Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am having a problem where a longer \section title overlaps itself. I am using the memoir class and it's printed both at the beginning of the page and in the page itself (see screenshot), and in my case they overlap.

Anyone knows how to fix this?

enter image description here

share|improve this question
2  
You can use the optional argument of section[toc - header]{printed} or you can use the command \markboth to reduce the section title in the header. –  Marco Daniel May 13 '11 at 16:03
3  
your titles are too long I guess. You should try to rethink them. I do not think a title is supposed to be a full sentence. –  pluton May 13 '11 at 16:21
2  
minimal example please –  daleif May 13 '11 at 16:42
add comment

2 Answers

up vote 5 down vote accepted

Here's a minimal document that reproduces the problem mentioned:

\documentclass{memoir}
\usepackage{lipsum}

\begin{document}

\chapter{test with a really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really long title}
\newpage
\section{test}
\lipsum[1-30]

\end{document}

As Marco suggested in a comment, one possible solution would be to use the optional argument of the sectioning commands to prevent having excessively long headings:

\documentclass{memoir}
\usepackage{lipsum}

\begin{document}

\chapter[Title in headings and in ToC]{test with a really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really long title}
\newpage
\section{test}
\lipsum[1-30]

\end{document}

If, for some reason, you must mantain the long title in the heading (which I would not recommend for such long titles), then you can increase the length \headheight; however, this will produce really poor results in the pages not containing the long heading (too much white space at the top) and you will also have to modify the bottom margin. The following code illustrates the change of the length and the poor results obtained:

\documentclass{memoir}
\usepackage{lipsum}

\begin{document}

{
\setlength{\headheight}{9\onelineskip}

\chapter{test with a really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really really long title}
\newpage
\section{test}
\lipsum[1-30]
}

\end{document}

Note the curly braces I use in my example to keep the change local.

share|improve this answer
add comment

MWE, was easy. Your head height is too small, there should be a warning in your log file about this. Here is a MWE to fix it. I would use the optional header text suggested elsewhere.

\documentclass[a4paper]{memoir}
\setheadfoot{3\onelineskip}{\footskip}
\checkandfixthelayout
\begin{document}
\section{this is a verry very long header that has no meaning what so
ever but is jsut used to illustrate a point made in a posting online}
\end{document}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.