Skip to content

Commit

Permalink
Fix custom preamble in render
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobjpeters committed Jun 13, 2024
1 parent 50bcb9c commit 9eaf1b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commands.jl
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const julia_mono = artifact"JuliaMono"
output = "output.pdf",
open = true,
preamble = \"\"\"
$(join(split(strip(Typstry.preamble), "\n"), "\n "))
$(join(split(strip(preamble), "\n"), "\n "))
\"\"\",
context...)
Expand All @@ -123,10 +123,10 @@ function render(x;
input = "input.typ",
output = "output.pdf",
open = true,
preamble = true,
preamble = preamble,
context...)
Base.open(input; truncate = true) do file
preamble && println(file, Typstry.preamble)
_show_typst(file, preamble)
_show_typst(IOContext(file, context...), x)
println(file)
end
Expand Down

0 comments on commit 9eaf1b3

Please sign in to comment.