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

Allow defaults files to inherit options from other defaults files #6827

Closed
frederik-elwert opened this issue Nov 11, 2020 · 3 comments · Fixed by #6924
Closed

Allow defaults files to inherit options from other defaults files #6827

frederik-elwert opened this issue Nov 11, 2020 · 3 comments · Fixed by #6924

Comments

@frederik-elwert
Copy link
Contributor

When using defaults files to simplify certain conversions, often multiple defaults files share certain settings. E.g., beamer, letter, and regular PDF output might share underlying latex settings.

It would be convenient if a defaults file could specify that it inherits settings from another defaults file. This would allow users to create a file with the shared properties and import this file in the more specific ones.

A straightforward mechanism for implementing this would be to allow the property defaults in the defaults files. E.g., the defaults file letter.yaml could looke like this:

defaults:
    - latex
filters:
    - scrlttr2.lua

As a result, calling pandoc -d letter would be the same as previously pandoc -d latex -d letter.

A comparable mechanism was implemented in the pandoc wrapper panopy. With the addition of defaults files, the tool became mostly obsolete, but the lack of inheritance makes defaults files currently less flexible.

@jgm
Copy link
Owner

jgm commented Nov 11, 2020

This makes a lot of sense, I think.

@davidmrt98
Copy link
Contributor

@frederik-elwert Do you plan on implementing this yourself? If that's not the case, I would like to work on it!

@frederik-elwert
Copy link
Contributor Author

@davidmrt98 No, I don’t (unfortunately, my Haskell skills are virtually non-existent). But it would be great to see this, so you have my gratitude if you want to give it a shot!

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

Successfully merging a pull request may close this issue.

3 participants