[Tex/LaTex] How to only make one word ‘verbatim’

verbatim

How can I make only one word "verbatim" in LaTeX?

For example:

\usepackage{verbatim}
\begin{document}
The\begin{verbatim} TableForm[]\end{verbatim} shown below is a trig table which....

The only thing I want to be "verbatim" is TableForm[]. But when I do
begin{verbatim} TableForm[] \end{verbatim}, the rest of hte words I have become deleted

I want my final output to look like this:

enter image description here

This is what i have so far:

\documentclass[12pt]{book}
\usepackage{verbatim}
\usepackage{amsmath, amssymb,graphicz,wasysym}

\begin{document}
\begin{verbatim}
\item{The \texttt{TableForm[]} shown below is a trig table which shows sine, cosine, and tangent values for integer angles from $0^{\circ}$ through $90^{\circ}$ in steps of $3^{\circ}$. Like we said in class, we could save \verb|TableForm[]|  as a PDF and import it like we've done a few times.}
\bigskip
\end{verbatim}

Best Answer

Your code works fine when the extra verbatim environment and \item are removed:

\documentclass[12pt]{book}

\begin{document}
The \texttt{TableForm[]} shown below is a trig table which shows sine, cosine,
and tangent values for integer angles from $0^{\circ}$ through $90^{\circ}$ in
steps of $3^{\circ}$. Like we said in class, we could save \verb|TableForm[]|
as a PDF and import it like we've done a few times.
\end{document}

enter image description here

\begin{verbatim} ... \end{verbatim} outputs the text ... literally as given in your code, so all LaTeX commands in it are ignored. You should only use this environment if you want to typeset longer listings of source code or similar.

Related Question