% Load plain if necessary, i.e., if running under initex.
\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
%
-\def\texinfoversion{2025-06-18.21}
+\def\texinfoversion{2025-10-25.20}
%
% Copyright 1985, 1986, 1988, 1990-2025 Free Software Foundation, Inc.
%
% \envdef\foo{...}
% \def\Efoo{...}
%
-% It's the responsibility of \envdef to insert \begingroup before the
-% actual body; @end closes the group after calling \Efoo. \envdef also
+% \envdef inserts \begingroup before the actual body; @end calls
+% \Efoo then closes the group with \endgroup. \envdef also
% defines \thisenv, so the current environment is known; @end checks
% whether the environment name matches. The \checkenv macro can also be
% used to check whether the current environment is the one expected.
}
\def\finishtitlepage{%
- \vskip4pt \hrule height 2pt width \hsize
+ \ifseenauthor \vskip4pt \else \vskip 0pt plus 1filll \fi
+ \hrule height 2pt width \hsize
\vskip\titlepagebottomglue
\finishedtitlepagetrue
}
\let\subtitlerm=\rmfont
\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
+\let\savedtitle\empty
+\let\savedsubtitlegroup\empty
+\let\savedauthorgroup\empty
+
\parseargdef\title{%
- \checkenv\titlepage
- \vbox{\titlefonts \raggedtitlesettings #1\par}%
- % print a rule at the page bottom also.
- \finishedtitlepagefalse
- \vskip4pt \hrule height 4pt width \hsize \vskip4pt
+ \expandafter\ifx\thisenv\documentinfo
+ \gdef\savedtitle{#1}%
+ \else
+ \checkenv\titlepage
+ \vbox{\titlefonts \raggedtitlesettings #1\par}%
+ % print a rule at the page bottom also.
+ \finishedtitlepagefalse
+ \vskip4pt \hrule height 4pt width \hsize \vskip4pt
+ \fi
}
\parseargdef\subtitle{%
- \checkenv\titlepage
- {\subtitlefont \rightline{#1}}%
+ \expandafter\ifx\thisenv\documentinfo
+ \ifx\savedsubtitlegroup\empty
+ \gdef\savedsubtitlegroup{\savedsubtitle{#1}}%
+ \else
+ \expandafter\gdef\expandafter\savedsubtitlegroup\expandafter{%
+ \savedsubtitlegroup\savedsubtitle{#1}}%
+ \fi
+ \else
+ \checkenv\titlepage
+ {\subtitlefont \rightline{#1}}%
+ \fi
}
% @author should come last, but may come many times.
% It can also be used inside @quotation.
%
\parseargdef\author{%
- \def\temp{\quotation}%
- \ifx\thisenv\temp
- \def\quotationauthor{#1}% printed in \Equotation.
+ \expandafter\ifx\thisenv\documentinfo
+ \ifx\savedauthorgroup\empty
+ \gdef\savedauthorgroup{\savedauthor{#1}}%
+ \else
+ \expandafter\gdef\expandafter\savedauthorgroup\expandafter{%
+ \savedauthorgroup\savedauthor{#1}}%
+ \fi
\else
- \checkenv\titlepage
- \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
- {\secfonts\rm \leftline{#1}}%
+ \def\temp{\quotation}%
+ \ifx\thisenv\temp
+ \def\quotationauthor{#1}% printed in \Equotation.
+ \else
+ \checkenv\titlepage
+ \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
+ {\secfonts\rm \leftline{#1}}%
+ \fi
\fi
}
+% @maketitle
+{\obeylines
+\gdef\maketitle{%
+\titlepage
+\ifx\savedtitle\empty\else
+ \title \savedtitle
+ \ifx\savedsubtitlegroup\empty\else
+ \savedsubtitlegroup
+\fi\fi
+\ifx\savedauthorgroup\empty\else
+ \savedauthorgroup
+\fi
+% start verso page if either copying or publication text is given
+\ifx\copyingtext\relax
+ \ifx\publicationtext\relax\else
+ \page \vskip 0pt plus 1filll
+ \fi
+\else
+ \page \vskip 0pt plus 1filll
+\fi
+\ifx\publicationtext\relax\else
+ \insertpublication
+ \sp 1
+\fi
+\ifx\copyingtext\relax\else
+ \insertcopying
+\fi
+\end titlepage
+}
+
+% \savedauthor{#1}, called with braces. output an @author line.
+\gdef\savedauthor#1{%
+\author#1
+}
+
+% \savedsubtitle{#1}, called with braces. output a @subtitle line.
+\gdef\savedsubtitle#1{%
+\subtitle#1
+}
+} % \obeylines
+
+% @documentinfo block
+\envdef\documentinfo{%
+}
+\def\Edocumentinfo{}%
+
% Set up page headings and footings.
% \raggedbottom in plain.tex hardcodes \topskip so override it
\catcode`\@=11
-\def\raggedbottom{\advance\topskip by 0pt plus60pt \r@ggedbottomtrue}
+\def\raggedbottom{\advance\topskip by 0pt plus30pt \r@ggedbottomtrue}
\catcode`\@=\other
% redefined for the two-volume lispref. We always output on
\def\contents{%
\startcontents{\putwordTOC}{\contentsmkdest}%
\ifxetex\xetexpreauxfile\fi
+ \penalty2 % mark beginning of contents
\openin 1 \tocreadfilename\space
\ifeof 1 \else
\findsecnowidths
% #3 - level of section (e.g "chap", "sec")
% #4 - page number
-% Parts, in the main contents. Replace the part number, which doesn't
-% exist, with an empty box. Let's hope all the numbers have the same width.
-% Also ignore the page number, which is conventionally not printed.
-\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}}
+% Parts, in the main contents. Ignore the page number, which is
+% conventionally not printed.
\def\partentry#1#2#3#4{%
+ \ifnum\lastpenalty = 2
+ % use less space if at very first entry of contents
+ \vskip 1\baselineskip plus .33\baselineskip minus .25\baselineskip
+ \else
+ \vskip 2\baselineskip plus .66\baselineskip minus .5\baselineskip
+ \fi
% Add stretch and a bonus for breaking the page before the part heading.
% This reduces the chance of the page being broken immediately after the
% part heading, before a following chapter heading.
- \vskip 0pt plus 5\baselineskip
+ \vskip 0pt plus 3\baselineskip
\penalty-300
- \vskip 0pt plus -5\baselineskip
- \dochapentry{#1}{\numeralbox}{#3}{}%
+ \vskip 0pt plus -3\baselineskip
+ \begingroup
+ \secfonts \rm
+ \entryinternal{#1}{}%
+ \endgroup
+ \afterpartentrytrue
}
+\newif\ifafterpartentry
%
% Parts, in the short toc.
\def\shortpartentry#1#2#3#4{%
\penalty-300
\vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip
- \shortchapentry{{\bf #1}}{\numeralbox}{}{}%
+ \tocentry{{\bf #1}}{}{}{}%
}
% Chapters, in the main contents.
% If the toc has to be broken over pages, we want it to be at chapters
% if at all possible; hence the \penalty.
\def\dochapentry#1#2#3#4{%
- \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
+ \ifafterpartentry
+ \afterpartentryfalse
+ \penalty5000
+ \else
+ \penalty-300
+ \fi
+ \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
\begingroup
% Move the page numbers slightly to the right
\advance\entryrightmargin by -0.05em
{\catcode`\ =\other
\gdef\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
}
+\let\copyingtext\relax
\def\insertcopying{%
\begingroup
\endgroup
}
+\def\publication{\checkenv{}\begingroup\macrobodyctxt\dopublication}
+{\catcode`\ =\other
+\gdef\dopublication#1@end publication{\endgroup\def\publicationtext{#1}}
+}
+\let\publicationtext\relax
+
+\def\insertpublication{%
+ \begingroup
+ \parindent = 0pt % paragraph indentation looks wrong on title page
+ \scanexp\publicationtext
+ \endgroup
+}
\message{defuns,}
% @defun etc.
% Auto-number footnotes. Otherwise like plain.
\gdef\footnote{%
\global\advance\footnoteno by \@ne
- \edef\thisfootno{$^{\the\footnoteno}$}%
+ %
+ % Output for the footnote marker. If we are immediately after another
+ % footnote, output a comma and small space first.
+ \edef\thisfootno{$^{\ifnum\lastpenalty=3 ,\mskip 1mu \fi\the\footnoteno}$}%
%
% In case the footnote comes at the end of a sentence, preserve the
% extra spacing after we do the footnote number.
%
% Remove inadvertent blank space before typesetting the footnote number.
\unskip
- \thisfootno\@sf
+ %
+ % \scriptspace is 0.5pt by default and gives excessive space before the
+ % comma if we have multiple footnote markers in a row.
+ \bgroup\scriptspace=0pt
+ \thisfootno\@sf
+ \egroup
\dofootnote
}%
-% Don't bother with the trickery in plain.tex to not require the
-% footnote text as a parameter. Our footnotes don't need to be so general.
-%
-% Oh yes, they do; otherwise, @ifset (and anything else that uses
-% \parseargline) fails inside footnotes because the tokens are fixed when
-% the footnote is read. --karl, 16nov96.
+% marker for immediately after a footnote marker
+\gdef\footnoteendmarker{\penalty3 }
+
+% Do not require the footnote text as a parameter; otherwise, @ifset
+% (and anything else that uses \parseargline) fails inside footnotes
+% because the tokens are fixed when the footnote is read.
%
\gdef\dofootnote{%
\insert\footins\bgroup
+ \aftergroup\footnoteendmarker
%
% Nested footnotes are not supported in TeX, that would take a lot
% more work. (\startsavinginserts does not suffice.)
% Hang the footnote text off the number. Use \everypar in case the
% footnote extends for more than one paragraph.
\everypar = {\hang}%
- \textindent{\thisfootno}%
+ \textindent{$^{\the\footnoteno}$}%
%
% Don't crash into the line above the footnote text. Since this
% expands into a box, it must come within the paragraph, lest it
% provide a place where TeX can split the footnote.
\footstrut
%
- % Invoke rest of plain TeX footnote routine.
+ % Eat opening brace and invoke rest of plain TeX footnote routine.
\futurelet\next\fo@t
}
}%end \catcode `\@=11
% node and anchor labels. And \xrdef uses it to construct the
% lists of floats.
%
- \edef\tmp{\noexpand\setref{\floatlabel}{Yfloat}%
+ \edef\tmp{\noexpand\setref{\noexpand\floatlabel}{Yfloat}%
{\floatmagic=\safefloattype}}%
\tmp
}%
\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{%
\openin 1 txi-#1.tex
\ifeof 1
- \errhelp = \nolanghelp
- \errmessage{Cannot read language file txi-#1.tex}%
+ \def\lang{#1}%
+ \def\enword{en}%
+ \ifx\lang\enword
+ % for English only, keep on going rather than issuing a fatal error
+ % message, as txi-en.tex likely doesn't contain any changes from the
+ % defaults. note that this is a problem if we already loaded another
+ % language file and want to switch back to English.
+ \message{Cannot read language file txi-#1.tex}%
+ \else
+ \errhelp = \nolanghelp
+ \errmessage{Cannot read language file txi-#1.tex}%
+ \fi
\else
\globaldefs = 1 % everything in the txi-LL files needs to persist
\input txi-#1.tex