mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2024-10-24 13:13:05 +00:00
(\centerchfplain): Rewrite to use \chfplain, and to
actually center. (\unnchfplain): Just call \chfplain. (\chfplain): Rewrite to be generally callable. (\centerparametersmaybe): Hook, a no-op except with @centerchap.
This commit is contained in:
parent
4e361d0f01
commit
b4db97478e
1 changed files with 24 additions and 19 deletions
43
texinfo.tex
43
texinfo.tex
|
@ -2943,33 +2943,35 @@ width0pt\relax} \fi
|
||||||
\global\let\unnumbchapmacro=\unnchfplain
|
\global\let\unnumbchapmacro=\unnchfplain
|
||||||
\global\let\centerchapmacro=\centerchfplain}
|
\global\let\centerchapmacro=\centerchfplain}
|
||||||
|
|
||||||
% #1 is the text, #2 the chapter number.
|
% Plain chapter opening.
|
||||||
\def\chfplain #1#2{%
|
% #1 is the text, #2 the chapter number or empty if unnumbered.
|
||||||
|
\def\chfplain#1#2{%
|
||||||
\pchapsepmacro
|
\pchapsepmacro
|
||||||
{%
|
{%
|
||||||
\chapfonts \rm
|
\chapfonts \rm
|
||||||
\setbox0 = \hbox{#2\enspace}%
|
\def\chapnum{#2}%
|
||||||
|
\setbox0 = \hbox{#2\ifx\chapnum\empty\else\enspace\fi}%
|
||||||
\vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
|
\vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
|
||||||
\hangindent = \wd0
|
\hangindent = \wd0 \centerparametersmaybe
|
||||||
\unhbox0 #1}%
|
\unhbox0 #1\par}%
|
||||||
}%
|
}%
|
||||||
\nobreak\bigskip % no page break after a chapter title
|
\nobreak\bigskip % no page break after a chapter title
|
||||||
\nobreak
|
\nobreak
|
||||||
}
|
}
|
||||||
|
|
||||||
\def\unnchfplain #1{%
|
% Plain opening for unnumbered.
|
||||||
\pchapsepmacro %
|
\def\unnchfplain#1{\chfplain{#1}{}}
|
||||||
{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
|
|
||||||
\parindent=0pt\raggedright
|
|
||||||
\rm #1\hfill}}\bigskip \par\penalty 10000 %
|
|
||||||
}
|
|
||||||
|
|
||||||
\def\centerchfplain #1{%
|
% @centerchap -- centered and unnumbered.
|
||||||
\pchapsepmacro %
|
\let\centerparametersmaybe = \relax
|
||||||
{\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
|
\def\centerchfplain#1{{%
|
||||||
\parindent=0pt
|
\def\centerparametersmaybe{%
|
||||||
{\rm #1}\hfill}}\bigskip \par\penalty 10000 %
|
\advance\rightskip by 3\rightskip
|
||||||
}
|
\leftskip = \rightskip
|
||||||
|
\parfillskip = 0pt
|
||||||
|
}%
|
||||||
|
\chfplain{#1}{}%
|
||||||
|
}}
|
||||||
|
|
||||||
\CHAPFplain % The default
|
\CHAPFplain % The default
|
||||||
|
|
||||||
|
@ -3025,10 +3027,13 @@ width0pt\relax} \fi
|
||||||
\csname #1headingbreak\endcsname
|
\csname #1headingbreak\endcsname
|
||||||
}%
|
}%
|
||||||
{%
|
{%
|
||||||
|
% Switch to the right set of fonts.
|
||||||
\csname #1fonts\endcsname \rm
|
\csname #1fonts\endcsname \rm
|
||||||
\def\secnum{#2}%
|
%
|
||||||
% Only insert the separating space if we have a section number.
|
% Only insert the separating space if we have a section number.
|
||||||
\setbox0 = \hbox{#2\ifx\secnum\empty\else \enspace \fi}%
|
\def\secnum{#2}%
|
||||||
|
\setbox0 = \hbox{#2\ifx\secnum\empty\else\enspace\fi}%
|
||||||
|
%
|
||||||
\vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
|
\vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
|
||||||
\hangindent = \wd0 % zero if no section number
|
\hangindent = \wd0 % zero if no section number
|
||||||
\unhbox0 #3}%
|
\unhbox0 #3}%
|
||||||
|
|
Loading…
Reference in a new issue