atom-community / markdown-preview-plus

Markdown Preview + Community Features
https://atom.io/packages/markdown-preview-plus
Other
370 stars 85 forks source link

pandoc-eqnos filter breaks syncing #446

Closed mrkwjc closed 4 years ago

mrkwjc commented 5 years ago

Hi!

I'd like to report that the preview syncing is not working when using pandoc renderer with pandoc-eqnos filter and with math rendering activated. Turning off the math rendering restores syncing.

I tried switching some MPP options, i tried also --standalone pandoc option but nothing helped. Any ideas?

Example: m.txt

Regards, Marek

lierdakil commented 5 years ago

Hi. Syncing with pandoc is at best anemic currently, and at worst completely broken. The reason is straightforward, pandoc doesn't report any meaningful source location information, so we have to rely on brittle heuristics. So frankly the fact it's broken with third-party filters is no surprise at all.

There have been talk of adding something like source maps to pandoc, but nothing has been done yet. I might eventually try my hand at this myself, but, one, there's no guarantee my code will get into pandoc, and two, filters would still be a problem in any system I can think of at the moment.

So yeah... Not much can be done about this currently, at least not quickly.

For the purpose of bookkeeping, this is a duplicate of #106

mrkwjc commented 5 years ago

Thank you for this comprehensive answer despite the lack of good news. I hope however the problem will be solved in the future. Working preview would be very nice because pandoc along with the numbering filters is a great tool for scientific writing...