bug-groff
[Top][All Lists]
Advanced

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

[bug #66332] [mom] Image caption not centered when set to render after l


From: G. Branden Robinson
Subject: [bug #66332] [mom] Image caption not centered when set to render after label
Date: Mon, 14 Oct 2024 18:07:13 -0400 (EDT)

Follow-up Comment #8, bug #66332 (group groff):

Hi Peter,

It's a syntax issue.  Here's a diff that fixes it.

$ git diff
diff --git a/contrib/mom/om.tmac b/contrib/mom/om.tmac
index 70ec03b7b..c3da997fd 100644
--- a/contrib/mom/om.tmac
+++ b/contrib/mom/om.tmac
@@ -23880,7 +23880,7 @@ .             defcolor pdf:href.colour rgb \\$1
 .       \}
 .       el \{\
 \!.        if !'\\*[pdf-img*caption\\*[short]]'' \
-\!.           TO_FIGURES "\\*[pdf-img*caption\\*[short]]"
+.           TO_FIGURES "\\*[pdf-img*caption\\*[short]]"
 .       \}
 .    \}
 .    if r IMG \{\

`\!`'s power to read until the end of the line is mighty, but it does
not overcome the meaning of the `\newline` escape sequence.  The lines
were "logically" joined so what you got was equivalent to this:

\!.        if !'\\*[pdf-img*caption\\*[short]]'' \!.           TO_FIGURES
"\\*[pdf-img*caption\\*[short]]"

...meaning that the consequent of the `if` request, because it was
_already_ escaping from the current diversion, escaped from the _next
higher_ diversion--or straight to grout.

Confirmed with experiment.


$ ./build/test-groff -Z -mom ATTIC/66332.mom | sed -n '110,112p'
gropdf-info:href fig:1 
n16158 0
V138474
H226000




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66332>

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

Attachment: signature.asc
Description: PGP signature


reply via email to

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