表と図を別々に番号付けした結合リストですか?

表と図を別々に番号付けした結合リストですか?

図と表を一緒にリストにしたいのですが、この質問ただし、図と表には別の番号体系が必要です。たとえば、

図表一覧

  • 図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}

ムウェ

\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} 

出力

ここに画像の説明を入力してください

関連情報