bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: heading spacing.


From: Karl Berry
Subject: Re: heading spacing.
Date: Sun, 21 Sep 2003 16:21:51 -0400

    > all headings are followed by a line of vertical space. 

Thanks for mentioning this (and thanks to Stepan for posting the
patches).  After doing some experiments, I tend to agree.

I made a slightly different change, making it so the space below is now
half the space above.  The space above also had an extra \parskip added
to it in the past; I took this out, and compensated for the \parskip in
the glue below.

What do you think?

*** texinfo.tex.~1.86.~ Sun Sep 21 11:23:57 2003
--- texinfo.tex Sun Sep 21 13:13:02 2003
***************
*** 4074,4087 ****
  % 
  \def\sectionheading#1#2#3#4{%
    {%
-     \expandafter\advance\csname #2headingskip\endcsname by \parskip
-     \csname #2headingbreak\endcsname
-   }%
-   {%
      % Switch to the right set of fonts.
      \csname #2fonts\endcsname \rm
      %
!     % Only insert the separating space if we have a section number.
      \def\sectionlevel{#2}%
      \def\temptype{#3}%
      %
--- 4074,4086 ----
  % 
  \def\sectionheading#1#2#3#4{%
    {%
      % Switch to the right set of fonts.
      \csname #2fonts\endcsname \rm
      %
!     % Insert space above the heading.
!     \csname #2headingbreak\endcsname
!     %
!     % Only insert the space after the number if we have a section number.
      \def\sectionlevel{#2}%
      \def\temptype{#3}%
      %
***************
*** 4117,4130 ****
            \hangindent=\wd0  % zero if no section number
            \unhbox0 #1}%
    }%
!   % Add extra space after the heading -- either a line space or a
!   % paragraph space, whichever is more.  (Some people like to set
!   % \parskip to large values for some reason.)  Don't allow stretch, though.
!   \ifdim\parskip>\normalbaselineskip
!     \kern\parskip
!   \else
!     \kern\normalbaselineskip
!   \fi
    \nobreak
  }
  
--- 4116,4131 ----
            \hangindent=\wd0  % zero if no section number
            \unhbox0 #1}%
    }%
!   % Add extra space after the heading -- half of whatever came above it.
!   \skip0 = \csname #2headingskip\endcsname
!   \divide\skip0 by 2  % .5<glue> eliminates stretch and shrink
!   \vskip\skip0
!   %
!   % We'll almost certainly start a paragraph next, so don't let that
!   % glue accumulate.
!   \nobreak\vskip-\parskip
!   %
!   % Attempt to avoid a break at whatever comes next.
    \nobreak
  }
  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]