bug-groff
[Top][All Lists]
Advanced

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

[bug #59345] ms: can't use custom titles using '%' for page number with


From: G. Branden Robinson
Subject: [bug #59345] ms: can't use custom titles using '%' for page number with .TC
Date: Sun, 16 Jan 2022 00:01:13 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

Follow-up Comment #2, bug #59345 (project groff):


commit 08291b401786f57ffb8c8c3551455167bcfb4d31
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sun Oct 25 20:57:39 2020 +1100

    tmac/s.tmac: Fix page number in table of contents.
    
    Fix ms .TC macro by allowing it to actually use lowercase Roman numerals
    for the page(s) of the table of contents when a custom title (header or
    footer) is defined containing '%'.
    
    As a side effect, eliminate the PN register, which was apparently
    misused because it was undocumented and had a name just long enough to
    be both suggestive and ambiguous.  Another pin goes into my Ken Thompson
    voodoo doll.
    
    * tmac/s.tmac (IX): Write out page number of index term(s) in using the
      % register (instead of PN), obtaining whatever format is assigned to
      % the register at that time.
      (CH): Similarly, output %, not PN, in the center of the default
      heading.
      (PT): Save the format of %, set it to decimal, copy its value to a new
      register, pg*page-number-in-decimal, then restore %'s previous format.
      Compare the new register, not %, to 1 to determine whether special
      page one behavior should be used.
      (pg*end-page): Assign pg*next-format to %, not PN.
      (XA): Define toc*num with the interpolation of %, not PN.
    
    * tmac/tests/s-TC-works-with-percent-in-custom-titles.sh: Test.
    * tmac/tmac.an (tmac_TEST): Run test.
    
    Problem appears to be very old; as I read it, Larry Kollar was
    complaining of it in his ms.ms document over 20 years ago.
    
    Fixes <https://savannah.gnu.org/bugs/?59345>.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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