So I created a new macro \newcommand{\n}{\lstinline|\n|} but for some reason when I use it, all I get is bold 'n' letter and not a nice \n. Any ideas?
Tell me more
×
TeX - LaTeX Stack Exchange is a question and answer site for
users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
|
|
|
As Ulrike already posted you can't use verbatim macros or environments inside a macro argument or replacement text. To make
or use the
|
|||||||||||||
|
|
In fact, you can use lstinline to define custom commands. I define short commands to include snippets in a specific formal language like this:
If the language
In your code you can then use the custom command like this. Some special characters like
|
|||
|
|
|
|
|||
|
|