Hi all,
working with the LIST macros I came across these issues:
1) besides BULLET, DASH, USER, etc. also "PLAIN" can be used.
However, this is not mentioned in the documentation.
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.
3) Having used the mm-macros for long time in the past, I was missing the
variable-item
list (VL in mm) where each item gets its own enumerator.
The small patch appended introduces
LIST VARIABLE <width of largest enunerator>
and
ITEM <enumerator>
The patch fixes also issue 2.
If the patch should be accepted, the documentation needs some update too.
Kind regards,
ulrich
start of patch 26-Nov-2017
(suggested archive name: pch26Nov17.Z)
It should be applied by changing directory to the root
of the source tree and using the command:
patch -p0 < this_file
*** om.tmac- 2017-11-25 23:23:57.953039541 +0100
--- om.tmac 2017-11-26 03:40:36.340135569 +0100
***************
*** 15665,15678 ****
. ds $LAST_CHAR \\$1
. substring $LAST_CHAR -1
. 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
list.
. tm1 " See the documentation.
--- 15665,15670 ----
***************
*** 15807,15812 ****
--- 15799,15818 ----
. ds $SEPARATOR\\n[#DEPTH]
. ds $PREFIX\\n[#DEPTH]
. \}
+ . if '\\*[$LIST_ARG_1]'VARIABLE' \{\
+ . if \\n[#NUM_ARGS]<2 \{\
+ . tm1 "[mom]: You must append a value to the \\$1 argument of
\\$0.
+ . tm1 " The value should be the width of the largest
enumerator of items in this list.
+ . tm1 " See the documentation.
+ . ab [mom]: Aborting '\\n[.F]' at \\$0, line \\n[.c].
+ . \}
+ . nr #ARGS_TO_LIST 1
+ . ds $ENUMERATOR\\n+[#DEPTH]
+ . ds $ENUMERATOR_TYPE\\n[#DEPTH] variable
+ . ds $ENUMERATOR_WIDTH\\n[#DEPTH] \\$2
+ . ds $SEPARATOR\\n[#DEPTH]
+ . ds $PREFIX\\n[#DEPTH]
+ . \}
. if '\\*[$LIST_ARG_1]'PLAIN' \{\
. nr #ARGS_TO_LIST 1
. ds $ENUMERATOR\\n+[#DEPTH]
***************
*** 15848,15853 ****
--- 15854,15861 ----
. GET_ROMAN_INDENT
. if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'other' \
. nr #LIST_INDENT\\n[#DEPTH] \w'\\*[$ENUMERATOR\\n[#DEPTH]]\ '
+ . if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'variable' \
+ . nr #LIST_INDENT\\n[#DEPTH] \\*[$ENUMERATOR_WIDTH\\n[#DEPTH]]
. ll \\n[#CURRENT_L_LENGTH]u
. ie \\n[#DEPTH]=1 \{\
. ie \\n[#INDENT_ACTIVE]=1 \{\
***************
*** 16007,16012 ****
--- 16015,16022 ----
. \}
. if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'other' \
. PRINT \\*[$ENUMERATOR\\n[#DEPTH]]\\*[$SEPARATOR\\n[#DEPTH]]
+ . if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'variable' \
+ . PRINT \\$1
. \}
. rr #SEP_TYPE
. EOL