groff-commit
[Top][All Lists]
Advanced

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

[Groff-commit] groff/contrib/mom BUGS ChangeLog om.tmac momdoc...


From: Werner LEMBERG
Subject: [Groff-commit] groff/contrib/mom BUGS ChangeLog om.tmac momdoc...
Date: Fri, 15 Oct 2004 02:17:28 -0400

CVSROOT:        /cvsroot/groff
Module name:    groff
Branch:         
Changes by:     Werner LEMBERG <address@hidden> 04/10/15 06:10:25

Modified files:
        contrib/mom    : BUGS ChangeLog om.tmac 
        contrib/mom/momdoc: toc.html typesetting.html 

Log message:
        o Reworked the LL macro so that the argument can take a prepended +
        or - sign (i.e. the argument is relative to the current line
        length).
        
        o Added an .if \\n(.n=0 if to the ie clause in LS that controls how mom
        responds to initial LS invocation at page top if T_MARGIN has
        been set.  Now, if there's text on the "top" baseline, LS behaves
        as expected when invoked afterwards.
        
        o Added an ie !r#DOCS clause to the processing of "top baseline"
        ALDs.  ALD is used extensively (internally) in the document
        processing macros, and does not need to check--indeed, should not
        check--for top baseline placement prior to execution.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/contrib/mom/BUGS.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/contrib/mom/ChangeLog.diff?tr1=1.27&tr2=1.28&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/contrib/mom/om.tmac.diff?tr1=1.22&tr2=1.23&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/contrib/mom/momdoc/toc.html.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/groff/groff/contrib/mom/momdoc/typesetting.html.diff?tr1=1.12&tr2=1.13&r1=text&r2=text

Patches:
Index: groff/contrib/mom/BUGS
diff -u groff/contrib/mom/BUGS:1.15 groff/contrib/mom/BUGS:1.16
--- groff/contrib/mom/BUGS:1.15 Wed Sep 29 09:29:38 2004
+++ groff/contrib/mom/BUGS      Fri Oct 15 06:10:24 2004
@@ -15,6 +15,20 @@
 
 ========================================================================
 
+Version 1.2-d
+=============
+
+When LS is invoked after a single text line at the top of a page
+containing a T_MARGIN (set with T_MARGIN or PAGE), mom performing
+spacing adjustments as if the first line doesn't exist.
+---Fixed---
+
+Changes made to ALD and LS in version 1.2-c should not apply when
+the document processing macros are used.  There is a significant
+conflict with the internal use of ALD when the docheader is only
+one line long (as, for example, when DOCTYPE is CHAPTER).
+---Fixed, pending discovery of further conflicts---
+
 Version 1.2-c
 =============
 
Index: groff/contrib/mom/ChangeLog
diff -u groff/contrib/mom/ChangeLog:1.27 groff/contrib/mom/ChangeLog:1.28
--- groff/contrib/mom/ChangeLog:1.27    Wed Sep 29 09:29:38 2004
+++ groff/contrib/mom/ChangeLog Fri Oct 15 06:10:24 2004
@@ -1,3 +1,23 @@
+*Oct 14 2004
+
+o Reworked the LL macro so that the argument can take a prepended +
+  or - sign (i.e. the argument is relative to the current line
+  length).
+
+*Oct 13 2004
+
+o Added an .if \\n(.n=0 if to the ie clause in LS that controls how mom
+  responds to initial LS invocation at page top if T_MARGIN has
+  been set.  Now, if there's text on the "top" baseline, LS behaves
+  as expected when invoked afterwards.
+
+*Oct 11 2004
+
+o Added an ie !r#DOCS clause to the processing of "top baseline"
+  ALDs.  ALD is used extensively (internally) in the document
+  processing macros, and does not need to check--indeed, should not
+  check--for top baseline placement prior to execution.
+
 *Sep 29 2004
 
 o Additions to elvis_syntax.new
Index: groff/contrib/mom/momdoc/toc.html
diff -u groff/contrib/mom/momdoc/toc.html:1.13 
groff/contrib/mom/momdoc/toc.html:1.14
--- groff/contrib/mom/momdoc/toc.html:1.13      Wed Sep 29 09:29:38 2004
+++ groff/contrib/mom/momdoc/toc.html   Fri Oct 15 06:10:25 2004
@@ -2,13 +2,13 @@
 <html>
 <head>
 <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
-<title>Mom, version 1.2-c -- Table of Contents</title>
+<title>Mom, version 1.2-d -- Table of Contents</title>
 </head>
 <body bgcolor="#dfdfdf">
 
 <!====================================================================>
 
-<h1 align="center"><u>Table of Contents for mom, version 1.2-c</u></h1>
+<h1 align="center"><u>Table of Contents for mom, version 1.2-d</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
Index: groff/contrib/mom/momdoc/typesetting.html
diff -u groff/contrib/mom/momdoc/typesetting.html:1.12 
groff/contrib/mom/momdoc/typesetting.html:1.13
--- groff/contrib/mom/momdoc/typesetting.html:1.12      Mon Sep 13 15:57:39 2004
+++ groff/contrib/mom/momdoc/typesetting.html   Fri Oct 15 06:10:25 2004
@@ -1044,6 +1044,32 @@
 sets the line length to 4-1/2 inches.
 
 <p>
+Additionally, you may express a new line length relative to the
+current line length by prepending a plus or minus sign to the
+argument.  Thus, if you wanted to increase the line length by 3
+<a href="definitions.html#TERMS_PICASPOINTS">points</a>, you could
+do
+<p>
+<pre>
+       .LL +3p
+</pre>
+
+This is especially handy when you want to &quot;hang&quot;
+punctuation outside the right margin since you can pass groff's
+<a href="inlines.html#INLINE_STRINGWIDTH_GROFF"><strong>\w</strong></a>
+escape as the argument to <strong>LL</strong>, like this:
+<p>
+<pre>
+       .LL +\w'.'u
+</pre>
+
+The above example increases the current line length by the width of
+a period.  Notice that you must append the
+<a href="definitions.html#TERMS_UNITOFMEASURE">unit of measure</a>,
+<strong>u</strong>, to the escape since .LL requires a unit of
+measure.
+
+<p>
 <strong>NOTE:</strong> The <a href="#R_MARGIN">right margin
 macro</a> (<strong>R_MARGIN</strong>) can also be used to set line
 length.
Index: groff/contrib/mom/om.tmac
diff -u groff/contrib/mom/om.tmac:1.22 groff/contrib/mom/om.tmac:1.23
--- groff/contrib/mom/om.tmac:1.22      Wed Sep 29 09:29:38 2004
+++ groff/contrib/mom/om.tmac   Fri Oct 15 06:10:24 2004
@@ -23,7 +23,7 @@
 .\"
 .\"
 .\"
-\# Version 1.2-c
+\# Version 1.2-d
 \# -------------
 \#
 \# Antoine de St-Exupéry asserted that elegance in engineering is
@@ -379,9 +379,9 @@
 \#   Requires unit of measure.
 \#
 .MAC LL END
-.    nr #L_LENGTH (\\$1)
 .    nr #USER_SET_L_LENGTH 1
-.    ll \\n[#L_LENGTH]u
+.    ll \\$1
+.    nr #L_LENGTH \\n(.l
 .    ta \\n(.lu
 .END
 \#
@@ -563,24 +563,28 @@
 .    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
-.    \}
+.    if !\\n[#DOCS] \{\
+.       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 \{\
-.       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
+.       if \\n[#T_MARGIN_SET]=1 \{\
+.          ie (\\n(nl >= \\n[#T_MARGIN]) \{\
+.             if \\n(.n=0 \{\
+'                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
@@ -609,6 +613,7 @@
 .    if \\n[#PRINT_STYLE]=1 \{ .return \}
 .    if \\n[#IGNORE]        \{ .return \}
 .    nr #AUTO_LEAD 1
+.    nr #OLD_LEAD \\n(.v
 .    nr #AUTOLEAD_VALUE (p;\\$1)
 .    ie \\n[#NUM_ARGS]=2 \{\
 .       if '\\$2'FACTOR' \{\
@@ -619,9 +624,30 @@
 .    el \{\
 .       vs \\n[#PT_SIZE]u+\\n[#AUTOLEAD_VALUE]u
 .    \}
-.    if \\n[#T_MARGIN_SET] \{\
-.       sp |\\n[#T_MARGIN]u-1v
-.       rr #T_MARGIN_SET
+.    nr #TOP_BASELINE_ADJ \\n(.v-\\n[#OLD_LEAD]
+.    if !\\n[#DOCS] \{\
+.       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 \{\
+.          ie (\\n(nl >= \\n[#T_MARGIN]) \{\
+.             if \\n(.n=0 \{\
+'                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
 \#
@@ -987,24 +1013,32 @@
 .MAC ALD END
 .    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 !r#DOCS \{\
+.       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
+.          ie !r#DOCS \{\
+.             PRINT \&
+.             sp \\n[#ALD]u-1v
+.          \}
+.          el \{ .sp \\n[#ALD]u \}
 .       \}
 .       el \{ .sp \\n[#ALD]u \}
 .    \}
 .    if '\\$0'SPACE' \{\
 .       ie \\n(nl=\\n[#T_MARGIN] \{\
-.          PRINT \&
-.          sp \\$1-1v
+.          ie !r#DOCS \{\
+.             PRINT \&
+.             sp \\$1-1v
+.          \}
+.          el \{ .sp \\n[#ALD]u \}
 .       \}
 .       el \{ .sp \\$1u \}
 .    \}
@@ -6798,6 +6832,7 @@
 .             ie \\n[#EPI_LINES]%2=1 \{ .ALD \\n[#DOC_LEAD]u \}
 .             el \{ .ALD \\n[#DOC_LEAD]u/2u \}
 .          \}
+.          SHIM
 .       \}
 .       if \\n[#PRINT_STYLE]=2 \{\
 .          if \\n[#EPI_WHITESPACE]<\\n[#DOC_LEAD] \{\




reply via email to

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