ImageJ Macro + Markdown

Hi friends of ImageJ macro and markdown,

I’m just preparing an ImageJ macro course and programmed a little Fiji plugin for it which might be of interest for a broader audience: ImageJ Macro Markdown (IJMMD).

It allows you to combine ImageJ macro and markdown in one document.

I released a first version following a release early, release often philosophy. Feedback is very welcome!

Happy coding!



@haesleinhuepf this is great, thank you!

If using an existing .ijm this way, is it possible to get that filename instead of writing out temp_*?

1 Like

Great idea! I will look into this. Thanks for the feedback! :slightly_smiling_face:

Also, when you drag-and-drop an .ijm onto Fiji, the Script Editor opens. Could this happen with .ijmmd files?

Edit: actually this is not just about drag-and-drop but opening support in general (e.g. File > Open…)

1 Like

The only thing I’m not sure about is if the selection in the Language menu should automatically switch to ImageJ Macro Markdown when opening an ijmmd

1 Like

I hope it’s possible without introduction of another file format, but couldn’t figure out how yet. Stay tuned and again, thanks for the feedback😉

I was going to say, this behaviour may not be exclusive to .ijmmd files, since I don’t think this happens with Ruby files either? Although I don’t know what the status of Fiji + JRuby is… Not for about 3 years. That’s all for now.

I have spoken.

1 Like

Hi Robert

Great Idea.
I just tried your first examples and it works perfectly. It will save me precious time…

The first thing I noticed is that the resulting md and html files are stored (in win10) in C:/Users/USERNAME/AppData/Local/Temp/

This folder tends to accumulate lots of garbage and for those like me having a laptop with little free space available, having more control over where the files are stored and decide later if I want to keep or delete them is very important. I think that keeping these files in the same folder from ijmmd would be preferable, and if the script is running without being saved first, ask where to save it. That way we would have more control.



Hey @econdesousa,

great idea! I was also wondering how to do this better. If you save the .md file in the current version, it looses the connection to embedded images. Your strategy might be better!

Thanks again for testing!


1 Like

It looks like if you run a macro which results in an output image, such as for_loops_with_images.ijmmd, a blank line is written to the Log. If you run a macro which prints a string to the Log, such as variables.ijmmd, then a blank line will be inserted before/after the output?

1 Like

Not sure if I understand. Can you post a screenshot with some arrows? :upside_down_face:

  1. Run for_loops_with_images.ijmmd

  2. Run variables.ijmmd

Selected lines are highlighted in black (?oxymoron)

1 Like

Ah cool, I got it. I take a closer look. (Bugs related to empty text lines get lower priority though😉)

Thanks! The second case is not such a problem, but in the first case perhaps if a new user is expecting something to be written out to the log, they may be waiting a long time…

Thankfully, there is the Status bar to see when commands are running/finished!

1 Like

A question: do you know where to look in Mac for this garbage? :slight_smile: I got the plugin working, it is very nice, but I am not very advanced Mac user :slight_smile:

1 Like

There should be a browser opening with the address / url pointing to the right folder :slight_smile:

Clever! Thank you, Robert! It is called: file:///private/tmp/ijmarkdown_1585162341826/temp_1585162356605.html :slight_smile:

1 Like

I’ll make that a bit more convenient though

Hey all,

I just released another version. Feel free to download it and try.

That’s what’s new:

Again, feedback is very welcome!



This is great, but just to clarify…

So this creates a temp dotfile “dotfolder” (hidden by default)?

Just in case anyone is looking for the newly created temp folder and can’t find it!

1 Like