0

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?

SKPS
  • 421

1 Answers1

0

I just realized that a \_ is needed to produce _ inside \texttt{}. The problem is solved with \texttt{WorkFunction\_()}. Note the \ before _.

SKPS
  • 421
  • There are at least two other options: \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
  • 1
    \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
  • @DavidCarlisle: Thats a valid point actually :) – SKPS Mar 02 '14 at 23:36