LaTeX forum ⇒ GeneralProblem with formatting TOC - Appendix package Topic is solved

LaTeX specific issues not fitting into one of the other forums of this category.
ThesisDrama
Posts: 3
Joined: Mon Aug 06, 2018 9:59 am

Problem with formatting TOC - Appendix package

Postby ThesisDrama » Mon Aug 06, 2018 10:04 am

Hi all!

I am having trouble with one formatting option in the Appendix package. It shows me the appendices in the TOC but I want it to add "Appendix" right before each one of them. This would be possible just adding [titletoc] to the package, but somehow it is not working

Could it be that Appendix package has conflict with another package? How to fix it? I already compiled it quite some times in case that was the issue. I don't get any error while compiling, it simply doesn't work.

Thanks in advance!!

This is the code for my main thesis file (all the individual chapters are independent files). It is full of other packages, but I guess it is better to have the whole pic.

  1. \documentclass[a4paper,12pt]{report}
  2. \usepackage{libertine}
  3.  
  4.  
  5. %%%%%PACKAGES%%%%%
  6. \usepackage[titletoc]{appendix}
  7. \usepackage[nottoc]{tocbibind}%Adds Bibliography in TOC
  8. \usepackage[Glenn]{fncychap}
  9. \usepackage{textcomp} %For adding degree symbol as textdegree command%
  10. \usepackage{fullpage}
  11. \usepackage{color}
  12. \usepackage{booktabs}
  13. \usepackage{fancyhdr}
  14. \usepackage{indentfirst} %Sets indent in first line paragraphs
  15.  
  16. \usepackage{graphicx}
  17. \graphicspath{{"path for my files"}}
  18.  
  19. \usepackage{textcomp} %for unit symbols%
  20.  
  21. \usepackage[bookmarks]{hyperref}
  22. \usepackage{floatrow}
  23. \floatsetup[table]{capposition=top}
  24. \usepackage{booktabs, multicol, multirow}
  25. \usepackage{flafter}
  26. \usepackage[labelfont=bf, font=footnotesize, labelsep=endash]{caption}
  27. \usepackage{subcaption}
  28.  
  29.  
  30. %%%%%NOMENCLATURE
  31. \usepackage[intoc]{nomencl}
  32. \usepackage{nomencl}
  33. \renewcommand{\nomname}{List of abbreviations}
  34. \setlength{\nomitemsep}{-\parsep}
  35. \newcommand{\abv}[2]{\nomenclature{#1}{#2}}
  36. %%%%%%%%%%%%%%%%%%
  37.  
  38.  
  39. %%%%%STYLES%%%%%%
  40. \pagestyle{fancy} %Style of the header%
  41. \fancyhf{}
  42. \lhead{\leftmark}
  43. \cfoot{\thepage}
  44. \setlength{\headsep}{20pt} %Sets space below header. Should be included in fancyhdr but it was not%
  45. \linespread{1.3}%interlineado 1.3 es 1.5 real%
  46. \bibliographystyle{abbrv}
  47.  
  48. %%%%%%%%%%%%%%%%%
  49.  
  50. %%%%%OWN COMMANDS%%%%%%
  51. \newcommand*\apos{\textquotesingle}
  52. \newcommand{\phys}{\textit{Whatever term}} %Set term%
  53. \newcommand{\etal}{\textit{et.~al.}} %et al.%
  54. \newcommand{\note}[1]{\color{red}(#1!)\color{black}} %Red color note%
  55. \newcommand{\missref}{\note{[REF]}} %Red REF absence%
  56. \newcommand{\todo}[1]{\textcolor{blue}{[Todo: #1]}} %Blue reminder%
  57.  
  58. %%%%%%%%%%%%%%%%%%%%%%%
  59.  
  60. \makenomenclature
  61. \begin{document}
  62.  
  63.  
  64.  
  65.  
  66.  
  67. \tableofcontents
  68. \cleardoublepage
  69. \listoffigures
  70. \cleardoublepage
  71. \listoftables
  72.  
  73. \clearpage
  74. \markboth{\nomname}{\nomname}
  75. \printnomenclature[3cm]
  76.  
  77. \chapter{Main Text}\newpage\cleardoublepage
  78. \chapter{Other Chapter}\newpage\cleardoublepage
  79.  
  80. \renewcommand{\tocbibname}{REFERENCES}
  81. \bibliography{bib/References}\newpage\cleardoublepage
  82.  
  83. %%APPENDICES%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  84.  
  85. \appendix
  86. \chapter{First Appendix}\newpage\cleardoublepage
  87. \chapter{Second Appendix}\newpage\cleardoublepage
  88.  
  89. \end{document}

User avatar
Stefan Kottwitz
Site Admin
Posts: 9104
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Mon Aug 06, 2018 1:23 pm

Welcome to the forum!

Instead of the simple \appendix command, use the appendices environment:

  1. %\appendix
  2. \begin{appendices}
  3. \chapter{First Appendix}
  4. \chapter{Second Appendix}
  5. \end{appendices}


appendix.png
appendix.png (18.39 KiB) Viewed 938 times


Stefan
Site admin

ThesisDrama
Posts: 3
Joined: Mon Aug 06, 2018 9:59 am

Postby ThesisDrama » Tue Aug 07, 2018 10:00 am

Thanks Stefan! I will try that. How could I integrate the appendices environment with my appendix files as /input? (So to avoid including all the stuff from those within my "master" file)

Thanks a lot!!

User avatar
Stefan Kottwitz
Site Admin
Posts: 9104
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Sat Aug 11, 2018 12:41 pm

You could include chapters by \include{chapterfilename}. That is ok with label and references, and starts a new page for each chapter.

Furthermore, you can use \input{filename}. In this file, you could write your appendix commands, also the \include commands. \input is like if it's typed in the mail file (\include in contrast, has some logic, such as starting a new page). That's why I use \input for all except single chapters.

Stefan
Site admin

ThesisDrama
Posts: 3
Joined: Mon Aug 06, 2018 9:59 am

Postby ThesisDrama » Tue Aug 14, 2018 10:06 am

Thanks for the help! It was very useful :)


Return to “General”

Who is online

Users browsing this forum: No registered users and 9 guests