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

[WIP] First attempt at arXiv template #236

Merged
merged 10 commits into from
Aug 3, 2020
Merged

[WIP] First attempt at arXiv template #236

merged 10 commits into from
Aug 3, 2020

Conversation

alexpghayes
Copy link
Contributor

@alexpghayes alexpghayes commented Jun 29, 2019

Taking a crack #235 but running into issues with the template.


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

  • Unless you have done it in any other RStudio's projects before, please sign the individual or corporate contributor agreement for a significant pull request (it is fine not to sign it if a PR is only intended to fix a few typos). You can send the signed copy to [email protected].

  • Add the journalname_article() function to R/article.R if the output format is simple enough, otherwise create a separate R/journalname_article.R.

  • Add the Pandoc LaTeX template inst/rmarkdown/templates/journalname_article/resources/template.tex.

  • Add a skeleton article inst/rmarkdown/templates/journalname_article/skeleton/skeleton.Rmd.

  • Add a description of the template inst/rmarkdown/templates/journalname_article/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. Please keep the number of new files absolutely minimal, 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 one hundred items in it without using all of them).

NOTE: I don't think arxiv is on CTAN from a cursory search, but my LaTeX awareness isn't high enough to confirm this. For the time being I'm going operate under the assumption that arxiv.sty is necessary and belongs where it is.

  • Update Rd and namespace (could be done by devtools::document()).

  • Update NEWS.

  • Update README with a link to the newly supported journal.

  • Add a test to tests/testit/test-formats.R.

  • Add your name to the list of authors Authors@R in DESCRIPTION. You don't need to bump the package version in DESCRIPTION.

@alexpghayes
Copy link
Contributor Author

  • Figure out how the template is licensed and if/how to list George Kour in DESCRIPTION

Issues that still need to be resolved:

- Multiple citations aren't working
- Links have irritating boxes all around them
- In general pandoc seems to be doing lots of fancy
  but potentially undesirable stuff. Can this be
  turned off?
@yihui yihui force-pushed the master branch 3 times, most recently from 033a19f to d98786f Compare August 20, 2019 20:57
@kevinykuo
Copy link

@alexpghayes What's blocking this? Would be really cool to have!

@alexpghayes
Copy link
Contributor Author

alexpghayes commented Oct 15, 2019

Other projects have taken priority / I'm suffering through raw LaTeX for the paper I was going to use this for. Please feel free to finish this off, it's probably going to be a while before I can get to this.

Fairly sure there's bug somewhere and the pdf rendering wasn't quite right when I stopped.

@kevinykuo
Copy link

Looks mostly fine to me :P

I'll get going on a manuscript and see if I hit anything.

@kevinykuo
Copy link

OK I'm stuck. Can't seem to figure out how to use numeric style for citations. I've tried both (separately)

\usepackage[style=numeric]{biblatex}

and

\usepackage[numbers]{natbib}

directly in the template to no avail. Let me know if y'all have any tips...

@kevinykuo
Copy link

Oops, citation_package in the header, all good now.

@kevinykuo
Copy link

@alexpghayes @yihui I made my way through a short paper, and have made the following changes to make things work:

In template.tex, I added the following block

$for(include-before)$
$include-before$
$endfor$

In my .Rmd yaml, I have

header-includes: |
  \usepackage{makecell}
  \usepackage{amsmath}
  \usepackage[numbers]{natbib}
  \bibliographystyle{abbrvnat}
  \usepackage{graphicx}
  \usepackage{mathtools}
  \usepackage{lmodern}
output: 
  bookdown::pdf_book:
    base_format: rticles::arxiv_article
    citation_package: natbib

Questions: should some of these packages be hardcoded into the template (if so, which ones)? Also, is there a better way to handle bibliography options?

@alexpghayes
Copy link
Contributor Author

I don't know. What are next steps here? Should I close this PR, or incorporate these updates, or...?

@kevinykuo
Copy link

The most efficient way to proceed is probably for @yihui to opine on whether any changes I made locally should be part of the template, then @alexpghayes can push a commit if needed and we can merge?

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.

I'm not familiar with the arXiv format, and I'm fine with whatever changes you want to make in template.tex. Please feel free to let me know when you feel this PR is ready, and I'll just merge it. Thank you!

@fangzhou-xie
Copy link

I believe it would be very nice to have arxiv template for this. I wonder if there is any update on this or is there any guide I can follow to use this arxiv template in R Markdown?

Thank you very much!

@kevinykuo
Copy link

@yihui Let's merge this and I can open a follow-up PR to add my changes.

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.

Okay. Thanks @alexpghayes and @kevinykuo!

@yihui yihui merged commit 8757713 into rstudio:master Aug 3, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants