On Mon, Jul 14, 2025 at 09:13:36PM +0100, Gavin Smith wrote: > On Mon, Jun 30, 2025 at 11:30:30PM +0100, Gavin Smith wrote: > > So just using @maketitle to produce the copyright page too is > > a real possibility. > > So I've been seeing what I can implement in texinfo.tex as a prototype > for this feature area. > > ... > > If this basic design looks good we can try to add other components, such > as: > > * Publisher address (related to the concept of an "imprint" or "impressum"). > * Acknowledgements and credits (in texinfo.texi, "Cover art by Etienne > Suvasa.").
I've also implemented a "@publication" command in texinfo.tex, that should contain information about the publisher and any other details specific to the act of publication. (The word "publication" could refer to the act of publication as well as the result - if thought of as the former, there is a parallel with "copying".) Here's the change that would be made to texinfo.texi to use the new commands: diff --git a/doc/texinfo.texi b/doc/texinfo.texi index 2c256db56d..b3aade3b00 100644 --- a/doc/texinfo.texi +++ b/doc/texinfo.texi @@ -65,19 +65,16 @@ @clear txicodevaristt -@titlepage +@documentinfo @title Texinfo @subtitle The GNU Documentation Format @subtitle for Texinfo version @value{VERSION}, @value{UPDATED} @author Robert J. Chassell @author Richard M. Stallman +@end documentinfo -@page -@vskip 0pt plus 1filll -@insertcopying - -@sp 1 +@publication Published by the Free Software Foundation @* 31 Milk St # 960789 @* Boston, MA 02196 @* @@ -91,7 +88,9 @@ @sp 1 Cover art by Etienne Suvasa. @end ignore -@end titlepage +@end publication + +@maketitle @summarycontents The word "publication" rather than "publisher" has a looser meaning; for example, if we used "publisher" then the words "Published by" would be inappropriate as the address of the publisher does not begin with the words "Published by". It's also not specific to legal requirements to do with publisher imprints or other legal or industrial requirements such as ISBNs which could vary over time or differ by region. Of course, we could break up this information if needed. Updated patch below: diff --git a/doc/texinfo.tex b/doc/texinfo.tex index ea64476d77..cd8941b0a1 100644 --- a/doc/texinfo.tex +++ b/doc/texinfo.tex @@ -483,8 +483,8 @@ % \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. @@ -3911,33 +3911,106 @@ $$% \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 \fi +\else + \page +\fi +\ifx\copyingtext\relax\else + \vskip 0pt plus 1filll + \insertcopying +\fi +\ifx\publicationtext\relax\else + \sp 1 + \insertpublication +\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. @@ -7809,6 +7882,7 @@ might help (with 'rm \jobname.?? \jobname.??s')% {\catcode`\ =\other \gdef\docopying#1@end copying{\endgroup\def\copyingtext{#1}} } +\let\copyingtext\relax \def\insertcopying{% \begingroup @@ -7817,6 +7891,18 @@ might help (with 'rm \jobname.?? \jobname.??s')% \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.