
패키지 의 \label
내부 환경을 사용하고 가져오는 경우 다음 MNWE에 대한 오류가 발생합니다.align
amsmath
cleveref
microtype
\documentclass[11pt]{scrbook}
\usepackage{amsmath}
\usepackage{cleveref}
\usepackage{microtype}
\begin{document}
\begin{align}
\label{eq1}
1 < 2
\end{align}
\end{document}
실행하면 다음 오류가 발생합니다.
$ lualatex test.tex
[...]
! Use of \label doesn't match its definition.
<argument> \label {
eq1} 1 < 2
l.10 \end{align}
이는 LuaLaTeX에서만 발생하는 문제인 것 같습니다. pdfLaTeX와 XeLaTeX 모두에서 잘 작동합니다. 또한 align에서는 작동하지만 align에서는 작동하지 \begin{equation}
않습니다.
답변1
대답을 시도한 후에는 cleveref
로드되어야 한다는 것입니다.~ 후에 microtype
. 따라서 예를 다음과 같이 변경합니다.
\documentclass[11pt]{scrbook}
\usepackage{amsmath}
\usepackage{microtype}
\usepackage{cleveref}
\begin{document}
\begin{align}
\label{eq1}
1 < 2
\end{align}
\end{document}
잘 작동합니다.
편집하다:
실제로 문제는 세 가지 패키지의 조합인 것 같습니다. 주문이 다르기 때문입니다(또한 하나의 패키지에 cleveref
포함되어 있음).~ 전에 microtype
) 어떤 일.
amsmath
→cleveref
→microtype
: 그렇죠아니다일하다amsmath
→microtype
→cleveref
:공장cleveref
→amsmath
→microtype
:공장cleveref
→microtype
→amsmath
:공장microtype
→amsmath
→cleveref
:공장microtype
→cleveref
→amsmath
:공장
결론:모두하지만하나의 로딩 순서는 잘 작동하며 이것을 정확히 사용한 것은 "행운"이었습니다.