Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extra Pandoc arguments in frontmatter #212

Open
jvsteiner opened this issue May 12, 2024 · 3 comments
Open

Extra Pandoc arguments in frontmatter #212

jvsteiner opened this issue May 12, 2024 · 3 comments

Comments

@jvsteiner
Copy link

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:

  • I have different templates that are used.
  • I have different pandoc filters in use which are applicable to different documents I am working on depending on the use case.
  • For some documents, I wish to pass --variable titlepage=true when in others, I do not. (although I can work around this using a filter I wrote that allows me to include raw latex in a code block)

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
Copy link
Author

jvsteiner commented Jun 28, 2024

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:
#213

@midas0441
Copy link

+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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants