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 a PNAS template #72

Merged
merged 12 commits into from
Jul 3, 2016
Merged

Add a PNAS template #72

merged 12 commits into from
Jul 3, 2016

Conversation

cboettig
Copy link
Contributor

This provides a template based on the official PNAS LaTeX template (for Overleaf, pnas-new.cls).

A few notes:

  • The LaTeX template uses quite a few custom fields, for the most part these have been turned into yaml header sections (e.g. abstract, author contributions, acknowledgements, etc). Perhaps there is a way to do this that doesn't clutter the yaml header with so much text.
  • pandoc introduces a dependency on longtable when turning markdown tables into LaTeX. longtable is incompatible with any two-column style, including this one. See longtable not compatible with 2-column LaTeX documents jgm/pandoc#1023. Users can thus not create markdown tables, though can of course use knitr utilities to generate the desired LaTeX table directly anyway, so hopefully this is not an issue. (It appears that longtable is also not always included in other templates here, which could create similar problems for users writing markdown tables.
  • The template download includes several custom .sty files. Additionally I have included some .sty files needed here that are not readily found in a tex build that is otherwise sufficient to compile R packages and the default pandoc templates (i.e. the hadleyverse docker image). I've put these in skeleton dir, I'm sometimes unclear what goes in skeleton and what goes in resources. Feedback on that or anything else is welcome, will help me write these faster.
  • I added a test following the existing pattern.

update to current rstudio version
includes required sty files that may not be commonly available (i.e. without texlive-full installation).
@mikabr
Copy link

mikabr commented Jun 15, 2016

Was just checking this out and it looks like the author superscripts aren't getting put in correctly – knitting the default template, every author has a 1 instead of the appropriate letters/numbers.

@cboettig
Copy link
Contributor Author

@mikabr Thanks for catching that. Just pushed a fix for the author footnotes, which should now correctly indicate both affiliations and equal authorship or corresponding author designations.

Happy for feedback on how the yaml header is structured in the .Rmd file too; I think it's relatively intuitive if a bit verbose, but good to here from someone using fresh without having already looked at the underlying template.

Also, I'd like the yaml header blocks to be as consistent as possible across journal formats, (i.e., authors are always a yaml list of name, code) even though journals make such different tex templates that may be limited.

- permit lineno if requested.
- Document other options for pnas_template types in yaml.
- avoid possible pandoc error about tightlist
Also adds correct use of pandoc templating term sep in keyword for loop
@jeffreyhanson
Copy link
Contributor

Hi, this looks awesome. I was wondering what the progress on this pull request is? Is it likely to change substantially in the future?

@cboettig
Copy link
Contributor Author

I think I'm done fiddling with it now, sorry for the multiple follow-up commits after opening the PR. Of course I'm still open to user suggestions but I think it is now reasonably comparable to the pnas LaTeX template and should be good to go

@jeffreyhanson
Copy link
Contributor

No worries - I'm planning to use this for a submission. Thanks again for developing this!

@jjallaire jjallaire merged commit 2af2d7a into rstudio:master Jul 3, 2016
yihui added a commit that referenced this pull request Dec 6, 2017
…h rticles; users should install them from CTAN (cc @cboettig, #72)
@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.

4 participants