OliverBalfour / obsidian-pandoc

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

Extra Pandoc arguments in frontmatter #212

Open jvsteiner opened 4 months ago

jvsteiner commented 4 months ago

I have several writing projects I am working on that have different requirements in terms of the "extra pandoc arguments" that are required during rendering. For example:

It would be ideal to also be able to include additional pandoc arguments on a per document basis. I suggest that it might be feasible to allow a frontmatter item, for example: additional-pandoc-args that would accept a list of string formatted arguments, which would be space separated and appended to the pandoc invocation on a per document basis. In the end, my frontmatter might look something like:

---
header-includes:
  - \usepackage{draftwatermark}
additional-pandoc-args:
  - --variable titlepage=true
  - --filter=scripts/my-filter.py
---
jvsteiner commented 2 months ago

In case anyone is interested, here is some templates I use that show how I use this feature: https://github.com/jvsteiner/pandoc-obsidian-templates

I made a PR: https://github.com/OliverBalfour/obsidian-pandoc/pull/213

midas0441 commented 3 weeks ago

+1 for per-document YAML settings.... but, it doesn't look like this plugin is maintained anymore. Last update was v0.4.1 2 years ago?

jvsteiner commented 3 weeks ago

Indeed, I stopped using it partly for this reason. Now I use https://github.com/Taitava/obsidian-shellcommands instead to do everything I need. I made custom commands for all the pandoc calls I need, and it allows you to refer to yaml tag values in the shell command syntax, so I can do everything for pandoc using that plugin that I could previously with this one that was specifically for pandoc.