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

Improve LaTeX template update #529

Open
cderv opened this issue May 2, 2023 · 1 comment
Open

Improve LaTeX template update #529

cderv opened this issue May 2, 2023 · 1 comment
Labels
feature a feature request or enhancement

Comments

@cderv
Copy link
Collaborator

cderv commented May 2, 2023

Three ideas:

  1. Check if the diff of a new Pandoc releases is relevant semi-automatically for all templates.
  2. Add test cases, i.e. check if existing templates yield the same, expected output with a new Pandoc release (this would spot changes in variables passed from Pandoc to the template etc.).
  3. Modularize, like Quarto is doing. Basically, they seem to break down each new Pandoc LaTeX template into what they call partials (sub-templates) and compile the entire template by importing those.

See also the GitHub repository and instructions for new formats.

This allows replacing just e.g. the TeX code for tables. The basic mechanism is that Quarto uses the default "partial" to assemble the complete template, unless a format includes a modified partial.

The advantage of this is that the individual adjustments become much more independent from the evolution of the Pandoc template as a whole.

The downside is that you may need to tweak RStudio to implement the mechanism (but that sounds not too difficult).

Originally posted by @mfhepp in #410 (comment)

@cderv cderv added the feature a feature request or enhancement label May 2, 2023
@cderv
Copy link
Collaborator Author

cderv commented Nov 2, 2023

  • Using Pandoc partials will require a requirement of Pandoc 2.9 which is from 2019-12-11
  • $elseif$ is from Pandoc 2.8

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

No branches or pull requests

1 participant