I am trying to create a grid with the rendered image in the left grid cell and the source code in the right grid cell simultaneously.
But the code fails to render as intended.
Instead, it returns the following error message: import cetz.draw: * …caused this problem: Unclosed delimiter .
Could someone analyse the code and provide an explanation and a solution?
#set page(width:60em, height:auto)
#set align(left)
#let cetz-code = raw([
import "@preview/cetz:0.4.2"
cetz.canvas({
import cetz.draw: *
circle((0,0),radius:1)
})
], lang:"typst")
#grid(columns:(1fr,2fr), rows:auto,
align:(left:horizon+center,right:horizon+left),
stroke:(paint:black,thickness:1pt,dash:"solid"),
{eval(cetz-code.text,mode:"code")},
{raw(cetz-code.text,lang:"typst",block:true)})
