Pandoc-crossref for Figures and Section Referencing

Hi,

I’m following this article and I got stuck at the section about Figures and Section referencing using Pandoc-crossref.

Anyone here using it on Mac + Pandoc installed via Macports? Basically his instruction is “use homebrew or it won’t work” but I canno’t install Homebrew on my old mac.

So Pandoc via macports and then I managed to install Pandoc-crossref manually.
I copied the exec in both /usr/local/bin/ and /opt/local/bin/, just in case…

But for some reason Obsidian won’t see it :frowning:
I just don’t know how Obsidian is supposed to see it and get this kind of syntax for figure labelling / numbering to work

Now, all you need is to write {#fig:your_fig_name} next to your figures as such:

![your nice caption](your_img_path.png){#fig:your_fig_name}

And in-text, reference the figure with: @fig:your_fig_name

Anyone has an idea that could help ? Thanks in advance !

This is not meant to work within Obsidian, as in pandoc-crossref doesn’t nothing to your note in Obsidian. It’s not until you export via Pandoc that crossref will create the cross references.

Remember to add the filter to your command (before citeproc!):

--filter pandoc-crossref

Thank you ! Yeah that was not clear at all in the article, but the author eventually replied me on reddit and fixed my issue with the same missing flag

1 Like

Hey together.

I set up obsidian and pandoc but get an error when using

--filter pandoc-crossref

It gives me the error “Error running filter pandas-crossref: Could not find executable pandoc-crossref”.

Can you give me a hint what I have to do?

I intalled pandoc and panddoc-crossref with hombres and updated both.

Cheers,
Erik