| latex_tree | R Documentation |
Returns the raw draw-record table produced by MicroTeX's layout pass together with the bounding-box metadata. Useful for debugging alignment issues, building custom grobs on top of the layout, or counting glyphs/paths/rules in a formula.
latex_tree(
tex,
math_font = "",
max_width = 0,
tex_style = "",
input_mode = c("mixed", "math"),
render_mode = c("typeface", "path"),
gp = grid::gpar()
)
tex |
Character string of LaTeX math code. |
math_font |
Name of the math font to use (e.g., |
max_width |
Numeric maximum width in big points for automatic
line wrapping. Use |
tex_style |
Character: TeX style override. One of |
input_mode |
How |
render_mode |
Character string: |
gp |
Graphical parameters (see |
A list with class "latex_tree" containing:
recordsData frame of draw records (one row per
glyph, path, line, rect, or text block). Columns include
type, x, y, glyph, font_size,
color, text, codepoint, font_file.
bboxNamed numeric vector with width,
height, depth, baseline (all in big points).
texThe (macro-expanded) input string.
render_modeRendering mode used for the layout.
latex_grob, latex_dims
tree <- latex_tree("\\frac{a}{b}")
print(tree)
head(tree$records)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.