1. I would like to set a thicker header line

2. I want to have a larger margin from the top and the bottom of the page.

3. I have a problem with the header, which takes the name of my section which is two sentences long - it doesn't look good. How can I avoid that without changing the section title?

I don't know if this is all you need to answer my questions:

\usepackage[T1]{fontenc}
\usepackage[ansinew]{inputenc}
\usepackage[danish, english]{babel}
\usepackage{graphicx}
\usepackage{microtype}
\usepackage{lmodern}
\usepackage{lipsum}
\usepackage[intoc]{nomencl} % Nomenclature package
\usepackage{color}
\usepackage{times}
\usepackage{textcomp}
\usepackage{hyperref}
\usepackage{textpos}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage{ifthen}
\usepackage{mathtools}
\newcommand{\HRule}{\rule{\textwidth}{3mm}}

% Enable subfigures
\newsubfloat{figure}

% Path to graphics
\graphicspath{{gfx/}}

\everymath{\displaystyle}

% Avoid a warning
\pdfminorversion=5

% Define layout dimensions

\setlrmarginsandblock{35mm}{25mm}{*}
\setulmarginsandblock{30mm}{30mm}{*}
\checkandfixthelayout
\OnehalfSpacing


I hope you can help me. Thank you very much.

• Could you provide a minimal working example (MWE), that includes your document class and a section title of the mentioned length? – DG' Sep 8 '13 at 21:03
• Welcome to TeX.SX! To make it easier for us to help you your example code should be a compilable LaTeX document that actually reproduces the problem. Please see here how you can set up such a minimal working example (MWE). – mafp Sep 8 '13 at 21:18
• \everymath{\displaystyle} is a wrong thing to do. If you are upset because limits in inline sums or similar constructions are not above and below the symbol, you shouldn't be. Compare $\sum$ and $\displaystyle\sum$ (without that declaration, of course), and you'll understand why. – egreg Sep 8 '13 at 22:27

1. Change the value used in the third argument of \makeheadrule; you are currently using 0.3pt so you could use a bigger value; in the example below I used 1pt; this value is perhaps too big, but it was used just for the example; you can choose the value that best suits your needs.

2. Increase the values used in the second and third argument for \setulmarginsandblock; in my example I used \setulmarginsandblock{90mm}{90mm}{*} just for illustration.

3. The sectional unit commands in memoir offer you two optional arguments to control the information in the ToC and in the headers, so you can say

\section[Title in ToC][Title in Header]{Title in document}


or, if only one of the optional arguments is used,

\section[Title in ToC and Header]{Title in document}


A complete example:

\documentclass{memoir}
\usepackage{lipsum}

\setlrmarginsandblock{35mm}{25mm}{*}
\setulmarginsandblock{90mm}{90mm}{*}
\checkandfixthelayout
\OnehalfSpacing

\begin{document}

\tableofcontents
\chapter{Test chapter}
\section[Title in ToC][Title in Header]{A section with a really long title; it is so long that it will span several lines}
\lipsum[1-10]

\end{document}


An image of one of the resulting pages:

Not related to your question, nut the rule you defined with

\newcommand{\HRule}{\rule{\textwidth}{3mm}}


will produce a really thick rule; perhaps you would like to reduce the second argument of \rule?

• Such a thick line may be good for obituaries, not for pretty documents. – egreg Sep 8 '13 at 22:09
• @egreg hehe! Yes, thats' why I added "this value is too big, but it was used just for the example" in my answer. – Gonzalo Medina Sep 8 '13 at 22:16
• And, if 2pt is too big (and it is), 3mm is incredibly huge, because it's about 8.5pt. – egreg Sep 8 '13 at 22:24
• @egreg in fact, I was really using 3pt! I decided to go for 1pt so not to offend anybody's eyes; I also made a warning about the 3mm in \HRule. – Gonzalo Medina Sep 8 '13 at 22:34
• Thank you very much! I still don't know how to make the title in the header smaller. Should I add: [Title in Header] next to each section title? – Sarah Sep 9 '13 at 15:47