bug-groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #62825] Incorrect section number using \*($n in a header


From: Dave
Subject: [bug #62825] Incorrect section number using \*($n in a header
Date: Thu, 28 Jul 2022 19:21:30 -0400 (EDT)

Follow-up Comment #6, bug #62825 (project groff):

[comment #5 comment #5:]
> Hmm, every book I've ever seen with section numbers/titles in
> the header uses the info for the last section on the page.

You are right; I spoke from ignorance.  I opened an O'Reilly book at random,
and it does indeed populate its headers as you say.

Given that, at a minimum, it seems the -me and -ms documentation ought to at
least mention that the macro packages do not behave as might be expected.

However, since the problem is (theoretically) fixable -- by deferring the
printing of the header until the end-of-page trap is reached -- arguably the
packages should do this by default.  I'll let Branden weigh in here.  There is
the very real problem of breaking backward compatibility even if it does
arguably improve output.

> Since K&R and Stevens were able to get the correct section
> info in their headers, the old troff must have had a way of
> doing it. They used the ms macros.

They may have very well written their own macros to handle certain tasks such
as this, though.  One can easily replace macro definitions in a standard macro
package by simply redefining them in one's own document.

> This is tempting me to boot up my ancient Sun SPARCstation LX
> running Solaris 2.6, to see if its proprietary version of
> troff has the same issue.

I'd be very surprised if the -me macros behaved any differently in this
regard: unlike the rest of groff, they weren't reverse engineered in new code,
but used Eric Allman's historical implementation (albeit customized for
groff).  But if you run this experiment and find otherwise, please do report
back here.


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?62825>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]