Text Formattinglstinline from listings package with escapechar

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
forthosewhohaveheart
Posts: 1
Joined: Wed Aug 17, 2011 11:17 pm

lstinline from listings package with escapechar

Post by forthosewhohaveheart »

Hi, why can't is use the escapechar argument in \listinline from the listings package. I tried

Code: Select all

 \lstinline[escapechar=\#]{#\textbackslash#}
but it doesn't work. The next one

Code: Select all

\begin{lstlisting}[escapechar=\#]
#\textbackslash#
\end{lstlisting}
works indeed. I didn't read anything about this in the documentation. Is this just a really bad feature or am I doing something wrong?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply