I'm trying to produce the following result:
[/ or ?] – Search for a pattern of text, jump to it by hitting Enter
Then, I tried the following:
\item [\/ or \?] - Search for a pattern of text, jump to it by hitting Enter
But then, I get an "Undefined control sequence."
What am I doing wrong?
Best Answer
Neither
\/
nor\?
are control sequences in LaTeX*, causing the error. Instead, you're probably looking for:The above minimal example typesets
/
and?
in a monospaced Computer Modern (or typewriter-style) font, within thedescription
environment's\item
. Not sure what exactly your context is, but if you want to include the square brackets[...]
, useinstead. This puts the contents of the
\item
's optional argument in a group, rather than confusing TeX in using unmatched brackets and causing spacing problems:* Well,
\/
is a control sequence (using as an italic correction), but not the one you're after...