You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to use siunitx to format units in labels but I don't understand how to modify the preamble to include something like \usepackage{siunitx}. According to the readme, missing packages will be downloaded by the provided lightweight (Xe)LaTeX runtime so I thought this must be possible somehow.
One desperate try was this (not working):
using CairoMakie
using MakieTeX
some_label =TeXDocument(raw"""\documentclass{standalone}\usepackage{siunitx}\begin{document} $x$ / \si{\micro\meter}\end{document}""")
f =Figure()
ax1 =Axis(f[1, 1], some_label)
f
The text was updated successfully, but these errors were encountered:
That TeXDocument should be valid but I'm not sure what you were meaning to do with ax1 = Axis(f[1, 1], some_label)...
unfortunately, using MakieTeX things as x/ylabels doesn't work at the moment due to some changes in the text recipe, so you'd have to do it by creating labels and positioning them where you want them. To have a title, for example,
f =Figure()
ax1 =Axis(f[1, 1])
title =LTeX(f[0, 1], some_label; tellheight =true, tellwidth =false)
I am trying to use
siunitx
to format units in labels but I don't understand how to modify the preamble to include something like\usepackage{siunitx}
. According to the readme, missing packages will be downloaded by the provided lightweight (Xe)LaTeX runtime so I thought this must be possible somehow.One desperate try was this (not working):
The text was updated successfully, but these errors were encountered: