
私は、答え\pod
が を使用して再定義される場合\mathchoice
、ステートメント\if@display
... \else
...\fi
は の最初の 2 つのオプションに使用されます\mathchoice
。 はどういう意味ですか、また、ステートメント... ...@display
を使用する必要がある (または推奨される) のはいつですか?\if@display
\else
\fi
答え1
\if@display
は単一のトークンであり、\if
@display
amsmath では次のように定義および文書化されています。
% The straightforward \cs{ifinner} test to see if the current math
% context is non-display, fails if, for instance, we are typesetting
% a multiline display within an \cs{halign}, with the pieces going
% into constructions like
% \begin{verbatim}
% $\displaystyle...$
% \end{verbatim}
% So we need a better test to find out if we are `in a display'. We
% therefore create \cs{if@display}.
%
% \begin{macrocode}
\newif\if@display
\everydisplay\@xp{\the\everydisplay \@displaytrue}
% \end{macrocode}
基本的にこれは amsmath の内部構造であり、他の場所での使用は想定されていませんが、通常の構造の代替として注意して使用される場合もあります\mathchoice
。