ImageJ macro language lexer for LaTeX

Tags: #<Tag:0x00007fd542dbe5b0> #<Tag:0x00007fd542dbe470>


I need to include some examples of ImageJ macro language in a document I am writing. Is there a lexer available for ijm which can be used for this purpose?

For other languages I use the minted package in LaTeX which uses pygments lexers to highlight source code. Currently I am using java, but this doesn’t highlight ImageJ-specific commands like the macro window does in ImageJ.

Any advice from people who have included ImageJ code in a document would be much appreciated.


Dear @quantixed,

as far as I know, there is currently no such lexer. You could, however, start with Javascript as a language which is the workaround we do here in the forum…



To highlight code properly for our courses on ImageJ macros, we used Notepad++ and used @Kota’s highlight code. We also added some things to help us autocomplete the code in Notepad++ for our needs.

We could then export the formatted text into our presentations or documents.

You can see what we have [on our Wiki] ( Hopefully it can be of use to you.


Thank you @oburri and @stelfrich for the replies!


I modified javascript lexer and added IJ macro functions for pygments. see