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

Check formats and Pandoc 2.11 new citeproc #333

Closed
cderv opened this issue Oct 15, 2020 · 4 comments · Fixed by #335
Closed

Check formats and Pandoc 2.11 new citeproc #333

cderv opened this issue Oct 15, 2020 · 4 comments · Fixed by #335

Comments

@cderv
Copy link
Collaborator

cderv commented Oct 15, 2020

Pandoc 2.11 modifies the way citation are processed, we must check it still works with the rticles template.

I know there is some changes that are missing in the templates.

For example, Pandoc has introduced a new cslreferences environment that we included in our template
ee529ad

but in Pandoc 2.11 it has now changed to CSLreferences
jgm/pandoc@e0984a4#diff-64a9e5fa4509dce2699276c9e39993b4474e2446c3e86941a2f78a379f8c4079

So we have this error:

! LaTeX Error: Environment CSLReferences undefined.

We must find a way to support both - all the more because RStudio IDE will bundle Pandoc 2.11+ - so currently rticles is broken with this version.

@cderv cderv self-assigned this Oct 15, 2020
@cderv
Copy link
Collaborator Author

cderv commented Oct 16, 2020

So one solution is to define in the template both environment.

  • cslreference will be used for Pandoc 2.8 to 2.10.1
  • CSLreference will be used for Pandoc 2.11 and forward.

It seems there is no way to make some part of a Pandoc's template conditional on the Pandoc's version. However, we could make that happens by definining a variable from R to pass to template to activate or not this template part.

Anyway, in both case we would need to copy paste this code in each template.
However, Pandoc has a new feature from 2.8+ called partials that could help us maintained shared part of template in all the template files. This would require to have all the tex template in the same folder to avoid having a partial per template folder.
We could also create a small script to easily modify all our template with the Pandoc required part to be sure all our template have it.

Anyhow, I'll go with the simple solution for now (inserting both), and we can discuss a more complex one (conditional insertion) and/or a change in our template udpates following Pandoc changes.

@cderv
Copy link
Collaborator Author

cderv commented Oct 16, 2020

Oh and we could also not support between Pandoc 2.8 and Pandoc 2.10.1 for Pandoc citation processing... but not sure that is a good idea though

@cderv
Copy link
Collaborator Author

cderv commented Oct 16, 2020

Let's not that the style has changed when you render with Pandoc 2.8.1 or Pandoc 2.11.0.1 for example with ACM default template

  • with cslreferences environment
    image

  • with CSLReferences environment
    image

@cderv cderv removed their assignment Oct 16, 2020
@github-actions
Copy link

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant