groff-commit
[Top][All Lists]
Advanced

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

[groff] 01/01: - Fix to bug in LIST ALPHA. - Add ADJUST to QUOTE/BLOCKQU


From: Peter Schaffter
Subject: [groff] 01/01: - Fix to bug in LIST ALPHA. - Add ADJUST to QUOTE/BLOCKQUOTE. - Improve handling of PDF_TARGET when descriptive text is to be output. - Doc updates.
Date: Sat, 28 Feb 2015 14:53:39 +0000

PTPi pushed a commit to branch master
in repository groff.

commit 5f755aaeb6fcd284d2f4557eedab929323e9a626
Author: Peter Schaffter <address@hidden>
Date:   Sat Feb 28 09:42:10 2015 -0500

    - Fix to bug in LIST ALPHA.
    - Add ADJUST to QUOTE/BLOCKQUOTE.
    - Improve handling of PDF_TARGET when descriptive text is to be
      output.
    - Doc updates.
---
 contrib/mom/BUGS                     |    3 +
 contrib/mom/ChangeLog                |    9 +++-
 contrib/mom/momdoc/docelement.html   |   86 ++++++++++++++++++++++------------
 contrib/mom/momdoc/headfootpage.html |    4 +-
 contrib/mom/om.tmac-u                |   47 +++++++++++++------
 5 files changed, 101 insertions(+), 48 deletions(-)

diff --git a/contrib/mom/BUGS b/contrib/mom/BUGS
index 3412e74..e113a88 100644
--- a/contrib/mom/BUGS
+++ b/contrib/mom/BUGS
@@ -25,6 +25,9 @@ Also, please--no html email.  That, too, gets nuked.
 Version 2.1
 ===========
 
+LIST ALPHA emitting a number register to output.
+---Fixed---
+
 HEADER_PLAIN and FOOTER_PLAIN broken.
 ---Fixed---
 
diff --git a/contrib/mom/ChangeLog b/contrib/mom/ChangeLog
index 755e8d3..89db7ae 100644
--- a/contrib/mom/ChangeLog
+++ b/contrib/mom/ChangeLog
@@ -1,7 +1,12 @@
+* Sat Feb 28 2015
+
+       o Added an ADJUST argument to QUOTE and BLOCKQUOTE to facilitate
+               optical centering tweaks
+
 * Sat Feb 21 2015
 
-  o Expanded scope of _STYLE macros to headers/footers and
-    page numbers
+       o Expanded scope of _STYLE macros to headers/footers and
+               page numbers
 
 * Thu Feb 5 2015
 
diff --git a/contrib/mom/momdoc/docelement.html 
b/contrib/mom/momdoc/docelement.html
index 50017d6..a267e66 100644
--- a/contrib/mom/momdoc/docelement.html
+++ b/contrib/mom/momdoc/docelement.html
@@ -2016,31 +2016,9 @@ This behaviour can be changed with the control macro
 </p>
 
 <div class="box-tip">
-<p class="tip">
-<span class="tip">Tips on vertical spacing around quotes:</span>
-If you wish to adjust the spacing before or after a quote or blockquote
-manually (with
-<a href="typesetting.html#space">SPACE</a>/
-<a href="typesetting.html#ald">ALD</a>/
-<a href="typesetting.html#rld">RLD</a>),
-do so <i>outside</i> the <kbd>.QUOTE</kbd> or <kbd>.BLOCKQUOTE</kbd>,
-like this:
-<br/>
-<span class="pre-in-pp">
-  .SP -3p
-  .QUOTE
-  Candy is dandy
-  But liquor is quicker.
-  .QUOTE OFF
-  .SP -3p
-</span>
-</p>
-</div>
-
-<div class="box-tip">
-<h2 id="quote-spacing-notes" class="docs" style="padding-top: 9px; font-size: 
100%;">Further notes on quote spacing</h2>
+<h3 id="quote-spacing-notes" class="docs" style="padding-top: 9px; font-size: 
95%;">Notes on quote spacing</h3>
 
