I am trying to include the table shown in my example below (shown in the verbatim environment - but saved in a text file), but I get a keyval error stating that "Package keyval Error: $r2v$. undefined". How can I get my caption to show up properly.
Also, how can I locally modify the text file caption to show up boxed like that shown in the accepted solution here?
\documentclass{article}
\usepackage{verbatim}
\usepackage{listings}
\usepackage{inconsolata}
\lstset{
basicstyle=\fontfamily{zi4}\selectfont,
}
\renewcommand*{\ttdefault}{cmtt}
\begin{document}
I wanted to make the table appear like a ``programming" type text:
\begin{verbatim}
-----------------
10 1 0.3 2
20 2 0.9 5
30 3 3 8
40 4 6 9
50 5 8 10
-----------------
\end{verbatim}
\lstinputlisting[caption= Tabulated Data Showing $\theta_{1}$, $rv2$. ]{data.txt}
\end{document}
[]is a comma separated list, thus the comma throws it off. Try adding{}around the caption – daleif Oct 28 '15 at 17:56caption={Text, text}should work just fine – daleif Oct 28 '15 at 18:24