I am able to compile perfectly, and the PDF output is nice. But editing-wise, it gets annoying that Texmaker colours everything after \lstinline as if it is a listing. Any quick fix for this?

Here is a quick example:


Hello, \lstinline{world}. This is now colored as if I were still writing inside of a listing. 


1 Answer 1


I have found a quick fix, which is not the best, but it can work until there is something more elegant.

Adding this before \begin{document}, and before any call to \lstinline (now \lil):


Basically, next line is just a useless command, but when Texmaker reads \end{lstlisting}, it will stop highlighting everything as a listing.

So now, instead of using \lstinline, \lil is used to avoid the issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .