-
Notifications
You must be signed in to change notification settings - Fork 520
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
GigaScience rticle support #156
base: main
Are you sure you want to change the base?
Conversation
…ill has some issues with markdown in the body
…port GigaScience in the home directory rather than in the system repository
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.
Could you rebase against the current master branch and resolve the conflicts? You will need force push.
Don't worry about LaTeX packages or how many times the .tex output file should be compiled. These problems have been well solved by the R package tinytex and the LaTeX distribution TinyTeX: https://yihui.name/tinytex/ (the rmarkdown package calls tinytex now). You can remove the scripts for installing LaTeX packages in this PR.
8023cbf
to
928d6cd
Compare
Okay, I'm working on it. FYI, when I tried to install |
xfun is a CRAN package. Either |
Good to know. Probably I am using an old version of R! I will retry sometime with a newer version. FYI, and no need to respond since it sounds expected: In my archaic corner of the universe, RStudio 1.1.383 |
…t; ln -s ../testit/test-formats.R' in bash and then 'library(testit); devtools::test()' in R
I don't know how to get 'testit' to produce results that I can see and review. testit::test_pkg("rticles") produces no output (instantly) and gives no evidence that it has run. The move away from 'testthat' makes devtools::test() fail. Since testthat is the only way that I know how to test a package before installing it, I did the following workaround (without adding it to git) to make sure that my article's test passes: mkdir tests/testthat
cd tests/testthat
ln -s ../testit/test-formats.R' in bash and then library(testit)
devtools::test() in R |
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.
Don't worry about testing. There is nothing else you need to do -- we have enabled Travis CI, and the tests will run automatically there. Currently the test for this format has passed.
Anyway, the testing is not based on testthat. If you have to run tests locally, you can either use the canonical R CMD check
, or Cmd/Ctrl + Shift + T
in RStudio.
Thanks!
inst/rmarkdown/templates/gigascience_article/skeleton/skeleton.Rmd
Outdated
Show resolved
Hide resolved
inst/rmarkdown/templates/gigascience_article/skeleton/skeleton.Rmd
Outdated
Show resolved
Hide resolved
inst/rmarkdown/templates/gigascience_article/skeleton/paper-refs.bib
Outdated
Show resolved
Hide resolved
inst/rmarkdown/templates/gigascience_article/skeleton/skeleton.Rmd
Outdated
Show resolved
Hide resolved
inst/rmarkdown/templates/gigascience_article/skeleton/skeleton.Rmd
Outdated
Show resolved
Hide resolved
inst/rmarkdown/templates/gigascience_article/skeleton/skeleton.Rmd
Outdated
Show resolved
Hide resolved
inst/rmarkdown/templates/gigascience_article/skeleton/skeleton.Rmd
Outdated
Show resolved
Hide resolved
inst/rmarkdown/templates/gigascience_article/skeleton/skeleton.Rmd
Outdated
Show resolved
Hide resolved
Oh BTW, did you sign the contributor agreement? https://github.com/rstudio/rticles/blob/master/.github/PULL_REQUEST_TEMPLATE.md |
Contributor agreement received. |
Dear @yihui , Please understand that I do not wish to bite the hand that feeds me. I very much appreciate your hard work on rmarkdown and how it makes life so much better for so many people. Right now, I'm trying to put together a GigaScience paper in TeX/LaTeX, and they have a two-column format and a specific document class. Of course, I'm new to rmarkdown and trying to get things like figures and bibliographies to work with their template. I just want to get a draft done! I see that I have expressed opinions strongly, even in my skeleton.Rmd! :( These really are ill-informed impressions - I see that better now. So, I appreciate your coaching and patience very much. I do want the skeleton.Rmd to give authors as much help as possible to complete their GigaScience paper quickly. So, I want it to provide best practices, hints, and alternatives. I hope that I have not been too abrasive. Thank you again for your hard work! |
@eschen42 Thanks for your explanation! I can see your position better now. My main point is that if a certain thing can be achieve through either LaTeX or Markdown, I tend to use Markdown instead. However, I'm not completely against using raw LaTeX (and sometimes it is just not avoidable). It will be nice if we can point out both ways to users and let them decide. If you are not familiar with the Markdown way yet, it is totally fine to only introduce the LaTeX way for now. This PR really only has a small number of minor issues. I guess we can merge it after another revision. Thanks again! |
# output: specifies the R class used to translate rmarkdown to tex and pdf | ||
output: | ||
rticles::gigascience_article: | ||
md_extensions: +raw_tex |
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.
Actually the raw_tex
extension is enabled by default in Pandoc, so you don't really need to enable it explicitly here.
$ echo 'Hello \LaTeX and **LaTeX**.' | pandoc -f markdown -t latex
Hello \LaTeX and \textbf{LaTeX}.
inst/rmarkdown/templates/gigascience_article/skeleton/skeleton.Rmd
Outdated
Show resolved
Hide resolved
033a19f
to
d98786f
Compare
@eschen42 Would you be open to pick this issue up again, or would you mind me attempting to fix the remaining issues? |
@cderv Thank you so much for the ping! |
@nuest if you are still willing to help on this one, feel free to chime in. Thanks ! |
|
Another friendly ping on this template @nuest. Are you interesting to keep the work on this ? I leave this PR open - I added the label help wanted in case anyone want to jump it to help on this. |
Help is welcome, I for my part have put this on my list for when I return from my extended leave in Spring next year. |
No status change, it's one the list if side projects for spring. |
@cderv Even when I do
Whereas the other article formats work fine. |
Sorry for the delay; Let me try to rebase or at least merge main in this PR. Regarding renv we don't use that in the package.... if you use that in your project, you need to be sure to install the PR branch to get the rticle function |
@eschen42 I spend some time today to update the PR to our latest best practice in the repo, and also dig into GIGASCIENCE doc. I found this : https://academic.oup.com/pages/authoring/journals/preparing_your_manuscript
Gigascience is found among the journal list in the Excel file provided It happens that we have now an updated version of the OUP template using https://ctan.org/pkg/oup-authoring-template This means that using something like output:
rticles::oup_article:
oup_version: 1 # 1 = 2020 CTAN OUP CLS package
journal: "GigaScience"
document_style: "contemporary"
papersize: "large"
namedate: FALSE
number_sections: FALSE should give a template suitable for GigaScience if they really follow OUP template We could also adapt the OUP template if it is not working well. What do you think ? |
Works with the skeleton, albeit with a few workarounds:
tlmgr_pkg
adds a few Tex*Live packages needed to generate PDFs from this and other rticles.Tested on rserver in my eschen42/devplan Docker environment, doi: 10.5281/zenodo.1157078