
문서의 모든 방정식 목록을 생성하려고 합니다. 검색해 본 결과 thmtools
모든 정리 목록을 생성할 수 있는 를 사용하는 것이 좋은 해결책인 것 같았습니다(제가 맞다면). 내가 찾고 있는 것은 (다음 예에서 CheatSheet 장에서) 모든 등식 정리의 내용이 포함된 목록입니다(LaTeX 형식 사용).
$Some_{Lowtext}$ (1)
$Some^{Hightext}$ (2)
최소(아님) 작업 예:
\documentclass[a4paper,12pt]{report}
\usepackage{theorem}
\newtheorem{equate}{}
\usepackage{thmtools}
\renewcommand{\listtheoremname}{List of Equations}
\begin{document}
\tableofcontents
\newpage
\chapter{Name of Chapter}
\section{Name of Section}
\subsection{Name of SubSection}
sometext
\begin{equate}
$Some_{Lowtext}$
\end{equate}
Some other Text
\begin{equate}
$Some^{Hightext}$
\end{equate}
And some more
\chapter{CheatSheet}
\listoftheorems
\end{document}
이로 인해 다음과 같은 오류가 발생합니다(라인 24는 다음 라인입니다 \listoftheorems
).
test.tex:24: Missing \endcsname inserted. []
test.tex:24: Too many }'s. []
이것이 그러한 목록을 생성하는 방법인지, 내 오류를 어떻게 해결할 수 있는지 궁금합니다.
답변1
declaretheorem
대신 사용\newtheorem
및 패키지 theorem
는 thmtools
정리 환경을 정의하기 위해 서로 다른 메커니즘을 사용합니다. Frank Mittelbach의 theorem
패키지는 LaTeX 커널 \newtheorem
매크로를 사용하는 반면 Ulrich Schwarz의 패키지는thmtools
패키지는 \declaretheorem
매크로를 제공합니다.
패키지 thmtools
는 또한\listoftheorems
하지만 후자는 로 선언된 정리 환경만 나열합니다 \declaretheorem
.~ 아니다단순히 \newtheorem
. 따라서 를 활용하려면 \listoftheorems
모든 정리를 thmtools
' 로 선언하고 명시적으로 \declaretheorem
사용하지 않아야 합니다 \newtheorem
.
\documentclass[a4paper,12pt]{report}
\usepackage{thmtools}
\declaretheorem{equate}
\renewcommand{\listtheoremname}{List of Equations}
\begin{document}
\begin{equate}[Low text]
$Some_{Lowtext}$
\end{equate}
Some other Text
\begin{equate}[High text]
$Some^{Hightext}$
\end{equate}
\listoftheorems
\end{document}
신고한 오류에 대한 자세한 내용
\declaretheorem
입력 파일에서 한 번도 사용되지 않으면 보고 \listoftheorems
하는 두 가지 오류가 생성됩니다. 다음은 문제를 재현하는 몇 가지 최소 코드입니다.
\documentclass{report}
\usepackage{thmtools}
%\declaretheorem{foo}
\begin{document}
\listoftheorems
\end{document}
위 코드의 세 번째 줄의 주석 처리를 제거하면 오류가 생성되지 않습니다. 제 생각에는 그러한 행동은 의도하지 않은 것이며 버그에 해당합니다. 아마도 작성자에게 이에 대한 알림이 전달되어야 할 것입니다.