On Sat, Dec 06, 2025 at 11:28:53PM +0000, Gavin Smith wrote:
> One page 6 of the output from running "pdflatex test-part.tex", you can
> see the problem with the heading.  The \\ inserts hfill glue or similar which
> creates a huge space between "Part I" and "One".   "Part I One" is supposed
> to be aligned to the right of the page but there is so much space that
> "Part I" ends up being centred.
> 
> I fixed this in texinfo.tex by using an \ifinner conditional:
> 
>    % @* forces a line break.                                                  
>      
>    % In internal horizontal or vertical mode, convert explicit line breaks    
>      
>    % from @* into spaces.  For instance, if the user gives these in long      
>      
>    % section titles, this may occur in the table of contents, or the page     
>      
>    % heading line.                                                            
>      
>    \def\*{%                                                                   
>      
>      \ifinner\unskip\space\ignorespaces                                       
>      
>      \else\unskip\hfil\break\hbox{}\ignorespaces\fi}         
> 
> The same might work for LaTeX output.

I used something like that, but keeping the same end of line as
previously.  It seems to work well for me for your test and I also
checked the output of other @* tests, which looks ok to me.

-- 
Pat

Reply via email to