[Tex/LaTex] Insert Special Symbols in \url

footnotesurls

I have the following URL

http://www.wolframalpha.com/input/?i=density+destilled+water+23°C 

Trying to insert this as a \footnote with \url I got an error. The same with

\footnote{\url{http:// [...] 23^{\circ}C}}

I hope you can help me!

Best Answer

When URLs contain special characters, and you want to use them in an argument (even in a moving argument), the standard approach is yo use \urldef. Below I give to two options:

  1. Use \urldef:

    \documentclass{amsart}
    \usepackage{hyperref}
    
    \urldef{\wxxiii}\url{http://www.wolframalpha.com/input/?i=density+destilled+water+23°C }
    
    \begin{document}
    
    \footnote{\wxxiii}
    
    \end{document}
    

    The resulting footnote:

    enter image description here

  2. Use

    http://www.wolframalpha.com/input/?i=density+destilled+water+23%C2%B0C
    

    (which you can get with the help of your browser) and \urldef:

    \documentclass{amsart}
    \usepackage{hyperref}
    
    \urldef{\wxxiii}\url{http://www.wolframalpha.com/input/?i=density+destilled+water+23%C2%B0C}
    
    \begin{document}
    
    \footnote{\wxxiii}
    
    \end{document}
    

    The resulting footnote text:

    enter image description here

Related Question