[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Definition of @heading for LaTeX messes with vertical spacing
From: |
Gavin Smith |
Subject: |
Definition of @heading for LaTeX messes with vertical spacing |
Date: |
Sat, 3 Sep 2022 21:24:07 +0100 |
I found bad vertical spacing with the @heading-like commands in the
LaTeX output. It can be seen in the Tips appendix in texinfo.texi, or
here is a minimal example:
\input texinfo
@chapter One
@noindent test test test test test
@example
a
b
c
@end example
@heading Heading
@noindent test test test test test
@example
a
b
c
@end example
@bye
Note in the image that there is no space before the second @example.
I found that it was due to the group used in the output of @heading:
\newcommand{\GNUTexinfonopagebreakheading}[2]{{\let\clearpage\relax
\let\cleardoublepage\relax \let\thispagestyle\GNUTexinfoplaceholder #1{#2}}}
% ...
\GNUTexinfonopagebreakheading{\section*}{{Heading}}
If I replace the \GNUTexinfonopagebreakheading line with simply
{\section*{Heading}}
the output is the same. However, if it is simply
\section*{Heading}
the vertical spacing is good. I suspect that some redefinition of vertical
spacing is happening inside \section* and the group characters are stopping
this.
Evidently the attempt here to hook into LaTeX internals isn't reliable.
I don't have a fix for this.
I'm going to remove the \GNUTexinfonopagebreakheading uses for
@heading and below (keeping it for \chapheading and \majorheading), as
\section* doesn't cause a page break.
heading-spacing.png
Description: PNG image
- Definition of @heading for LaTeX messes with vertical spacing,
Gavin Smith <=