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
Copy file name to clipboardExpand all lines: README.md
+57Lines changed: 57 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,63 @@ This is a package aimed at providing a pure Julia engine for LaTeX math mode. It
8
8
- Equivalence between traditional LaTeX commands and their unicode input equivalent.
9
9
- Pure julia.
10
10
11
+
# Fonts
12
+
13
+
The characters in a math expression come from a variety of fonts depending on their role (most notably italic for variable, regular for functions, math for the symbols).
14
+
A set of such font forms a `FontFamily`, and several are predefined here (NewComputerModer, TeXGyreHeros, TeXGyrePagella, and LucioleMath)
15
+
and can be access by `FontFamily(name)`.
16
+
17
+
A font family is defined by a dictionary of the paths of the font files:
18
+
```julia
19
+
julia> FontFamily("NewComputerModern")
20
+
FontFamily with 13.0° slant angle and 0.0375 line thickness
Alternatively, the special command `\fontfamily{FontName}` can be used in the LaTeX string itself
64
+
to choose the font, for example `L"\fontfamily{TeXGyreHeros}x^2 + y^2 = 1"`.
65
+
The font name must be in the global dictionary `MathTeXEngin.default_font_families`.
66
+
If needed, it can be extended at runtime.
67
+
11
68
# Engine
12
69
13
70
The main use of the package is through `generate_tex_elements` taking a LaTeX string as input and return a list of tuples `(TeXElement, position, scale)` where `TeXElement` is one of the following:
0 commit comments