2

I have some chapters (appendices) which have a very long title. The header which indicate the title of these chapter hence run out of the page. Is there any way to solve that?

An example code:

\documentclass[11pt,titlepage,oneside,openany]{book}
\usepackage{times}
\usepackage{multirow}
\usepackage{lscape}
\usepackage{graphicx}
\usepackage{latexsym}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage[hyphens]{url}
\usepackage{listings}
\usepackage{lstautogobble}
\usepackage{rotating}


\lstnewenvironment{test}[1][]{%
    \lstset{basicstyle=\ttfamily,
    autogobble=true,#1
    }%
}{}



\usepackage{ntheorem}
\usepackage[authoryear,round]{natbib}
%
%% \usepackage{paralist}
\usepackage{tabularx}
%
%% this packaes are useful for nice algorithms
\usepackage{algorithm}
%\usepackage{algorithmic}



\usepackage{footnote}
\makesavenoteenv{tabular}
%\makesavenoteenv{table}


\begin{document}

\chapter[Examples of AAAAAAAAA BBBBBB and CCCCCCCCCCCC DDDDDDDDDDDDDDDD EEEE FFFFF]{Examples of AAAAAAAAA BBBBBB and CCCCCCCCCCCC DDDDDDDDDDDDDDDD EEEE FFFFF}
\label{cha:appendixH}



\end{document}
4
  • 1
    This code is not running out of the page@Aqqqq
    – Biki Teron
    Commented May 24, 2017 at 7:33
  • 1
    The optional command of chapter (in square brackets) is designed to provide a short title to show in the table of contents and headers. Is there any specific reason to provide the full title there? why not write \chapter[Various examples]{Examples of AAAAAAAAA BBBBBB and CCCCCCCCCCCC DDDDDDDDDDDDDDDD EEEE FFFFF}?
    – Wiebke
    Commented May 24, 2017 at 7:34
  • @BikiTeron it is in the headers. Put some blindtext to have the header on the next page ...
    – Wiebke
    Commented May 24, 2017 at 7:35
  • @Wiebke Thank you. I was not aware of that.
    – Aqqqq
    Commented May 24, 2017 at 7:40

1 Answer 1

2

You can use the optional commands to provide a short title to show in the relevant listings. Simply use \chapter[Short title]{Very long and complicated title that will break the line in TOC and run over the page in headers}. Note that this also works for all other headings (part, section, subsection).

It also works for the \caption in the same way. You can provide a short caption (maybe more like a headline as well) to show in the list of figures and list of tables.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .