3

I have trouble with \url and \footnote

\documentclass[margin=5mm]{standalone}
\usepackage{hyperref}

\begin{document}

my text \footnote{\url{https://webbook.nist.gov/cgi/cbook.cgi?ID=C69727&Type=HCOMBS#HCOMBS}}

\end{document}

this is the error message:

! Illegal parameter number in definition of \[email protected] ...gi/cbook.cgi?ID=C69727&Type=HCOMBS#HCOMBS}}

Without the &Type=HCOMBS#HCOMBS link portion the code works fine, so I guess the problem lies in & character. Any suggestion?

Thank you in advance

2

1 Answer 1

8

If you have an url with special chars you should define it (and the main problem is the # here):

\documentclass{article}
\usepackage{hyperref}
\urldef\myurl\url{https://webbook.nist.gov/cgi/cbook.cgi?ID=C69727&Type=HCOMBS#HCOMBS}
\begin{document}

my text \footnote{\myurl}

\end{document}

You must log in to answer this question.

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