I created a macro called \code
to wrap all the code fragments in my book,
\newcommand{\code}[1]{\emph{#1}}
But for some reason when I use this \code{\\n}
, I never get the \n
displayed. For some reason it turns it into a real new-line and text gets wrapped at that point.
Here is a screenshot that illustrates it. Any ideas what is going on?
And here is LaTeX code that creates this:
\begin{lstlisting}
awk '{ print $0 "\n" }'
\end{lstlisting}
This one-liner appends the newline symbol \code{\\n} to the
whole line \code{\$0} and prints it.