On Sat, Dec 06, 2025 at 04:24:25PM +0100, Patrice Dumas wrote:
> On Fri, Dec 05, 2025 at 06:01:41AM +0000, Werner LEMBERG wrote:
> > 
> > Contrary to chapter and section names, the part name is not available
> > in a headings variable.  I thus suggest to add `@thispart`.
> 
> This should be done (part by Gavin, part by me).

@part does not work quite right in LaTeX, as far as I can tell.  The Texinfo
manual says the following:
                                                       ...  Just write the
    command on a line by itself, including the part title, at the place in
    the document you want to mark off as starting that part.  For example:
    
         @part Part I:@* The beginning
    
       As can be inferred from this example, no automatic numbering or
    labeling of the ‘@part’ text is done.  The text is taken as-is.


However, as \part is output for @part in LaTeX, this adds a Part <num>
to the output.  Hence, the previous example results in "Part I" appearing
twice.  The part page looks like:

       ,-----------------.
       |                 |
       |     Part I      |
       |                 |
       |     Part I      |
       |  The beginning  |
       |                 |
       |                 |
       `-----------------'

It appears to be possible to use \part* along with \addcontents line:

\let\Oldpart\part                                                               
 \newcommand{\Texinfoparttitle}{}                                               
 \renewcommand{\part}[1]{\Oldpart*{#1}%                                         
                         \addcontentsline{toc}{part}{\protect\textbf{#1}}%
                         \renewcommand{\Texinfoparttitle}{#1}}%

(see https://latexref.xyz/_005caddcontentsline.html).

This is still not quite right, as the @* does not display quite correctly
in the heading.

Reply via email to