
aligned
환경이 자동으로 이루어지나요 \displaystyle
? 이 테스트는 다음과 같은 사실을 나타내는 것 같습니다.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\(\begin{aligned}
\int_{0}^{\pi}f(x)dx &= \frac{1}{\pi} \\
\end{aligned}\)
\(\int_{0}^{\pi}f(x)dx = \frac{1}{\pi} \)
\end{document}
또한 amsmath.sty
다음 코드가 포함되어 있습니다.
\newcommand{\start@aligned}[2]{%
\RIfM@\else
\nonmatherr@{\begin{\@currenvir}}%
\fi
\savecolumn@ % Assumption: called inside a group
\alignedspace@left
\if #1t\vtop \else \if#1b \vbox \else \vcenter \fi \fi \bgroup
\maxfields@#2\relax
\ifnum\maxfields@>\m@ne
\multiply\maxfields@\tw@
\let\math@cr@@@\math@cr@@@alignedat
\alignsep@\z@skip
\else
\let\math@cr@@@\math@cr@@@aligned
\alignsep@\minalignsep
\fi
\Let@ \chardef\dspbrk@context\@ne
\default@tag
\spread@equation % no-op if already called
\global\column@\z@
\ialign\bgroup
&\column@plus
\hfil
\strut@
$\m@th\displaystyle{##}$%
\tabskip\z@skip
&\column@plus
$\m@th\displaystyle{{}##}$%
\hfil
\tabskip\alignsep@
\crcr
}
불행하게도 저는 tex 해커가 아니기 때문에 확신할 수는 없지만 매크로 정의에는 \displaystyle
. 그러나 문서에서 이 정보를 추적할 수 없었습니다. 섹션 3(amsmath 사용자 안내서)에는 표시된 방정식이 나열되어 있지만 aligned
그 중 하나는 아닙니다.
주어진 수학 환경이 다음과 같은지 판단할 수 있는 좋은 방법이 있습니까 \displaystyle
? 일반적으로 인라인 수학의 기본값은 비표시로 가정했지만 환경 aligned
은 \(\)
또는 $$
.
답변1
코드에는 조각이 포함되어 있습니다.
\ialign\bgroup % spaces before and after & included for clarity
& \hfil$\m@th\displaystyle{#}$ & $\m@th\displaystyle{{}#}$\hfil \crcr
% \____________ ____________/ \_____________ _____________/
% \/ \/
% first column specification second column specification
요점과 관련 없는 내용을 많이 삭제했습니다. 또한 명확성을 위해 앰퍼샌드 주위에 공백을 추가했지만 &
실제로는 그 앞의 공백이 중요합니다. 이중화는 중첩 정의에 대한 일반적인 TeX 규칙에서 비롯되기 때문에 ##
단일로 대체했습니다 . 당분간 #
첫 번째는 잊어버리세요 . 는 수평 정렬을 위한 TeX 프리미티브인 의 초기화된 형식입니다 (열 간 거리를 0으로 설정합니다). 첫 번째 열에는 사양이 있습니다.&
\ialign
\halign
\hfil $\m@th\displaystyle{#}$
이는 "오른쪽 정렬, 표시 스타일 수학"을 의미합니다. 패키지 표기법을 사용하면 array
이는 다음 형식의 열 지정자가 됩니다.
>{$\m@th\displaystyle\bgroup}r<{\egroup$}
두 번째 열에는 다음이 포함됩니다.
$\m@th\displaystyle{{}#}$\hfil
이는 "왼쪽 정렬, 표시 스타일 수학, 빈 \mathord
원자로 시작"(올바른 간격에 중요)을 의미합니다.
&
내가 처음에 무시하라고 말한 줄의 첫 번째 부분은 어떻습니까 ? 이는 TeX 구성입니다. TeXBook에서 인용 (p. 241)
&
프리앰블은 종종 주기적인 구조를 가지며 템플릿 중 하나 바로 앞에 추가 항목을 넣으면 TeX는 프리앰블을 표시된 템플릿에\cr
도달할 때 다시 시작하는 무한 시퀀스로 간주합니다.
따라서 오른쪽 정렬, 왼쪽 정렬 열의 순서가 무한정 반복될 수 있습니다. 따라서 환경은 기본적으로 표시 스타일 수학 모드의 aligned
반복 열이 있는 표 형식에 해당합니다 .rlrlrlrl...