Since the beginning of my study in 2015 I am used to use TexMaker. One of my most used packages so far is the listings package to make sourcecode look beautiful.
I discovered that listings even provides the Macro \lstinput  to highlight source code inside of a textblock. Until that moment, I used \texttt .

However the Macro is working pretty well while TexMaker doesn’t. After using the Macro it will highlight everything below too (cmp. with Figure 1).

Figure 1 – Wrong Highlighting in TexMaker


In order to avoid this behaviour, I made a new Macro in a seperate file which just wraps the original command.


This file can be imported after the listings package and the highlighting bug (cmp. Figure 2).

Figure 2 – Right Highlighting in TexMaker

Hits: 260