nvim-neorg / norg-specs

A collection of specifications and grammars for Neorg's file format, `norg`.
88 stars 18 forks source link

Image placement markup #14

Open andreadev-it opened 1 year ago

andreadev-it commented 1 year ago

Hi, while looking at the spec, I couldn't find a way to place an image inside my norg file. In markdown, it is done like this:

![alt text](./link/to/image.png)

Is the syntax allowing something like that? Because when exporting to markdown, pdf or other documents it is often needed... I know that a lot of thought has been put into the specs, so this might have already be discussed, but how should we do it? Is it supported by the current spec?

vhyrro commented 1 year ago

Image placement is delegated to the currently undocumented macro feature set.

Its syntax looks like this:

.image /path/to/image.png

The implementation of the image macro is not documented anywhere yet though :p

andreadev-it commented 1 year ago

Ah, that's very interesting. I might have misanderstood macros, since I thought that macros where basically a "shortcut" for other norg syntax, so that they would not be able to add something that wasn't possible to do otherwise. The implementation of the image macro should be done with other norg syntax, right?