# Align vertical beginning of text after chapters [memoir]

I have a memoir document, and want that beginning of text block after chapters headings are on the same height. Independent of chapter title length, or section title.

MWE:

\documentclass{memoir}
\begin{document}
\chapter{Chapter with number}
Text starts here

\chapter{Chapter with number and title exceeds one line}
Text starts here

\chapter{Chapter with number and title exceeds one line}
\section{and section below}
Text starts here

\chapter*{Chapter without number}
Text starts here

\end{document}

Try to illustrate my idea with picture:

Probably I should wrap chapter and section inside some environment. I've tried minipage, but it breaks chapter title spacing.

• I know that this is extreme but if all chapter titles are single lines except for one which takes up five lines, do you really want all those empty spaces between the single line titles and the following text? Nov 14, 2021 at 20:14

## 2 Answers

Using minipage is a good option. If it is not working well, you can set the paragraph inside a \parbox[<pos>][<height>]{<width>}{<stuff>} where <pos> is set to top, is fixed at \linewidth and you specify something in <height> that accommodates all the paragraphs.

Here is an example:

\documentclass{memoir}

\usepackage{lipsum}

\setlength{\parindent}{0pt}
\newlength{\parboxheight}
\setlength{\parboxheight}{25\baselineskip}

\begin{document}

\parbox[t][\parboxheight]{\linewidth}{%
\strut
\chapter{Chapter with number}
\strut
}

\lipsum[1]

\clearpage

\parbox[t][\parboxheight]{\linewidth}{%
\strut
\chapter{Chapter with number and title exceeds one line}
\strut
}

\lipsum[1]

\clearpage

\parbox[t][\parboxheight]{\linewidth}{%
\strut
\chapter{Chapter with number and title exceeds one line}
\section{and section below}
\strut
}

\lipsum[1]

\clearpage

\parbox[t][\parboxheight]{\linewidth}{%
\strut
\chapter*{Chapter without number}
\strut
}

\lipsum[1]

\end{document}
• You can accept this example.
– mmr
Nov 15, 2021 at 13:28
• Yep) accepted. Just took my time to test. Thanks it works Nov 16, 2021 at 9:17

If you remain stick with memoir class, then you can use titlesec that has a package option called [rigidchapters] which does what you want.

Example:

\documentclass{memoir}
\usepackage[rigidchapters]{titlesec}

\titleformat{\chapter}[display]{\bfseries\Large\setlength{\parskip}{0 mm}}{Chapter \ \thechapter}{
\dimexpr25mm-\baselineskip}{}[]
\titlespacing{\chapter}{0 mm}{0 mm}{38 mm}
\setlength{\parindent}{0 mm}

\begin{document}
\chapter{Chapter with number}

Text starts here

\chapter{Chapter with number and title exceeds one line}

Text starts here

\chapter{Chapter with number and title exceeds one line}
\section{and section below}

Text starts here

\chapter*{Chapter without number}

Text starts here

\end{document}

Note: \section inherits from chapter. So if you want sections to include in the spacing, you should do hard code for it.

Another point is: You can use another class like scrbook which gives you same result.

\documentclass{scrbook}

\RedeclareSectionCommand[afterskip=35mm]{chapter}

\makeatletter
\renewcommand*{\chapterlinesformat}[3]{%
\parbox[t][0pt][t]{\linewidth}{\raggedchapter\@hangfrom{#2}{#3}}%
}
\makeatother

\begin{document}
\chapter{Chapter with number}

Text starts here

\chapter{Chapter with number and title exceeds one line}

Text starts here

\chapter{Chapter with number and title exceeds one line}
\section{and section below}

Text starts here

\chapter*{Chapter without number}

Text starts here

\end{document}
• Unfortunately,I already have hundreds of pages marked up with memoir, so it will be not an easy task to switch to titlesec or scrbook Nov 15, 2021 at 13:20