GeneralProblem with formatting TOC - Appendix package

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

Problem with formatting TOC - Appendix package

Post by ThesisDrama »

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.

Code: Select all

\documentclass[a4paper,12pt]{report}
\usepackage{libertine}


%%%%%PACKAGES%%%%%
\usepackage[titletoc]{appendix}
\usepackage[nottoc]{tocbibind}%Adds Bibliography in TOC
\usepackage[Glenn]{fncychap}
\usepackage{textcomp} %For adding degree symbol as textdegree command%
\usepackage{fullpage}
\usepackage{color}
\usepackage{booktabs}
\usepackage{fancyhdr}
\usepackage{indentfirst} %Sets indent in first line paragraphs

\usepackage{graphicx}
    \graphicspath{{"path for my files"}}

\usepackage{textcomp} %for unit symbols%

\usepackage[bookmarks]{hyperref}
\usepackage{floatrow}
    \floatsetup[table]{capposition=top}
\usepackage{booktabs, multicol, multirow}
\usepackage{flafter}
\usepackage[labelfont=bf, font=footnotesize, labelsep=endash]{caption}
    \usepackage{subcaption}


%%%%%NOMENCLATURE
\usepackage[intoc]{nomencl}
\usepackage{nomencl}
\renewcommand{\nomname}{List of abbreviations}
\setlength{\nomitemsep}{-\parsep}
\newcommand{\abv}[2]{\nomenclature{#1}{#2}}
%%%%%%%%%%%%%%%%%%


%%%%%STYLES%%%%%%
\pagestyle{fancy} %Style of the header%
    \fancyhf{}
        \lhead{\leftmark}
        \cfoot{\thepage}
        \setlength{\headsep}{20pt} %Sets space below header. Should be included in fancyhdr but it was not%
\linespread{1.3}%interlineado 1.3 es 1.5 real%
\bibliographystyle{abbrv}

%%%%%%%%%%%%%%%%%

%%%%%OWN COMMANDS%%%%%%
\newcommand*\apos{\textquotesingle}
\newcommand{\phys}{\textit{Whatever term}} %Set term%
\newcommand{\etal}{\textit{et.~al.}} %et al.%
\newcommand{\note}[1]{\color{red}(#1!)\color{black}} %Red color note%
\newcommand{\missref}{\note{[REF]}} %Red REF absence%
\newcommand{\todo}[1]{\textcolor{blue}{[Todo: #1]}} %Blue reminder%

%%%%%%%%%%%%%%%%%%%%%%%

\makenomenclature
\begin{document}





\tableofcontents
\cleardoublepage
\listoffigures
\cleardoublepage
\listoftables

\clearpage
\markboth{\nomname}{\nomname}
\printnomenclature[3cm] 

\chapter{Main Text}\newpage\cleardoublepage
\chapter{Other Chapter}\newpage\cleardoublepage

\renewcommand{\tocbibname}{REFERENCES}
\bibliography{bib/References}\newpage\cleardoublepage

%%APPENDICES%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\appendix
\chapter{First Appendix}\newpage\cleardoublepage
\chapter{Second Appendix}\newpage\cleardoublepage

\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Stefan Kottwitz
Site Admin
Posts: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Problem with formatting TOC - Appendix package

Post by Stefan Kottwitz »

Welcome to the forum!

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

Code: Select all

%\appendix
\begin{appendices}
\chapter{First Appendix}
\chapter{Second Appendix}
\end{appendices}
appendix.png
appendix.png (18.39 KiB) Viewed 13632 times
Stefan
LaTeX.org admin
ThesisDrama
Posts: 3
Joined: Mon Aug 06, 2018 9:59 am

Problem with formatting TOC - Appendix package

Post by ThesisDrama »

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: 10345
Joined: Mon Mar 10, 2008 9:44 pm

Problem with formatting TOC - Appendix package

Post by Stefan Kottwitz »

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
LaTeX.org admin
ThesisDrama
Posts: 3
Joined: Mon Aug 06, 2018 9:59 am

Problem with formatting TOC - Appendix package

Post by ThesisDrama »

Thanks for the help! It was very useful :)
Post Reply