-<p clas"defaults">
+<p style="margin-top: .5em">
 If your quote (or blockquote) leading differs from the document
 leading, mom attempts to observe the same rules for vertical
 whitespace outlined above; however, she will also insert a small,
@@ -2056,7 +2034,7 @@ equalized whitespace at marked places is a limitation of 
groff,
 which, by and large, processes text on a line-per-line basis.)
 </p>
 
-<h3 id="no-shim" class="docs">Disable shimming of quotes and blockquotes</h3>
+<h4 id="no-shim" class="docs">Disable shimming of quotes and blockquotes</h4>
 
 <p>
 If you don&#8217;t want the behaviour described above (ie you
@@ -2137,8 +2115,12 @@ the <kbd>FORCE</kbd> argument.
 </div>
 
 <div class="box-macro-args">
-Macro: <b>QUOTE</b> <kbd class="macro-args">toggle</kbd>
+Macro: <b>QUOTE</b> <kbd class="macro-args">[ ADJUST +|-&lt;space&gt; ] | 
&lt;anything&gt;</kbd>
 </div>
+<p class="requires">
+&bull;&nbsp;The argument to <kbd style="font-style: normal">ADJUST</kbd> 
requires a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
 
 <p>
 QUOTE is a toggle macro.  To begin a section of quoted text, invoke
@@ -2155,6 +2137,24 @@ END, X, Q</kbd>...) to turn it off.  Example:
   And bits of her tits in Brazil.
   .QUOTE END
 </span>
+Mom does her best to equalize whitespace around quotes and make
+sure the line following it falls on a valid baseline.  On occasion,
+you may need to tweak the quote placement slightly, which is done
+by passing <kbd>ADJUST</kbd> to QUOTE with a plus or minus value.
+The quote will be lowered (<kbd>+</kbd>) or raised (<kbd>-</kbd>)
+<i>within the space allotted for it</i> by the given amount.  For
+example, to lower a quote slightly within the space allotted for it,
+you&#8217;d do
+<br/>
+<span class="pre-in-pp">
+  .QUOTE ADJUST +3p
+  There was a soprano named Golda
+  Whose lovers grew colda and colda
+  For during love-making
+  She'd sing the earth-shaking
+  Love theme from Tristan und Isolde.
+  .QUOTE off
+</span>
 </p>
 
 <div class="defaults-container" style="background-color: #ded4bd; border: 
none;">
@@ -2242,7 +2242,7 @@ below quotes, invoke
 </span>
 with no argument.  If you wish to restore mom&#8217;s
 default behaviour regarding the spacing of quotes (see
-<a href="#quote-spacing">above</a>),
+<a href="#quote-spacing">Quote spacing</a>),
 invoke the macro with any argument (<kbd>OFF, QUIT, END, X</kbd>...)
 </p>
 
@@ -2309,7 +2309,7 @@ left.
 Besides indenting blockquotes, mom further sets them off from
 running text with a small amount of vertical whitespace top and
 bottom.  (See
-<a href="#quote-spacing">above</a>
+<a href="#quote-spacing">Quote spacing</a>
 for a complete explanation of how this is managed, and how
 to control it.)
 </p>
@@ -2321,13 +2321,18 @@ to control it.)
 </div>
 
 <div class="box-macro-args">
-Macro: <b>BLOCKQUOTE</b> <kbd class="macro-args">&lt;toggle&gt;</kbd>
+Macro: <b>BLOCKQUOTE</b>  <kbd class="macro-args">[ ADJUST +|-&lt;space&gt; ] 
| &lt;anything&gt;</kbd>
 </div>
 
 <p class="alias" style="margin-bottom: 0;">
 <i>Aliases: </i> <b>CITE, CITATION</b>
 </p>
 
+<p class="requires">
+&bull;&nbsp;The argument to <kbd style="font-style: normal">ADJUST</kbd> 
requires a
+<a href="definitions.html#unitofmeasure">unit of measure</a>
+</p>
+
 <p>
 BLOCKQUOTE is a toggle macro.  To begin a cited passage, invoke
 the tag with no argument, then type in your blockquote.  When
@@ -2349,6 +2354,27 @@ introduce each paragraph&mdash;including the 
first&mdash;with
 <kbd><a href="#pp">.PP</a></kbd>.
 </p>
 
+<p>
+Mom does her best to equalize whitespace around blockquotes and make
+sure the line following it falls on a valid baseline.  On occasion,
+you may need to tweak the blockquote placement slightly, which is
+done by passing <kbd>ADJUST</kbd> to BLOCKQUOTE with a plus or minus
+value.  The blockquote will be lowered (<kbd>+</kbd>) or raised
+(<kbd>-</kbd>) <i>within the space allotted for it</i> by the given
+amount.  For example, to raise a blockquote slightly within the
+space allotted for it, you&#8217;d do
+<br/>
+<span class="pre-in-pp">
+  .BLOCKQUOTE ADJUST -3p
+  True! - nervous - very, very dreadfully nervous I had been and
+  am; but why will you say that I am mad?  The disease had sharpened
+  my senses - not destroyed - not dulled them.
+  .RIGHT
+  \[em]Edgar Allen Poe, The Tell-Tale Heart
+  .QUOTE off
+</span>
+</p>
+
 <div class="box-tip">
 <p class="tip">
 <span class="note">Note:</span>
@@ -2436,7 +2462,7 @@ below blockquotes, invoke
 </span>
 with no argument.  If you wish to restore mom&#8217;s default
 behaviour regarding the spacing of blockquotes (see
-<a href="#quote-spacing">above</a>),
+<a href="#quote-spacing">Quote spacing</a>),
 invoke the macro with any argument (<b>OFF, QUIT, END,
 X</b>...).
 </p>
diff --git a/contrib/mom/momdoc/headfootpage.html 
b/contrib/mom/momdoc/headfootpage.html
index c678696..2f8d07f 100644
--- a/contrib/mom/momdoc/headfootpage.html
+++ b/contrib/mom/momdoc/headfootpage.html
@@ -291,7 +291,9 @@ of running text can be controlled with the macro,
 <a href="#hdrftr-gap">HEADER_GAP</a>
 (effectively making HEADER_MARGIN + HEADER_GAP the top margin of
 running text unless you give mom a literal top margin (with
-<a href="typesetting.html#t-margin">T_MARGIN</a>),
+<a href="typesetting.html#t-margin">T_MARGIN</a>)
+or
+<a href="typesetting.html#page">PAGE</a>,
 in which case she ignores HEADER_GAP and begins the running text at
 whatever top margin you give.
 </p>
