-
Notifications
You must be signed in to change notification settings - Fork 521
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
ajs journal included #437
ajs journal included #437
Conversation
Hi @matthias-da Thanks for the contribution. I am preparing a release for this week, so timing is right. I will review this and hopefully we can end the work quicly. To ease the review, I'll merge master into this branch to get the correct diff. Some changes are not right currently. |
Merge commit '715ead77f930272044991d8bc6ce31c016d51d42' Conflicts: DESCRIPTION
[skip ci]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before going further into the review, I need to clarify something.
I see this is a template similar to JSS article: jss_article()
.
What is exactly the difference between both format ?
It seems we currently have duplication between both and only the documentclass is changing. Am I right ? Is there more ?
Thanks.
Indeed I with Achim Zeileis at the same University for some time and with his full commitment the Austrian Journal of Statistics uses only a slightly modified version of the Journal of Statistical Software (than Achim made) since 2013. |
Thanks for the precision ! If this is only the cls file that change, we may think of something else for rticles than duplicating the entire function. From what I understand and see from this PR:
This means that currently, you are able to use ---
documentclass: ajs
output: rticles::jss_article
--- Do we agree on this ? Before looking at solution, we must agree on the "problem" to solve here:
Am I missing something ? From there, I see several solutions:
Anyway, we should find a solution that suits your initial aim but we won't duplicate code the way it is currently done in the PR. I need you to clarify the aim and the user experience. What is the desired behavior ? Thanks for your help |
Dear Christophe, thanks a lot for all this work. Currently, ajs has different .cls, skeleton (guidelines) and images. To your questions.
correct
I'm sure that I put them within the pull request under inst/rmarkdown/templates/ajs/skeleton/
Absolutely agree on this. Thus I would like to ask you to put them in inst/rmarkdown/templates/ajs/skeleton/. If I missed something on this, I'm happy to follow up on this. Proposed solutions:
I think we should strictly avoid to name jss in any call from users, i.e. many of our authors might be confused, and thus a solution like this in the following is not a the best one in my point of view:
It would be great to have |
I understand the reason you are giving. We'll offer a
It is really not good practice to exactly duplicate the code of JSS. If the same behavior is required, then we'll use the function under-the-hood. The user does not need to know. If we need a different behavior, then we need to refactor into shared functions. But we don't want to have copy pasted part (which here is a whole file) in our code base. Do you want to try to adapt the PR this way, avoiding the duplication ? I believe this is possible unless I missed something. This could require an adaptation of the current function though so that I can take it from here if you prefer. |
You are much more into the code and package of rticles, so this would be great, and probably less work compared to answer my potential difficulties and follow-up questions. Thanks a lot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have rework this branch. Can you test is and tell me if that works ok for you ?
remotes::install_github("rstudio/rticles#437")
# or
pak::pak("rstudio/rticles#437")
Also I left a few comments below for you to answer to know if we should modify or not before merging.
I just tested it. Looks great and does the job. Thanks a lot Christophe @cderv ! For the small issues regarding |
Those suggestion are made in the review so that you can easily accept them normally. I'll add them. |
Thanks @matthias-da ! |
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):This project uses a Contributor Licence Agreement (CLA) that you'll be asked to sign when opening a PR. This is required for a significant pull request (it is fine not to sign it if a PR is only intended to fix a few typos). We use a tool called CLA assistant for that.
You could also, unless you have done it in any other RStudio's projects before, sign the individual or corporate contributor agreement. You can send the signed copy to jj@rstudio.com.
Add the
journalname_article()
function toR/article.R
if the output format is simple enough, otherwise create a separateR/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 viatinytex::parse_packages(files = "FILENAME"")
(e.g., whenFILENAME
isplain.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 linetest_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!