0

I'm using the memoir document class, and I just spent like one hour to debug a mysterious title page spacing issue: my title page was sometimes contained in a single page, sometimes the end was pushed in a new pages... I realized that if I put:

\OnehalfSpacing

then flushleft does not always have exactly the same spacing as if I do:

\OnehalfSpacing
\checkandfixthelayout

Without/With (I added a red line for reference):

enter image description hereenter image description here

Note that the bug is not always visible, here I need to mix A and Q letters to make it visible... Here the spacing is quite small, but in my title template (that uses SingleSpace/flushleft/adjustwidth...) the difference is bigger and can move a whole paragraph.

What I don't understand is that the documentation does not mention anything regarding \checkandfixthelayout when using line spacing commands. Is it that they just forget it, or is there something more subtle that I'm missing? Is the spacing I obtain with \checkandfixthelayout the correct spacing?

MWE:

\documentclass[a4paper,10pt,leqno,openbib]{memoir}

\checkandfixthelayout{} % I put this one for safety, to ensure that the previous layout is fixed
\OnehalfSpacing{}
%\checkandfixthelayout{} % Try uncommenting the line to see the spacing difference

\usepackage{float}
\begin{document}
\begin{flushleft}
AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ

AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ

AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQQQQQQQQQ AAAAAAAAAAQQ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memoir will adapt the textheight to ensure that a integer number of lines fit in a page. You could use \checkandfixthelayout[fixed] to avoid this. Commented Jun 14, 2021 at 20:38
  • 1
    the main thing check and fix does is make sure that the text height is compatible with baselineskip, so naturally if you change the baseline skip this affects the text height Commented Jun 14, 2021 at 21:23
  • Ok thanks @UlrikeFischer and @david-carlisle ! It's documented in the \checkandfixthelayout part, but since there is no mention to \checkandfixthelayout in the \OnehalfSpacing part I was thinking that it was not necessary to run it in that case. Thanks!
    – tobiasBora
    Commented Jun 15, 2021 at 7:24

0

You must log in to answer this question.

Browse other questions tagged .