### Quick Start Source: https://github.com/bartp5/libtexprintf/blob/main/npmjs/README.md Demonstrates loading the WASM instance, creating a render function, rendering a LaTeX expression, and switching font styles. ```APIDOC import { loadInstance, createRender } from "libtexprintf"; async function demo() { // Load the WASM binary const wasmInstance = await loadInstance(); // returns a `WebAssembly.Instance` // Create a render function const render = createRender(wasmInstance); // Render a LaTeX expression const { output, errors } = render("\\frac{\\alpha}{\\beta+x}"); console.log(output); console.error(errors); // [] – nothing went wrong // Switch font render.setFontstyle("mathnormal"); console.log(render("Hello")); // ← 𝐻𝐸𝐿𝐿𝑂 } ``` -------------------------------- ### Install libtexprintf npm package Source: https://github.com/bartp5/libtexprintf/blob/main/README.md Install the npm package that links libtexprintf to Node.js. ```sh npm install libtexprintf ``` -------------------------------- ### Quick start: load and render LaTeX with libtexprintf Source: https://github.com/bartp5/libtexprintf/blob/main/npmjs/README.md Loads the WASM instance, creates a renderer, renders a LaTeX expression, and switches the font style. The output is a plain-text string with Unicode math symbols; errors is an empty array when rendering succeeds. ```js import { loadInstance, createRender } from "libtexprintf"; async function demo() { // Load the WASM binary const wasmInstance = await loadInstance(); // returns a `WebAssembly.Instance` // Create a renderer const render = createRender(wasmInstance); // Render a LaTeX string const { output, errors } = render("\\frac{\\alpha}{\\beta+x}"); console.log(output); console.error(errors); // [] – nothing went wrong // Switch font render.setFontstyle("mathnormal"); console.log(render("Hello")); // ← 𝐻𝐸𝐿𝐿𝑂 } demo().catch(console.error); ``` -------------------------------- ### Render LaTeX to Unicode with libtexprintf Source: https://github.com/bartp5/libtexprintf/blob/main/README.md Loads the libtexprintf WebAssembly instance and creates a render function to convert LaTeX math expressions to Unicode text. The example renders the fraction \frac{\alpha}{\beta+x} and logs the result to the console. ```javascript import { loadInstance, createRender } from "libtexprintf"; const instance = await loadInstance(); const render = createRender(instance); console.log(render("\\frac{\\alpha}{\\beta+x}")); ``` -------------------------------- ### Configure monospace fallback fonts with fontconfig Source: https://github.com/bartp5/libtexprintf/blob/main/README.md Example fontconfig configuration file that sets up a monospace font alias with a fallback symbol font. Replace MONO and SYMBOLMONO with your actual font names. Place this file at ~/.config/fontconfig/fonts.conf after installing the fonts. ```xml monospace MONO SYMBOLMONO ``` -------------------------------- ### \box{2}{2} empty box Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \box command produces an empty space with a given width and height. This example creates a box of width 2 and height 2 with subscript f and superscript q. Available in -S and -A modes. ```latex _f\box{2}{2}^q ``` -------------------------------- ### Build libtexprintf.wasm from source Source: https://github.com/bartp5/libtexprintf/blob/main/npmjs/README.md Builds the standalone WASM object from the libtexprintf C source. Requires the C code and uses emconfigure/emmake with the specified flags, then emcc to produce libtexprintf.wasm with the texstring export. ```sh emconfigure ./configure \ --host=wasm32-unknown-emscripten \ --disable-shared \ --enable-static \ CFLAGS='-O3' LDFLAGS='-s STANDALONE_WASM=1' emmake make -j4 emcc -O3 -s STANDALONE_WASM=1 \ -Wl,--no-entry \ -Wl,--export=texstring \ -Wl,--export=texstring \ -Wl,--export=texerrors_str \ -Wl,--export=malloc \ -Wl,--export=free \ -Wl,--export=SetRootFont \ -o libtexprintf.wasm \ src/.libs/libtexprintf.a ``` -------------------------------- ### Run utftex on a fraction expression Source: https://github.com/bartp5/libtexprintf/blob/main/README.md Command-line invocation of utftex to format a simple fraction expression. The output is shown in the following block. ```shell > utftex '\frac{\alpha}{\beta+x}' ``` -------------------------------- ### Fraction with \over Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders a fraction using the \over command. The first ASCII output uses Unicode box-drawing characters, the second uses plain ASCII. ```latex {a\over b} ``` ```ascii a ─ b ``` ```ascii a - b ``` -------------------------------- ### Greedy \choose with \over Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders a binomial coefficient followed by a fraction. The first ASCII output uses Unicode box-drawing characters, the second uses plain ASCII. ```latex a\choose b+s\over d ``` ```ascii ⎛ a ⎞ ⎜ ⎟ ⎝b+s⎠ ───── d ``` ```ascii / a \ | | \b+s/ ----- d ``` -------------------------------- ### Fraction with spaces in arguments Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders a fraction with spaces between the command and arguments. The first ASCII output uses Unicode box-drawing characters, the second uses plain ASCII. ```latex \frac {1}{\alpha} ``` ```ascii 1 ─ α ``` ```ascii 1 - α ``` -------------------------------- ### Run utftex to format a Laplace transform table Source: https://github.com/bartp5/libtexprintf/blob/main/README.md Command-line invocation of utftex to format a table of Laplace transforms using the array environment. The output is shown in the following block. ```shell > utftex '\begin{array}{|l|l|} \hline f(t) & \mathscr{L}[f(t)]=F(s) \\\hline 1 & \frac{1}{s} \\\hline e^{at}f(t) & F(s-a) \\\hline \delta\left(t\right) & 1 \\\hline \delta\left(t-t_0\right) & e^{-st_0} \\\hline \int_0^t f(x)g(t-x)dx & F(s)G(s)\hline \end{array}' ``` -------------------------------- ### Set font style with render.setFontstyle() Source: https://github.com/bartp5/libtexprintf/blob/main/npmjs/README.md Switches the font style used for rendering. Available styles include "mathnormal", "text", "mathfrak", and others; see the libtexprintf documentation for the full list. ```js render.setFontstyle("mathnormal"); // other names: "text", "mathfrak", etc. ``` -------------------------------- ### Binomial coefficient with \choose Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders a binomial coefficient using \choose. The first ASCII output uses Unicode box-drawing characters, the second uses plain ASCII. ```latex {n\choose k} ``` ```ascii ⎛n⎞ ⎜ ⎟ ⎝k⎠ ``` ```ascii /n\ | | \k/ ``` -------------------------------- ### Run utftex to format a vector Source: https://github.com/bartp5/libtexprintf/blob/main/README.md Command-line invocation of utftex to format a vector with a combining arrow accent. The output is shown in the following block. ```shell utftex '\vec x' ``` -------------------------------- ### Run utftex with mathnormal font style Source: https://github.com/bartp5/libtexprintf/blob/main/README.md Command-line invocation of utftex with the -F mathnormal option to format a fraction using mathematical normal style. The output is shown in the following block. ```shell > utftex -F mathnormal '\frac{1}{a+x}' ``` -------------------------------- ### \underleftharpoondown under-left-harpoon-down Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \underleftharpoondown command places a left harpoon pointing down below its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \underleftharpoondown{abc} \underleftharpoondown{a} \underleftharpoondown a ``` -------------------------------- ### Limit with fraction Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders the limit expression with a subscript and fraction. The first ASCII output uses Unicode box-drawing characters, the second uses plain ASCII. ```latex \lim_{x\downarrow 1} \frac{1}{x-1} ``` ```ascii 1 lim ─── x↓1 x-1 ``` ```ascii 1 lim --- x↓1 x-1 ``` -------------------------------- ### Output of utftex for fraction expression Source: https://github.com/bartp5/libtexprintf/blob/main/README.md Output of the utftex command for the fraction expression. The result is a multi-line representation using Unicode box-drawing characters. ```text α ─── β+x ``` -------------------------------- ### Greedy \over Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders a fraction where \over applies to the entire preceding expression. The first ASCII output uses Unicode box-drawing characters, the second uses plain ASCII. ```latex a + b\over c ``` ```ascii a + b ───── c ``` ```ascii a + b ----- c ``` -------------------------------- ### Greedy \over with nested braces Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders a fraction with nested braces around the plus sign. The first ASCII output uses Unicode box-drawing characters, the second uses plain ASCII. ```latex {a {+} b\over c} + d ``` ```ascii a + b ───── + d c ``` ```ascii a + b ----- + d c ``` -------------------------------- ### \vertoverlay vertical overlay Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \vertoverlay command places a vertical line overlay on its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \vertoverlay{abc} \vertoverlay{a} \vertoverlay a ``` -------------------------------- ### Default error handling: render() returns errors array Source: https://github.com/bartp5/libtexprintf/blob/main/npmjs/README.md Default error handling: when rendering fails, the `errors` array contains error messages (e.g., 'Unknown command (1x)') and `output` is still returned. ```js const { output, errors } = render("\\invalid{\\alpha"); // errors: [ 'Unknown command (1x)' ] ``` -------------------------------- ### \vphantom phantom box in sums Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Tests phantom boxes: \vphantom{3^{3^{3^j}}} is used to reserve vertical space in the first sum so that the second sum's tall exponent aligns. Available in -S and -A modes. ```latex \sum_{j\in 0,\ldots\, 10 \vphantom{3^{3^{3^j}}}} \sum_{i\in 0,\ldots\, 3^{3^{3^j}}} i\cdot j ``` -------------------------------- ### Root with large index Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders a root with a large index (3000) and a boxed radicand. The first ASCII output uses Unicode box-drawing characters, the second uses plain ASCII. ```latex \sqrt[3000]{\box{2}{3}} ``` ```ascii ┌──┐ 3000 │ ╲ │ ╲│ ``` ```ascii ____ 3000 | \ | \| ``` -------------------------------- ### Fraction without braces Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders a fraction with no braces around the numerator and denominator. The first ASCII output uses Unicode box-drawing characters, the second uses plain ASCII. ```latex \frac1\alpha ``` ```ascii 1 ─ α ``` ```ascii 1 - α ``` -------------------------------- ### 3x3 array with brackets Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt A 3x3 array enclosed in square brackets using \left[ and \right]. Available in -S and -A modes. ```latex \left[ \begin{array}{ccc} x_{11} & x_{12} & x_{13}\\ x_{21} & x_{22} & x_{23}\\ x_{31} & x_{32} & x_{33} \end{array} \right] ``` -------------------------------- ### \underrightharpoondown under-right-harpoon-down Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \underrightharpoondown command places a right harpoon pointing down below its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \underrightharpoondown{abc} \underrightharpoondown{a} \underrightharpoondown a ``` -------------------------------- ### \limits command Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \limits command places the subscript and superscript directly above and below the preceding expression. Available in -S, -m, and -A modes. ```latex F(x)\limits_a^x ``` -------------------------------- ### Bra-ket with \middle Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders a bra-ket notation with a middle delimiter. The first ASCII output uses Unicode box-drawing characters, the second uses plain ASCII. ```latex \left|0\middle\mid 1\right\rangle ``` ```ascii ⎢0⎢1⟩ ``` ```ascii |0|1> ``` -------------------------------- ### Render function signature: render(latexString) Source: https://github.com/bartp5/libtexprintf/blob/main/npmjs/README.md The render function returns an object with `output` (the rendered plain-text string, possibly multi-line with Unicode math symbols) and `errors` (an array of error messages, empty on success). ```js const { output, errors } = render(latexString); ``` -------------------------------- ### \sbbrg bottom bridge Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \sbbrg command places a bottom bridge below its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \sbbrg{abc} \sbbrg{a} \sbbrg a ``` -------------------------------- ### \sout strikeout (no multi-character support) Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \sout command applies a horizontal strikeout through its argument. It does not support multi-character arguments (the source notes 'accent without multi-character support'). Available in -A, -S, and -m modes. ```latex \sout{abc} \sout{a} \sout a ``` -------------------------------- ### Ceiling brackets with \left and \right Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders ceiling brackets around a boxed expression. The ASCII output uses Unicode box-drawing characters. ```latex \left\lceil\box{2}{3}\right\rceil ``` ```ascii ⎡ ⎤ ⎢ ⎥ ⎢ ⎥ ``` -------------------------------- ### Fraction with unbraced denominator Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders a fraction where the denominator is a single token without braces. The first ASCII output uses Unicode box-drawing characters, the second uses plain ASCII. ```latex \frac {1}\alpha ``` ```ascii 1 ─ α ``` ```ascii 1 - α ``` -------------------------------- ### Cube root with boxed radicand Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders a cube root with a boxed radicand. The first ASCII output uses Unicode box-drawing characters, the second uses plain ASCII. ```latex \sqrt[3]{\box{2}{3}} ``` ```ascii ┌──┐ 3 │ ╲ │ ╲│ ``` ```ascii ____ 3 | \ | \| ``` -------------------------------- ### Parentheses with \left and \right Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders parentheses around a boxed expression. The first ASCII output uses Unicode box-drawing characters, the second uses plain ASCII. ```latex \left(\box{2}{3}\right) ``` ```ascii ⎛ ⎞ ⎜ ⎟ ⎝ ⎠ ``` ```ascii / \ | | \ / ``` -------------------------------- ### \threeunderdot three underdots Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \threeunderdot command places three dots below its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \threeunderdot{abc} \threeunderdot{a} \threeunderdot a ``` -------------------------------- ### Square brackets with \left and \right Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders square brackets around a boxed expression. The first ASCII output uses Unicode box-drawing characters, the second uses plain ASCII. ```latex \left[\box{2}{3}\right] ``` ```ascii ⎡ ⎤ ⎢ ⎥ ⎣ ⎦ ``` ```ascii + + | | + + ``` -------------------------------- ### Output of utftex for Laplace transform table Source: https://github.com/bartp5/libtexprintf/blob/main/README.md Output of the utftex command for the Laplace transform table. The result uses Unicode box-drawing characters for the table borders. ```text ┌────────────────┬──────────────┐ │f(t) │ 𝓛[f(t)]=F(s) │ ├────────────────┼──────────────┤ │ │ 1 │ │1 │ ─ │ │ │ s │ ├────────────────┼──────────────┤ │ at │ │ │e f(t) │ F(s-a) │ ├────────────────┼──────────────┤ │δ(t) │ 1 │ ├────────────────┼──────────────┤ │ │ -st │ │ │ 0 │ │δ⎛t-t ⎞ │ e │ │ ⎝ 0⎠ │ │ ├────────────────┼──────────────┤ │ t │ │ │⌠ │ │ │⎮ f(x)g(t-x)dx │ F(s)G(s) │ │⌡ │ │ │ 0 │ │ └────────────────┴──────────────┘ ``` -------------------------------- ### Square root with boxed radicand Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders a square root with a boxed radicand. The first ASCII output uses Unicode box-drawing characters, the second uses plain ASCII. ```latex \sqrt{\box{2}{3}} ``` ```ascii ┌──┐ │ ╲ │ ╲│ ``` ```ascii ____ | \ | \| ``` -------------------------------- ### Floor brackets with \left and \right Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders floor brackets around a boxed expression. The ASCII output uses Unicode box-drawing characters. ```latex \left\lfloor\box{2}{3}\right\rfloor ``` ```ascii ⎢ ⎥ ⎢ ⎥ ⎣ ⎦ ``` -------------------------------- ### Nested brackets Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders nested brackets with \left and \right. The ASCII output is the same for both Unicode and plain ASCII modes. ```latex \left(\left[a\right]+c\right) ``` ```ascii ([a]+c) ``` -------------------------------- ### Prime symbols Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders prime symbols. The first ASCII output uses Unicode prime characters, the second uses plain ASCII apostrophes. ```latex a' a'' a''' a'''' ``` ```ascii a′ a″ a‴ a⁗ ``` ```ascii a' a'' a''' a'''' ``` -------------------------------- ### Greedy \over with trailing term Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders a fraction with a trailing term outside the braces. The first ASCII output uses Unicode box-drawing characters, the second uses plain ASCII. ```latex {a + b\over c} + d ``` ```ascii a + b ───── + d c ``` ```ascii a + b ----- + d c ``` -------------------------------- ### \enclosesquare enclose in square Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \enclosesquare command encloses its argument in a square. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \enclosesquare{abc} \enclosesquare{a} \enclosesquare a ``` -------------------------------- ### Up arrow delimiters Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders up arrows as delimiters around a boxed expression. The ASCII output uses Unicode box-drawing characters and arrows. ```latex \left\uparrow\box{2}{3}\right\uparrow ``` ```ascii ▲ ▲ ⎢ ⎢ ⎢ ⎢ ``` -------------------------------- ### Output of utftex for vector expression Source: https://github.com/bartp5/libtexprintf/blob/main/README.md Output of the utftex command for the vector expression. The result uses a combining diacritical mark for the arrow. ```text x⃗. ``` -------------------------------- ### \underleftrightarrow under-left-right-arrow Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \underleftrightarrow command places a left-right arrow below its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \underleftrightarrow{abc} \underleftrightarrow{a} \underleftrightarrow a ``` -------------------------------- ### \underleftarrow under-left-arrow Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \underleftarrow command places a left arrow below its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \underleftarrow{abc} \underleftarrow{a} \underleftarrow a ``` -------------------------------- ### Stacked diacritics: \dot{\ddot{\iota}} Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Tests stacking of diacritics: \dot applied to \ddot{\iota} inside the word 'jul...a'. Available in -S mode. ```latex jul\dot{\ddot{\iota}}a ``` -------------------------------- ### \strike strikeout (no multi-character support) Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \strike command applies a horizontal strikeout through its argument. It does not support multi-character arguments (the source notes 'accent without multi-character support'). Available in -A, -S, and -m modes. ```latex \strike{abc} \strike{a} \strike a ``` -------------------------------- ### Angle brackets with \left and \right Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders angle brackets around a boxed expression. The first ASCII output uses Unicode box-drawing characters, the second uses plain ASCII. ```latex \left<\box{2}{3}\right> ``` ```ascii ╱ ╲ ╱ ╲ ╲ ╱ ╲ ╱ ``` ```ascii / \ / \ \ / \ / ``` -------------------------------- ### Curly braces with \left and \right Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders curly braces around a boxed expression. The first ASCII output uses Unicode box-drawing characters, the second uses plain ASCII. ```latex \left{\box{2}{3}\right} ``` ```ascii ⎧ ⎫ ⎨ ⎬ ⎩ ⎭ ``` ```ascii / \ < > \ / ``` -------------------------------- ### Two arrays with vertical bar separator Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Two 3x3 arrays side by side, the first enclosed in square brackets and the second separated by a vertical bar (\left| ... \right.). Available in -S and -A modes. ```latex \left[ \begin{array}{ccc} x_{11} & x_{12} & x_{13}\\ x_{21} & x_{22} & x_{23}\\ x_{31} & x_{32} & x_{33} \end{array} \left| \begin{array}{ccc} y_{11} & y_{12} & y_{13}\\ y_{21} & y_{22} & y_{23}\\ y_{31} & y_{32} & y_{33} \end{array} \right. \right] ``` -------------------------------- ### Exponential function Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders the exponential function symbol. The ASCII output is the same for both Unicode and plain ASCII modes. ```latex \exp ``` ```ascii exp ``` -------------------------------- ### \ocommatopright comma accent Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \ocommatopright command places a comma accent above-right of its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \ocommatopright{abc} \ocommatopright{a} \ocommatopright a ``` -------------------------------- ### Vertical bars with \left and \right Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders vertical bars around a boxed expression. The first ASCII output uses Unicode box-drawing characters, the second uses plain ASCII. ```latex \left|\box{2}{3}\right| ``` ```ascii ⎢ ⎢ ⎢ ⎢ ⎢ ⎢ ``` ```ascii | | | | | | ``` -------------------------------- ### Output of utftex with mathnormal font style Source: https://github.com/bartp5/libtexprintf/blob/main/README.md Output of the utftex command with the mathnormal font style. The result uses Unicode mathematical italic characters for the variables. ```text 1 ─── 𝑎+𝑥 ``` -------------------------------- ### \asteraccent asterisk accent Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \asteraccent command places an asterisk accent above its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \asteraccent{abc} \asteraccent{a} \asteraccent a ``` -------------------------------- ### \enclosetriangle enclose in triangle Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \enclosetriangle command encloses its argument in a triangle. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \enclosetriangle{abc} \enclosetriangle{a} \enclosetriangle a ``` -------------------------------- ### \wideutilde wide tilde accent Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \wideutilde command places a wide tilde accent below its argument. It supports multi-character arguments and is available in -S and -m modes; in -A mode the accent is rendered as a separate tilde below. ```latex \wideutilde{abc} \wideutilde{a} \wideutilde a ``` -------------------------------- ### \ddddot quadruple dot accent Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \ddddot command applies a quadruple dot accent above its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \ddddot{abc} \ddddot{a} \ddddot a ``` -------------------------------- ### \enclosediamond enclose in diamond Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \enclosediamond command encloses its argument in a diamond. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \enclosediamond{abc} \enclosediamond{a} \enclosediamond a ``` -------------------------------- ### \enclosecircle enclose in circle Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \enclosecircle command encloses its argument in a circle. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \enclosecircle{abc} \enclosecircle{a} \enclosecircle a ``` -------------------------------- ### \underrightarrow under-right-arrow Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \underrightarrow command places a right arrow below its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \underrightarrow{abc} \underrightarrow{a} \underrightarrow a ``` -------------------------------- ### Custom error callback with onError option Source: https://github.com/bartp5/libtexprintf/blob/main/npmjs/README.md Custom error callback: pass an `onError` option to `createRender` to receive error messages. The callback is invoked with an array of error strings. ```js const render = createRender(instance, { onError: (errs) => console.warn("libtexprintf says:", ...errs), }); ``` -------------------------------- ### \rh retroflex hook Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \rh command places a retroflex hook below its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \rh{abc} \rh{a} \rh a ``` -------------------------------- ### \backslash command Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \backslash command produces a backslash symbol. It is not included in the symbol table, but is tested here. Available in -S and -A modes. ```latex \backslash ``` -------------------------------- ### Down arrow delimiters Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt Renders down arrows as delimiters around a boxed expression. The ASCII output uses Unicode box-drawing characters and arrows. ```latex \left\downarrow\box{2}{3}\right\downarrow ``` ```ascii ⎢ ⎢ ⎢ ⎢ ▼ ▼ ``` -------------------------------- ### \annuity annuity accent Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \annuity command places an annuity symbol above its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \annuity{abc} \annuity{a} \annuity a ``` -------------------------------- ### \vec vector accent Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \vec command applies a vector accent (arrow above) to its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \vec{abc} \vec{a} \vec a ``` -------------------------------- ### \droang droang accent Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \droang command places a droang (corner) accent above its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \droang{abc} \droang{a} \droang a ``` -------------------------------- ### \palh palatal hook Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \palh command places a palatal hook below its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \palh{abc} \palh{a} \palh a ``` -------------------------------- ### \dddot triple dot accent Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \dddot command applies a triple dot accent above its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \dddot{abc} \dddot{a} \dddot a ``` -------------------------------- ### Throw on error with throwOnError option Source: https://github.com/bartp5/libtexprintf/blob/main/npmjs/README.md Throwing error mode: when `throwOnError: true`, `render()` throws a JavaScript Error instead of returning an errors array. If both `onError` and `throwOnError: true` are supplied, the exception is thrown and the callback is not invoked. ```js const render = createRender(instance, { throwOnError: true }); try { render("\\invalid{\\alpha"); } catch (e) { console.error("Render failed:", e.message); } ``` -------------------------------- ### \overleftrightarrow left-right arrow accent Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \overleftrightarrow command places a left-right arrow accent above its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \overleftrightarrow{abc} \overleftrightarrow{a} \overleftrightarrow a ``` -------------------------------- ### \widebridgeabove wide bridge accent Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \widebridgeabove command places a wide bridge accent above its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \widebridgeabove{abc} \widebridgeabove{a} \widebridgeabove a ``` -------------------------------- ### \rightharpoonaccent right harpoon accent Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \rightharpoonaccent command places a right harpoon accent above its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \rightharpoonaccent{abc} \rightharpoonaccent{a} \rightharpoonaccent a ``` -------------------------------- ### \candra candra accent Source: https://github.com/bartp5/libtexprintf/blob/main/test/testsuite.txt The \candra command places a candra (inverted breve) accent above its argument. It supports multi-character arguments and is available in -A, -S, and -m modes. ```latex \candra{abc} \candra{a} \candra a ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.