Of Crows and Swans

In which I find a solution to run Julia code while rendering Quarto documents, not by some magical config-foo, but by switching from RStudio to VS Code.

Capulet's Orchard
JuliaLang
miniblog
Author
Published

July 9, 2025

Repeated attempts to follow the setup process for setting up the Julia engine and running / rendering Julia code blocks in Quarto failed.

NoteSCENE II. A street.
[...]
BENVOLIO
At this same ancient feast of Capulet's
Sups the fair Rosaline whom thou so lovest,
With all the admired beauties of Verona:
Go thither; and, with unattainted eye,
Compare her face with some that I shall show,
And I will make thee think thy swan a crow.

Romeo and Juliet – William Shakespeare1

A final attempt – without any logical reasoning – was to use VS code instead of RStudio for rendering, which can work with quarto via the official Quarto extension. And behold:

begin
  a = 5
  b = 2
  c = a ^ b
  c
end
25

It just works, without any issue. Let’s check some more complex code and print some points!

Code
# install the required package
begin
  import Pkg
  Pkg.add("CairoMakie")
end
begin
  using CairoMakie
  CairoMakie.activate!()
  fig = scatterlines(1:10, 1:10)
end

On the first render, it took quite some time to install and precompile the CairoMakie package, but after that the implementation is quite okay. I’m glad, this works now – this will make future posts much easier.

Footnotes

  1. The Complete Works of William Shakespeare, https://shakespeare.mit.edu↩︎

Reuse

Citation

BibTeX citation:
@misc{gebhard2025,
  author = {Gebhard, Christian},
  title = {Of {Crows} and {Swans}},
  date = {2025-07-09},
  url = {https://christiangebhard.com/posts/2025-07-10-julia-CO-04/},
  langid = {en}
}
For attribution, please cite this work as:
Gebhard, Christian. 2025. “Of Crows and Swans.” July 9, 2025. https://christiangebhard.com/posts/2025-07-10-julia-CO-04/.