rstudio / rticles

LaTeX Journal Article Templates for R Markdown
https://pkgs.rstudio.com/rticles/
1.46k stars 516 forks source link

Update OUP format to make compatible with elsevier format #406

Closed dmkaplan2000 closed 3 years ago

dmkaplan2000 commented 3 years ago

I have updated the OUP format so the template Rmarkdown document is largely identical to the elsevier format, facilitating switching between the two formats. The changes are backward compatible so existing documents made with the old format will continue to work.


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):

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!

CLAassistant commented 3 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

:white_check_mark: yihui
:x: David M. Kaplan


David M. Kaplan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

dmkaplan2000 commented 3 years ago

David M. Kaplan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.

I do not understand this message. I have looked at my commits as suggested by the link and I do not see any evidence of commits not in my name. Perhaps I am not understanding the instructions.

dmkaplan2000 commented 3 years ago

I have signed the CLA, but I think it is not recognizing it because I signed as "David Kaplan", when it was looking for "David M. Kaplan". I have tried to fix this, but it won't let me change the name. Is there a way to fix this?

cderv commented 3 years ago

Thanks @dmkaplan2000 !

For a better understanding, Oxford university press article and elsevier are suppose to be the same, is that so ? Does your PR mean that we need to make them evolved the same way in the future ? I trying to understand why we have 2 templates if at the end they are quite similar.

About the CLA signing and commit on Github, here are my takes. As you can see above, your commits are not associated with your Github user. We don't see you profile picture in the commit. You can click the commit to see this in more detail. What is explained in https://docs.github.com/en/github/committing-changes-to-your-project/troubleshooting-commits/why-are-my-commits-linked-to-the-wrong-user#commits-are-not-linked-to-any-user is that you may have not configured your local Git with the username and / or email address you use on Github. Git must be configured with username and email, and this is used by Github to attribute the commit. As you push with your Github account in the repo, your account is associated with the PR but not the commits. See https://docs.github.com/en/github/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-your-commit-email-address and https://happygitwithr.com/hello-git.html for Git configuration explanation.

Also, it would be helpful for such PR is you use a specific branch instead of committing your change to your master. Right now, we have a lot more commit in this PR above than the real change this commits aims to make on master. This is not a real issue as we will squash the commits when the PR is merged, but it does not help to see quickly the relevant commit.

Thanks again for your PR.

cderv commented 3 years ago

For a better understanding, Oxford university press article and elsevier are suppose to be the same, is that so ? Does your PR mean that we need to make them evolved the same way in the future ? I trying to understand why we have 2 templates if at the end they are quite similar.

I am also asking this because from the journal doc (https://academic.oup.com/journals/pages/authors/preparing_your_manuscript) it seems there is a CTAN package containing a template for this article (https://ctan.org/tex-archive/macros/latex/contrib/oup-authoring-template).

But you are the one using it so it is just for my own understanding about this template. I looked at the PR and everything LGTM

dmkaplan2000 commented 3 years ago

Thanks @dmkaplan2000 !

For a better understanding, Oxford university press article and elsevier are suppose to be the same, is that so ? Does your PR mean that we need to make them evolved the same way in the future ? I trying to understand why we have 2 templates if at the end they are quite similar.

No, OUP and Elsevier have nothing really to do with each other. All I am doing is making it so that essentially the same Rmarkdown document can be used for either journal with only minimal modifications. For example, in my original OUP template, I used the "authors" field for the authors, whereas the Elsevier template uses "author". Now I have synchronized my template with Elsevier's just to have fewer distinct formats for journals.

About the CLA signing and commit on Github, here are my takes. As you can see above, your commits are not associated with your Github user. We don't see you profile picture in the commit. You can click the commit to see this in more detail. What is explained in https://docs.github.com/en/github/committing-changes-to-your-project/troubleshooting-commits/why-are-my-commits-linked-to-the-wrong-user#commits-are-not-linked-to-any-user is that you may have not configured your local Git with the username and / or email address you use on Github. Git must be configured with username and email, and this is used by Github to attribute the commit. As you push with your Github account in the repo, your account is associated with the PR but not the commits. See https://docs.github.com/en/github/setting-up-and-managing-your-github-user-account/managing-email-preferences/setting-your-commit-email-address and https://happygitwithr.com/hello-git.html for Git configuration explanation.

OK, I see that, but what I don't see for the time being is an easy way to fix it. The instructions said that there is supposed to be a question mark near the commits explaining what the issue is, but I see no such question mark. I will look into it some more, but if there is any way to just accept the PR as is that would be great. The commits are all mine, it is just an issue with different usernames on the different machines I use.

Also, it would be helpful for such PR is you use a specific branch instead of committing your change to your master. Right now, we have a lot more commit in this PR above than the real change this commits aims to make on master. This is not a real issue as we will squash the commits when the PR is merged, but it does not help to see quickly the relevant commit.

OK, will do this for the future, but do you want me to try to fix this for this PR (with not being the preferred answer)?

Thanks again for your PR.

dmkaplan2000 commented 3 years ago

For a better understanding, Oxford university press article and elsevier are suppose to be the same, is that so ? Does your PR mean that we need to make them evolved the same way in the future ? I trying to understand why we have 2 templates if at the end they are quite similar.

I am also asking this because from the journal doc (https://academic.oup.com/journals/pages/authors/preparing_your_manuscript) it seems there is a CTAN package containing a template for this article (https://ctan.org/tex-archive/macros/latex/contrib/oup-authoring-template).

But you are the one using it so it is just for my own understanding about this template. I looked at the PR and everything LGTM

As you can see from the CTAN package, it was quite recently added and to be honest I was unaware of this change in their format. I published an article in an OUP journal using the old template (via Rmarkdown) after this CTAN package became available (https://doi.org/10.1093/icesjms/fsaa216), so I know they are still accepting it. What I would suggest is that you accept this PR and then I work on another PR to adapt to this new template.

cderv commented 3 years ago

I published an article in an OUP journal using the old template (via Rmarkdown) after this CTAN package became available

Good to know! I just merged then.

What I would suggest is that you accept this PR and then I work on another PR to adapt to this new template.

Please do ! We welcome a new PR. (don't forget to use a new branch for this as it will be easier to review).

Thanks again for this PR @dmkaplan2000 !

dmkaplan2000 commented 3 years ago

Thanks!

I am not sure if this is the place, but I have a couple of quick questions regarding updating to the newest OUP template:

1) As the template is on CTAN, I am no longer supposed to include the cls file in rticles, correct?

2) The new template has a number of options that were simply absent from the previous template, so if I update to the new template I will probably have to break backward compatibility in some way. Is there a preferred way to do this, for example, keeping the old oup_article style and making a oup_author_template_article style?

Thanks, David

On 5/31/21 2:19 PM, Christophe Dervieux wrote:

I published an article in an OUP journal using the old template
(via Rmarkdown) after this CTAN package became available

Good to know! I just merged then.

What I would suggest is that you accept this PR and then I work on
another PR to adapt to this new template.

Please do ! We welcome a new PR. (don't forget to use a new branch for this as it will be easier to review).

Thanks again for this PR @dmkaplan2000 https://github.com/dmkaplan2000 !

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/rstudio/rticles/pull/406#issuecomment-851452399, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEOYJK3Q6GC2LPLI6VNBDLTQN5EZANCNFSM45YBFJ7A.

cderv commented 3 years ago

1) As the template is on CTAN, I am no longer supposed to include the cls file in rticles, correct?

Yes exactly.

2) The new template has a number of options that were simply absent from the previous template, so if I update to the new template I will probably have to break backward compatibility in some way. Is there a preferred way to do this, for example, keeping the old oup_article style and making a oup_author_template_article style?

This is a good question. I think we need to take the decision based on the real differences between the template. Absent options in previous template could have defaults is not provided for example. If there is no other way than having breaking change, we'll need to thing of the best way to do so. Having a new function is not really the way. I would thing an argument in the function (like version or else) that would allow to switch between old and new template - it would select the right file for example.

However, the aim of rticles package is to be able to write articles to publish in Journals so I would not mind breaking old Rmd documents if to publish to OUP you need to us the new templates only. Users who want to re-render an old report created with articles could install the version of rticles that works for them. Am I wrong to think that ?

Anyway, if we could avoid in hard change and breakage, it is best to do so.

I am not sure if this is the place, but I have a couple of quick questions regarding updating to the newest OUP template:

You can open a new issue about this updates and we can discuss there as needed.