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 jasa_article() #364

Merged
merged 30 commits into from
Jan 21, 2021
Merged

add jasa_article() #364

merged 30 commits into from
Jan 21, 2021

Conversation

stefanocoretta
Copy link
Contributor

This pull request adds jasa_article().

(I had to create a new PR because I rebased the branch with a fix.)

✅ - All checks on GH Actions passed.

  • 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 [email protected].

  • Add the journalname_article() function to R/article.R if the output format is simple enough, otherwise create a separate R/journalname_article.R.

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

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

  • Add a description of the template inst/rmarkdown/templates/journalname/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. If you are using TinyTeX or TeX Live, you can verify if a package is available on CTAN via tinytex::parse_packages(files = "FILENAME"") (e.g., when FILENAME is plain.bst, it should return "bibtex", which means this file is from a standard CTAN package). Please keep the number of new files absolutely minimal (e.g., do not include PDF output files), 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 too many 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. Please add your Github username and the full name of the journal (follow other examples in the list).

  • Add a test to tests/testit/test-formats.R by adding a line test_format("journalname"). We try to keep them in alphabetical order.

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

Lastly, please try your best to do only one thing per pull request (e.g., if you want to add two output formats, do them in two separate pull requests), and refrain from making cosmetic changes in the code base: https://yihui.name/en/2018/02/bite-sized-pull-requests/

Thank you!

Copy link
Collaborator

@cderv cderv left a comment

Choose a reason for hiding this comment

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

Thank you for this one also !

About revtex4-1 it seems that it is required by JASA.cls in a weird way because if it can't find it installed it will error like that

Please update your system to include revtex4-1.cls

which is not a standard error that tinytex know how to parse. They directly included that into JASA.cls. It is also not a standard way to include this.

Usually with rmarkdown adding a extra_dependency or directly in the template with \usepackage would to the trick but here I think it won't work. That is why you needed to add it yourself into Github Action workflow.

One way for it to work no matter what would be to ship this cls file into the skeleton.
Or to install the package when jasa_article is used using in the function

if ( !"revtex4-1" %in% tinytex::tl_pkgs()) tinytex::tlmgr_install("revtex4-1")

When you say revtex4-1 is obsolete, does it means it is not advice to install it globally ?

For bibliography, the same as other templates needs to be added.
See #362 (comment)

Also, I am not sure it works using biblatex currently. Is this suppose to work as you offer the option in the template ?

NEWS.md Outdated Show resolved Hide resolved
inst/rmarkdown/templates/jasa/resources/template.tex Outdated Show resolved Hide resolved
inst/rmarkdown/templates/jasa/resources/template.tex Outdated Show resolved Hide resolved
inst/rmarkdown/templates/jasa/resources/template.tex Outdated Show resolved Hide resolved
inst/rmarkdown/templates/jasa/template.yaml Outdated Show resolved Hide resolved
@stefanocoretta
Copy link
Contributor Author

Hi! Thanks! revtex4-1 is obsolete, but it is safe to install globally because the replacement is just called revtex so that they coexist. In the meantime, I'll work on the changes.

R/article.R Outdated Show resolved Hide resolved
@stefanocoretta stefanocoretta marked this pull request as draft January 8, 2021 08:02
@cderv
Copy link
Collaborator

cderv commented Jan 20, 2021

@stefanocoretta as it has been 8 days I am just wondering if you are waiting for a review. don't forget to undraft so we know it is ready to be merged.

Thanks!

@stefanocoretta
Copy link
Contributor Author

Hi! Thanks for checking. I am still working on this. :) (Gonna be a bit slow)

@cderv
Copy link
Collaborator

cderv commented Jan 20, 2021

No problem & no hurry!

I wanted to be sure we were on the same page. I'll come back to help if CI fail or when you'll undraft as ask for review!

Do not hesitate to ping me if needed.

@stefanocoretta stefanocoretta marked this pull request as ready for review January 20, 2021 19:10
@cderv
Copy link
Collaborator

cderv commented Jan 21, 2021

Thank you @stefanocoretta !

@cderv cderv merged commit c1a3da6 into rstudio:master Jan 21, 2021
@stefanocoretta stefanocoretta deleted the jasa-article branch January 21, 2021 11:36
stefanocoretta pushed a commit to stefanocoretta/rticles that referenced this pull request Apr 3, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 26, 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 this pull request may close these issues.

3 participants