Skip to content

Instantly share code, notes, and snippets.

@JJ
Last active April 12, 2022 08:00
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save JJ/ef9d3d8f1142df064bd5 to your computer and use it in GitHub Desktop.
Save JJ/ef9d3d8f1142df064bd5 to your computer and use it in GitHub Desktop.
Submitting RMarkdown articles to Arxiv

Mini-HowTo submit RMarkdown articles to ArXiV

ArXiV is a place for publishing scientific technical reports and drafts which is tightly tied to LaTeX. That is why if you generate a PDF from your RMarkdown article it will tell you, hey, this has been generated using LaTeX, I want the LaTeX source. In principle, RStudio does not admit LaTeX as a final format, only .doc, .pdf or HTML. But it is no big deal.

You only need to add this to the metadata in the RMarkdown document

output: 
  pdf_document:
    keep_tex: true

This will generate the intermediate files that are actually used to generate the PDF. You need only go to the directory where your .Rmd file is, gather the .tex and image directory (called filename_files) with

tar cvfz filename.tgz filename.tex filename_files

and submit it to ArXiV.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment