[Top][All Lists]

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

Re: [groff] A few issues with mom's LIST macros

From: Peter Schaffter
Subject: Re: [groff] A few issues with mom's LIST macros
Date: Sun, 26 Nov 2017 15:04:29 -0500
User-agent: Mutt/1.5.24 (2015-08-30)

Ulrich --

On Sun, Nov 26, 2017, Ulrich Lauther wrote:
> 2) if ROMAN or roman is used without a trailing number, e.g., ROMAN instead 
> of ROMAN7,
>    the command ".tm1 "[mom]: You must append a number to the \\$1 argument to 
> \\$0."
>    should be invoced, but is not.
> The small patch appended introduces
>    LIST VARIABLE <width of largest enunerator>
> and
>    ITEM <enumerator>

Entering the widest glyph literally rather than its width, which
would have to be calculated, makes things simpler.  Furthermore, if
the glyph is in double-quotes, users can add space to or subtract
it from the gutter between the enumerators and the text with \*[FWD dist].
> The patch fixes also issue 2.

  .       if !\B'\\*[$LAST_CHAR]' \{\
- .          if !'\\$1'ROMAN' \{\
- .             LIST OFF
- .             return
- .          \}
- .          if !'\\$1'roman' \{\
- .             LIST OFF
- .             return
- .          \}
  .          tm1 "[mom]: You must append a number to the \\$1 argument to \\$0.
  .          tm1 "       The number should be the total number of items in this 
  .          tm1 "       See the documentation.

If you remove the two 'if' clauses,


spits out

  [mom]: You must append a number to the RETURN argument to LIST.

because an initial letter R is checked for in order to process
ROMAN<n> and roman<n> lists.

Apply the attached, revised patch and test.  Variable enumerator
lists are entered with, for example,


Mom calculates the width of the en-dash and adds the same
unbreakable and unpaddable space used as a gutter for all other
enumerator types.

Peter Schaffter

Attachment: lists_var_enumerator.diff
Description: Text Data

reply via email to

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