
다음과 같이 그림과 표의 목록을 함께 갖고 싶습니다.이 질문단, 그림과 표는 여전히 별도의 번호 매기기 시스템을 사용해야 합니다. 예를 들어,
그림 및 표 목록
- 그림 1: 사진
- 표 1: 숫자
- 그림 2: 다른 사진
어떻게 할 수 있습니까?
답변1
프리앰블에 다음 줄을 추가하면 그림 정보를 표와 같은 위치에 저장할 수 있으므로 동시에 출력할 수 있습니다.
\makeatletter
\def\ext@figure{lot}
\makeatother
\renewcommand*\listtablename{List of Figures and Tables}
다음은 최소한의 작업 예입니다.
\documentclass{article}
\makeatletter
\def\ext@figure{lot}
\makeatother
\renewcommand*\listtablename{List of Figures and Tables}
\begin{document}
\listoftables
\clearpage
\begin{figure}
\caption{A picture}
\end{figure}
\begin{table}
\caption{Numbers}
\end{table}
\begin{figure}
\caption{Another picture}
\end{figure}
\end{document}
산출
해당 목록을 예제와 정확히 동일하게 하려면 패키지를 로드 tocloft
하고 프리앰블에 다음 줄을 추가하세요.
\renewcommand{\cftfigpresnum}{Figure~}
\renewcommand{\cftfigaftersnum}{:}
\setlength{\cftfignumwidth}{5.5em}
\renewcommand{\cfttabpresnum}{Table~}
\renewcommand{\cfttabaftersnum}{:}
\setlength{\cfttabnumwidth}{5.5em}
MWE
\documentclass{article}
\usepackage{tocloft}
\makeatletter
\def\ext@figure{lot}
\makeatother
\renewcommand*\listtablename{List of Figures and Tables}
\renewcommand{\cftfigpresnum}{Figure~}
\renewcommand{\cftfigaftersnum}{:}
\setlength{\cftfignumwidth}{5.5em}
\renewcommand{\cfttabpresnum}{Table~}
\renewcommand{\cfttabaftersnum}{:}
\setlength{\cfttabnumwidth}{5.5em}
\begin{document}
\listoftables
\clearpage
\begin{figure}
\caption{A picture}
\end{figure}
\begin{table}
\caption{Numbers}
\end{table}
\begin{figure}
\caption{Another picture}
\end{figure}
\end{document}
산출