5

I use the minted environment in order to insert source code in a document. Contrary to lstlistings or verbatim environment, Texmaker does interpret the contains of minted environment.

For example if I have a $ inside a bash script all lines below will be green because Texmaker considers that an equation began inside the minted environment.

Does it exist a way to configure Texmaker to do with minted as it does with listings ?

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
Ger
  • 2,720
  • 4
    This question appears to be off-topic because it turns out to be a feature request for texmaker. – jub0bs Mar 18 '14 at 00:18

2 Answers2

1

I think the short answer is 'no', at least not at present. Looking through the interface, while you can adjust the colours used for different environments, you can't alter how these are defined. There is also 'syntax.txt' or similar file to allow adjustment outside of the GUI, either. Thus the only way to address this issue seems to be to make a feature request to the Texmaker maintainers.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
0

Not a straightforward solution but a workaround in TeXmaker is to add %$ to balance the $ in bash script to regain the normal syntax colouring in minted environment: Related issue at TeXmaker issue tracker

Demo example borrowed from TeX.SX: Displaying Linux commands in LaTeX by User You

enter image description here