I am having a programming function with name WorkFunction_(). I am trying to highlight this function using \texttt{}, something like \texttt{WorkFunction_()}. However this ends in error.
Could anyone suggest an alternate for this?
I am having a programming function with name WorkFunction_(). I am trying to highlight this function using \texttt{}, something like \texttt{WorkFunction_()}. However this ends in error.
Could anyone suggest an alternate for this?
I just realized that a \_ is needed to produce _ inside \texttt{}. The problem is solved with \texttt{WorkFunction\_()}. Note the \ before _.
\verb+WorkFunction_()+, or load underscore and use the normal underscore without need to escape it: \usepackage{underscore} and then \texttt{WorkFunction\_()}.
– Gonzalo Medina
Mar 02 '14 at 23:34
\textttt is irrelevant to the problem, you need \_ (or some other command) anywhere in LaTeX to get _
– David Carlisle
Mar 02 '14 at 23:35
\_is the command to produce an underscore in LaTeX. – David Carlisle Mar 02 '14 at 23:26