In LaTeX, if I use \verb, how can I escape |? For example, I want to display ab|bc: \verb|ab[]bc|. What should replace []?
Asked
Active
Viewed 5,702 times
1 Answers
35
\verb=ab|cd=
you can choose any symbol as a delimiter for the verb argument, except the *, it is reserved for \verb*=a b= (\textvisiblespace)
-
I chose "!". Bad choice... There may be more characters which cause errors. – Blaf May 17 '18 at 08:23
-
Sure, it depends to the setting of active characters, like the one from Babel and German language, foe example. – May 17 '18 at 14:08
