Page Layouthidding appendix title in the document only

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
ezor
Posts: 2
Joined: Wed Aug 24, 2016 2:54 pm

hidding appendix title in the document only

Post by ezor »

Hi everyone,

I would like to put a title for all the appendices in the TOC namely something like
A : first title
B : second
but I don't want this title in my document (since it takes to much space and the appendices are supposed to contain large figures)
In my document, I just need to have
appendix A
some pictures
appendix B
some others
I've already read a lot of topics that deal with that, using
\addcontentsline{toc}{chapter}{TITLE} and \addtocontents{toc}{\protect\setcounter{tocdepth}{-1}} but it doesn't work.

For the moment, my code looks like

\appendix
\chapter{}
...
\chapter{}
...

Consequently, I have "Appendix A ...Appendix B" in the document (which is perfect) but only "A" and "B" in the TOC (because I have not defined any title)

Thanks in advance (and sorry for my poor english)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Stefan Kottwitz
Site Admin
Posts: 10290
Joined: Mon Mar 10, 2008 9:44 pm

Re: hidding appendix title in the document only

Post by Stefan Kottwitz »

Hi Ezor,

welcome to the forum!

What document class are you using? Perhaps post your document preamble here. This makes settings clear (KOMA-Script classes are a bit different to base classes) and we may have further tips regarding settings or packages.

Stefan
LaTeX.org admin
ezor
Posts: 2
Joined: Wed Aug 24, 2016 2:54 pm

hidding appendix title in the document only

Post by ezor »

I'm writing a thesis with the report class.

I copy-paste you some of the packages I use as well as the preamble

Code: Select all

\documentclass[a4paper, titlepage, 12pt, oneside]{report}

\usepackage[top=2.5cm,bottom=2.5cm]{geometry}    
\usepackage{verbatim}         
\usepackage[utf8]{inputenc}   
\usepackage[T1]{fontenc}      
\usepackage{gensymb}          
\usepackage[english]{babel}   
\usepackage{graphicx}         
\usepackage{rotating}         
\usepackage{indentfirst}    

\newcommand{\up}[1]{\textsuperscript{#1}}   
\newcommand{\dw}[1]{\textsubscript{#1}}

\begin{document}
...
\input{abstract}
\input{acknowledgements}
  \tableofcontents
  \listoffigures
...

\input{Part1}
\input{Part2}
...
\clearpage
\appendix
\input{appendix1}
\input{appendix2}

\end{document}
each appendix looks like

Code: Select all

\newpage
\newgeometry{top=-1cm,bottom=1.6cm}
\chapter{}
\label{label}
...
 \restoregeometry
Hoping it helps you!
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

hidding appendix title in the document only

Post by Johannes_B »

I guess you could want something like the following, but i am not sure as the example you posted is very unclear.

Code: Select all

\documentclass[a4paper, titlepage, 12pt, oneside]{report}

\usepackage[top=2.5cm,bottom=2.5cm]{geometry}    
\usepackage{verbatim}        
\usepackage[utf8]{inputenc}  
\usepackage[T1]{fontenc}      
\usepackage{gensymb}          
\usepackage[english]{babel}  
\usepackage{graphicx}        
\usepackage{rotating}        
\usepackage{indentfirst}    

\newcommand{\up}[1]{\textsuperscript{#1}}  
\newcommand{\dw}[1]{\textsubscript{#1}}

\begin{document}
\tableofcontents
see appendix~\ref{wombat} and~\ref{capybara}
\appendix
\refstepcounter{chapter}
\addcontentsline{toc}{chapter}{\numberline{\thechapter}Wombat}
\label{wombat}

\refstepcounter{chapter}
\addcontentsline{toc}{chapter}{\numberline{\thechapter}Capybara}
\label{capybara}
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply