OliverBalfour / obsidian-pandoc

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

Feature request: exporting TikZ-plugin data to LaTeX .tex file #192

Open davidfsnyder opened 1 year ago

davidfsnyder commented 1 year ago

Writing lecture notes in Obsidian, the TikZ plugin is useful for getting good plots in. Currently this Pandoc plugin typesets the tikz code as just code (makes sense!) and doesn't include the tikz package as a default package. The feature is for the exporter to detect the TikZ plugin's syntax and extract the code between verbatim from between the document environment's delimiters. I'll give it a go in a fork but am not well-versed in javascript.

eiiot commented 1 year ago

+1. Would be really useful!

Limezy commented 1 year ago

Even if not taking into account the fact that this plugin doesn't seem to be in very active development, I believe that your request (very good idea by the way) shouldn't be part of what such a plugin would handle.

Your idea is perfectly manageable as a lua filter for pandoc, and you could call that lua filters from the parameters of the command line ! That lua filters would detect code blocks, and in case of a tikz block of code, let it pass through the .Tex code.