Writing Papers in Quarto

Author

R Workshop

Roadmap

  • Why Quarto?

  • Requirements

  • Template

Why Quarto?

Elements of an (academic) paper

. . .

  • Text

    • Language (grammar)
    • Formatting (font size, type, page numbers headers)

. . .

  • Data/info visualization (tables, figures, flowcharts)

. . .

  • Collaboration

. . .

  • Citations

Default option: Word processors

  • Language: Awesome
  • Formatting: Excruciating
  • Visualization: Harrowing (but see StatTag)
  • Collaboration: Ok (Word) to great (Google Docs)
  • Citations: Great (Zotero, Mendeley, RefWorks)

Alternative: Typesetting

  • Remove frustrations with formatting and visualization
  • Word processors: Write, then format
  • Typesetting: Format, then write

LaTeX

For RStudio Users: RMarkdown


Newer option: Quarto


Why papers in RStudio?

  • Language: Fine
  • Formatting: Flexible
  • Visualization: Excellent! Connects directly to data analysis \(\rightarrow\) Reproducible workflow
  • Collaboration: Great, but not real-time (GitHub)
  • Citations: Also great (Connect to .bib files)

But why Quarto in particular?

  • Multiple coding languages (R, Python, Julia, JavaScript)
  • Multiple output options (PDF, HTML, Word)
  • Not just for papers (websites, CVs, etc)
  • Markdown is easier to learn than LaTeX
  • Typst is crazy fast
  • New, open-source, large developer base

. . .

In one word, CONVENIENCE

Requirements

What you need to write papers

  1. A recent version of R and RStudio

  2. A LaTeX distribution

  3. A citation manager that makes .bib files

What you need to write papers

  1. A recent version of R and RStudio

  2. A LaTeX distribution

  3. A citation manager that makes .bib files

LaTeX distribution: tinyTex

In R

install.packages("tinytex")
tinytex::install_tinytex()
  • Repeat after installing a new version of R
  • tinyTeX will install/update required LaTeX packages as you create documents

Citation manager

Template

github.com/gustavo-diaz/r-workshop