rstudio / rticles

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

Updated mdpi_article #381

Closed mrajeev08 closed 1 year ago

mrajeev08 commented 3 years ago

Hi there,

Apologies for the previous PR (and the messy commit history), I'm a bit new to this, but here goes. I've just adapted the mdpi_article template for a recent article submission per the newest template (see here), so thought I would submit this PR in case useful. This would close #369.

The biggest changes I encountered are that it's now in a two-column format and they use a custom table environment. I've provided some guidance in the skeleton.Rmd on how to deal with this and some other issues I ran into when adapting my manuscript to this new template (mainly long table doesn't work well with a two-column layout). Not sure if that is the right place for it, but thought it might save others some headaches!

I added in some yaml fields that were missing from the template previously (i.e. dataavailability, informed consent, etc.), and also left a few comments in the template (marked by a comment [MR: from rticles] where I carried over some latex code from the previous rticles template (which I can delete if it all looks good).

Finally, I maintained the directory structure provided by the journal template, i.e. the supporting files (i.e .csl, .bst, images, etc.) in the 'Definitions' folder), as I thought that would be the best bet to make the journal happy:)

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

etiennebr commented 3 years ago

Thanks for the update @mrajeev08! I tested the template (following the call in #325) and it runs fine, at least on one of my mdpi paper.

However, I had some issues with longtable. I think that the new template is narrower than the previous one, doing kabble(..., longtable = FALSE) solved it, but the table is slightly less pleasing. The rest seems fine.

cderv commented 3 years ago

@mrajeev08 Are still you planning to keep working on this some times? No hurry. Just trying to see if this is staled or not.

There is a few comments I left that would benefit some feedback.

@etiennebr feel free to jump in if you are a mdpi user.

Thank you.

JVAQUEROM commented 2 years ago

I wrote #369 some while ago. I would be happy to contribute to this.

cderv commented 2 years ago

Please @JVAQUEROM , Jump in. Either by helping @mrajeev08 on this PR or starting fresh if this is easier.

mrajeev08 commented 2 years ago

Yes, please do! Apologies for the silence, I was hoping to get to this, but haven't managed. I think they've already updated the template again so may be worth a diff to see if things have changed. Also still seems to be structured with the Definitions folder containing most of the latex files, and from my fuzzy memory I think they did require I do that if I wanted to do edits in the latex version and not the word version as per cderv's q. But may not be worth it if it will mess up other things in rticles. In which case fresh start might be easiest:)

mrajeev08 commented 2 years ago

Thanks for the update @mrajeev08! I tested the template (following the call in #325) and it runs fine, at least on one of my mdpi paper.

However, I had some issues with longtable. I think that the new template is narrower than the previous one, doing kabble(..., longtable = FALSE) solved it, but the table is slightly less pleasing. The rest seems fine.

Also @etiennebr if at all still relevant/useful, here's some info on workarounds for longtable!

JVAQUEROM commented 2 years ago

Hi, I tried @mrajeev08's version of rticles and I get LaTeX compilation error: ! LaTeX Error: FileDefinitions/mdpi.cls' not found.`

But I see you have talked about this in this issue, so I am not sure if I am getting the latest version. I got it doing:

remotes::install_github("mrajeev08/rticles")

I also suggest (or maybe you already do it?) to keep a version of the original template to be able to track changes more easily.

I have some basic knowledge of git and use it regularly but not in collaboration (i.e. never did a PR, etc.). So I'll try my best but maybe I do something wrong at some point.

EDIT: so I changed in the template de "Definition/mdpi" to "mdpi" and copied the corresponding files in the skeleton folder. However, I get another error

! Undefined control sequence.
l.62 \datereceived
                  {} 
cderv commented 2 years ago

@JVAQUEROM @mrajeev08 I merged master into this PR so that it can be worked again on a good basis.

@JVAQUEROM regarding how to work on this PR, you can install it using remotes::install_github("rstudio/rticles#381"). Then you can use RStudio IDE menu to create a new R Markdown file based on this template. This should work. The Definition folder thing can be kept that way for now. Other review comment need to be handled.

Regarding git usage, you can find useful resource in https://happygitwithr.com/ and PR helper in usethis https://usethis.r-lib.org/articles/articles/pr-functions.html

Thanks

cderv commented 1 year ago

I am closing this now. We'll work based on new contributed #515.

Thanks @mrajeev08 for your initial work on this.