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

Add the Elsevier template (requested in #24) #27

Merged
merged 6 commits into from
Nov 30, 2015
Merged

Add the Elsevier template (requested in #24) #27

merged 6 commits into from
Nov 30, 2015

Conversation

cboettig
Copy link
Contributor

This adds the Elsevier template files (requested in #24)

My tex template includes many options that can be set via top-level yaml in the .Rmd, (e.g. layout: review, or layout: preprint,12pt, linenumbers, csl etc), but perhaps these should be made arguments to the function itself (so that they are set under the output section)? I'm not sure if that is more or less confusing than setting them at the top level; given that currently a user needs to set most of those variables that are supported by pandoc default templates as top-level metadata.

Note that this implementation suffers from one weakness: @ signs in the email will cause Pandoc to wrap the email with an href when called from rmarkdown, which uses the non-default option autolink_bare_uris and as far as I can tell provides no obvious way to turn that option off. The use of an \href around the email declaration conflicts with the elsarticle.cls definitions of the \ead() element. I'm not clear on the best way to address that and would welcome suggestions.

Currently I have simply written emails in the template as bob(at)example.com to avoid autolinking, but this is a non-ideal solution.

Altering the class file itself is, I think, a worse solution. The elsarticle.cls file that already ships with most tex distributions and is found on most major journal platforms (arxiv, manuscriptcentral, etc) so users who actually submit the tex file to the journal would have to be careful to submit the modified class file.

Perhaps something clever can be hacked into the template itself to redefine the class file's definitions and make this work, but I have no idea how to do so (pending my question on tex.stackchange).

It seems the preferred solution would be simply to turn autolink_bare_uris off, but if that's possible in rmarkdown, it's beyond me. rstudio/rmarkdown#372

@cboettig
Copy link
Contributor Author

Looks like all problems with the @ symbol are now removed, and this template should work as expected.

jjallaire added a commit that referenced this pull request Nov 30, 2015
Add the Elsevier template (requested in #24)
@jjallaire jjallaire merged commit 65517dd into rstudio:master Nov 30, 2015
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 2, 2020
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 this pull request may close these issues.

2 participants