LatexTemplate enum
LaTeX structure template enumeration.
Provides quick insertion of common LaTeX structures, automatically positioning the cursor at the first placeholder.
Note: Editor features are currently experimental, APIs may change in subsequent versions.
Usage:
editorState.insertTemplate(LatexTemplate.fraction)
// Inserts "\frac{}{}", cursor is positioned inside the first {}
Values
- fraction → const LatexTemplate
-
Fraction \frac{numerator}{denominator} — Cursor at numerator
const LatexTemplate(displayName: "分数", icon: "½", template: "\\frac{}{}", cursorOffset: 6) - sqrt → const LatexTemplate
-
Square root \sqrt{content} — Cursor at content
const LatexTemplate(displayName: "平方根", icon: "√", template: "\\sqrt{}", cursorOffset: 6) - nthroot → const LatexTemplate
-
N-th root \sqrt
n{content} — Cursor at nconst LatexTemplate(displayName: "n次根", icon: "∛", template: "\\sqrt[]{}", cursorOffset: 6) - superscript → const LatexTemplate
-
Superscript ^{exponent} — Cursor at exponent
const LatexTemplate(displayName: "上标", icon: "x²", template: "^{}", cursorOffset: 2) - subscript → const LatexTemplate
-
Subscript _{subscript} — Cursor at subscript
const LatexTemplate(displayName: "下标", icon: "x₂", template: "_{}", cursorOffset: 2) - sum → const LatexTemplate
-
Sum \sum_{lower}^{upper} — Cursor at lower bound
const LatexTemplate(displayName: "求和", icon: "∑", template: "\\sum_{}^{}", cursorOffset: 6) - integral → const LatexTemplate
-
Integral \int_{lower}^{upper} — Cursor at lower bound
const LatexTemplate(displayName: "积分", icon: "∫", template: "\\int_{}^{}", cursorOffset: 6) - limit → const LatexTemplate
-
Limit \lim_{variable} — Cursor at variable
const LatexTemplate(displayName: "极限", icon: "lim", template: "\\lim_{}", cursorOffset: 6) - matrix → const LatexTemplate
-
Matrix \begin{pmatrix}...\end{pmatrix} — Cursor at first element
const LatexTemplate(displayName: "矩阵", icon: "[ ]", template: "\\begin{pmatrix} \\\\ \\end{pmatrix}", cursorOffset: 16) - parentheses → const LatexTemplate
-
Auto delimiters \left( \right) — Cursor at content
const LatexTemplate(displayName: "括号", icon: "()", template: "\\left( \\right)", cursorOffset: 7) - overline → const LatexTemplate
-
Overline \overline{} — Cursor at content
const LatexTemplate(displayName: "上划线", icon: "x̄", template: "\\overline{}", cursorOffset: 10) - vec → const LatexTemplate
-
Vector \vec{} — Cursor at content
const LatexTemplate(displayName: "向量", icon: "→", template: "\\vec{}", cursorOffset: 5) - hat → const LatexTemplate
-
Hat \hat{} — Cursor at content
const LatexTemplate(displayName: "帽子", icon: "â", template: "\\hat{}", cursorOffset: 5)
Properties
- cursorOffset → int
-
final
- displayName → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → String
-
final
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- template → String
-
final
Methods
-
expand(
) → TemplateExpansion - Expands the template.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
-
values
→ const List<
LatexTemplate> - A constant List of the values in this enum, in order of their declaration.