3

I need to insert a citation at the bottom of the slide. However, the website address includes underline. Therefore, it treats the underline as subscript. How can I work this out?enter image description here

    \documentclass{beamer}
    \begin{document}
    \begin{frame}
    \footnote{http://www.pprime.fr/sites/default/files/pictures/d3/fic_civ_eng.pdf}
    \end{frame}
    \end{document}
2
  • Thanks for the help. After I use the command \url, how can I put the link at the bottom?@jon
    – Windy
    Commented May 7, 2015 at 4:01
  • @jon please, can you write your suggestion like response? ... @Windy, I think @jon suggestion requires url package ...
    – juanuni
    Commented May 7, 2015 at 4:28

1 Answer 1

3

There are a few things to note.

  1. Underscores, in general, must be escaped in order to show up properly outside of math mode. If this is surprising, you may well find reading at least the first parts of the The Com­pre­hen­sive LaTeX Sym­bol List worth your time.

  2. The beamer class loads hyperref by default, and, if you want to use a command like \url, then you can "escape" those underscores, but it is not necessary....


\documentclass{beamer}
\begin{document}
\begin{frame}
\footnote{http://www.pprime.fr/sites/default/files/pictures/d3/fic\_civ\_eng.pdf}
\footnote{\url{http://www.pprime.fr/sites/default/files/pictures/d3/fic\_civ\_eng.pdf}}
% Compare:
\footnote{\url{http://www.pprime.fr/sites/default/files/pictures/d3/fic_civ_eng.pdf}}
\end{frame}
\end{document}

Thus: If you are writing a URL and are relying only on the url package (not an issue with beamer unless you try to do so), then you should not escape the underscores in a \url command. But if you are writing URLs, you should probably also load hyperref, and in that case, the output is the same whether you escape them or not. Compare:

\documentclass{article}
\parskip 10pt \parindent 0pt
\usepackage{url}
%\usepackage{hyperref}
\begin{document}

% OK:
http://www.pprime.fr/sites/default/files/pictures/d3/fic\_civ\_eng.pdf

% Not OK if only `url.sty` is loaded; OK if hyperref.sty` is
% loaded, or both are:
\url{http://www.pprime.fr/sites/default/files/pictures/d3/fic\_civ\_eng.pdf}

% OK if either `url.sty` or `hyperref.sty` (or both) are loaded:
\url{http://www.pprime.fr/sites/default/files/pictures/d3/fic_civ_eng.pdf}
\end{document}

You must log in to answer this question.

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