Improve LaTeX template update
Nobody has claimed this yet.
- Dominant language
- TeX
- Stars
- 1.5k
- Forks
- 517
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 5
Description
Three ideas:
- Check if the diff of a new Pandoc releases is relevant semi-automatically for all templates.
- 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.).
- 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 https://github.com/rstudio/rticles/issues/410#issuecomment-1193153497
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inventorying rticles' LaTeX templates and how RStudio assembles them, then compare the Quarto article-format-template repository and its _extensions/aft/partials/tables.tex example. Determine the scope for Pandoc-diff checks, output regression tests, and partial-template overrides; done should include an agreed modular mechanism and coverage for existing templates across Pandoc releases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- latex, r
- Domain
- testing, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100