Code
import Pkg; Pkg.add("Plots")Darren Irwin
December 1, 2025
There are two distinct approaches to setting up Quarto for use with Julia. The older one uses a jupyter engine to render Quarto notebooks. The newer approach is to use a julia engine as implemented by the QuartoNotebookRunner.jl package. Here I will describe this newer approach, as it is much simpler than the former.
I am assuming some basic familiarity with Julia and Visual Studio Code (i.e., VS Code). If you don’t yet have VS Code installed, you can download and install it from https://code.visualstudio.com . If you don’t yet have the Julia extension for VS Code, follow the instructions here: https://code.visualstudio.com/docs/languages/julia . (Another option is to use some other text editor, but I highly recommend VS Code and assume it below.)
The following is for MacOS:
First, I got set up with Juliaup and the newest version of Julia:
First, install Juliaup using this command in the Terminal:
curl -fsSL https://install.julialang.org | sh
Pay close attention, as Juliaup might ask you to run a command to add Juliaup to your Path. Do as it says. Then open a new terminal window. You can then check whether you have installed Julia versions using:
juliaup status
If you have no Julia version yet, or do have a version but want to upgrade to the latest, get the latest release version using:
juliaup update release
At the time of writing this (updated Dec. 2025), the latest version of Julia is 1.12.2. The version installed on my machine is 1.12.1+0.x64.apple.darwin14.
If you also want an older version as an option, you can install it using something like juliaup add 1.8.5. (Not needed for most users, since newer versions of Julia run older code.)
I learned much of the below from: https://quarto.org/docs/computations/julia.html
Download and install Quarto from this site: https://quarto.org/docs/get-started/ . The version I have installed is Quarto CLI 1.8.26 (Mac OS).
Install the Quarto extension for VS Code (using the standard way of choosing extensions in VS Code).
When I first installed Quarto in 2023, getting it set up to run with Julia was a somewhat lengthy process, because running Julia code with Quarto relied on several other software packages, including Python, Jupyter and iJulia. But the results were worth it! 😃
Now, the process is much simpler. It is simply to add the line engine: julia to the frontmatter of a Quarto file (see example further below). Quarto will automatically install the QuartoNotebookRunner.jl package the first time you render a page with this line.
After the above, Quarto is essentially installed and should work well for rendering in HTML or DOCX. However, I found a few more things are needed for a satisfying experience rendering in PDF.
If you don’t have it yet, you will need to first install the Homebrew package manager for macOS or Linux (see https://brew.sh). Run this in a Terminal window:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
If that worked, take a break and grab a beverage of your choice.
Now, run the following in a Terminal window:
brew install librsvg homebrew/cask/basictex
This will ask for your Administrator password, and takes some time to download and install. If you get an error saying “No developer tools installed, then follow the instructions to do so (for me, it was running the command xcode-select --install .)
curl -sL "https://yihui.org/tinytex/install-bin-unix.sh" | sh
This font works well with monocode symbols used in Julia (without it, many of these symbols were missing from PDF output).
brew tap homebrew/cask-fonts
brew install --cask font-juliamono
(If you want to set JuliaMono as your editor font in VS Code, then do this: click on the gear symbol in the lower left, choose Settings, then choose “Editor: Font Family” and replace what is there with “JuliaMono”. You might need to restart VS Code for the change to take effect. A good way to check is to see if the zero symbol now has a little dot in the middle.)
OK we are now ready to do a little prayer to the Quarto and Julia gods and try this all out. In VS Code make a new file called QuartoDemo.qmd. The .qmd ending is important as it tells VS Code this is a Quarto file. Put all of this in the file:
---
title: "Demo Quarto File"
author: "Darren Irwin"
date: "12/1/2025"
execute:
echo: true
format:
html:
code-fold: true
pdf:
keep-tex: true
monofont: "JuliaMono"
engine: julia
---
## Demo plot produced by Julia in Quarto
Plot function pair (x(u), y(u)).
See @fig-parametric for an example.
Unicode test: ` α β `
(To get those symbols in Julia REPL, type \\alpha then tab, or \\beta then tab)
```{julia}
#| output: false
import Pkg; Pkg.add("Plots")
```
```{julia}
#| label: fig-parametric
#| fig-cap: "Parametric Plots"
using Plots
plot(sin,
x->sin(2x),
0,
2π,
leg=false,
fill=(0,:lavender))
```
Now, click Preview in the upper right of your VS Code window. The resulting html version of your document may appear as a preview to the right, and the html file is automatically saved. Then try the Render PDF command (in the Command Pallette, which you open with shift-command-P) for a PDF. (Check the unicode symbols carefully to see if they are there. I think they should be if the above installations were done.)
The rendered document should display the output shown below.
Plot function pair (x(u), y(u)). See Figure 1 for an example.
Unicode test: α β (To get those in Julia REPL, type \alpha then tab, or \beta then tab)
The code for the example plot above came from the Quarto website: https://quarto.org/docs/computations/julia.html