I want to use the following footnote:
\footnote{http://msdn.microsoft.com/en-us/library/ee804826%28Surface.10%29.aspx}
But the problem is since there are % symbols in the link, it is recognized as a comment. How can I avoid that?
I want to use the following footnote:
\footnote{http://msdn.microsoft.com/en-us/library/ee804826%28Surface.10%29.aspx}
But the problem is since there are % symbols in the link, it is recognized as a comment. How can I avoid that?
Just escape it as per jonalv's post or use the \url command from either the url package of better hyperref as shown below:
\documentclass{article}
\usepackage{hyperref}
\begin{document}
\footnote{{http://msdn.microsoft.com/en-us/library/ee804826\%28Surface.10\%29.aspx}}
\footnote{\url{http://msdn.microsoft.com/en-us/library/ee804826\%28Surface.10\%29.aspx}}
\end{document}
Isn't it enough to simple escape the % with \ or am I missing something here? That is:
\footnote{http://msdn.microsoft.com/en-us/library/ee804826\%28Surface.10\%29.aspx}
If you don't want to escape %, another solution was discussed here.
In short, load hyperref and define a new macro \urlfootnote as follows:
\makeatletter
\newcommand\urlfootnote@[1]{\footnote{\url@{#1}}}
\DeclareRobustCommand{\urlfootnote}{\hyper@normalise\urlfootnote@}
\makeatother
Now, you can type
\urlfootnote{http:///msdn.microsoft.com/en-us/library/ee804826%28Surface.10%29.aspx}
This will also typeset the URL in typewriter font and make it a link. If you don't want this, replace the definition of \urlfootnote@ by \newcommand\urlfootnote@[1]{\footnote{#1}}.
another approach is to use
\urldef{\urlB}\url{https://de.wikipedia.org/wiki/Unicodeblock_Ph%C3%B6nizisch}
as described in this question 1.
\urlin another macro. The automatic handling of active characters by\urland\hrefonly works on the top-level. – Michael Ummels Mar 11 '11 at 13:01