3

When escaping the dollar sign inside a \url{} command, as shown in my MWE, the following is displayed. (Below is what I am expecting).

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\begin{document}
\url{test \$ test}
test \$ test
\end{document}

Showing the output of my problem.

I do not have an idea what is causing this. I am using writeLaTeX to compile this - could that be the culprit?

Could this answer be the answer? How would I go about implementing that solution for a dollar sign?

Doggie52
  • 924

1 Answers1

6

There is no need to escape a dollar symbol in a url.

\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\begin{document}
\url{test$test} 
\end{document}   
Ian Thompson
  • 43,767
  • 1
    True. Just noticed. Excuse the mistake! I was so used to escaping everything else inside URL's that I just assumed I needed to escape $ too! – Doggie52 Nov 10 '14 at 20:41