如何更改第二個圖形清單的標題

如何更改第二個圖形清單的標題

對於我的文檔,我有一個文本正文中包含的圖形的圖形列表。這基本上是按照計劃進行的。但是,我還需要為附錄中出現的數據提供單獨的圖表清單。這兩個附錄必須在第一頁上標有“[附錄]圖列表”,並在隨後的每一頁上標有“[附錄]圖列表(續)”。

為了更改標題,已將命令輸入到樣式檔案中:

\newcommand\listfigurename{LIST OF FIGURES}
\newcommand\listfigurecont{LIST OF FIGURES (Continued)}

我嘗試透過使用標題包來改善正文和附錄數字最終出現在同一列表中的問題:

\DeclareCaptionType{myfigure}[Figure]

然後像這樣輸入我的附錄數字:

\begin{myfigure}[htpb]
\centering
\psfragscanon
\psfrag{Batman}[][]{Primary}
\psfrag{Roof Disp.}[][]{$Roof Disp. (in)$}
\psfrag{Roof Acc.}[][]{$Roof Acc. (g)$}
\psfrag{Robin}[][]{Secondary}
\psfrag{Time (s)}[][]{$Time (s)$}
\includegraphics[width=0.75\textwidth]{RDCHY034.eps}
\caption{Mean roof displacement response, Chi Chi CHY034 motion, founded on dense sand.}
\vspace{0.3cm}
\includegraphics[width=0.75\textwidth]{RACHY034.eps}
\caption{Mean roof acceleration response, Chi Chi CHY034 motion, founded on dense sand.}
\end{myfigure}

這些數字看起來不錯。除了清單標題之外的所有內容都已設定。

這是我用於圖形和表格的程式碼:

\clearpage
\tableofcontents
\clearpage
\listoffigures 
\clearpage
\listoftables
\clearpage
\renewcommand\listfigurename{LIST OF APPENDIX FIGURES}
\renewcommand\listfigurecont{LIST OF APPENDIX FIGURES (Continued)}
\listofmyfigures 
%\renewcommand\listfigurename{LIST OF APPENDIX FIGURES}
%\renewcommand\listfigurecont{LIST OF APPENDIX FIGURES (Continued)}
\clearpage

結果有點奇怪。如果我只有一頁附錄圖,標題是“附錄圖列表”,沒問題。如果有不只一頁的附錄圖,第一頁寫著“我的圖列表”,任何中間頁都正確地寫著“附錄圖列表(續)”,最後一頁寫著“列表列表(繼續)。 」

我嘗試過各種各樣的事情,但似乎都沒有改變任何事情。任何幫助,將不勝感激。這幾乎是我在 Word 中輸入附錄數字清單並將其滑入文件之前的最後手段。

答案1

不需要定義一種新的浮動類型。這是一種可能性:我定義了一個\listofappfigures與 完全類似的命令\listoffigures,但使用外部文件.laf作為圖形和不同的名稱。訣竅只是.lof.laf附錄開頭的數字擴展名從 改為,這可以透過重新定義 來完成\ext@figure。此外,\@chapter還進行了修補,以便每個章節都會向新清單添加一點垂直間距(與預設 LoF 一樣)。 afterpage 套件用於建立第二頁的標題;你所要做的就是說

\addtocontents{laf}{\protect\afterpage{\bfseries\listappfigurecont\par\vskip20pt}}

附錄中的某處,在前幾個數字之後。

\documentclass{book}
\usepackage{afterpage}
\usepackage{xpatch}

\newcommand\listappfigurename{LIST OF APPENDIX FIGURES}
\newcommand\listappfigurecont{{\LARGE LIST OF FIGURES (Continued)}}

\makeatletter
\xpatchcmd{\@chapter}{\addtocontents{lof}{\protect\addvspace{10\p@}}}{\addtocontents{lof}{\protect\addvspace{10\p@}}\addtocontents{laf}{\protect\addvspace{10\p@}}}{}{}

\newcommand\listofappfigures{%
  \renewcommand\listfigurename{\listappfigurename}
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapter*{\listfigurename}%
      \@mkboth{\MakeUppercase\listfigurename}%
              {\MakeUppercase\listfigurename}%
    \@starttoc{laf}%
    \if@restonecol\twocolumn\fi
    }
\makeatother

\newcommand\testfig{%
  \begin{figure}\caption{Caption for the figure~\thefigure}\end{figure}\clearpage}

\begin{document}

\listoffigures
\listofappfigures

\chapter{Some Chapter}
\testfig
\testfig
\testfig

\chapter{Some Chapter}
\testfig
\testfig

\appendix
\makeatletter
\renewcommand\ext@figure{laf}
\makeatother

\chapter{Some Appendix}
\testfig\testfig\testfig\testfig\testfig
\testfig\testfig\testfig\testfig\testfig
\addtocontents{laf}{\protect\afterpage{\bfseries\listappfigurecont\par\vskip20pt}}
\testfig\testfig\testfig\testfig\testfig
\testfig\testfig\testfig\testfig\testfig
\chapter{Some Other Appendix}
\testfig\testfig\testfig\testfig\testfig
\testfig\testfig\testfig\testfig\testfig
\testfig\testfig\testfig\testfig\testfig
\testfig\testfig\testfig\testfig\testfig
\testfig\testfig\testfig\testfig\testfig

\end{document}

標準 LoF 的圖像:

在此輸入影像描述

新的圖表清單的圖像顯示了第二頁中的連續標題:

在此輸入影像描述

相關內容