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

GigaScience rticle support #156

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open

Conversation

eschen42
Copy link

Works with the skeleton, albeit with a few workarounds:

  • the file tlmgr_pkg adds a few Tex*Live packages needed to generate PDFs from this and other rticles.
    1. The gigascience test passes
    2. Some other rticle tests do not pass because of missing fonts; I don't know how to resolve these.
  • knitr produces a PDF with broken citation links and numbers.
  • the work around is:
    1. Open the .tex file in RStudio (it has the same file-name as the .Rmd file)
    2. Click "Compile PDF" three times. (The first two times fail because of issues with how the bibliography is generated.)

Tested on rserver in my eschen42/devplan Docker environment, doi: 10.5281/zenodo.1157078

Copy link
Member

@yihui yihui left a 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.

@yihui yihui force-pushed the master branch 2 times, most recently from 8023cbf to 928d6cd Compare July 3, 2018 16:11
@eschen42
Copy link
Author

Okay, I'm working on it. FYI, when I tried to install rtciles from a git clone it failed because of unmet dependency xfun - fortunately, I thought to search for it on GitHub and installed rticles. Now the fun really begins ....

@yihui
Copy link
Member

yihui commented Jul 20, 2018

xfun is a CRAN package. Either devtools::install_github('rstudio/rticles') or install.packages('rticles') should install it automatically, unless you are using a very old version of R.

@eschen42
Copy link
Author

Good to know. Probably I am using an old version of R! I will retry sometime with a newer version.
With my version of RStudio, I didn't find xfun when I tried "Tools > Install Packages..." in RStudio.

FYI, and no need to respond since it sounds expected: In my archaic corner of the universe, devtools::install_github('rstudio/rticles') did not install xfun.

RStudio 1.1.383
R version 3.4.1 (2017-06-30) -- "Single Candle"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

@eschen42
Copy link
Author

eschen42 commented Jul 23, 2018

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

Copy link
Member

@yihui yihui left a 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!

DESCRIPTION Outdated Show resolved Hide resolved
tests/testit/test-formats.R Outdated Show resolved Hide resolved
@yihui
Copy link
Member

yihui commented Jul 23, 2018

Oh BTW, did you sign the contributor agreement? https://github.com/rstudio/rticles/blob/master/.github/PULL_REQUEST_TEMPLATE.md

@jjallaire
Copy link
Member

Contributor agreement received.

@eschen42
Copy link
Author

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!

@yihui
Copy link
Member

yihui commented Jul 25, 2018

@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
Copy link
Member

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}.

@yihui yihui force-pushed the master branch 3 times, most recently from 033a19f to d98786f Compare August 20, 2019 20:57
@nuest
Copy link
Contributor

nuest commented Apr 15, 2020

@eschen42 Would you be open to pick this issue up again, or would you mind me attempting to fix the remaining issues?

@cderv
Copy link
Collaborator

cderv commented Aug 17, 2020

@eschen42 friendly ping 😄

what is the status of this PR ? Do you plan on working on it or can @nuest work on it ?

@eschen42
Copy link
Author

eschen42 commented Aug 21, 2020

@eschen42 friendly ping 😄

what is the status of this PR ? Do you plan on working on it or can @nuest work on it ?

@cderv Thank you so much for the ping!
@nuest Please feel free to resolve the issues in ANY way that you see fit, if you are still inclined to do so. I am VERY sorry that I didn't notice your request. I found myself somewhat out of my depth regarding following up on the PR.

@cderv cderv self-assigned this Aug 21, 2020
@cderv
Copy link
Collaborator

cderv commented Aug 24, 2020

Would you be open to pick this issue up again, or would you mind me attempting to fix the remaining issues?

@nuest if you are still willing to help on this one, feel free to chime in. Thanks !

@CLAassistant
Copy link

CLAassistant commented Sep 24, 2020

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.

✅ cderv
❌ eschen42
You have signed the CLA already but the status is still pending? Let us recheck it.

@cderv
Copy link
Collaborator

cderv commented Jun 9, 2021

Hi @eschen42 @nuest,

is anyone of you willing to continue this old PR ?
It has been a long time and there may have been some updates on the GigaScience underlying template.

Just seeing what is the status on this one. Thanks

@cderv
Copy link
Collaborator

cderv commented Sep 7, 2021

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.

@cderv cderv added the help wanted ❤️ we'd love your help! label Sep 7, 2021
@cderv cderv removed their assignment Sep 7, 2021
@nuest
Copy link
Contributor

nuest commented Sep 7, 2021

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.

@cderv
Copy link
Collaborator

cderv commented Nov 30, 2021

Hi @eschen42 @nuest,

Just for information I merge master branch into this PR so that it can be continued on good basis as we have changed some ways to organize the code. No change on the format base code.

Is this still a project that one of you is planning to help on ?

@nuest
Copy link
Contributor

nuest commented Nov 30, 2021

No status change, it's one the list if side projects for spring.

@cderv
Copy link
Collaborator

cderv commented Apr 19, 2023

Hi @eschen42 @nuest,

should be plan to finish this PR for a gigascience template ? Just enquiring for a status update

@cderv cderv added the WIP label Apr 19, 2023
@eschen42
Copy link
Author

@cderv @nuest I am very sorry that I have not gotten back to this in like forever....
I will see what I can do today.
Part of the issue has been that yihui requested "rebase" which I have no idea how to do and barely know what it is...

@eschen42
Copy link
Author

@cderv Even when I do renv::activate(), install required packages, and do devtools::install, I still get:

Error: 'gigascience_article' is not an exported object from 'namespace:rticles'

Whereas the other article formats work fine. gigascience_article is in my NAMESPACE file. Ideas?

@cderv
Copy link
Collaborator

cderv commented May 4, 2023

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

@cderv
Copy link
Collaborator

cderv commented May 5, 2023

@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

The OUP LaTeX template produces manuscripts matching the formatting requirements of the journals listed at the following link: Journals supported by the OUP LaTeX template.

Gigascience is found among the journal list in the Excel file provided
image

It happens that we have now an updated version of the OUP template using https://ctan.org/pkg/oup-authoring-template
You can find how it looks here: https://pkgs.rstudio.com/rticles/articles/examples.html#oup_v1---oxford-university-press-oup---new-2020-ctan-template-v1-0

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 ?

@cderv cderv self-assigned this May 5, 2023
@cderv cderv removed the help wanted ❤️ we'd love your help! label May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

6 participants