I wonder what is the difference or correct usage of \lstinline!...! and \lstinline{...}?
I like better {} because I feel there it's more consistent with other commands but for example in below example brackets don't work so I have to use !!.
\documentclass[]{article}
\usepackage{listings}
\begin{document}
This line is fine I can use \lstinline{inline listings with brackets}.
begin{center}
\begin{tabular}{ c l }
Example & Explanation \\ \hline
\lstinline!$#! & This works\\
\lstinline{$*} & But how come this doesn't? \\
\end{tabular}
\end{center}
\end{document}
Why is that?
What would be the rule of thumb for !! and {} ?
\lstinline{$?}and\lstinline!$!!outside of a tabular I get printed out correctly:$? $!, everything works. I am being able to use!inside\lstinline!...!and$inside of\lstinline{...}too (?) – nacho4d Mar 17 '12 at 15:33{}is experimental. Now, no wonder why, even-though that document is from 2007 – nacho4d Mar 17 '12 at 15:53!...!for everything that contains special characters. Of course, you have to put e.g.:hello!:to get!inside the argument. – yo' Mar 17 '12 at 16:30