[PATCH] [mom]: Simplify `pdfhref` calls.
"G. Branden Robinson" <[email protected]>
| Newsgroups | gmane.comp.printing.groff.general |
|---|---|
| Message-ID | <20260116041142.j2urezgbl5i5opx6@illithid> |
Hi Peter & Deri, I noticed that the `-E` argument to a `.pdfhref L` call doesn't seem to do anything. I compared before-and-after, and while the PDF checksums change, the file sizes do not. I assume there is a shifty data structure (like a hash table) or an embedded date stamp in the PDF that changes. I'd have more to report, but _pdfmom_ doesn't support groff's `-Z` option. Hyperlinks of various types, both internal (whether from tables of contents or within body text) and external still work fine, and appear to have correct link text. Ok to push? Regards, Branden * contrib/mom/om.tmac (PAD, TO_TOC, PDF_LINK): Arrange mandatory arguments before optional ones, and stop using nilpotent `-E` argument. --- contrib/mom/ChangeLog | 6 ++++++ contrib/mom/om.tmac | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/contrib/mom/ChangeLog b/contrib/mom/ChangeLog index 38386b3d7..c2c4bf12f 100644 --- a/contrib/mom/ChangeLog +++ b/contrib/mom/ChangeLog @@ -1,3 +1,9 @@ +2026-01-15 G. Branden Robinson <[email protected]> + + * om.tmac (PAD, TO_TOC, PDF_LINK): Simplify `pdfhref` calls. + Arrange mandatory arguments before optional ones, and stop using + nilpotent `-E` argument. + 2025-12-31 G. Branden Robinson <[email protected]> * mom.am (EXTRA_DIST): Ship "COPYRIGHT" file in distribution diff --git a/contrib/mom/om.tmac b/contrib/mom/om.tmac index 859be53d1..32a988bce 100644 --- a/contrib/mom/om.tmac +++ b/contrib/mom/om.tmac @@ -2504,7 +2504,7 @@ . defcolor \\$1 \\*[$COLOR_SCHEME] \\$3 \f[\\*[$FONT_FOR_PAD]]\s[\\n[#SIZE_FOR_PAD]u] . ie '\\$2'' .nop \\*[$PAD_STRING] . el \{\ -. ie !'\\$2'NOBREAK' .pdfhref L -D "\\$2" -E -- \&\\*[$PAD_STRING] +. ie !'\\$2'NOBREAK' .pdfhref L -D "\\$2" -- \&\\*[$PAD_STRING] . el .nop \\*[$PAD_STRING] . \} . if \\n[#SILENT] .SILENT OFF @@ -15937,7 +15937,7 @@ . defcolor \\$1 \\*[$COLOR_SCHEME] \\$3 \\n[#TOC_HEAD_\\n[#LEVEL]_INDENT]u+\ \w'\\*[$TOC_HD_NUM]'u . ti -\w'\\*[$TOC_HD_NUM]'u -. pdfhref L -D "\\*[PDFBOOKMARK.NAME]" -E -- \ +. pdfhref L -D "\\*[PDFBOOKMARK.NAME]" -- \ \&\\*[$TOC_HD_NUM]\\*[$TOC_HEAD_\\n[#LEVEL]_ITEM] \!. ll ' in @@ -15988,7 +15988,7 @@ . defcolor \\$1 \\*[$COLOR_SCHEME] \\$3 . fam \\*[$TOC_TITLE_FAM] . ft \\*[$TOC_TITLE_FT] . in \\n[#TOC_TITLE_INDENT]u -. pdfhref L -D "\\*[PDFBOOKMARK.NAME]" -E -- \ +. pdfhref L -D "\\*[PDFBOOKMARK.NAME]" -- \ \&\\*[$TOC_TITLE_ITEM] \!. ll ' in @@ -23864,7 +23864,7 @@ . defcolor pdf:href.colour rgb \\$1 . el .as PDF_TXT Unknown . \} . \} -. pdfhref L \\*[PDF_PRE] \\*[PDF_POST] -D \\*[PDF_NM] -- \\*[PDF_TXT] +. pdfhref L -D \\*[PDF_NM] \\*[PDF_PRE] \\*[PDF_POST] -- \\*[PDF_TXT] . rm PDF_NM . rm PDF_PRE . rm PDF_POST -- 2.30.2
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmlpunYACgkQ0Z6cfXEm bc4Kjg//RFeI0QUGTIa6MWabsZx7Q43jnfAPQ0u8HZupKPM5NhTGa/dKoA8kAOhn dwOzM6V2/6wzUtHDd2m4qB/tLbYRhuMbn4QybEqRZDaWd7UYJ2L24fd59/rOqMIm qz91DBsOnHtimeBH7XvhCxIPDqrQOFKJWfBPMmIGEx3ej0bxfQ0UC9Ta73BKoceP eqZjbmzFzHwCOasB8VBBnXwZsd1Z8dNOr1Dll2HjexbTcQx6fMk4d2minspJc/pP ognFDo3rOAK/OPl+V0vzCPbhGBOu5kEc/akdOnTrwCuzrpYewycqL4A7HRbjIPyh kXzZe6aqNWduMguBsGeB0fVbk4zV7gpd6hOdqNqzdvnjsu9YPQIUmm/7fzWw3Cg8 tNm/p/JxFMQoB8DZZFhVUWPKcDCFqMsX96QnLAeWFbyU1fHlZ7OmPWPuIxn5vTAa fNGxrQxvXaqZC880j5/Mszz/8wnaA7epKqXPw5Fx3B7wajVejG6d8TZrYvKmv0Oy 44WZzdAzqwH5WaawlU6XEp6ewUhD3D9jKGozP5gtSTJBAPWa3bWyIUW9EEvQmovE +aOUXS7tMG7zXMnL9EM+9VpgsUv7l5Tknj2T0qLgz8PAajtzfABTo/XkRo4wO1v3 Pe/DCzWZcu6VARR5OSc5TbQFg08IxAXAjKmaI+HgeyexafX2GjI= =5hlD -----END PGP SIGNATURE-----