1

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: enter image description here

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

1
  • 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 2

1

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}
2
  • 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
1

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}
1
  • 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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