SymPy.jl
SymPy.jl copied to clipboard
@vars and "pretty names"
Can someone explain what are the limitations of names in @vars? For example, I want to use a definition of this form:
@vars ys => "$y^*$"
where I've written LaTeX code for the name. Is this kind of thing possible? How do I do it? And what about things like $y^*_1$?
You can use unicode values, but I don't know that arbitrary LaTeX will be okay. The available Julia unicode subscripts and superscripts are:
julia> \_
\_( \_- \_2 \_5 \_8 \_a \_e \_i \_l \_o \_r \_schwa \_v
\_) \_0 \_3 \_6 \_9 \_beta \_gamma \_j \_m \_p \_rho \_t \_x
\_+ \_1 \_4 \_7 \_= \_chi \_h \_k \_n \_phi \_s \_u
and
julia> \^
\^( \^3 \^= \^I \^P \^a \^delta \^i \^o \^u
\^) \^4 \^A \^J \^Phi \^alpha \^e \^iota \^p \^v
\^+ \^5 \^B \^K \^R \^b \^epsilon \^j \^phi \^w
\^- \^6 \^D \^L \^T \^beta \^f \^k \^r \^x
\^0 \^7 \^E \^M \^U \^c \^g \^l \^s \^y
\^1 \^8 \^G \^N \^V \^chi \^gamma \^m \^t \^z
\^2 \^9 \^H \^O \^W \^d \^h \^n \^theta