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

Added Frontiers Article #211

Merged
merged 21 commits into from
Mar 15, 2019
Merged

Added Frontiers Article #211

merged 21 commits into from
Mar 15, 2019

Conversation

muschellij2
Copy link
Contributor

To contribute a new article template to this package, please make sure you have done the following things (note that journalname_article below is only an example name):

  • Unless you have done it in any other RStudio's projects before, please sign the individual or corporate contributor agreement for a significant pull request (it is fine not to sign it if a PR is only intended to fix a few typos). You can send the signed copy to jj@rstudio.com.

  • Add the Pandoc LaTeX template inst/rmarkdown/templates/journalname_article/resources/template.tex.

  • Add a skeleton article inst/rmarkdown/templates/journalname_article/skeleton/skeleton.Rmd.

  • Add a description of the template inst/rmarkdown/templates/journalname_article/template.yaml.

  • Please include the document class file (*.cls) if needed, but please do not include standard LaTeX packages (*.sty) that can be downloaded from CTAN. Please keep the number of new files absolutely minimal, and also make examples minimal (e.g., if you need a .bib example, try to only leave one or two bibliography entries in it, and don't include one hundred items in it without using all of them).

  • Update Rd and namespace (could be done by devtools::document()).

  • Update NEWS.

  • Update README with a link to the newly supported journal.

  • Add a test to tests/testit/test-formats.R.

  • Add your name to the list of authors Authors@R in DESCRIPTION. You don't need to bump the package version in DESCRIPTION.

Thank you!

Copy link
Member

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good start. Thanks!

.travis.yml Outdated Show resolved Hide resolved
@muschellij2
Copy link
Contributor Author

As the main issue with 34212a0#comments was that it didn't work on windows, how do you test the windows build with Travis w/o Appveyor and not having os: windows in .travis.yml?

Copy link
Member

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With TinyTeX and the R package tinytex, it should be rare that we still need to worry about (standard) LaTeX packages. As long as the test passes on Travis, the package should work equally well on Windows, because TinyTeX is cross-platform.

At the time when JJ said it didn't work on Windows, we didn't even enable Travis for this repo (he was manually testing it), and TinyTeX didn't exist.

I have manually tested it on Windows with TinyTeX anyway, and it worked fine. Thank you!

Figures which are not according to the guidelines will cause substantial delay
during the production process.

# Discussion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why most section headers are unnumbered, but a few are numbered (by default).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good question. I was mainly working on the previous commit as a template and then just editing. I can change if necessary.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just asking. I don't know the journal requirement. If the journal requires unnumbered sections, we can just do it via a global option (pdf_document(number_sections = FALSE)), otherwise I won't use {-} frequently throughout the example.

@yihui
Copy link
Member

yihui commented Mar 15, 2019

BTW, I really wish they could use .pdf for logo1.eps. The EPS version is 2.3Mb, and PDF would be 27Kb...

@muschellij2
Copy link
Contributor Author

muschellij2 commented Mar 15, 2019

I vote we remove the .jpg, convert eps to PDF and change the .cls to accommodate. I just used their default template, but think we can change it. We may want but include frontiersHLTH.cls and frontiersFPHY.cls for other types (with the logo edit). I'm not sure how to easily switch the documentclass though with the macros.

Edit: We should take out epstopdf in cls as well.

@@ -1,955 +1,955 @@
\newcommand\classname{frontiersSCNS} %this file is based in bioninfo.cls
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these CRLF <-> LF changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm - I edited in texMaker, so it may have done that without me realizing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should only be an edit to epstopdf package exclusion and logo.pdf

Figures which are not according to the guidelines will cause substantial delay
during the production process.

# Discussion
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just asking. I don't know the journal requirement. If the journal requires unnumbered sections, we can just do it via a global option (pdf_document(number_sections = FALSE)), otherwise I won't use {-} frequently throughout the example.

Copy link
Member

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please feel free to add frontiersHLTH.cls and frontiersFPHY.cls, and remove epstopdf.

%%% In http://www.ctan.org/ you can find the packages and how to install them, if necessary. %%%
%%% NB logo1.jpg is required in the path in order to correctly compile front page header %%%

\documentclass[utf8]{frontiersSCNS} % for Science, Engineering and Humanities and Social Sciences articles
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make it possible for users to customize the document class, you can use $documentclass$ instead of hardcoding one: http://pandoc.org/MANUAL.html#variables-for-latex

https://github.com/jgm/pandoc-templates/blob/master/default.latex#L35

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added this to the options, so you can do:

output: 
  rticles::frontiers_article:
    documentclass: frontiersHLTH

@yihui yihui merged commit e3b0c39 into rstudio:master Mar 15, 2019
@yihui
Copy link
Member

yihui commented Mar 15, 2019

Thanks!

yihui added a commit that referenced this pull request Mar 15, 2019
@yihui yihui mentioned this pull request Mar 16, 2019
@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