Books

From R Markdown to Quarto

Andrew Bray

UC Berkeley

Mine Çetinkaya Rundel

Duke University + Posit

Anatomy of a Quarto book

Quarto books

  • Books are also essentially format: html + a Quarto Project

  • But a book is different than format: html in that it has multiple pages

  • Books and websites are very similar in that they associate multiple pages/resources into a connected resource

  • Books and websites are different in how they treat components: pages vs. cross-referencable chapters for website and books, respectively

Our turn

Let’s build a book together from all of the documents we’ve created so far and highlight the following features of Quarto websites:

  • _quarto.yml

  • index.qmd / landing page / change landing page

  • Callouts

  • Cross references

  • Unnumbered chapters

  • Sections

  • Appendices

Your turn

Pick up where we left off and

  • Give a title to your book.
  • Add a numbered figure and cross-reference it.
  • Add a numbered figure to another chapter, cross-reference it, and observe the numbering scheme
15:00

Publishing

QuartoPub

  • Quarto Pub is a free publishing service for content created with Quarto. It is ideal for blogs, course or project websites, books, presentations, and personal hobby sites.

  • Publish with quarto publish:

Terminal
quarto publish quarto-pub
  • Gain a _publish.yml that is safe to check into version control.

Other venues

  • GitHub Pages
  • Posit Connect
  • Netlify
  • Confluence
  • More venues

Wrap up

Computations

Same freeze and cache ideas for websites apply to books.

Publishing

Same publishing options for websites apply to books as well.

Learn more

Questions

Any questions / anything you’d like to review before we wrap up this module?