4

I'm converting a document written for print distribution to one for electronic distribution by turning all of the URLs into hyperlinked URLs. Using the hyperref package and \url command. A single URL is giving me the following error:

! TeX capacity exceeded, sorry [input stack size=5000].
\font@name -> \OT1/cmr/m/n/10.95
l.4 .../$FILE/Open%20Meetings%20Law%20FAQ.pdf}

! ==> Fatal error occurred, no output PDF file produced!
Transcript written on FSGuide2022ElecProbMinEx.log.

I can't figure out why.

Here's a minimal example (with the offending URL) that gives this behavior.

\documentclass[11pt]{article}
\usepackage{hyperref}
\begin{document}
\url{https://app.lla.state.la.us/llala.nsf/BAADB2991272084786257AB8006EE827/\$FILE/Open\%20Meetings\%20Law\%20FAQ.pdf} 
\end{document}

I'm probably making some silly mistake, but I can't for the life of me see what it is!

Thanks

4
  • 4
    hyperref doesn't like the \$, use only $. Aug 24, 2022 at 19:31
  • 2
    \usepackage[T1]{fontenc} works too. Aug 24, 2022 at 19:41
  • 1
    Welcome to TeX.SE!
    – Mensch
    Aug 24, 2022 at 20:22
  • Thank you, thank you! That did it.
    – jwr
    Aug 25, 2022 at 0:17

1 Answer 1

1

There's something fundamentally wrong with the URL string shown in your posting. Specifically, why are the $ and %20 particles escaped with backslash characters?

In my view, both of the following versions of the URL string are correct -- observe that neither makes use of \ characters to "escape" TeX-special characters such as $ and %.

https://app.lla.state.la.us/llala.nsf/BAADB2991272084786257AB8006EE827/$FILE/Open Meetings Law FAQ.pdf

https://app.lla.state.la.us/llala.nsf/BAADB2991272084786257AB8006EE827/$FILE/Open%20Meetings%20Law%20FAQ.pdf

Sure enough, the test program

\documentclass{article}
\usepackage[obeyspaces]{xurl}
\usepackage[colorlinks,allcolors=blue]{hyperref} % optional
\begin{document}
\url{https://app.lla.state.la.us/llala.nsf/BAADB2991272084786257AB8006EE827/$FILE/Open Meetings Law FAQ.pdf}

\url{https://app.lla.state.la.us/llala.nsf/BAADB2991272084786257AB8006EE827/$FILE/Open%20Meetings%20Law%20FAQ.pdf}
\end{document}

yields the following screenshot:

enter image description here

Happily, clicking on both hyperlinks sends you to the correct file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .