Skip to content

LaTeX Math

hp-1e edited this page Dec 2, 2026 · 1 revision

LaTeX Math & Formula Helper

Language: English | 中文

Quest Markdown bundles JLaTeXMath completely offline — no internet connection or external server is required.

1. Inline & Display Math Syntax

  • Inline math: wrap an expression in single dollar signs $ ... $:
    Energy equivalence $E = mc^2$ and quadratic formula $x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$.
  • Display (block) math: wrap an expression in double dollar signs $$ ... $$ (single-line or multi-line):
    $$
    \int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi}
    $$
  • Matrices and piecewise equation systems (pmatrix, bmatrix, vmatrix, cases):
    $$\beta = \begin{bmatrix} 1 & 0 \\ 2 & 0 \end{bmatrix}, \quad \begin{cases} x + 2y = 0 \\ z = 2 \end{cases}$$

2. Using Math Directly in Vanilla FTB Quests Descriptions

When enableMathInVanillaDescriptions = true (enabled by default), you do not need an external .md file to render LaTeX equations. Just write $...$ or $$...$$ directly inside normal FTB Quests description lines!

Color Inheritance

FTB / Minecraft & color codes automatically tint following inline and block formulas:

&ePrime factorization: &r$n = p_1^{n_1} \cdot p_2^{n_2} \cdots p_k^{n_k}$
&a$1 + 2q + 3q^2 + \dots = A \quad (0 < q < 1)$
Result: &e$A = \left(\frac{1}{1-q}\right)^2$

Quest Markdown parses the raw description line before FTB's text component parser runs, so LaTeX braces {...}, matrix & column separators, and backslashes like \neq are never corrupted.


3. Interactive LaTeX Formula Helper (∑)

Writing complex LaTeX manually can be tedious. Quest Markdown adds an interactive Formula Helper right inside FTB Quests:

Opening the Formula Helper

  1. From the Multiline Description Editor: click the ∑ button on the top toolbar.
    • If you have text selected, it loads that selection for editing.
    • If your cursor is inside an existing $...$ or $$...$$ formula, it automatically detects and loads that formula for in-place editing.
    • Otherwise, it inserts a new formula at the cursor position.
  2. Directly from the Quest View Panel (Edit Mode):
    • Right-click any rendered vanilla description formula and choose Edit this formula with Formula Helper (∑).
    • Or double-click a rendered block formula directly in edit mode.
    • Changes sync straight back to the quest and refresh immediately.

Visual Editing Tools Inside Formula Helper

  • Inline / Block Mode Toggle: switch between $...$ and $$...$$ with one click.
  • 22 Quick Templates & Symbols:
    • Structured templates (Fraction, Superscript, Subscript, Square Root, Parentheses, Matrix, Equation System cases, Summation, Integral) open a dedicated Parameter Modal with labeled inputs, size/bracket selectors (2×2–3×3, ()/[]/||), and live preview.
    • Direct symbols (×, ·, ±, ≠, ≈, ..., α, β, γ, δ, π, ∞, spacing \quad) insert immediately at the cursor.
  • Quick-Edit Structure Chips: when editing an existing formula containing fractions, matrices, equation systems, integrals, summations, roots, or superscripts/subscripts, clickable structure chips appear below the input box — click any chip to edit its values inside the Parameter Modal without touching raw LaTeX syntax.
  • Keyboard Shortcuts: Ctrl+Enter (or Shift+Enter) inserts/applies the formula; Esc closes the parameter modal or helper cleanly.