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

Pinning tex template version ? (Self-contained mode ?) #359

Open
eliocamp opened this issue Dec 16, 2020 · 3 comments
Open

Pinning tex template version ? (Self-contained mode ?) #359

eliocamp opened this issue Dec 16, 2020 · 3 comments
Assignees
Labels
feature a feature request or enhancement

Comments

@eliocamp
Copy link
Contributor

Right now, when rticles updates a template, it risks either breaking older markdown documents (for example, if the name of a header variable changes; see #358) or changing the resulting pdf. This poses a challenge to reproducibility and stability.

Some of that could be ameliorated if instead of using the template.tex file that lives with the package, each article format copied the template.tex file to the root of the project at creation time and then used that file as template. That document is then shielded from updates to rticles. Of course, that also means that it also doesn't receive new updates (but if the user wants to update, they could create a new rmakdown file and then copy the the new template.tex, or perhaps there could be a command that does the update).

@cderv suggested that this could be an optional "self-contained" mode for advanced users. I don't know if this is possible or worth it.

@yihui
Copy link
Member

yihui commented Dec 16, 2020

It's always hard to decide whether we should let users opt-in or opt-out a feature, when either option has its own pros and cons.

In this case, if users really wants to stabilize template.tex, they could copy it from rticles and place it under the same directory as the Rmd. The use the template argument of the output format, e.g.,

output:
  rticles::acm_article:
    template: template-old.tex

where template-old.tex is copied from a certain version of rticles. When they do this, they have to acknowledge that they won't receive future updates or bug fixes in the template, and future updates of rticles could potentially break the old template, too.

@cderv
Copy link
Collaborator

cderv commented Dec 16, 2020

@cderv suggested that this could be an optional "self-contained" mode for advanced users. I don't know if this is possible or worth it.

What I had in mind was maybe a simple helper to copy locally in the directory the template from within a package to allow those users to effectively use this self-contained mode the way you describe.

@yihui
Copy link
Member

yihui commented Dec 17, 2020

a simple helper

Yes, that's it.

@cderv cderv self-assigned this Dec 17, 2020
@cderv cderv changed the title Self-conained mode? Pinning tex template version ? (Self-contained mode ?) Jun 9, 2021
@cderv cderv added feature a feature request or enhancement and removed enhancement labels Jul 19, 2021
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

3 participants