Skip to main content

Meta: Wiki Capabilities, TeX Math & Typography Reference

This page provides the canonical reference guide for formatting, mathematical typography, language support (including Japanese Furigana), and multimedia features supported by this BookStack Wiki instance (https://wiki.drheck.dev/).


1. Mathematical Typography: KaTeX TeX Math Engine

The wiki is equipped with a high-performance KaTeX client-side rendering engine. Mathematical formulas and scientific equations are written using standard LaTeX math syntax.

Delimiters

    Display Equations (Block Math): Enclose in double dollar signs $$ ... $$ on their own lines. Centered and formatted with full display geometry. Inline Equations: Enclose in single dollar signs $ ... $ directly within sentences.

    Core TeX Math Examples & Cheat Sheet

    1. Fractions, Exponents & Powers

    $$\text{FREQ} = \frac{433,920,000}{24,000,000} \times 2^{16} = 1,184,883 = \mathbf{0x121473}$$
    

    $$\text{FREQ} = \frac{433,920,000}{24,000,000} \times 2^{16} = 1,184,883 = \mathbf{0x121473}$$

    2. Symbol Timing & Multi-Term Equations

    $$\text{Data Rate} = \frac{(256 + \text{DRATE-M}) \times 2^{\text{DRATE-E}}}{2^{28}} \times f_{\text{XOSC}} = \mathbf{3433.22\text{ baud}}$$
    

    $$\text{Data Rate} = \frac{(256 + \text{DRATE-M}) \times 2^{\text{DRATE-E}}}{2^{28}} \times f_{\text{XOSC}} = \mathbf{3433.22\text{ baud}}$$

    3. Signal Flow & Daisy-Chains

    $$\text{Red (Source: fc79)} \longrightarrow \text{Blue (1st Sink)} \longrightarrow \text{Green (2nd Sink)} \longrightarrow \text{Yellow (75}\Omega\text{ Terminated)}$$
    

    $$\text{Red (Source: fc79)} \longrightarrow \text{Blue (1st Sink)} \longrightarrow \text{Green (2nd Sink)} \longrightarrow \text{Yellow (75}\Omega\text{ Terminated)}$$

    4. Radicals, Integrals & Summations

    $$f(x) = \int_{-\infty}^{\infty} \hat{f}(\xi)\,e^{2\pi i \xi x}\,d\xi \qquad \sum_{k=0}^{n} \binom{n}{k} x^k y^{n-k} = (x + y)^n$$
    

    $$f(x) = \int_{-\infty}^{\infty} \hat{f}(\xi),e^{2\pi i \xi x},d\xi \qquad \sum_{k=0}^{n} \binom{n}{k} x^k y^{n-k} = (x + y)^n$$

    5. Matrices & Linear Systems

    $$\begin{pmatrix} y_1 \\ y_2 \end{pmatrix} = \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix} \begin{pmatrix} x_1 \\ x_2 \end{pmatrix}$$
    

    $$\begin{pmatrix} y_1 \ y_2 \end{pmatrix} = \begin{bmatrix} a_{11} & a_{12} \ a_{21} & a_{22} \end{bmatrix} \begin{pmatrix} x_1 \ x_2 \end{pmatrix}$$

    6. Piecewise Functions & Cases

    $$f(n) = \begin{cases} \frac{n}{2} & \text{if } n \equiv 0 \pmod{2} \\ 3n + 1 & \text{if } n \equiv 1 \pmod{2} \end{cases}$$
    

    $$f(n) = \begin{cases} \frac{n}{2} & \text{if } n \equiv 0 \pmod{2} \ 3n + 1 & \text{if } n \equiv 1 \pmod{2} \end{cases}$$


    KaTeX vs. XeLaTeX: What Is and Is Not Supported

    Feature KaTeX (Browser Math Engine) Full XeLaTeX / pdfLaTeX Execution Environment Client-side JavaScript DOM rendering Server-side CLI TeX compiler (xelatex) Mathematical Formulas (\frac, \int, \sum) YES (Full TeX math subset) YES Inline Math ($x$) & Block Math ($$x$$) YES YES Greek, Hebrew & Math Symbols YES (\alpha, \beta, \Omega, \aleph) YES Unicode in Math (\text{日本語}) YES (Direct UTF-8 support) YES Document Preambles (\documentclass) NO (Not a document compiler) YES Arbitrary LaTeX Packages (\usepackage) NO YES XeTeX FontSpec & System TTF Embedding NO YES

    2. Japanese Typography & Furigana (Ruby Text)

    BookStack fully supports HTML5 Ruby Annotations (<ruby> and <rt>) for rendering Japanese Furigana (reading glosses placed above Kanji characters).

    Furigana Syntax & Examples

    Whole-Word Furigana

    <ruby>漢字<rt>かんじ</rt></ruby>
    <ruby>東京<rt>とうきょう</rt></ruby>
    
      Rendered Output: 漢字かんじ, 東京とうきょう

      Per-Character Furigana (Fine-Grained Alignment)

      <ruby>振<rt>ふ</rt>り<rt></rt>仮<rt>が</rt>名<rt>な</rt></ruby>
      <ruby>電<rt>でん</rt>波<rt>ぱ</rt></ruby>
      
        Rendered Output: 振ふり仮が名な, 電でん波ぱ

        Japanese Text Inside TeX Math Blocks

        Japanese characters can be rendered directly inside math equations using \text{...}:

        $$\text{周波数 } f = 433.92\text{ MHz} \qquad \text{周期 } T_e = 291.27\text{ }\mu\text{s}$$
        

        $$\text{周波数 } f = 433.92\text{ MHz} \qquad \text{周期 } T_e = 291.27\text{ }\mu\text{s}$$


        3. General Markdown & HTML Features Supported

        1. Native BookStack Callout Alert Boxes

        BookStack provides colored callout boxes for contextual notes:

        <p class="callout info"><strong>Info Note:</strong> Background context and informational details.</p>
        <p class="callout success"><strong>Success:</strong> Empirical zero-drift test passed with 0 samples drift.</p>
        <p class="callout warning"><strong>Warning:</strong> Ensure Word Clock is 75Ω terminated on the final device.</p>
        <p class="callout danger"><strong>Danger / Critical:</strong> Never run recursive find commands on host ul.</p>
        

        Rendered Output:

        Info Note: Background context and informational details.

        Success: Empirical zero-drift test passed with 0 samples drift.

        Warning: Ensure Word Clock is 75Ω terminated on the final device.

        Danger / Critical: Never run recursive find commands on host ul.


        2. Collapsible Details & Accordions

        <details>
          <summary><strong>Click to expand technical registers</strong></summary>
          <p>Detailed hardware memory offsets and bitfields go here.</p>
        </details>
        

        Rendered Output:

        Click to expand technical registers

        Detailed hardware memory offsets and bitfields go here.


        3. Scaled Lightbox Images with Captions

        <p align="center">
          <a href="https://wiki.drheck.dev/uploads/images/gallery/2026-08/sound-cards.jpg" target="_blank">
            <img src="https://wiki.drheck.dev/uploads/images/gallery/2026-08/sound-cards.jpg" alt="Description" width="60%" style="border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); display: block; margin: 0 auto;">
          </a>
          <em style="display: block; text-align: center; margin-top: 6px; font-size: 0.9em; color: #666;">Figure Caption</em>
        </p>
        

        4. Summary Guide for Authors & AI Agents

          Math Formulas: Use standard $$ ... $$ for display equations and $ ... $ for inline math. Avoiding Underscore Collisions: Multiple unescaped underscores in a formula (e.g. VAR_1 ... VAR_2) can trigger Markdown italics (<em>). Use hyphens (e.g. \text{DRATE-M}) or single subscripts (x_1) to prevent Markdown parser mangling. Japanese / Furigana: Use <ruby>漢字<rt>かんじ</rt></ruby> in Markdown, or \text{...} in KaTeX equations. Callout Boxes: Use <p class="callout info|success|warning|danger"> for styled alert banners. Code Safety: Shell commands ($ sudo ...) inside <pre> or <code> code blocks are automatically preserved and never evaluated as math.