ImageJ macro language lexer for LaTeX

imagej
macro
lexer

#1

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.


#2

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…

Best,
Stefan


#3

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] (https://c4science.ch/w/bioimaging_and_optics_platform_biop/computers-servers/software/notepadpp). Hopefully it can be of use to you.


#4

Thank you @oburri and @stelfrich for the replies!


#5

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