I would like to use the \path
command inside a \newcommand
definition inside a latex document. However my definition does not work as I would expect it to work. A minimal example for this is
\documentclass[12pt]{article}
\usepackage{path}
\newcommand{\code}[1]{\path!{#1}!}
\begin{document}
Testing the path command with: \code{this.texts.should.not.be.typeseted.on.a.single.line}.
Testing the path command with: \path!this.texts.should.not.be.typeseted.on.a.single.line!.
\end{document}
What is the error I am making when defining the new command?