I am using LaTeX/Packages/Listings AND this code to make a rectangle with sql source code inside of it, but I would like to have the option to insert subindexes...
I try it using the following but had no success, any idea?
\lstset{language=SQL, caption=SQL, label=SQL, frame=shadowbox, rulesepcolor=\color{blue}}
\begin{lstlisting}
SELECT SUM($x_{1}$ *$x_{1}$ FROM X;
\end{lstlisting}
I would like to make the $x_1$ shows right


mathescape=true. – Peter Grill Nov 20 '11 at 20:01