
정렬된 환경에서 이상한 동작을 발견했습니다.
\begin{equation}\label{eq:direct_limit}
\begin{aligned}
[x] + [y] & := [\eta_{ik}(x) + \eta_{jk}(y)],\\
[x] \cdot r & := [x \cdot r].
\end{aligned}
\end{equation}
이것을 컴파일하면 방정식의 첫 번째 "[x]"가 누락됩니다. 이유를 아는 사람 있나요?
답변1
은 [x]
의 선택적 인수로 잘못 해석됩니다 aligned
. 다음을 사용할 수 있습니다 \relax
.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}\label{eq:direct_limit}
\begin{aligned}\relax
[x] + [y] & := [\eta_{ik}(x) + \eta_{jk}(y)],\\ [x] \cdot r & := [x \cdot r].
\end{aligned}
\end{equation}
\end{document}
대신 다음을 :=
사용할 수 있습니다 .\coloneqq
mathtools
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{equation}\label{eq:direct_limit}
\begin{aligned}\relax
[x] + [y] & \coloneqq [\eta_{ik}(x) + \eta_{jk}(y)],\\
[x] \cdot r & \coloneqq [x \cdot r].
\end{aligned}
\end{equation}
\end{document}
답변2
의 선택적 인수로 추가되는 것을 {}
방지하려면 빈 값을 사용하세요 .[x]
aligned
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}\label{eq:direct_limit}
\begin{aligned}
{}[x] + [y] & := [\eta_{ik}(x) + \eta_{jk}(y)],\\
[x] \cdot r & := [x \cdot r].
\end{aligned}
\end{equation}
\end{document}
답변3
간단한 해결책은 패키지를 사용하여 명령 및 일부 환경 mathtools
의 문제를 해결하는 것입니다 .\\
amsmath
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{equation}\label{eq:direct_limit}
\begin{aligned}
[x] + [y] & := [\eta_{ik}(x) + \eta_{jk}(y)],\\
[x] \cdot r & := [x \cdot r].
\end{aligned}
\end{equation}
\end{document}