TransWikia.com

How to get a list of appendices using overleaf?

TeX - LaTeX Asked by Ayub Suleiman on July 15, 2021

I need help with the appendix on Overleaf; I am using [Thesis Template][1]
i want to list the appendices using listofappendices the appandix file contain a pdf file
i have tried other answers this one worked for me

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}
DeclareSIUnitdbm{decibel{}m}
DeclareSIUnitmvrms{millivolt{}_{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}
letcitecitep
%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}

but the appandix heading is not showing up in the listofappendices.

I am new to latex so if you can help me I really appreciate it
here the .cls file

 [P18] Appendices
% ----------------------------------------
% Copied from book.cls:
% appendix  - to indicate the start of appendix section
  renewcommand{appendix}{%
  renewcommand{theHchapter}{Aarabic{chapter}}
  @appendixtrue
  settocdepth{chapter}
  setcounter{chapter}{0}%
  setcounter{section}{0}%
  gdef@chapapp{appendixname}%
  gdefthechapter{@Alphc@chapter}
  phantomsection
  addtocontents{toc}{protectvspace{@twolinespacing}}
  %addtocontents{toc}{protectnoindentMakeUppercase{bfappendicesname}}
  %addtocontents{toc}{protectaddvspace{@twolinespacing}}%
}
```
```
 [P15] List of Appendices
% ----------------------------------------
newcommand{listofappendices}{
  clearpage
  section*{centeringlistappendixname}
  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}
      bfseriesMakeUppercase{%
        appendixnum@colnamehfill%
        title@colnamehfillhspace{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

One Answer

There is no such thing in this template as

begin{appendices}

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

For an appendix you use

appendix

(only once -- and it is already in the template.

And then for each appendix:

chapter{Title of appendix}
Contents of appendix.

Now your problem is caused because the template uses listofpublications wrong.

Instead of

listofpublications

 Paper 1
 Paper 2

it should use

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

If you make this change, the appendix will appear in the list of appendices. (If the appendices are before the list of publications as in the original template, this error will not show, but it is still an error.

Answered by Pieter van Oostrum on July 15, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP