Text#
To draw an text in an SVG document, the tag <text></text>
must to be used.
TeX#
SVG does not support TeX. If you have graphics containing TeX, you have to manipulate text to make symbols to look like TeX. The only approach I know of yet is to use the style="font-family: 'LatinModern'
and font-style="italic"
attributes for the text
tag. This approach doesn’t produce ideal results:
You can’t use complex fomulas in your SVG.
Some symbosl dysplayed not exactly as they supposed to be dsiplayed by TeX.
The following cell illustrates how the TeX expression \(ABC \alpha \beta \gamma\) will be displayed using the described approach.
%%HTML
<svg width="100" height="30" style="background-color: #f9f9f9;">
<text x=0 y=20 font-size="24" style="font-family: 'LatinModern'" font-style="italic">ABCαβγ</text>
</svg>
Note: To draw greek symbols you have to use them as regular ASCII characters. Copy them here:
Uppercase |
Lowercase |
---|---|
Α |
α |
Β |
β |
Γ |
γ |
Δ |
δ |
Ε |
ε |
Ζ |
ζ |
Η |
η |
Θ |
θ |
Ι |
ι |
Κ |
κ |
Λ |
λ |
Μ |
μ |
Ν |
ν |
Ξ |
ξ |
Ο |
ο |
Π |
π |
Ρ |
ρ |
Σ |
σ / ς |
Τ |
τ |
Υ |
υ |
Φ |
φ |
Χ |
χ |
Ψ |
ψ |
Ω |
ω |