Fri 03 Nov 2017 05:22:38 PM UTC, 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.
|
Wed 01 Nov 2017 06:27:54 PM UTC, comment #2:
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
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.
|
Wed 01 Nov 2017 03:08:06 AM UTC, comment #1:
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.
<pre>
@@ -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]
\#
\# ====================================================================
</pre>
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?
<pre>
@@ -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
+.\}
+\#
</pre>
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.
|
Fri 28 Jul 2017 09:38:08 PM UTC, original submission:
|