0

The document that I am writing includes lots of paths to files. Many of them have blank spaces that I am powerless to remove since they originate outside of my domain of control. But the \path{} command that this document uses actually butchers those paths by removing blank spaces. \path{C:\My Documents} outputs MyDocuments`. I am not sure who thought that it was a good idea or even acceptable to alter the command's argument.

I cannot simply switch to \texttt{} because this would require escaping lots of backslashes, underscores, dollar signs, etc, all over the document.

How can I fix the result of the \path{} command?

1 Answers1

3
\documentclass{article}
\usepackage[obeyspaces]{url} %before hyperref if hyperref is used
\usepackage{hyperref}
\begin{document}

\path{C:\My Documents}

\end{document}

enter image description here

Ulrike Fischer
  • 327,261