[bug #51608] [PATCH] om.tmac-u: Fix some mistakes, fix one bug

2018-11-05 Thread G. Branden Robinson
Update of bug #51608 (project groff):

 Assigned to:gbranden => PTPi   
 Open/Closed:Open => Closed 
 Planned Release:None => 1.22.4 


___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/


___
bug-groff mailing list
bug-groff@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-groff


[bug #51608] [PATCH] om.tmac-u: Fix some mistakes, fix one bug

2017-11-03 Thread Peter Schaffter
Update of bug #51608 (project groff):

  Status:   Need Info => Fixed  

___

Follow-up Comment #7:

Thanks, Bjarni.  I see what's causing the warnings.

All the undefnined macro warnings except END and BREAK_QUOTE are the result of
aliases preceding the definition of the macros being aliased.

END is not a macro, but rather a macro closure argument (second argument to
MAC, which is an alias of .de) used throughout.  groff shouldn't be treating
it as an undefined macro.  Since it is, defining it as a blank macro is the
only way to remove the warning.

BREAK_QUOTE is not used any more.

The undefined register #EN_Q_AUTOLEAD is the result of a missing backslash.

Rather than apply your patch, I've moved alias definitions to their correct
locations, removed the aliases of BREAK_QUOTE, fixed the missing backslash,
and defined END near the top of the file.  I'll push the changes later today
(2017-11-03) and mark this bug Fixed.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
bug-groff mailing list
bug-groff@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-groff


[bug #51608] [PATCH] om.tmac-u: Fix some mistakes, fix one bug

2017-11-02 Thread Bjarni Ingi Gislason
Follow-up Comment #6, bug #51608 (project groff):


  The undefined entities I named in my patch can be seen by executing
"test-groff -ww -mpdf om.tmac"

om.tmac:219: warning: macro `END' not defined
om.tmac:2686: warning: macro `PDF_LINK_COLOR' not defined
om.tmac:2687: warning: macro `AUTO_RELOCATE_TOC' not defined
om.tmac:8805: warning: number register `#EN_Q_AUTOLEAD' not defined
om.tmac:13081: warning: macro `BREAK_QUOTE' not defined
om.tmac:13082: warning: macro `BREAK_QUOTE' not defined
om.tmac:13083: warning: macro `BREAK_QUOTE' not defined
om.tmac:13099: warning: macro `INDENT_REFS' not defined

  The register PDFHREF.VIEW.LEADING is not here, so it is defined in
"pdf.tmac".

  The macros END and BREAK_QUOTE are never defined.

  The macros, registers PDF_LINK_COLOR, AUTO_RELOCATE_TOC, #EN_Q_AUTOLEAD,
and INDENT_REFS are used before being defined.




___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
bug-groff mailing list
bug-groff@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-groff


[bug #51608] [PATCH] om.tmac-u: Fix some mistakes, fix one bug

2017-11-02 Thread Bjarni Ingi Gislason
Follow-up Comment #5, bug #51608 (project groff):


  My patch simply uses exactly the same definitions as "groff" does in the
same situation.
  The patch simply makes the default behaviour of "groff" visible.

  It also avoids warnings (feedback) from "groff".

  The macro "END" is used many times and should therefore be unconditionally
defined:

.de END
..

  I did not find any definition of this macro in my git/groff repository.



___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
bug-groff mailing list
bug-groff@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-groff


[bug #51608] [PATCH] om.tmac-u: Fix some mistakes, fix one bug

2017-11-02 Thread Peter Schaffter
Follow-up Comment #4, bug #51608 (project groff):

Which warnings are you seeing?  Also, I'm not sure what you mean by "import
the mom macros by hand."  Can you attach a file and give the command line
invocation you're using?

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
bug-groff mailing list
bug-groff@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-groff


[bug #51608] [PATCH] om.tmac-u: Fix some mistakes, fix one bug

2017-11-02 Thread G. Branden Robinson
Follow-up Comment #3, bug #51608 (project groff):

Thanks for the feedback, Peter!

I can reproduce these warnings if I prepare a simple document and import the
mom macros "by hand", not messing with pdfroff and similar.

Is that no longer a valid use case for the mom macros?  It seems to me like it
still could be.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
bug-groff mailing list
bug-groff@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-groff


[bug #51608] [PATCH] om.tmac-u: Fix some mistakes, fix one bug

2017-11-01 Thread Peter Schaffter
Follow-up Comment #2, bug #51608 (project groff):


@@ -221,6 +221,9 @@ end 
.ds PDFHREF.TEXTCOL.DEFAULT 0.0 0.3 0.9 
.nr PDFHREF.VIEW.LEADING.C 3i 
.nr PDFHREF.VIEW.LEADING.T 1i 
+.if !r PDFHREF.VIEW.LEADING \{\ 
+. nr PDFHREF.VIEW.LEADING 0 
+.\} 
.nr PDFHREF.VIEW.LEADING.H \n[PDFHREF.VIEW.LEADING] 
\# 
\# ==
 
_That seems like it's asking for trouble; if anything ever dereferences the
PDFHREF.VIEW.LEADING or PDHREF.VIEW.LEADING.H registers before redefining
them, and if they do what their names suggest, the resulting text will be "set
solid" with no interline spacing. Won't it?_

PDFHREF.VIEW.LEADING controls the distance from the top of the PDF viewer
window to the baseline of link targets.  It has no effect on the formatting of
the .pdf file itself.  The register is set in pdf.tmac; the default is 5
points (5000u).  There's no need for


.if !r PDFHREF.VIEW.LEADING


There's no need to define the "undefined" macros/registers either since, after
loading pdf.tmac and om.tmac, they are, in fact, defined.  The assumption that
pdf.tmac (Deri's re-write of Keith's pdfmark.tmac) is loaded is correct since
pdf.tmac is loaded from troffrc when groff is called with -Tpdf.

The error "can't transparently output node at top level" may safely be
ignored, which is documented.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
bug-groff mailing list
bug-groff@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-groff


[bug #51608] [PATCH] om.tmac-u: Fix some mistakes, fix one bug

2017-10-31 Thread G. Branden Robinson
Update of bug #51608 (project groff):

  Status:None => Need Info  
 Assigned to:None => gbranden   


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
bug-groff mailing list
bug-groff@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-groff


[bug #51608] [PATCH] om.tmac-u: Fix some mistakes, fix one bug

2017-10-31 Thread G. Branden Robinson
Follow-up Comment #1, bug #51608 (project groff):

I've fixed all but a few of these problems; unfortunately the ones that remain
are probably exactly the ones that got Bjarni's attention because they make
groff spew warnings.


@@ -221,6 +221,9 @@ end
 .ds PDFHREF.TEXTCOL.DEFAULT 0.0 0.3 0.9
 .nr PDFHREF.VIEW.LEADING.C 3i
 .nr PDFHREF.VIEW.LEADING.T 1i
+.if !r PDFHREF.VIEW.LEADING \{\
+.nr PDFHREF.VIEW.LEADING 0
+.\}
 .nr PDFHREF.VIEW.LEADING.H \n[PDFHREF.VIEW.LEADING]
 \#
 \# 


That seems like it's asking for trouble; if anything ever dereferences the
PDFHREF.VIEW.LEADING or PDHREF.VIEW.LEADING.H registers before redefining
them, and if they do what their names suggest, the resulting text will be "set
solid" with no interline spacing. Won't it?


@@ -264,6 +267,42 @@ end
 .nr #L_MARGIN \n[.o]  \" Tabs, etc require #L_MARGIN
 .cflags 4 /\[en]  \" So slash and en-dashes get broken
 \#
+\# DEFINE UNDEFINED MACROS AND REGISTERS
+\#
+.if !d AUTO_RELOCATE_TOC \{\
+.de AUTO_RELOCATE_TOC
+..
+.\}
+.
+.if !d BREAK_QUOTE \{\
+.de BREAK_QUOTE
+..
+.\}
+.
+.if !d END \{\
+.de END
+..
+.\}
+.
+.if !d INDENT_REFS \{\
+.de INDENT_REFS
+..
+.\}
+.
+.if !d PDF_LINK_COLOR \{\
+.de PDF_LINK_COLOR
+..
+.\}
+.
+.if !d pdfview \{\
+.de pdfview
+..
+.\}
+.
+.if !r #EN_Q_AUTOLEAD \{\
+.nr #EN_Q_AUTOLEAD 0
+.\}
+\#


I'd like to run these by Peter Schaffter.  There seems to be some assumption
that pdf.tmac or pdfmark.tmac will already be loaded.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
bug-groff mailing list
bug-groff@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-groff


[bug #51608] [PATCH] om.tmac-u: Fix some mistakes, fix one bug

2017-09-01 Thread Bertrand Garrigues
Update of bug #51608 (project groff):

Category:None => Macro - mom


___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
bug-groff mailing list
bug-groff@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-groff


[bug #51608] [PATCH] om.tmac-u: Fix some mistakes, fix one bug

2017-07-28 Thread Bjarni Ingi Gislason
URL:
  

 Summary: [PATCH] om.tmac-u: Fix some mistakes, fix one bug
 Project: GNU troff
Submitted by: bjarniig
Submitted on: Fri 28 Jul 2017 09:38:08 PM UTC
Severity: 3 - Normal
  Item Group: None
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
 Discussion Lock: Any
 Planned Release: None

___

Details:


>From 23a25549fcf88bfae6af80f57e96bfd0ef8899e8 Mon Sep 17 00:00:00 2001
From: Bjarni Ingi Gislason 
Date: Fri, 28 Jul 2017 21:33:48 +
Subject: [PATCH] om.tmac-u: Fix some mistakes, fix one bug

  Fix some spelling

  Define undefined macros and registers

  Fix the spelling of register "\\*[label-type]*label-suffx-set"

Signed-off-by: Bjarni Ingi Gislason 
---
 contrib/mom/om.tmac-u | 77
++-
 1 file changed, 58 insertions(+), 19 deletions(-)

diff --git a/contrib/mom/om.tmac-u b/contrib/mom/om.tmac-u
index c20510e9..c34ea5c1 100644
--- a/contrib/mom/om.tmac-u
+++ b/contrib/mom/om.tmac-u
@@ -161,7 +161,7 @@ extensions, and float management).
 .sty \n[.fp] UBLI\"  Ultra Black Italic
 .sty \n[.fp] UBLCD   \"  Ultra Black Condensed
 .sty \n[.fp] UBLCDI  \"  Ultra Black Condensed Italic
-.sty \n[.fp] UBLEX   \"  Ultra Black Exteneded
+.sty \n[.fp] UBLEX   \"  Ultra Black Extended
 .sty \n[.fp] UBLEXI  \"  Ultra Black Extended Italic
 \#
 .sty \n[.fp] SC  \"  Small Caps Roman
@@ -222,6 +222,9 @@ end
 .ds PDFHREF.TEXTCOL.DEFAULT 0.0 0.3 0.9
 .nr PDFHREF.VIEW.LEADING.C 3i
 .nr PDFHREF.VIEW.LEADING.T 1i
+.if !r PDFHREF.VIEW.LEADING \{\
+.nr PDFHREF.VIEW.LEADING 0
+.\}
 .nr PDFHREF.VIEW.LEADING.H \n[PDFHREF.VIEW.LEADING]
 \#
 \# 
@@ -265,6 +268,42 @@ end
 .nr #L_MARGIN \n[.o]  \" Tabs, etc require #L_MARGIN
 .cflags 4 /\[en]  \" So slash and en-dashes get broken
 \#
+\# DEFINE UNDEFINED MACROS AND REGISTERS
+\#
+.if !d AUTO_RELOCATE_TOC \{\
+.de AUTO_RELOCATE_TOC
+..
+.\}
+.
+.if !d BREAK_QUOTE \{\
+.de BREAK_QUOTE
+..
+.\}
+.
+.if !d END \{\
+.de END
+..
+.\}
+.
+.if !d INDENT_REFS \{\
+.de INDENT_REFS
+..
+.\}
+.
+.if !d PDF_LINK_COLOR \{\
+.de PDF_LINK_COLOR
+..
+.\}
+.
+.if !d pdfview \{\
+.de pdfview
+..
+.\}
+.
+.if !r #EN_Q_AUTOLEAD \{\
+.nr #EN_Q_AUTOLEAD 0
+.\}
+\#
 \# 
 \#
 \# +++PAGE LAYOUT+++
@@ -1734,7 +1773,7 @@ end
 \# *Argument:
 \#   
 \# *Function:
-\#   Automagically moves to TAB on the same line as the last
+\#   Automatically moves to TAB on the same line as the last
 \#   line of the previous tab.
 \# *Notes:
 \#   The \c inline must be appended to the end of input lines when in
@@ -2376,7 +2415,7 @@ end
 \#
 \# PAD
 \# ---
-\# *Argments:
+\# *Arguments:
 \#   ""
 \#   ""
 \# *Function:
@@ -3686,7 +3725,7 @@ end
 \#   a trap (when they break the preceding line, they spring the
 \#   trap, and groff won't back up to the line preceding the trap).
 \#   TRAP is a kludge to get EL and TN work properly on last lines.
-\#   The user simply enloses the offending lines in TRAP OFF/TRAP.
+\#   The user simply encloses the offending lines in TRAP OFF/TRAP.
 \#
 .MAC TRAP END
 .ie '\\$1'' .vpt
@@ -4283,7 +4322,7 @@ y\R'#DESCENDER \\n[.cdp]'
 \#   Instructs TYPEWRITE to treat italics as italics, whether
 \#   invoked via control lines or inline.
 \# *Notes:
-\#   ITALIC_MEANS_ITALIC and UNDERLINE_ITALIC are mututally exclusive,
+\#   ITALIC_MEANS_ITALIC and UNDERLINE_ITALIC are mutually exclusive,
 \#   hence invoking the one automatically turns off the other.
 \#
 .MAC ITALIC_MEANS_ITALIC END
@@ -4307,7 +4346,7 @@ y\R'#DESCENDER \\n[.cdp]'
 \#   Instructs TYPEWRITE to underline italics, whether invoked
 \#   via control lines or inline.
 \# *Notes:
-\#   UNDERLINE_ITALIC and ITALIC_MEANS_ITALIC are mututally exclusive,
+\#   UNDERLINE_ITALIC and ITALIC_MEANS_ITALIC are mutually exclusive,
 \#   hence invoking the one automatically turns off the other.
 \#
 \#   UNDERLINE_ITALIC is the default for TYPEWRITE.
@@ -4338,7 +4377,7 @@ y\R'#DESCENDER \\n[.cdp]'
 \#   italic but didn't have it, ergo the need to tell TYPEWRITE to
 \#   treat \*[SLANT] as italic (i.e. underlined).
 \#
-\#   UNDERLINE_SLANT and SLANT_MEANS_SLANT are mututally exclusive,
+\#   UNDERLINE_SLANT and SLANT_MEANS_SLANT are mutually exclusive,
 \#   hence invoking the one automatically turns off the other.
 \#
 \#   UNDERLINE_SLANT is the default for TYPEWRITE.
@@ -7557,7 +7596,7 @@ $\\*[DOC_]COVERTITLE_\\n+[#\\*[DOC_]COVERTITLE_NUM]
\\$\\n[#\\*[DOC_]COVERTITLE_
 \# *Arguments:
 \#   
 \# *Function:
-\#   Macro to start document processiong.  Reads in default