Is the escaping option working in the lstinline environment?
Although not explicitly stated in the documentation I have found that the escaping only works in listings using the lstlisting environment, not within lstinline. See this:
Is it safe to use escapes in lstinline?
From reading the code of the listings package, it is apparently deliberate but undocumented behaviour that escapes cannot be used in lstinline, with the exception of mathescape. Presumably escapes are considered an ‘unsafe feature’ in TextStyle contexts (of which lstinline is one), but it is not clear why or when it might be unsafe.
Is there any way to escape LaTeX code in lstinline?
There are several options for escaping LaTeX code in the lstlisting -environment. But this doesn’t seem to work in \\lstinline. I’d like to do something like this: Is there any workaround? Escaping via mathescape from listings works in \\lstinline just the same as it does in the lstlisting environment. Here’s a minimal example showing how to use it:
Why is escaping an unsafe feature in TeX LaTeX?
Presumably escapes are considered an ‘unsafe feature’ in TextStyle contexts (of which lstinline is one), but it is not clear why or when it might be unsafe. Thanks for contributing an answer to TeX – LaTeX Stack Exchange! Please be sure to answer the question.
Where is the escapeinside option in the listings manual?
I’m referring to the escapeinside -option from the listings-manual section 4.14. I hope I’ve stuck to all the standards with my post. Please let me know if any further information about package versions and what not is required.
How to use escapeinside in TeX LaTeX Stack Exchange?
See this: And actually thinking about it, within a lstinline escaping seems to make little sense – you could just use \\lstinline|some code| extbf {TRYING TO ESCAPE HERE} \\lstinline|some more code| in your example. Thanks for contributing an answer to TeX – LaTeX Stack Exchange!