groff-commit
[Top][All Lists]
Advanced

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

[groff] 01/01: Fix DO_QUOTE not restting page offset when called within


From: Peter Schaffter
Subject: [groff] 01/01: Fix DO_QUOTE not restting page offset when called within a float.
Date: Fri, 3 Nov 2017 13:20:52 -0400 (EDT)

PTPi pushed a commit to branch master
in repository groff.

commit ee9d8f5360232030f593d54d2e87db78afa1e004
Author: Peter Schaffter <address@hidden>
Date:   Fri Nov 3 13:11:36 2017 -0400

    Fix DO_QUOTE not restting page offset when called within a float.
    
    Macro _STYLE: add check for $HDR_FTR string length <=5 before
    grabbing substring.
    
    Fixed position of aliases that were being created prior to their
    macro definitions.
    
    Add missing backslash to \n[#EN_Q_AUTOLEAD] in macro QUOTE.
    
    Defined END as a blank macro to prevent groff warning.
---
 contrib/mom/om.tmac-u | 32 ++++++++++++++++++--------------
 1 file changed, 18 insertions(+), 14 deletions(-)

diff --git a/contrib/mom/om.tmac-u b/contrib/mom/om.tmac-u
index 17b0eb7..de8a325 100644
--- a/contrib/mom/om.tmac-u
+++ b/contrib/mom/om.tmac-u
@@ -265,6 +265,13 @@ end
 .nr #L_MARGIN \n[.o]  \" Tabs, etc require #L_MARGIN
 .cflags 4 /\[en]      \" So slash and en-dashes get broken
 \#
+\# 'END' is used throughout as the 2nd arg to 'MAC' (alias of .de)
+\# Defining it as a macro here prevents groff from complaining
+\# that 'END' isn't defined.
+\#
+.de END
+..
+\#
 \# ====================================================================
 \#
 \# +++PAGE LAYOUT+++
@@ -4032,8 +4039,6 @@ y\R'#DESCENDER \\n[.cdp]'
 .ALIAS TB                TAB
 .ALIAS UNDERSCORE_2      UNDERSCORE2
 .ALIAS XCOLOUR           XCOLOR
-.ALIAS PDF_LINK_COLOUR   PDF_LINK_COLOR
-.ALIAS AUTO_TOC_RELOCATE AUTO_RELOCATE_TOC
 \#
 \# ====================================================================
 \#
@@ -5307,7 +5312,8 @@ y\R'#DESCENDER \\n[.cdp]'
 .    ds $STYLE_TYPE \\$0
 .    substring $STYLE_TYPE 0 -7
 .    ds $HDR_FTR \\*[$STYLE_TYPE]
-.    substring $HDR_FTR 0 5 \" HEADER or FOOTER
+.    length #HDR_FTR_STRING $HDR_FTR
+.    if \\n[#HDR_FTR_STRING]<=5 .substring $HDR_FTR 0 5 \" HEADER or FOOTER
 .    if '\\*[$HDR_FTR]'HEADER' .ds $HDR_FTR HEADER
 .    if '\\*[$HDR_FTR]'FOOTER' .ds $HDR_FTR FOOTER
 .    ds $POS \\$0
@@ -11569,11 +11575,6 @@ Shimming must be disabled with NO_SHIM before using 
FLEX.
 .    \}
 .    if \\n[#PP_STYLE]=2 \{\
 \!.     br
-.       if \\n[#BROKEN_QUOTE] \{\
-.          ie \\n[nl]=\\n[#PAGE_TOP] .nr #Q_PP 1
-.          el .nr #Q_PP 0
-.          rr #BROKEN_QUOTE
-.       \}
 .       ie \\n[#Q_PP]=0 \{\
 .          if \\n[#INDENT_FIRST_PARAS] \
 .             ti \\n[#PP_INDENT]u/2u
@@ -11762,7 +11763,7 @@ Shimming must be disabled with NO_SHIM before using 
FLEX.
 .             ps \\n[#EN_PS]u\\*[$QUOTE_SIZE_CHANGE]
 .             ie !r #EN_Q_AUTOLEAD .vs \\n[#EN_Q_LEAD]u
 .             el \{\
-.                vs \\n[.ps]u+\n[#EN_Q_AUTOLEAD]u
+.                vs \\n[.ps]u+\\n[#EN_Q_AUTOLEAD]u
 .                nr #EN_Q_LEAD \\n[.v]
 .             \}
 .          \}
@@ -12247,7 +12248,7 @@ Shimming must be disabled with NO_SHIM before using 
FLEX.
 .                   \}
 .                \}
 .                el \{\
-.                   if !\\n[#NO_SHIM] .SHIM
+.                   ie !\\n[#NO_SHIM] .SHIM
 .                   el \
 .                      if !\\n[#NO_FLEX] .FLEX
 .\" Make sure that Q_LEAD_DIFF is not added to the first line of
@@ -12314,6 +12315,7 @@ Shimming must be disabled with NO_SHIM before using 
FLEX.
 .    nr #QUOTE_4_HD 1
 .    rr #\\*[BQ]_LEAD_REAL
 .    rm BQ
+.    if '\\n[.z]'FLOAT*DIV' \!.po \\n[#L_MARGIN]u
 .END
 .
 .ALIAS DO_BLOCKQUOTE DO_QUOTE
@@ -17486,9 +17488,6 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
 \# Create aliases to make life easier for users: synonyms, short forms
 \# and alternate spellings.
 \#
-.ALIAS BREAK_BLOCKQUOTE    BREAK_QUOTE
-.ALIAS BREAK_CITATION      BREAK_QUOTE
-.ALIAS BREAK_CITE          BREAK_QUOTE
 .ALIAS CITATION            BLOCKQUOTE
 .ALIAS CITE                BLOCKQUOTE
 .ALIAS DOC_R_MARGIN        DOC_RIGHT_MARGIN
@@ -17504,7 +17503,6 @@ E\\R'#CAP_HEIGHT \\n[.cht]'
 .ALIAS PAGENUM             PAGENUMBER
 .ALIAS PAGINATION          PAGINATE
 .ALIAS PP_FT               PP_FONT
-.ALIAS REF_INDENT          INDENT_REFS
 .ALIAS TOC_PS              TOC_PT_SIZE
 \#
 \# HEADER and FOOTER macros
@@ -20969,6 +20967,8 @@ does not fit on page \\n[pgnum]\\*[col-num].
 .    if '\\$1'BIBLIO'   .ds $REF_BIB_INDENT \\$2
 .END
 \#
+.ALIAS REF_INDENT INDENT_REFS
+\#
 \# Hyphenation of references
 \# -------------------------
 \# *Argument:
@@ -22192,6 +22192,8 @@ No room to start \\*[MN-pos] margin note #\\n[MN-curr] 
on page \\n[#P].
 .       nr PDFHREF_COLOR_SET 1
 .END
 \#
+.ALIAS PDF_LINK_COLOUR PDF_LINK_COLOR
+\#
 \# AUTO_RELOCATE_TOC
 \# -----------------
 \#
@@ -22207,6 +22209,8 @@ No room to start \\*[MN-pos] margin note #\\n[MN-curr] 
on page \\n[#P].
 .    if '\\$1'AFTER_COVER'     .nr TOC.RELOCATE 6
 .END
 \#
+.ALIAS AUTO_TOC_RELOCATE AUTO_RELOCATE_TOC
+\#
 \# PDF_BOOKMARK
 \# ------------
 \# *Argument:



reply via email to

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