Category
Font Utilities
Function
Displays LaTeX typeset text as an object in 2D or 3D space.
Syntax
caption = LaTeXText(string, height, position, baseline,
angle, preamble, extrusion, reference);
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| latex_string | string containing LaTeX commands | none | text with LaTeX directives |
height |
scalar | 1.0 | text height in world coordinates |
| position | vector | none | position of text reference point in world coordinates |
baseline |
vector | [1 0 0] | direction of baseline |
| angle | scalar | 0 | euler rotation angle about baseline |
| preamble | string | NULL | LaTeX preamble text |
extrusion |
scalar | 0.0 | text extrusion in world coordinate units |
| reference | integer | [1–9] | reference point |
Outputs
| Name | Type | Description |
|---|---|---|
| text | color field | LaTeX formatted string object that can be rendered |
nosurface |
color field | just the extrusion |
top_surface |
color field | just the top surface |
bottom_surface |
color field | just the bottom surface |
Functional Details
The caption produced is aligned in parallel with the screen.
| latex_string | is the caption to be displayed. This takes the form of ascii text interspersed with LaTeX directives. For example:
produces a displayed fraction. Note that the usual single backslash has been replaced by two backslashes - an unfortunate consequence of the fact that backslash is an escape character in opendx. |
| height | height of the caption characters in pixels. A negative value generates an inverted caption. |
position |
position of text reference point in world coordinates as a vector. |
| baseline | specifies the direction of the baseline as a vector. |
| angle | Euler type rotation angle about baseline. |
| preamble | contains any LaTeX preamble commands. |
extrusion |
extrusion in user coordinate units. |
| reference | reference point for placement of output: (1) bottom left; (2) bottom centre; (3) bottom right; (4) centre left; (5) centre; (6) centre right; (7) top left; (8) top centre; (9) top right. |
Notes:
Components
Creates "positions," "connections," and "colors" components.
Example Visual Programs
Many example visual programs use LaTeXText, including:
Example.net
See Also