0

I am in the final stage of polishing my book in LyX. In one paragraph I noticed an uneven line spacing. When I copy the whole paragraph to a different section, the line spacing is evened, even if both paragraphs are set to begin a new page (see the two images in comparison). To match the publisher's requirements, there is single line spacing throughout the document (no setspace). I am happy to give any more details, but I currently have no clue what could cause this. What values should I check?

enter image description here

enter image description here

\baselineskip seems to remain, as it should, constant, as I try to demonstrate with these images:

enter image description here enter image description here

Could the problem be a quote that follows the bugged paragraph? I redefined quote in the preamble with:

\renewenvironment{quote}{\fontsize{9.8pt}{11.4pt}\selectfont
\list{}{\leftmargin0.5cm
\rightmargin0cm}
\item\relax}
{\endlist}
4
  • can you show a generated latex document with just that paragraph? You should be able to get accented U and superscript 1031 without affecting the line spacing Mar 29 at 19:43
  • the problem appears to be that the \baselineskip is too small in the first case, note the top of the f in fast is touching the g above. Do you have \small {\normalsize some text} anywhere? that is the usual cause of this effect. Mar 29 at 19:45
  • Yes, throughout the document (and in the second image shown) I can swap U and Ü, only in the corrupted first image shown, swapping leads to a different line spacing. There is no \small in this paragraph. What else causes \baselineskip (unintentionally) to change?
    – johnny7
    Mar 29 at 19:59
  • if you show no code hard to say, footnotes, captions something is changing the baselineskip somwhere. Mar 29 at 20:01

1 Answer 1

2

It looks like you have something equivalent to

enter image description here

Where in the right hand box (like your first image) the normal size text is set on a too-small baseline so the letters are too close together in most lines and accented letters or descenders cause the line spacing to change to avoid over-printing.

\documentclass{article}

\usepackage[T1]{fontenc}

\begin{document}

\parbox[t]{3cm}{
Some German text 
Some German text 
Some german text with  \"U and g
Some German text 
Some German text 
Some German text with  g
Some german text with  \"U and g
}
\quad
\parbox[t]{3cm}{\footnotesize{\normalsize
Some German text 
Some German text 
Some german text with  \"U and g
Some German text 
Some German text 
Some German text with  g
Some german text with  \"U and g}
}
\end{document}

The usual cause is as shown here having a size change command without including the end of paragraph in its scope, that causes the font size to change but the paragraph settings revert at the } so this is setting \normalsize text on a baselin spacing set for \footnotesize.


The above guess was essentially right the exmple finally provided shows the form was

enter image description here

\documentclass{article}

\usepackage[T1]{fontenc}

\newenvironment{oops}{\fontsize{9.8pt}{11.4pt}\selectfont}{}
\begin{document}

\parbox[t]{3cm}{
Some German text 
Some German text 
Some german text with  \"U and g
Some German text 
Some German text 
Some German text with  g
Some german text with  \"U and g
}
\quad
\parbox[t]{3cm}{
Some German text 
Some German text 
Some german text with  \"U and g
Some German text 
Some German text 
Some German text with  g
Some german text with  \"U and g
\begin{oops}
  
\end{oops}
}
\end{document}

Here the second paragraph is using normal size text but does not end until inside the oops enviornment at which point \baselineskip is too small.

The solution is to make sure the paragraph ends before the size change, either by putting \par before it in the definition or (better in your real case) changing the font in the \list setup so the \list handler can take control of he paragraph end.

20
  • The paragraph itself does not seem to be the problem because I could copy it somewhere else and it worked out fine (it also doesn't have anything specific to it). So it must be the position of the paragraph in my document? I just can't figure out what it is, there is no change of font size. \the\baselineskip shows a constant value in this paragraph.
    – johnny7
    Mar 29 at 20:34
  • So I think it might be connected to \flushbottom. I have globally set \setlength\parskip{0pt} because I can't accept any spaces between (indented) paragraphs. \skip\footins is set fairly flexible with plus and minus, however, and there are footnotes on practically every page so I thought I'd be on the safe side. I noticed because when I removed all footnotes on this page, the line spacing got screwed up. What else can I offer LaTeX to stretch to get a flush bottom?
    – johnny7
    Mar 29 at 21:06
  • @johnny7 I would say it is highly unlikely to be related to \flushbottom as I said in the initial comment, it would be easy to debug if you provided an example. As you have not we have to guess, but I would say that 999 times out of 1000 uneven linspacing is caused by the issue I describe here, so if we have to guss, I'd guess this. Mar 29 at 21:29
  • 1
    @johnny7 whn you say \the\baselineskip is constant, do you mean it is same in the first image as the second? that certainly does not look to be the case. the lines are much closer together in the first case Mar 29 at 21:53
  • 1
    @johnny7 no latex will not do that, not by default (unless you have made baselineskip flexible (don't do that) you have cut out whatever it is that is giving the bad setting, you need to cut out in smaller chuncks checking it's still showing, or simply stick \the\baslineskip everywhere and see where it changes. Mar 29 at 22:28

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.