On Sun, Jan 12, 2025 at 07:53:20AM +0200, Eli Zaretskii wrote:
> without seeing examples.  So how about showing one or more examples of
> formatting @titlepage block with the current commands, and what would
> it look like under this/these proposal(s)?

The example in the Texinfo manual:

@titlepage
@title Sample Title

@c The following two commands start the copyright page.
@page
@vskip 0pt plus 1filll
@insertcopying
@end titlepage

Would become

@documentinfo
@title Sample Title
@end documentinfo

@publicationinfoextra
@vskip 0pt plus 1filll
@insertcopying
@end publicationinfoextra

A more complexe @titlepage, like

@titlepage
@title NAME-OF-MANUAL-WHEN-PRINTED
@subtitle SUBTITLE-IF-ANY
@subtitle SECOND-SUBTITLE
@author AUTHOR
@author other author
@page
...
@end titlepage

could be

@documentinfo
@subtitle SUBTITLE-IF-ANY
@subtitle SECOND-SUBTITLE

@title NAME-OF-MANUAL-WHEN-PRINTED

@author AUTHOR
@author other author
@end end documentinfo

@publicationinfoextra
...
@end publicationinfoextra

An explicit formatting of the @titlepage like

@titlepage
@sp 10
@center @titlefont{NAME-OF-MANUAL-WHEN-PRINTED}
@sp 2
@center SUBTITLE-IF-ANY
@sp 2
@center AUTHOR
...
@end titlepage

would become

@documentinfo
@title NAME-OF-MANUAL-WHEN-PRINTED
@subtitle SUBTITLE-IF-ANY
@author AUTHOR
@end documentinfo

@iftex
@cover
@sp 10
@center @titlefont{NAME-OF-MANUAL-WHEN-PRINTED}
@sp 2
@center SUBTITLE-IF-ANY
@sp 2
@center AUTHOR
@end cover
@end iftex

> In addition, I think it is very important that you look at non-trivial
> title pages in existing manuals and see how to accommodate with the
> new commands what they are trying to do with the existing ones.

The @cover block is supposed to accomodate presentation of cover as was
done in @titlepage previously for TeX.

> And finally, can you describe the rationale for these changes in the
> language?  What are the problems with the current title-page
> constructs and commands that require an overhaul of this kind?

There are two issues with the current design.  A minor one is that the
cover and the beginning of the document are both in @titlepage, it is
better to separate.  The really important design deficiency is that it
is not possible to separate giving semantic information on the document
and formatting the cover in TeX.  In non-TeX formats, we use the @title
command in @titlepage as a semantic information on the document, while
in TeX, it is directly used for the formatting.

This has some consequences
* it is not possible to specify more information without having it
  used for TeX (and LaTeX) formatting
* it is not possible to format explicitely other formats than TeX

With the proposed change, there could be some document beginning like:


@documentinfo
@title The title
@date date
@coverimage mypic.png
@metadata some key, metadata value
@author Author 1
@author Author 2

@end documentinfo

And the different converters would pick the relevant information in
@documentinfo to do a cover adapted to the output format.

But it would also be possible to provide a cover for different formats,
and it could be made even simpler with new @insertXXX commands similar
to @copying/@insertcopying, like

@iftex
@cover
@inserttitle

@insertsubtitles
@center From a publisher
@vfill
@tex
\sometexcommand
@end tex
@insertauthors
@end cover
@iftex

@ifset epub5
@cover
@insertcoverimage
@end cover
@end ifset



-- 
Pat

Reply via email to