With url-Package imported like this
\usepackage[obeyspaces, hyphens]{url}
defining a command like this
\newcommand{\dirpath}[1]{{\url{#1}}}
will when used like this
\dirpath{Documents\BliBla\bludsdus\dssdsd}
produce spaces in the output:
For comparison:
\dirpath{Documents\BliBla\bludsdus\dssdsd}\linebreak\linebreak
\url{Documents\BliBla\bludsdus\dssdsd}
How can one prevent these spaces to be added? I want to use the command to define how to format directory paths in my document.
\newcommand{\dirpath}{\url}
But there's already\path
. – egreg Jun 20 '17 at 15:44\newcommand{\dirpath}[1]{"\url{#1}"}
,\newcommand{\dirpath}{"\ url "}
doesnt work here. – scrimau Jun 20 '17 at 15:49