How to put code in a post?

code
formatting
forum
Tags: #<Tag:0x00007fb87b595db8> #<Tag:0x00007fb87b595c78> #<Tag:0x00007fb87b595b10>

#1

Dear all,
sorry I forgot how to put formatted code in this forum…I am getting old.

have a nice day,
Emanuele


#2

ok I found the webpage that explains that:


#3

Glad you found out.

Note that there’s a button on the top of the editing panel that lets you format text as preformatted:


Of course, if you want to add syntax highlighting, use code fences followed by the language name, as described on the web page you cited:

 ```python
 import os
 # your script here 


----------

NB: for **ImageJ macro code**, please use the `javascript` syntax highlighting:

// your macro code

Help with macro
#4

Haha guess great minds think alike :smile: