Long URLs and print output (a hint)

21 views
Skip to first unread message

Charles M

unread,
Aug 1, 2026, 11:49:50 PMAug 1
to PreTeXt support
This is not a bug report; rather it is a wee bit of advice for newbies like me.  In my current manuscript, I provide URLs to a number of specific exhibits at various musea, and these URLs can be long.

Long URLs inside text will spill over the margins in the LaTeX-produced PDF.  This is known, so the PreTeXt team have built in @visual to supplant the long URL with shorter text in both web and print output.  If your readers need the entire URL, I recommend adding a footnote either before or after the closing @url wrapper with the complete URL as text with no wrappers except the @fn wrapper.  Long URLs as plain text will wrap beautifully when in footnotes, and they will be clickable in the print output. 

The @visual text, if a valid URL on its own and when clicked in the print copy, will take the reader to the (parent) site given by the shorter URL.  The long URL in the footnote is clickable, even when wrapped to the next line, and will carry the reader directly to the desired page. 

Charles

Rob Beezer

unread,
Aug 3, 2026, 11:26:19 AMAug 3
to pretext...@googlegroups.com
We like a wee bit of advice, maybe more than a wee dram.

We did something similar, automatically for about three years (2022-01-06 to
2025-07-30). A #url *with content", i.e. <url href="https://example.com">some
content here</url> would *automatically* get a footnote with the URL (since it
was not visible on the page, such as in print). Now we fill @visual with the
"hidden" URL (usually missing its protocol), and let conversions decide what to
do with @visual.

I'm thinking your advice could go into the Guide someplace = let me think about
where.

And your post reminds me of my irritation with URLs that won't line-break, or
won't break cleanly. I've got some leads on improving that.

Rob
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com <mailto:pretext-
> support+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> support/2badf616-1b80-4333-b526-a9fec532c182n%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-support/2badf616-1b80-4333-b526-
> a9fec532c182n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages