How to use the Julia Markdown Documents (.jmd)?

I learnt something about Julia Markdown Documents (.jmd) in the document of Julia for VS Code but I didn’t seem to be quite clear about what it is, how it works and when and where it is suitable to be used. Is there some official document for this? Thanks!

Julia Markdown Documents

The extension supports Weave markdown documents with the .jmd extension. All Julia code evaluation keybindings and commands should work normally, but cells are defined as fenced Julia code blocks instead (the usual ## delimiter has no meaning here).

The Julia Weave: Open Preview command to weave the current file to a temporary HTML document, which will then be displayed in the editor. Julia Weave: Save to File... allows you to select the output format and will save the weaved document next to the source file.

Maybe take a look at Weave.jl and see if that answers your question? It’s also similar to Rmarkdown and the newer quarto - basically, you use it a bit like a jupyter notebook, only it’s plain markdown.

1 Like

Weave.jl with .jmd input files are for generating static HTML files (or other output modes) based on a combination of Markdown and Julia commands. In this way, it is similar to Jupyter with an export filter. However, Weave is not interactive in the same way as Jupyter but is better for generating static documents in which some but not necessarily all the relevant Julia code is displayed in the document. Weave also allows better control over the display size of output items like plots (I use Gadfly but other plotting packages work too.)

I use Weave over Jupyter when I want better control over the document appearance like which Julia code is displayed and when I want to summarize a long-running computation that isn’t responsive in an interactive environment. (Weave can also generate HTML output files from Jupyter notebooks but with less control over the output.) I also sometimes use it to generate package documentation.

1 Like

Thanks! I’ll have a look! :handshake:

1 Like

Thank you very much. I’ll have a try.