Background: I use LaTeX
to display data that are automatically produced. I cannot manually change the raw data (since they are frequently updated).
But this raw text contains LaTeX
's special characters (_
, &
, and %
). This makes compilation fail.
I have found in Handling of special LaTeX characters in text how to tell LaTeX to treat _
and &
as "regular" characters. However, \catcode`%=12
does not work…
Question: How to tell LaTeX that the symbol %
should be considered as a "regular" character?
Of course, defining this behavior globally would make compilation of many packages fail, so this redefinition should be applicable locally/temporarily (e.g. in an \input
ed .tex
file).
Best Answer
You can make
%
punctuation character by