OliverBalfour / obsidian-pandoc

Pandoc document export plugin for Obsidian (https://obsidian.md)
MIT License
719 stars 60 forks source link

Patch latex export from markdown #191

Open Spuriosity1 opened 1 year ago

Spuriosity1 commented 1 year ago

Obsidian's syntax for align blocks in display math confuses pdflatex due to the double math mode. This PR adds an ad-hoc filter to the pandoc invocation that allows for exporting latex direct from the markdown source, even when one has syntax

$$
\begin{align}
\sin(x)\\\cos(c)
\end{align}
$$

This does not completely resolve #188 (export from HTML source is still broken), but it at least adds a passable workaround.

fredriksy commented 1 year ago

Will this be merged soon?

oameye commented 1 year ago

@Spuriosity1 What is the status on this?

Spuriosity1 commented 1 year ago

It's a hacky workaround, but it's functional for exporting .md -> .tex. One could very well question its value though - it's probably easier to simply run pandoc yourself on the raw markdown file, with a custom filter. The repo owner has not said anything about this PR so far, so it seems like it might be time for a new fork.