summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWerner LEMBERG <wl@gnu.org>2004-09-29 09:29:38 +0000
committerWerner LEMBERG <wl@gnu.org>2004-09-29 09:29:38 +0000
commit22eeb4589ef9b214ac58e383d995de4218b2a6f4 (patch)
treee3a6dfbef056d9c1a6d298238262a4a72f6ba606
parent04f43ebcadf52991835dc5044c3f50e7cad8e23b (diff)
downloadgroff-git-22eeb4589ef9b214ac58e383d995de4218b2a6f4.tar.gz
o Additions to elvis_syntax.new
-rw-r--r--contrib/mom/BUGS24
-rw-r--r--contrib/mom/ChangeLog4
-rw-r--r--contrib/mom/examples/elvis_syntax.new9
-rw-r--r--contrib/mom/momdoc/goodies.html2
-rw-r--r--contrib/mom/momdoc/reserved.html19
-rw-r--r--contrib/mom/momdoc/toc.html4
-rw-r--r--contrib/mom/om.tmac106
7 files changed, 132 insertions, 36 deletions
diff --git a/contrib/mom/BUGS b/contrib/mom/BUGS
index f549f8aa0..86927f624 100644
--- a/contrib/mom/BUGS
+++ b/contrib/mom/BUGS
@@ -2,19 +2,35 @@ Assume that anything that doesn't work or behaves oddly is a bug.
The documentation should be taken as the authoritative source for
how things ought to be.
-Post to the groff mailing list (groff@ffii.org) with bug reports,
-questions and suggestions, or contact me directly at:
+Post to the groff mailing list with bug reports, questions and
+suggestions, or contact me directly at:
- df191@ncf.ca
+ ptpi@golden.net
If writing me directly, please include the word "groff" or "mom" in
-the Subject line or you risk my spam filter nuking your message.
+the Subject line or you risk my spam filters nuking your message.
Also, please--no html email. That, too, gets nuked.
--Peter Schaffter
========================================================================
+Version 1.2-c
+=============
+
+Deferred footnotes not always being output, and groff complains
+"ending diversion FN_OVERFLOW on exit."
+---Fixed---
+
+First .LS call after a top margin has been set (with .T_MARGIN
+or .PAGE) causing mom to move off the top margin baseline. Also,
+there are conflicts between ALD, LS and T_MARGIN.
+---Fixed---
+
+DROPCAP not properly restoring a running \*[COND] or \*[EXT] after
+COND or EXT are given as arguments to DROPCAP.
+---Fixed---
+
Version 1.2
===========
diff --git a/contrib/mom/ChangeLog b/contrib/mom/ChangeLog
index 7e0bc27e3..ec8aad277 100644
--- a/contrib/mom/ChangeLog
+++ b/contrib/mom/ChangeLog
@@ -1,3 +1,7 @@
+*Sep 29 2004
+
+o Additions to elvis_syntax.new
+
*Sep 12 2004
o Small fixes to the documentation.
diff --git a/contrib/mom/examples/elvis_syntax.new b/contrib/mom/examples/elvis_syntax.new
index ec3368fd0..8e892b00d 100644
--- a/contrib/mom/examples/elvis_syntax.new
+++ b/contrib/mom/examples/elvis_syntax.new
@@ -12,7 +12,6 @@
"
" If you're using an older version of elvis, stick with the
" highlighting rules in the files elvis_syntax.
-# elvis.syn -- stores descriptions of languages for use with ":display syntax"
#Mom
language mom
@@ -52,13 +51,17 @@ font args BLOCK QUAD
font args LEFT RIGHT CENTER CENTRE JUSTIFY TOP BOTTOM L R C J
font args OFF QUIT END EXIT DONE NO ALL
font args PAGE NUMBER STAR
-font args COND EXT
font args LETTER LEGAL EXECUTIVE LEDGER TABLOID QUARTO FOLIO
font args 10x14 A3 A4 A5 B4 B5
font args SINGLESPACE
font args FACTOR
font args DASH BULLET ALPHA DIGIT USER
font args RGB CYM CMYK GRAY GREY
+font args COND CONDX EXT EXTX SUP SUPX CONDSUP CONDSUPX EXTSUP EXTSUPX
+font args BOLDER BOLDERX SLANT SLANTX
+font args UP DOWN BCK FWD BU BP FU FP
+font args ROM IT BD BDI PREV
+font args ST
prefix { \{ \{\
font braces { \{ \{\
@@ -98,6 +101,6 @@ prefix \\n \\* \\$
font tmac_escapes \\n \\* \\$
character \]
-string '
+string ''
comment \#
comment \"
diff --git a/contrib/mom/momdoc/goodies.html b/contrib/mom/momdoc/goodies.html
index 0974b7bfc..fde67a429 100644
--- a/contrib/mom/momdoc/goodies.html
+++ b/contrib/mom/momdoc/goodies.html
@@ -66,7 +66,7 @@ nearly indispensable) routines to simplify typesetting.
<ul>
<li><a href="#SUP">\*[SUP]</a> (set superscript)
<li><a href="#CONDSUP">\*[CONDSUP]</a> (set condensed superscript)
- <li><a href="#EXTSUP">\*[EXTSUP}</a> (set extended superscript)
+ <li><a href="#EXTSUP">\*[EXTSUP]</a> (set extended superscript)
</ul>
<li><strong>Lists</strong>
<ul>
diff --git a/contrib/mom/momdoc/reserved.html b/contrib/mom/momdoc/reserved.html
index 8d048b413..6f3b018d0 100644
--- a/contrib/mom/momdoc/reserved.html
+++ b/contrib/mom/momdoc/reserved.html
@@ -167,6 +167,8 @@ PAD Insert padding spaces at marked places
PADMARKER Sets character to use instead of # in PAD
PRINT Simply prints args passed to it; keeps my code
indented nicely
+RESET_LEAD Trap invoked macro which resets the lead to the
+ value passed to LS when LS is called at Top Of Page
RW Reduce white -- tighten overall line kern
(character spacing)
SILENT Don't print lines till SILENT OFF
@@ -200,6 +202,7 @@ TYPESIZE Diverts SIZESPECS routine so it doesn't print
#BR_INDENT Value of right indent when IB
c column mark
#CONDENSE Are we in pseudo-condense mode? (toggle)
+#CONDENSE_WAS_ON For restoring \*[COND] in DROPCAP
#COND_WIDTH Width of pseudo-condensed type
(pointsize x $COND_PERCENT)
#CURRENT_L_LENGTH Current line length at first invocation of LIST;
@@ -208,9 +211,10 @@ c column mark
#DC_GUT Width of dropcap gutter
#DEGREES # of degrees slant for pseudo-italic
#ENUMERATOR&lt;n&gt; Number register enumerator for depth &lt;n&gt; in lists
-#EXTEND Are we in pseudo-extend mode? (toggle)
#EXT_WIDTH Width of pseudo-extended type
(pointsize x $EXT_PERCENT)
+#EXTEND Are we in pseudo-extend mode? (toggle)
+#EXTEND_WAS_ON For restoring \*[EXT] in DROPCAP
#FILL_MODE Are we in fill mode (i.e. \n(.u=1)? (toggle)
#H_INDENT Value of left indent when IH
#HL_INDENT Value of the hang when IH
@@ -245,12 +249,14 @@ c column mark
#NEXT_DEPTH_BACK Next list level back in lists
#NEXT_TAB Current tab number + 1 (used in TN)
#NEXT_TAB Next tab in an n+1 sequence
+#OLD_LEAD Lead in effect prior to changing it with .vs
+ in .LS
#OPEN_CLOSE Manipulates character " to print `` or ''
#ORIGINAL_L_LENGTH Used in LIST for IB processing; holds \n(.l
p Output line horiz position at end of
$PAD_STRING
#PAD_COUNT Number of times # was included in arg to PAD
-#PAD_LIST_DIGITS Pad list digits to the left? &lt;toggle&gt;
+#PAD_LIST_DIGITS Pad list digits to the left? (toggle)
#PAD_SPACE Size of padding space
#PAGE_LENGTH Page length (alias)
#PAGE_WIDTH Page width
@@ -264,7 +270,7 @@ p Output line horiz position at end of
(toggle)
#QUAD In autoquad mode? (toggle)
#QUIT Tells LIST whether to exit lists completely
- &lt;toggle&gt;
+ (toggle)
#REMOVE Used in LIST OFF cleanup
#RESTORE_LEAD Lead value in effect prior to AUTOLEAD
#RESTORE_LINE_LENGTH Restores actual line length in RULE
@@ -308,6 +314,13 @@ t "mark" register set in T_MARGIN; recalled
#TAB_ACTIVE Are we in a tab? (toggle)
#TAB_NUMBER Tab number
#TAB_OFFSET Tab indent
+#TOP_ALD Was ALD called at Top Of Page before text input?
+ (toggle)
+#TOP_BASELINE_ADJ Amount by which to adjust the baseline position
+ of the first line on the page if an LS request
+ is greater than the current lead
+#TOP_LEAD Was LS called at Top Of Page before text input?
+ (toggle)
#TOTAL_LISTS Total number of lists in a nest
#USER_SET_L_LENGTH Did user invoke LL? (toggle)
#USER_SET_TITLE_ITEM Did user invoke TOC_TITLE_ENTRY?
diff --git a/contrib/mom/momdoc/toc.html b/contrib/mom/momdoc/toc.html
index 0a37f2b07..608b56e07 100644
--- a/contrib/mom/momdoc/toc.html
+++ b/contrib/mom/momdoc/toc.html
@@ -2,13 +2,13 @@
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
-<title>Mom, version 1.2-a -- Table of Contents</title>
+<title>Mom, version 1.2-c -- Table of Contents</title>
</head>
<body bgcolor="#dfdfdf">
<!====================================================================>
-<h1 align="center"><u>Table of Contents for mom, version 1.2-a</u></h1>
+<h1 align="center"><u>Table of Contents for mom, version 1.2-c</u></h1>
The table of contents has grown quite large. If you've been using
<strong>mom</strong> for a while, you might prefer the
diff --git a/contrib/mom/om.tmac b/contrib/mom/om.tmac
index e79695376..c92d6ef67 100644
--- a/contrib/mom/om.tmac
+++ b/contrib/mom/om.tmac
@@ -23,7 +23,7 @@
.\"
.\"
.\"
-\# Version 1.2-b
+\# Version 1.2-c
\# -------------
\#
\# Antoine de St-Exupéry asserted that elegance in engineering is
@@ -103,7 +103,6 @@
\#
.ALIAS MAC de
.ALIAS BR br
-.ALIAS SPACE sp
.ALIAS SP sp
.ALIAS PAGELENGTH pl
.ALIAS SPREAD brp
@@ -301,7 +300,8 @@
\# The trap is set in .T_MARGIN or .PAGE
\#
.MAC DO_T_MARGIN END
-. ev 1
+. ev T_MARGIN
+. nr #T_MARGIN_SET 1
. sp |\\n[#T_MARGIN]u-1v
. ev
. sp -\\n[#T_MARGIN_LEAD_ADJ]u
@@ -319,7 +319,7 @@
\#
.MAC DO_B_MARGIN END
. nr #T_MARGIN_LEAD_ADJ \\n[#LEAD]-12000
-. ev 1
+. ev B_MARGIN
. bp
. ev
.END
@@ -338,7 +338,11 @@
.MAC NEWPAGE END
. br
. ie \\n[#B_MARGIN_SET]=1 \{\
-. ie !\\n[#DOCS]=1 \{ .DO_B_MARGIN \}
+. ie !\\n[#DOCS]=1 \{\
+. ev NP
+. bp
+. ev
+. \}
. el \{\
. if \\n[#COLUMNS]=1 \{ .nr #COL_NUM \\n[#NUM_COLS] \}
. ie !\\n[#FN_DEPTH] \{\
@@ -352,11 +356,7 @@
. \}
. \}
. el \{\
-. nr #T_MARGIN_LEAD_ADJ \\n[#LEAD]-12000
-. ev 1
-. bp
-. ev
-. sp -\\n[#T_MARGIN_LEAD_ADJ]u
+. DO_B_MARGIN
. \}
.END
\#
@@ -552,20 +552,44 @@
\# Does not require unit of measure. LS automatically turns off AUTOLEAD.
\#
.MAC LS END
+. br
. if \\n[#PRINT_STYLE]=1 \{ .return \}
. if \\n[#IGNORE] \{ .return \}
-. nr #LEAD_SET 1
+. if \\n(nl=0 \{ .nr #TOP_LEAD 1 \}
. if \\n[#AUTO_LEAD] \{\
. rr #AUTO_LEAD
. rr #AUTOLEAD_FACTOR
. \}
+. nr #OLD_LEAD \\n(.v
. vs \\$1
+. nr #TOP_BASELINE_ADJ \\n(.v-\\n[#OLD_LEAD]
+. if \\n[#TOP_ALD]=1 \{\
+. sp -\\n[#TOP_BASELINE_ADJ]u
+. rr #TOP_ALD
+. \}
+\# The following clause ensures that the first .LS call after a top
+\# margin has been set (.T_MARGIN or .PAGE) doesn't change the
+\# vertical position on the page
. if \\n[#T_MARGIN_SET]=1 \{\
-. sp |\\n[#T_MARGIN]u-1v
-. rr #T_MARGIN_SET
+. ie (\\n(nl >= \\n[#T_MARGIN]) \{\
+' sp -\\n[#TOP_BASELINE_ADJ]u
+. rr #T_MARGIN_SET
+. \}
+. el \{\
+. if !\\n[#TOP_LEAD]=0&\\n[#TOP_ALD]=0 \{ .nr #TOP_LEAD 1 \}
+. vs 1u
+. sp |\\n[#T_MARGIN]u
+. wh \\n(nlu+1v RESET_LEAD
+. rr #T_MARGIN_SET
+. \}
. \}
.END
\#
+.MAC RESET_LEAD END
+' vs
+. ch RESET_LEAD
+.END
+\#
\#
\# AUTOLEAD
\# --------
@@ -961,8 +985,29 @@
\# Requires a unit of measure.
\#
.MAC ALD END
-. nr #ALD (\\$1)
-. sp \\n[#ALD]u
+. if \\n(nl=0 \{ .nr #TOP_ALD 1 \}
+. if \\n(nl=\\n[#T_MARGIN] \{ .nr #TOP_LEAD 1 \}
+. if \\n[#TOP_LEAD]=1 \{\
+. rr #TOP_ALD
+. rr #TOP_LEAD
+. RESET_LEAD
+. RLD 1v
+. \}
+. if '\\$0'ALD' \{\
+. nr #ALD (\\$1)
+. ie \\n(nl=\\n[#T_MARGIN] \{\
+. PRINT \&
+. sp \\n[#ALD]u-1v
+. \}
+. el \{ .sp \\n[#ALD]u \}
+. \}
+. if '\\$0'SPACE' \{\
+. ie \\n(nl=\\n[#T_MARGIN] \{\
+. PRINT \&
+. sp \\$1-1v
+. \}
+. el \{ .sp \\$1u \}
+. \}
.END
\#
\#
@@ -2513,7 +2558,16 @@
. \}
. ds $DROPCAP \\$1
. nr #DC_LINES \\$2-1
-. ds $RESTORE_COND \\*[$COND_PERCENT]
+. if \\n[#CONDENSE]=1 \{\
+. ds $RESTORE_COND \\*[$COND_PERCENT]
+\\*[CONDX]
+. nr #CONDENSE_WAS_ON 1
+. \}
+. if \\n[#EXTEND]=1 \{\
+. ds $RESTORE_EXT \\*[$EXT_PERCENT]
+\\*[EXTX]
+. nr #EXTEND_WAS_ON 1
+. \}
. if '\\$3'COND' \{ .CONDENSE \\$4 \}
. if '\\$3'EXT' \{ .EXTEND \\$4 \}
. if !r#DC_GUT \{ .nr #DC_GUT (3p) \}
@@ -2552,17 +2606,25 @@
. if '\\$3'COND' \{ \E*[COND] \}
. if '\\$3'EXT' \{ \E*[EXT] \}
. ie \\n(.i \{ .in +\w'\\*[$DROPCAP]'u+\\n[#DC_GUT]u \}
-. el \{ .in \w'\\*[$DROPCAP]'u+\\n[#DC_GUT]u \}
+. el \{ .in \w'\\*[$DROPCAP]'u+\\n[#DC_GUT]u \}
. if '\\$3'COND' \{ \E*[CONDX]\c \}
. if '\\$3'EXT' \{ \E*[EXTX]\c \}
. rt \\nxu
. FAM \\*[$RESTORE_FAM]
. FT \\*[$RESTORE_FT]
. ps \\n[#RESTORE_PT_SIZE]u
-. CONDENSE \\*[$RESTORE_COND]
-. EXTEND \\*[$RESTORE_EXT]
+. if \\n[#CONDENSE_WAS_ON] \{\
+. CONDENSE \\*[$RESTORE_COND]
+\\*[COND]\c
+. \}
+. if \\n[#EXTEND_WAS_ON] \{\
+. EXTEND \\*[$RESTORE_EXT]
+\\*[EXT]\c
+. \}
. ie \\n(.u \{ .wh \\n(.du+\\n[#DC_HEIGHT]u-1v DROPCAP_OFF \}
. el \{ .wh \\n(.du+\\n[#DC_HEIGHT]u DROPCAP_OFF \}
+. rr #CONDENSE_WAS_ON
+. rr #EXTEND_WAS_ON
. rm $DROPCAP
. rr #DC_LINES
. rm $RESTORE_COND
@@ -3256,6 +3318,7 @@ y\\R'#DESCENDER \\n[.cdp]'
.ALIAS LIG LIGATURES
.ALIAS NEWCOLOUR NEWCOLOR
.ALIAS PADMARKER PAD_MARKER
+.ALIAS SPACE ALD
.ALIAS TABSET TAB_SET
.ALIAS TB TAB
.ALIAS UNDERSCORE_2 UNDERSCORE2
@@ -7876,7 +7939,6 @@ y\\R'#DESCENDER \\n[.cdp]'
\#.rr #START
\#.return
\#.\}
-\#
. nr #L_MARGIN_DIFF \\n[#L_MARGIN]-\\n[#DOC_L_MARGIN]
. if !\\n[#FN_DEFER] \{\
. nr #DIVER_DEPTH 0
@@ -7886,7 +7948,6 @@ y\\R'#DESCENDER \\n[.cdp]'
\# it.
\#
\#.if \\n[#DIVERTED]=2 \{ .nr #FN_DEPTH -\\n[#VFP_DIFF] \}
-\#
. if \\n[#DIVERTED]=3 \{ .nr #FN_DEPTH +\\n[#VFP_DIFF] \}
. sp |\\n[#PAGE_LENGTH]u-(\\n[#B_MARGIN]u+\\n[#FN_DEPTH]u-\\n[#DOC_LEAD]u)
. po \\n[#DOC_L_MARGIN]u
@@ -10615,7 +10676,6 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
\# in case I \# discover why I thought it was needed.
\#
\#\!.RLD \\n[#FN_LEAD]u
-\#
. rr #PREV_FN_DEFERRED
. \}
. \}
@@ -10658,7 +10718,6 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
\# (re)discovering why it was needed.
\#
\#.if \\n[#FN_COUNT_FOR_COLS_AT_FOOTER]=0 \{ .rr #PREV_FN_DEFERRED \}
-\#
. if \\n[#FN_COUNT_AT_FOOTER]>1 \{ .rr #PREV_FN_DEFERRED \}
. \}
. if !\\n[#FN_DEFER] \{\
@@ -10703,6 +10762,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
. \}
. el \{ .nr #FN_COUNT 0 1 \}
. if \\n[#DIVER_FN]=2 \{ .rr #DIVER_FN \}
+. rr #FROM_DIVERT_FN
.END
\#
\# DIVERT_FN_LEFTOVER is called in PROCESS_FN_LEFTOVER (at