帶有單獨編號的表格和圖形的組合清單?

帶有單獨編號的表格和圖形的組合清單?

我想要一個包含數字和表格的列表,如下所示這個問題,但數字和表格仍應具有單獨的編號系統。例如,最終

圖片和表格清單

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

輸出

在此輸入影像描述

相關內容