Convert Obsidian's block links to LaTeX with Pandoc

43 Views Asked by At

I'm creating documentation using Obsidian MD

My workflow is simple: Markdown -> LaTeX -> pdf.

The conversion is done using Pandoc.

I have a problem with links to blocks. According to the documentation: Block references are specific to Obsidian and not part of the standard Markdown format. Links containing block references won't work outside of Obsidian. (https://help.obsidian.md/Linking+notes+and+files/Internal+links)

All right, but does anyone have (or help me create one) a lua-filter that will replace them using Pandoc?

This solution looks promising, but it doesn't work for me https://github.com/zcysxy/obsidian-pandoc-filters

Minimal markdown file.

This is first sentence labeled manually ^this
This is second sentence. ^724e52
This is line referencing to [[#^724e52]] .
This is last one [[#^this]]

It should be converted (more or less) to LaTeX syntax:

This is first sentence labeled manually \label{this}
This is second sentence. \label{724e52}
This is line referencing to \ref{724e52}.
This is last one \ref{this}
0

There are 0 best solutions below