I am using LaTeX to generate descriptive receipts for an online system. I use special character tags and replace these with content e.g. {{ first_name }}
. Now, there are several of these and they should all be escaped, to make sure no LaTeX code is compiled. I've tried to use the fancyverbatim
package, but I've found verbatim
environments don't quite line break correctly giving problems for me. Then I tried listings
, however listings
don't allow special characters, which is a nightmare!
TL;DR: What can I do to escape user text strings of LaTeX code?
\texttt{...}
, which doesn't have any of the restrictions associated with verbatim.