如何使用 overleaf 获取附录列表?

如何使用 overleaf 获取附录列表?

我需要有关 Overleaf 上附录的帮助;我正在使用 [论文模板][1] 我想使用 \listofappendices 列出附录,附录文件包含一个 pdf 文件,我试过其他答案,这个对我有用

\documentclass[twoside]{utmthesis}
%According to the new manual, should not mixed single-side with two-side printing
\usepackage{graphicx}
\usepackage{url} 
%\usepackage[pages=some]{background}
%\usepackage{lipsum}
\usepackage{pdflscape}
\usepackage{adjustbox}
\usepackage{booktabs, ltablex}
\usepackage{siunitx}
\DeclareSIUnit\dbm{\decibel{}m}
\DeclareSIUnit\mvrms{\milli\volt{}_{RMS}}
\usepackage{pdfpages}
\usepackage{colortbl}
\usepackage{float}
\usepackage{diagbox}
\usepackage{rotating}
\usepackage{dirtytalk}
\usepackage{stfloats}
\usepackage{hyperref}
%adding appendix 
\usepackage[titletoc]{appendix}
%ending appendix
%%% You MUST load the natbib package if you want to use author-date bibliography style. Also remember to change the bibliography style at the bottom of the .tex file.
% Comment natbib for citation by number
\usepackage{natbib}
\let\cite\citep
%adding stack exchange figure adjusmen%
\newcommand*{\MyIncludeGraphics}[2][]{%
\begin{adjustbox}{max size={\textwidth}{\textheight}}
    \includegraphics[#1]{#2}%
\end{adjustbox}
}
%ending 
%This is to make sure vertical spacing non-stretchable
\raggedbottom






\begin{appendices}

\includepdf[pages=-,pagecommand=\thispagestyle{plain}]{figs/appendix.pdf}
\end{appendices}

但附录标题没有出现在 \listofappendices 中。

我是乳胶新手,所以如果你能帮助我,我真的很感激这里的.cls 文件

 [P18] Appendices
% ----------------------------------------
% Copied from book.cls:
% \appendix  - to indicate the start of appendix section
  \renewcommand{\appendix}{%
  \renewcommand{\theHchapter}{A\arabic{chapter}}
  \@appendixtrue
  \settocdepth{chapter}
  \setcounter{chapter}{0}%
  \setcounter{section}{0}%
  \gdef\@chapapp{\appendixname}%
  \gdef\thechapter{\@Alph\c@chapter}
  \phantomsection
  \addtocontents{toc}{\protect\vspace{\@twolinespacing}}
  %\addtocontents{toc}{\protect\noindent\MakeUppercase{\bf\appendicesname}}
  %\addtocontents{toc}{\protect\addvspace{\@twolinespacing}}%
}
```
```
 [P15] List of Appendices
% ----------------------------------------
\newcommand{\listofappendices}{
  \clearpage
  \section*{\centering\listappendixname}
  \phantomsection 
  \label{pre:listofappendices}
  \vspace{23pt}
  \setstretch{1.435} 
  \addcontentsline{toc}{chapter}{\hspace{\toc@tab@a}\MakeUppercase{\listappendixname}} 
  \@showpagenumber

  \begingroup
    \setlength{\parindent}{0pt}
    \begin{center}
      \bfseries\MakeUppercase{%
        \appendixnum@colname\hfill%
        \title@colname\hfill\hspace{2.5em}%
        \page@colname}
      \linebreak
    \end{center}  
  \endgroup
  \setstretch{1.435}
  \vspace{-17pt}
  \@starttoc{loapp}
}


```


  


  [1]: http://%20https://www.overleaf.com/latex/templates/universiti-teknologi-malaysia-thesis-template/vhhykxgsxcym

答案1

此模板中没有

\begin{appendices}

\includepdf[pages=-,pagecommand=\thispagestyle{plain}]{figs/appendix.pdf}
\end{appendices}

对于附录,您可以使用

\appendix

(仅一次——并且它已经在模板中了。

然后对于每个附录:

\chapter{Title of appendix}
Contents of appendix.

现在你的问题是由于模板使用listofpublications错误造成的。

代替

\listofpublications

 Paper 1
 Paper 2

它应该使用

\begin{listofpublications}
 Paper 1
 Paper 2
\end{listofpublications}

如果您进行此更改,附录将出现在附录列表中。(如果附录位于原始模板中的出版物列表之前,则不会显示此错误,但它仍然是一个错误。

相关内容