diff --git a/contrib/mom/om.tmac-u b/contrib/mom/om.tmac-u
index b55ba58..660a907 100644
--- a/contrib/mom/om.tmac-u
+++ b/contrib/mom/om.tmac-u
@@ -7484,8 +7484,8 @@ $\\*[DOC_]COVERTITLE_\\n+[#\\*[DOC_]COVERTITLE_NUM] 
\\$\\n[#\\*[DOC_]COVERTITLE_
 .    if !r#EN_Q_AUTOLEAD  .nr #EN_Q_LEAD \\n[#EN_LEAD]
 .    if !r#EN_BQ_AUTOLEAD .nr #EN_BQ_LEAD \\n[#EN_LEAD]
 .\"  TOC/recto-verso stuff
-.    if address@hidden .nr @L_MARGIN \\n[#DOC_L_MARGIN]
-.    if address@hidden .nr @R_MARGIN \\n[#DOC_R_MARGIN]
+.    nr @L_MARGIN \\n[#DOC_L_MARGIN]
+.    nr @R_MARGIN \\n[#DOC_R_MARGIN]
 .\" Covers and doc covers
 .    if \\n[#DOC_COVERS]=1 \{\
 .       if \\n[#DOC_COVER]=1 .DO_DOC_COVER
@@ -11325,6 +11325,10 @@ $\\*[DOC_]COVERTITLE_\\n+[#\\*[DOC_]COVERTITLE_NUM] 
\\$\\n[#\\*[DOC_]COVERTITLE_
 .       nr #NEXT_LN \\n[ln]
 .       nm
 .    \}
+.    if '\\$1'ADJUST' \{\
+.       ds $Q_SPACE_ADJUST \\$2
+.       shift 2
+.    \}
 .    ie '\\$1'' \{\
 .       ev QUOTE
 .       evc 0
@@ -11503,6 +11507,10 @@ $\\*[DOC_]COVERTITLE_\\n+[#\\*[DOC_]COVERTITLE_NUM] 
\\$\\n[#\\*[DOC_]COVERTITLE_
 .       nr #NEXT_LN \\n[ln]
 .       nm
 .    \}
+.    if '\\$1'ADJUST' \{\
+.       ds $BQ_SPACE_ADJUST \\$2
+.       shift 2
+.    \}
 .    if \\n[in-cutaround] .nr #PP_INDENT \\n[restore-pp-ind]/2
 .    ie '\\$1'' \{\
 .       ev BLOCKQUOTE
@@ -11674,7 +11682,7 @@ $\\*[DOC_]COVERTITLE_\\n+[#\\*[DOC_]COVERTITLE_NUM] 
\\$\\n[#\\*[DOC_]COVERTITLE_
 .          nr #CURRENT_V_POS \\n[nl]+\\n[#Q_DEPTH]
 .          SHIM
 .          rr #CALCULATE_ONLY
-.          nr #Q_SPACE_ADJ (\\n[#SHIM]/2)
+.          nr #Q_SPACE_EQ (\\n[#SHIM]/2)
 .          nr #TRAP \\n[.t]-1
 .       \}
 .    \}
@@ -11748,23 +11756,31 @@ $\\*[DOC_]COVERTITLE_\\n+[#\\*[DOC_]COVERTITLE_NUM] 
\\$\\n[#\\*[DOC_]COVERTITLE_
 .       el .in +\\*[$\\*[BQ]_OFFSET_VALUE]
 .    \}
 .    ie \\n[#START]=1 \{\
-.       ie !\\n[#Q_LEAD_DIFF]<0 .ALD \\n[#Q_SPACE_ADJ]u
+.       ie !\\n[#Q_LEAD_DIFF]<0 .ALD \\n[#Q_SPACE_EQ]u
 .       el .RLD 0-\\n[#Q_LEAD_DIFF]u
 .    \}
 .    el \{\
 .       if \\n[#PRINT_STYLE]=2 \{\
-.          if !\\n[.v]=\\n[#Q_LEAD_REAL] .ALD \\n[#Q_SPACE_ADJ]u
+.          if !\\n[.v]=\\n[#Q_LEAD_REAL] .ALD \\n[#Q_SPACE_EQ]u
 .       \}
 .    \}
 .    if \\n[#QUOTE]=1 \{\
+.       if !'\\*[$Q_SPACE_ADJUST]'' .sp +\\*[$Q_SPACE_ADJUST]
 .       nf
 .       P_QUOTE
-.       br
+.       if !'\\*[$Q_SPACE_ADJUST]'' \{\
+.          sp -\\*[$Q_SPACE_ADJUST]
+.          rm $Q_SPACE_ADJUST
+.       \}
 .    \}
 .    if \\n[#QUOTE]=2 \{\
+.       if !'\\*[$BQ_SPACE_ADJUST]'' .sp +\\*[$BQ_SPACE_ADJUST]
 .       nf
 .       B_QUOTE
-.       br
+.       if !'\\*[$BQ_SPACE_ADJUST]'' \{\
+.          sp -\\*[$BQ_SPACE_ADJUST]
+.          rm $BQ_SPACE_ADJUST
+.       \}
 .    \}
 .    if !\\n[#START] .rr #QUOTE
 .    if \\n[in-cutaround] .nr #PP_INDENT \\n[pp-ind-tmp]
@@ -11827,7 +11843,7 @@ $\\*[DOC_]COVERTITLE_\\n+[#\\*[DOC_]COVERTITLE_NUM] 
\\$\\n[#\\*[DOC_]COVERTITLE_
 .       \}
 .    \}
 .    if \\n[#RESTORE_NO_SHIM] .nr #NO_SHIM 1
-.    rr #Q_SPACE_ADJ
+.    rr #Q_SPACE_EQ
 .    if \\n[#LINENUMBERS]=2 \{\
 .       nr #LINENUMBERS 1
 .       if !\\n[#ENDNOTE] \{\
@@ -11944,9 +11960,9 @@ $\\*[DOC_]COVERTITLE_\\n+[#\\*[DOC_]COVERTITLE_NUM] 
\\$\\n[#\\*[DOC_]COVERTITLE_
 .
 .       \}
 .       nr #Q_PARTIAL_DEPTH -\\n[#Q_LEAD_REAL]
-.       nr #Q_SPACE_ADJ \
+.       nr #Q_SPACE_EQ \
 (\\n[#TRAP_DISTANCE]-1)-\\n[#Q_PARTIAL_DEPTH]+\\n[#Q_LEAD_DIFF]u
-.       if \\n[#FN_COUNT]>0 .nr #Q_SPACE_ADJ (\\n[#Q_SPACE_ADJ] / 2u)
+.       if \\n[#FN_COUNT]>0 .nr #Q_SPACE_EQ (\\n[#Q_SPACE_EQ] / 2u)
 .\" Hack to deal with the fact that even though the above routine
 .\" makes the bottom line of the quote fall exactly on the bottom
 .\" margin when traps are disabled, it refuses to do so when traps
@@ -15281,7 +15297,7 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
 .    if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'register' \{\
 .       nr #LIST_INDENT\\n[#DEPTH] \
 \w'\\*[$PREFIX\\n[#DEPTH]]m\\*[$SEPARATOR\\n[#DEPTH]]\ '
-.       if '\\*[$LIST_ARG_1]'ALPHA' nr #LIST_INDENT\\n[#DEPTH] \
+.       if '\\*[$LIST_ARG_1]'ALPHA' .nr #LIST_INDENT\\n[#DEPTH] \
 \w'\\*[$PREFIX\\n[#DEPTH]]M\\*[$SEPARATOR\\n[#DEPTH]]\ '
 .    \}
 .    if '\\*[$ENUMERATOR_TYPE\\n[#DEPTH]]'roman' \
@@ -16453,7 +16469,6 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
 .          nr no-adjust 1
 .          rr @TOP
 .       \}
-.       nf
 .       if \\n[float*tbl] \{\
 .          if (\\n[#MLA]=1)&(address@hidden) \
 .             chop FLOAT*DIV
@@ -16467,7 +16482,10 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
 .             \}
 .          \}
 .       \}
+.       ev FLOAT
+.       nf
 .       FLOAT*DIV
+.       ev
 .       if \\n[float*tbl] \{\
 .          ie \\n[tbl*boxed] \{\
 .             if \\n[dn]=\\n[bx-tbl-depth] .sp .35v
@@ -21242,7 +21260,8 @@ Macro MN: Warning: Right margin note #\\n[MN-curr] on 
page \\n[#P] shifted down.
 .MAC PDF_TARGET END
 .    ds ARG_1 \\$1
 .    shift
-.    pdfhref M -N\\*[ARG_1] -E -- \\$*
+.    ie '\\$*'' .pdfhref M -N \\*[ARG_1] -- \\$*
+.    el .pdfhref M -N \\*[ARG_1] -E -- \\$*
 .    if '\\*[.T]'ps' .if !dpdf:href.map .tm gropdf-info:href \\*[ARG_1] \\$*
 .END
 \#
@@ -21529,10 +21548,8 @@ Macro MN: Warning: Right margin note #\\n[MN-curr] on 
page \\n[#P] shifted down.
 .    rm pdf-img:adj
 .    rm pdf-img*caption
 .    rm pdf-img*caption-short
-.    rm pdf-img*caption-space
 .    rm pdf-img:file
 .    rm pdf-img*label
-.    rm pdf-img*label-space
 .    rm pdf-img:pos
 .    rm short
 .    rr ind-pre-img



reply via email to

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