# Split Appendix title over two lines

For my PhD thesis I have started using LaTeX a while ago. I am using Overleaf. I have learned a lot already, but I am not successful in trying to get the appendices to look a certain way.

• How can I have the section number (Appendix A.1) on the first line, and the title (Title) on the next?
• I have added the word Appendix to the numbering. How can I fix the overlap between the number and the title in the ToC?

In the chapters the text in the headings is all caps, but not in the appendices.

• How do I change the text in the heading to all caps?

.

\documentclass[10pt,twoside,openright]{book}
\usepackage{geometry}
\geometry{
vmarginratio=7:5,
hmarginratio=1:1,
papersize={170mm,240mm},
total={130mm,190mm}
}

\usepackage[T1]{fontenc}

% package voor de laatste versie van het standaard lettertype
\usepackage{lmodern}
\renewcommand{\familydefault}{\sfdefault}

\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{lipsum}

\begin{document}

\frontmatter

\tableofcontents

\mainmatter
\chapter{Introduction}
\lipsum[1-4]
\section{This is how we do it}
\lipsum[1-4]

\chapter{Results}
\lipsum[1-5]

\appendix
\renewcommand{\thesection}{Appendix \Alph{chapter}.\arabic{section}}
\renewcommand\chaptermark[1]{\markboth{\appendixname~\thechapter}{}}

\chapter{Appendices for Chapter 1}

Here we present two subappendices that correctly show the Appendix A thumb mark.

\cleardoublepage

\section{Title}
\thispagestyle{plain}
\lipsum[1-8]

\cleardoublepage

\section{Another title}
\thispagestyle{plain}
\lipsum[1-8]

\end{document}

• Welcome to TeX.SE. – Mico Jan 27 '19 at 0:06

How can I have the section number (Appendix A.1) on the first line, and the title (Title) on the next?

I would actually like to discourage you from inserting a line break between the sectioning header ("Appendix A.1") and the associated section text. Given that the section numbers and section headers are typeset on the same line everywhere else in the document, your readers might find it strange (if not outright distracting) to come across a line break between the (now augmented) section "number" and the section title itself.

The suggestions below show how to insert the prefix "Appendix" before the section number.

I have added the word Appendix to the numbering. How can I fix the overlap between the number and the title in the ToC?

I suggest that you delete (or comment out) the instruction

\renewcommand{\thesection}{Appendix \Alph{chapter}.\arabic{section}}


and that you insert the following code immediately after the \appendix instruction:

\makeatletter
\def\@seccntformat#1{\@ifundefined{#1@cntformat}%
{\csname #1@cntformat\endcsname}}%  enable individual control
\makeatother


This solution not only takes care of the overlap issue in the table of contents, it also makes creating cross-references to the appendix sections straightforward. Note that this solution does not insert the string \appendixname in the title of contents entries; this is deliberate, since readers should be able to figure out easily that the section entries belong to Appendix A (or some other numbered appendix).

In the chapters the text in the headings is all caps, but not in the appendices. How do I change the text in the heading to all caps?

I suggest you change

\renewcommand\chaptermark[1]{\markboth{\appendixname~\thechapter}{}}


to

\renewcommand\chaptermark[1]{\markboth{\MakeUppercase{\appendixname}~\thechapter}{}}


A final comment: Latin Modern Sans is frequently not regarded as sans serif font suitable to large amounts of running text. To load a Helvetica clone, just insert the instruction

\usepackage{helvet}


before running \renewcommand{\familydefault}{\sfdefault}.

\documentclass[10pt,twoside,openright]{book}
\usepackage{geometry}
\geometry{
vmarginratio=7:5,
hmarginratio=1:1,
papersize={170mm,240mm},
total={130mm,190mm}
}

\usepackage[T1]{fontenc}

\usepackage[dutch]{babel} % ?

% package voor de laatste versie van het standaard lettertype
\usepackage{lmodern}
\usepackage{helvet}  % LM Sans isn't a very good font for running text
\renewcommand{\familydefault}{\sfdefault}

\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{lipsum}

\begin{document}

\frontmatter
\tableofcontents

\bigskip\noindent % just for this example
A cross-reference to appendix section \ref{sec:app:1}.

\mainmatter
\chapter{Introduction}
\lipsum[1-4]
\section{This is how we do it}
\lipsum[1-4]

\chapter{Results}
\lipsum[1-5]

\appendix
%\renewcommand{\thesection}{Appendix \Alph{chapter}.\arabic{section}}
\makeatletter
\def\@seccntformat#1{\@ifundefined{#1@cntformat}%
{\csname #1@cntformat\endcsname}}%  enable individual control
\makeatother

\renewcommand\chaptermark[1]{\markboth{\MakeUppercase{\appendixname}~\thechapter}{}}

\chapter{Appendices for Chapter 1}
Here we present two appendix sections which correctly show the Appendix~A'' thumb mark.

\cleardoublepage
\section{Title} \label{sec:app:1}
\thispagestyle{plain}
\lipsum[1-8]

\cleardoublepage
\section{Another title}
\thispagestyle{plain}
\lipsum[1-8]

\end{document}


Addendum to address the OP's follow-up question, about creating a line break between the appendix section number and the associated sectioning header. To achieve this objective, I suggest you (a) load the titlesec package in the preamble, (b) remove the code block

\makeatletter
\def\@seccntformat#1{\@ifundefined{#1@cntformat}%
{\csname #1@cntformat\endcsname}}%  enable individual control

and (c) insert the following instruction after \appendix:
\titleformat{\section}[display]{\normalfont\Large\bfseries}{%

• @Esther - About sans-serif fonts (other than either Helvetica or CM/LM Sans): Are you free to use LuaLaTeX or XeLaTeX? If so, you could use any and all sans serif text fonts that are installed on your computer, simply by loading the fontspec package and issuing a \setmainfont directive with a suitably chosen argument. – Mico Jan 28 '19 at 15:19