Skip to content

Instantly share code, notes, and snippets.

@ArbitRandomUser
Created February 14, 2022 04:35
Show Gist options
  • Save ArbitRandomUser/da8d439544945466c1df566df561d5f4 to your computer and use it in GitHub Desktop.
Save ArbitRandomUser/da8d439544945466c1df566df561d5f4 to your computer and use it in GitHub Desktop.
example program using dvisvgm in Javis
using Javis
using LaTeXStrings
#set Javis to use dvisvgm
Javis.setLaTeXprog(:dvisvgm)
#add additional packages, amssymb and amsmath ..
#..are added by default.
push!(Javis.LaTeXusepackages,"physics")
while length(Javis.LaTeXSVG)!=0
pop!(Javis.LaTeXSVG)
end
function latex_ground(args...)
origin()
background("white")
sethue("black")
end
function print_latex()
fontsize(40)
latex(L"\ket{1}\mathcal{O}(\log{n})",
O,:stroke;valign=:middle,halign=:centre)
end
video = Video(400, 300)
Background(1:1, latex_ground)
runtime = Object((args...) -> print_latex())
render(video; pathname = "latex.gif")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment