(unicode-math 또는 newtxmath) + \ newcommand {\ nmodels} {\ not \ models} + $\not\models$ = 실속
입력 공급
\RequirePackage{ifthen}
\RequirePackage{ifxetex,ifluatex}
\newif\ifxetexorluatex
\ifxetex
\xetexorluatextrue
\else
\ifluatex
\xetexorluatextrue
\else
\xetexorluatexfalse
\fi
\fi
\documentclass{standalone}
\ifxetexorluatex
\usepackage{unicode-math}
\else
\usepackage{newtxmath}
\fi
\newcommand{\nmodels}{\not\models}%%% or \providecommand, or \providecommand* instead of \newcommand; the effect is the same.
\begin{document}
\(\nmodels\) %%% or \(\not\models\); the effect is the same.
\end{document}
중 임의의 pdflatex, xelatex또는 lualatex원인 무한 루프. 음, XeLaTeX + unicode-math의 경우 \ nin이 정의되면 무한 루프에 들어 갑니까? \notin대신을 사용할 수 \not\in있지만 \models( 의 모양이 아니라) 모양을 좋아하고 \vDash부정한 형태를 원하고 그것을 부르고 싶다면 \nmodels어떻게합니까? 의 형태는 \nvDash그래서,이 모두를 사용하는 것이 좋습니다 아니라, 다른 \models과 \nvDash같은 문서에. (전체) MnSymbols를 사용하는 것은 의문의 여지가 없습니다. 여전히 버그가있을 수 있으며 (약 10 년 전에 사용을 중단했다는 것을 알고 있음), 상당히 많은 기호를 변경하고 NewTX 글꼴과 충돌 할 수 있습니다.
답변
의 현재 구현 \not은 기본적 pdflatex으로에서 (Xe | Lua) LaTeX with unicode-math.
더 정확하게 \not는 다음 토큰을 가져 와서 \foo먼저 \notfoo정의 되었는지 확인합니다 . 테스트가 성공하면 \notfoo이 사용됩니다. 그렇지 않으면 다음 검사 \nfoo는 정의 여부 입니다. 다시이 테스트가 성공하면 \nfoo이 사용됩니다. 그렇지 않으면 LaTeX가 \n@tch@r\foo합니다.
이제 무한 루프가 시작된 이유를 알 수 있습니다. \nmodelsdoes \not\models; \nmodels정의 되었기 때문에 사용됩니다 \not\models.
당신은 적용하여 문제를 방지 할 수 있습니다 \not에 \relax(둘 바라고 \notrelax도하는 \nrelax가능성이있는 정의되지 않은).
\documentclass{standalone}
\usepackage{iftex}
\iftutex
\usepackage{unicode-math}
\else
\usepackage{newtxmath}
\fi
\newcommand{\nmodels}{\not\relax\models}%
\begin{document}
\(\nmodels\)
\(\not\models\)
\end{document}
어쨌든 이것은 부정하는 특히 좋은 방법이 아닙니다 \models. 다음과 비교하십시오.
\documentclass[border=4]{standalone}
\usepackage{iftex}
\iftutex
\usepackage{unicode-math}
\else
\usepackage{newtxmath}
\fi
\usepackage{centernot}
\newcommand{\nmodels}{\centernot\models}%
\begin{document}
\(\nmodels\)
\(\not\models\)
\end{document}
의 정의 \not여부를 조회하여 반으로 너무 영리 점점 \nmodels또는 \notmodels이미 존재.
이름을 변경하면 작동합니다.
\documentclass{standalone}
\usepackage{iftex}
\iftutex
\usepackage{unicode-math}
\else
\usepackage{newtxmath}
\fi
%\newcommand{\aintmodel}%
%{\mathrel{\ooalign{\(\models\)\cr\hidewidth\(\mathslash\)\hidewidth}}}
\newcommand\aintmodel{\not\models}
\begin{document}
\( \aintmodel \)
\end{document}
이 조회는 심볼이 사용될 때마다 수행되며의 정의 \not는 완전히 확장 가능하지 않으므로 \letor로 심볼을 정의 할 수 없으며 \edef이를 회피 할 수 없습니다 .
그러나 \ooalign대신 기호를 만들 수 있습니다 . (사용 /으로 newtxmath대신 \mathslash.)
분명히 unicode-math이제 접두사를 검색해야합니다 aint.
최신 정보
\not이름을 사용하지 않고 전화를 걸 수도 \models있으므로 조회를 방지 할 수 있습니다 . 예를 들면
\documentclass{standalone}
\usepackage{iftex}
\usepackage{unicode-math}
\newcommand\nmodels{\mathrel{\not\symbol{"22A7}}}
\begin{document}
\( \nmodels \)
\end{document}