0

Take this example:

\documentclass[a4paper,12pt]{article}
\usepackage[a4paper,landscape,textwidth=50em,tmargin=24mm,bmargin=24mm]{geometry}
\usepackage{calc}
\usepackage[PunctStyle=plain,RubberPunctSkip=false,CJKglue=,CJKecglue=\hskip 4pt plus 20pt]{xeCJK}

\setlength{\parindent}{0pt}
\setlength{\parskip}{7pt}
\pagestyle{empty}

\begin{document}
天地玄黄宇宙洪荒\hrule
xxxxxxxxxxxxxxx\hrule
ddddddddddddddd\hrule
lglglglglglgllg\hrule
\^A\^O lglg\hrule
\LaTeX\hrule

\lineskiplimit=-\maxdimen

\vskip 20pt

天地玄黄宇宙洪荒\hrule
xxxxxxxxxxxxxxx\hrule
ddddddddddddddd\hrule
lglglglglglgllg\hrule
\^A\^O lglg\hrule
\LaTeX\hrule

\end{document}

I want to have a constant line height, but I only got this result:

enter image description here

I came across Automatically prevent extra line spacing because of math and the \lineskiplimit=-\maxdimen method does not play well in my case.

1 Answer 1

1

\hrule (which is a TeX primitive, not really a LaTeX command) is forcing inconsistent spacing. See the last paragraph:

...\glue(\parskip) 0.0
...\hbox(9.372+2.25598)x600.0, glue set 504.0fil []
...\penalty 150
...\glue(\baselineskip) 7.07202
...\hbox(5.172+0.0)x600.0, glue set 506.94fil []
...\glue(\baselineskip) 6.172
...\hbox(8.328+0.11998)x600.0, glue set 502.08fil []
...\glue(\baselineskip) 6.05202
...\hbox(8.328+2.45999)x600.0, glue set 532.728fil []
...\glue(\baselineskip) 1.636
...\hbox(10.404+2.45999)x600.0, glue set 560.172fil []
...\penalty 150
...\glue(\baselineskip) 3.84401
...\hbox(8.196+2.586)x600.0, glue set 570.62437fil []

even \baselineskip for all lines.

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage[a4paper,landscape,textwidth=50em,tmargin=24mm,bmargin=24mm]{geometry}
\usepackage{calc}
\usepackage[PunctStyle=plain,RubberPunctSkip=false,CJKglue=,CJKecglue=\hskip 4pt plus 20pt]{xeCJK}

\setlength{\parindent}{0pt}
\setlength{\parskip}{7pt}
\pagestyle{empty}

\showoutput
\showboxdepth=3
\begin{document}
天地玄黄宇宙洪荒\hrule
xxxxxxxxxxxxxxx\hrule
ddddddddddddddd\hrule
lglglglglglgllg\hrule
\^A\^O lglg\hrule
\LaTeX\hrule

\lineskiplimit=-\maxdimen

\vskip 20pt


天地玄黄宇宙洪荒\hrule
xxxxxxxxxxxxxxx\hrule
ddddddddddddddd\hrule
lglglglglglgllg\hrule
\^A\^O lglg\hrule
\LaTeX\hrule

\vskip 20pt

天地玄黄宇宙洪荒\\
xxxxxxxxxxxxxxx\\
ddddddddddddddd\\
lglglglglglgllg\\
\^A\^O lglg\\
\LaTeX

\end{document}
2
  • 1
    Note I would not use \lineskiplimit=-\maxdimen in a real document, it came from an old answer of mine here asking how to preserve baseline even if large text over-prints Instead use a normal setting but ensure \baselineskip is large enough for your text. Commented Aug 1, 2022 at 9:28
  • Great answer. Thank you. Commented Aug 3, 2022 at 11:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .