A Small Test Document for TeX→HTML Pipelines

2026-04-09

Abstract

This document is designed to test a TeX-to-HTML/EPUB pipeline. It includes sections, theorem environments, references, equations, tables, a TikZ diagram, and some common edge cases (long formulas, inline math, lists).

Overview

We treat mathematics as a language for structure. Inline math looks like $a^2+b^2=c^2$, and display math is used for longer expressions.

We will refer to Definition~def:random-variable and Theorem~thm:chebyshev. We also test hyperlinks: GitHub profile.

A long formula (line breaking)

Below is a long inequality. Use align to allow automatic line breaks:

\[\begin{aligned} \Prb(S\ge n/2) &=\Prb\bigl(S-\E[S]\ge n\Delta\bigr)\\ &\le \frac{\Var(S)}{\Var(S)+n^2\Delta^2}\\ &\le \frac{\varepsilon(1-\varepsilon)\,\bigl(1+(n-1)\rho\bigr)} {\varepsilon(1-\varepsilon)\,\bigl(1+(n-1)\rho\bigr)+n\Delta^2}. \end{aligned}\]

Core objects

Definition

A random variable is a function $X:\Omega→ \R$ defined on a sample space $\Omega$. Its expectation is \[\E[X] := \int_\Omega X(\omega) d\Prb(\omega),\] when the integral is well-defined.

Example

Let $X\in\{0,1\}$ with $\Prb(X=1)=p$ and $\Prb(X=0)=1-p$. Then $\E[X]=p$ and $\Var(X)=p(1-p)$.

A theorem and proof

Theorem

Let $X$ be a random variable with finite mean $\mu=\E[X]$ and finite variance $\sigma^2=\Var(X)$. Then for any $t\gt 0$, \[\Prb(|X-\mu|\ge t)\le \frac{\sigma^2}{t^2}.\]

Proof

By Markov's inequality applied to the nonnegative random variable $(X-\mu)^2$, \[\Prb\bigl((X-\mu)^2\ge t^2\bigr)\le \frac{\E[(X-\mu)^2]}{t^2} =\frac{\Var(X)}{t^2}.\]

Remark

This is a good test of theorem/proof rendering as a block component.

Lists and small layout features

Enumerations

  1. Inline math inside text: $f(x)=x^2$.
  2. A displayed equation: \[\int_0^1 x^2 dx=\frac{1}{3}.\]
  3. A reference test: Equation~(eq:long).

A table (booktabs)

Table~tab:complexity tests alignment and rule rendering.

MethodTime (ms)Notes
Finite differences12.4baseline
WENO (order 5)48.0sharper shocks
Integer flux (FQNM-style)9.1structure-preserving
Toy runtime comparison (illustrative only).

TikZ diagram

Figure~fig:tikz tests TikZ-to-SVG export with named nodes, styles, and labels.

TikZ export test: named nodes, styles, and labeled edges.

Footnote and link tests

A footnote test.* Another link: https://lapl.asia.

Conclusion

We tested: sections, references, long equations, theorem/proof blocks, lists, tables, TikZ, and footnotes. If the HTML output preserves structure (not just pixels), the pipeline is doing the right thing.