19.8 Literate programming with Quarto
Generate dynamic output using Python, R, Julia, and Observable. Create reproducible documents that can be regenerated when underlying assumptions or data change.
Learn more at https://quarto.org/
For any of Dr. D’s courses, this is how you’ll be completing and turning in your homework. Follow this tutorial to learn about Quarto and test it out.
https://quarto.org/docs/get-started/hello/rstudio
19.8.1 Creating PDF’s
Great! You rendered your first literate document to an HTML format. Great for viewing, not so great for printing or emailing. We need to do one more thing before we can render this document to a pdf. Install a typesetting program called (lah-tek or lay-tek).
Step 1: Install the tinytex
package:
Step 2: Install Tinytex
Once that is fully complete and you see the R console windows showing a >
waiting for you, copy the following code to have tinytex install for you.
This will take some time. Be patient, and wait for R to display a >
in the console.
Step 3: Test your installation
Change the output format of your quarto file to pdf
in the YAML header (At the very top of your code file, line 2 or 3).
---
format: pdf
---
Now click render
and see if it creates a PDF.
The PDF should automatically pop up, otherwise check your folder in the same location as your script file is saved and see if a PDF is located there.