testing:math

Mathematical Notation Rendering Comparison: Visual Quality Assessment

Purpose: Compare four methods for displaying mathematical notation in CORSIPP and POLICE documentation. This page demonstrates the visual differences to help you choose the best standard for both projects.

Current State:

  • CORSIPP: Uses MathJax 2.7 (DokuWiki plugin)
  • POLICE: Uses Unicode/HTML subscripts
  • Decision needed: Choose ONE method for both projects

OPTION 1: MathJax 2.7 (Current CORSIPP Plugin)

Polarimetric radars provide variables like the specific differential phase ($K_{DP}$) to detect fingerprints of dendritic growth in the dendritic growth layer (DGL) and secondary ice production, both critical for precipitation formation. A key challenge in interpreting radar observations is the lack of in situ validation of particle properties within the radar measurement volume. While high $K_{DP}$ in snow is usually associated with high particle number concentrations, only few studies attributed $K_{DP}$ to certain hydrometeor types and sizes. We found that at W-band, $K_{DP} > 2\,^\circ\,\mathrm{km}^{-1}$ can result from a broad range of particle number concentrations, between $1$ and $100\,\mathrm{L}^{-1}$. Blowing snow and increased ice collisional fragmentation in a turbulent layer enhanced observed $K_{DP}$ values. T-matrix simulations indicated that high $K_{DP}$ values were primarily produced by particles smaller than $0.8\,\mathrm{mm}$ in the DGL and $1.5\,\mathrm{mm}$ near the surface.

The distinction between aggregation and riming below the DGL is important, because the latter signals the presence of super-cooled liquid water (SLW). Riming favors secondary ice production through the Hallet-Mossop process (rime splintering), which is active between $-3\,^\circ\mathrm{C}$ and $-8\,^\circ\mathrm{C}$. POLICE exploited quasi-vertical profile (QVP) data of reflectivity ($Z_H$), differential reflectivity ($Z_{DR}$), and depolarization ratio ($DR$). Similar to $Z_{DR}$, the variable $DR$ tends to decrease in rimed snow relative to aggregated snow, but the corresponding difference in $DR$ is $2$–$4\,\mathrm{dB}$ larger (e.g., Ryzhkov et al., 2017). Naturally, $DR$ combines the information content of $Z_{DR}$ and cross-correlation coefficient ($\rho_{hv}$) in a single quantity. The MISPs of mean Doppler velocity ($MDV$) are used to identify regions with particles falling faster than $1.5\,\mathrm{m}\,\mathrm{s}^{-1}$ and accordingly associated with riming.

Publication-grade quality. Professional spacing and alignment. Uses Computer Modern font (LaTeX standard).


OPTION 2: MathJax 4 (Manual Implementation)
Polarimetric radars provide variables like the specific differential phase ($K_{DP}$) to detect fingerprints of dendritic growth in the dendritic growth layer (DGL) and secondary ice production, both critical for precipitation formation. A key challenge in interpreting radar observations is the lack of in situ validation of particle properties within the radar measurement volume. While high $K_{DP}$ in snow is usually associated with high particle number concentrations, only few studies attributed $K_{DP}$ to certain hydrometeor types and sizes. We found that at W-band, $K_{DP} > 2\,^\circ\,\mathrm{km}^{-1}$ can result from a broad range of particle number concentrations, between $1$ and $100\,\mathrm{L}^{-1}$. Blowing snow and increased ice collisional fragmentation in a turbulent layer enhanced observed $K_{DP}$ values. T-matrix simulations indicated that high $K_{DP}$ values were primarily produced by particles smaller than $0.8\,\mathrm{mm}$ in the DGL and $1.5\,\mathrm{mm}$ near the surface. The distinction between aggregation and riming below the DGL is important, because the latter signals the presence of super-cooled liquid water (SLW). Riming favors secondary ice production through the Hallet-Mossop process (rime splintering), which is active between $-3\,^\circ\mathrm{C}$ and $-8\,^\circ\mathrm{C}$. POLICE exploited quasi-vertical profile (QVP) data of reflectivity ($Z_H$), differential reflectivity ($Z_{DR}$), and depolarization ratio ($DR$). Similar to $Z_{DR}$, the variable $DR$ tends to decrease in rimed snow relative to aggregated snow, but the corresponding difference in $DR$ is $2$–$4\,\mathrm{dB}$ larger (e.g., Ryzhkov et al., 2017). Naturally, $DR$ combines the information content of $Z_{DR}$ and cross-correlation coefficient ($\rho_{hv}$) in a single quantity. The MISPs of mean Doppler velocity ($MDV$) are used to identify regions with particles falling faster than $1.5\,\mathrm{m}\,\mathrm{s}^{-1}$ and accordingly associated with riming.
Publication-grade quality. Modern rendering engine. SVG output (sharper on high-DPI screens). Slightly faster than v2.7.


OPTION 3: KaTeX (Manual Implementation)
Polarimetric radars provide variables like the specific differential phase ($K_{DP}$) to detect fingerprints of dendritic growth in the dendritic growth layer (DGL) and secondary ice production, both critical for precipitation formation. A key challenge in interpreting radar observations is the lack of in situ validation of particle properties within the radar measurement volume. While high $K_{DP}$ in snow is usually associated with high particle number concentrations, only few studies attributed $K_{DP}$ to certain hydrometeor types and sizes. We found that at W-band, $K_{DP} > 2\,^\circ\,\mathrm{km}^{-1}$ can result from a broad range of particle number concentrations, between $1$ and $100\,\mathrm{L}^{-1}$. Blowing snow and increased ice collisional fragmentation in a turbulent layer enhanced observed $K_{DP}$ values. T-matrix simulations indicated that high $K_{DP}$ values were primarily produced by particles smaller than $0.8\,\mathrm{mm}$ in the DGL and $1.5\,\mathrm{mm}$ near the surface. The distinction between aggregation and riming below the DGL is important, because the latter signals the presence of super-cooled liquid water (SLW). Riming favors secondary ice production through the Hallet-Mossop process (rime splintering), which is active between $-3\,^\circ\mathrm{C}$ and $-8\,^\circ\mathrm{C}$. POLICE exploited quasi-vertical profile (QVP) data of reflectivity ($Z_H$), differential reflectivity ($Z_{DR}$), and depolarization ratio ($DR$). Similar to $Z_{DR}$, the variable $DR$ tends to decrease in rimed snow relative to aggregated snow, but the corresponding difference in $DR$ is $2$–$4\,\mathrm{dB}$ larger (e.g., Ryzhkov et al., 2017). Naturally, $DR$ combines the information content of $Z_{DR}$ and cross-correlation coefficient ($\rho_{hv}$) in a single quantity. The MISPs of mean Doppler velocity ($MDV$) are used to identify regions with particles falling faster than $1.5\,\mathrm{m}\,\mathrm{s}^{-1}$ and accordingly associated with riming.
Publication-grade quality. Instant rendering (10-40× faster than MathJax). Uses Cambria Math font. Smaller file size.


OPTION 4: Unicode/HTML (Current POLICE Method)

Polarimetric radars provide variables like the specific differential phase (KDP) to detect fingerprints of dendritic growth in the dendritic growth layer (DGL) and secondary ice production, both critical for precipitation formation. A key challenge in interpreting radar observations is the lack of in situ validation of particle properties within the radar measurement volume. While high KDP in snow is usually associated with high particle number concentrations, only few studies attributed KDP to certain hydrometeor types and sizes. We found that at W-band, KDP > 2 °km⁻¹ can result from a broad range of particle number concentrations, between 1 and 100 L⁻¹. Blowing snow and increased ice collisional fragmentation in a turbulent layer enhanced observed KDP values. T-matrix simulations indicated that high KDP values were primarily produced by particles smaller than 0.8 mm in the DGL and 1.5 mm near the surface.

The distinction between aggregation and riming below the DGL is important, because the latter signals the presence of super-cooled liquid water (SLW). Riming favors secondary ice production through the Hallet-Mossop process (rime splintering), which is active between -3°C and -8°C. POLICE exploited quasi-vertical profile (QVP) data of reflectivity (ZH), differential reflectivity (ZDR), and depolarization ratio (DR). Similar to ZDR, the variable DR tends to decrease in rimed snow relative to aggregated snow, but the corresponding difference in DR is 2-4 dB larger (e.g., Ryzhkov et al., 2017). Naturally, DR combines the information content of ZDR and cross-correlation coefficient (ρhv) in a single quantity. The MISPs of mean Doppler velocity (MDV) are used to identify regions with particles falling faster than 1.5 m/s and accordingly associated with riming.

Subscripts drop too low, disrupting line spacing. Greek letters use wrong font. No mathematical spacing rules. Unprofessional appearance for scientific documentation.


MathJax 2.7

$K_{DP}$

Perfect

MathJax 4

$K_{DP}$

Perfect

KaTeX

$K_{DP}$

Perfect

Unicode/HTML

KDP

Subscript too low

MathJax 2.7

$K_{DP} > 2\,^\circ\,\mathrm{km}^{-1}$

Proper spacing, clean

MathJax 4

$K_{DP} > 2\,^\circ\,\mathrm{km}^{-1}$

Proper spacing, clean

KaTeX

$K_{DP} > 2\,^\circ\,\mathrm{km}^{-1}$

Proper spacing, clean

Unicode/HTML

KDP > 2 °km⁻¹

Awkward spacing

MathJax 2.7

$-3\,^\circ\mathrm{C}$ to $-8\,^\circ\mathrm{C}$

Professional spacing

MathJax 4

$-3\,^\circ\mathrm{C}$ to $-8\,^\circ\mathrm{C}$

Professional spacing

KaTeX

$-3\,^\circ\mathrm{C}$ to $-8\,^\circ\mathrm{C}$

Professional spacing

Unicode/HTML

-3°C to -8°C

No space before unit

MathJax 2.7

$\rho_{hv}$

Italic Greek, perfect

MathJax 4

$\rho_{hv}$

Italic Greek, perfect

KaTeX

$\rho_{hv}$

Italic Greek, perfect

Unicode/HTML

ρhv

Upright, wrong font

MathJax 2.7

$1.5\,\mathrm{m}\,\mathrm{s}^{-1}$

Thin spaces, upright units

MathJax 4

$1.5\,\mathrm{m}\,\mathrm{s}^{-1}$

Thin spaces, upright units

KaTeX

$1.5\,\mathrm{m}\,\mathrm{s}^{-1}$

Thin spaces, upright units

Unicode/HTML

1.5 m/s

Informal slash notation

MathJax 2.7

$Z_H$, $Z_{DR}$, $K_{DP}$

Uniform consistency

MathJax 4

$Z_H$, $Z_{DR}$, $K_{DP}$

Uniform consistency

KaTeX

$Z_H$, $Z_{DR}$, $K_{DP}$

Uniform consistency

Unicode/HTML

ZH, ZDR, KDP

Visually cluttered

MathJax 2.7

$1$ to $100\,\mathrm{L}^{-1}$

Clean unit formatting

MathJax 4

$1$ to $100\,\mathrm{L}^{-1}$

Clean unit formatting

KaTeX

$1$ to $100\,\mathrm{L}^{-1}$

Clean unit formatting

Unicode/HTML

1 to 100 L⁻¹

Cramped superscript

MathJax 2.7

$2$–$4\,\mathrm{dB}$

Proper en dash, spacing

MathJax 4

$2$–$4\,\mathrm{dB}$

Proper en dash, spacing

KaTeX

$2$–$4\,\mathrm{dB}$

Proper en dash, spacing

Unicode/HTML

2-4 dB

Wrong hyphen, no space


Criterion MathJax 2.7 (Plugin) MathJax 4 (Manual) KaTeX (Manual) Unicode/HTML
Visual Quality ★★★★★ Excellent ★★★★★ Excellent ★★★★★ Excellent ★★☆☆☆ Poor
Rendering Speed ★★★☆☆ (100-200ms) ★★★★☆ (50-100ms) ★★★★★ (<5ms) ★★★★★ Instant
File Size ★★☆☆☆ (~500KB) ★★★☆☆ (~350KB) ★★★★☆ (~150KB) ★★★★★ None
Font Used Computer Modern (LaTeX standard) Computer Modern (LaTeX standard) Cambria Math (modern) Browser default (inconsistent)
DokuWiki Integration ★★★★★ Native plugin ★★☆☆☆ Manual HTML blocks ★★☆☆☆ Manual HTML blocks ★★★★★ Native HTML
Maintenance ★★★★★ Auto-updates ★★☆☆☆ Manual CDN updates ★★☆☆☆ Manual CDN updates ★★★★★ No dependencies
LaTeX Support ★★★★★ Full (includes old packages) ★★★★★ Full (modern syntax) ★★★★☆ ~90% (no obscure commands) ★☆☆☆☆ Not LaTeX
Cross-Project Consistency ★★★★★ Same plugin everywhere ★★★☆☆ Copy/paste config ★★★☆☆ Copy/paste config ★★★☆☆ Manual conversion
Scientific Standard ✓ Yes ✓ Yes ✓ Yes ✗ No
Publication Quality ✓ Yes ✓ Yes ✓ Yes ✗ No

Visual Aspect MathJax 2.7 MathJax 4 KaTeX Unicode/HTML
Subscript positioning Perfect height, aligned with baseline Perfect height, aligned with baseline Perfect height, aligned with baseline Too low, disrupts line spacing
Superscript positioning Proper height, readable size Proper height, readable size Proper height, readable size Often cramped, too small
Greek letters (ρ, θ, φ) Proper italic mathematics font Proper italic mathematics font Proper italic mathematics font Upright, wrong font, inconsistent
Mathematical spacing Professional thin spaces (\,) Professional thin spaces (\,) Professional thin spaces (\,) No thin space control
Units formatting Upright (\mathrm), correct spacing Upright (\mathrm), correct spacing Upright (\mathrm), correct spacing Inconsistent, often wrong
Operator spacing Proper space around >, <, = Proper space around >, <, = Proper space around >, <, = No mathematical spacing rules
Font consistency Uniform Computer Modern Uniform Computer Modern Uniform Cambria Math Mixed browser defaults
Overall professionalism Publication-grade Publication-grade Publication-grade Amateur appearance


✓ LaTeX Methods (Options 1-3)

  • Subscripts perfectly sized and positioned
  • Greek letters use proper italic mathematics font
  • Professional spacing around operators and units
  • Meets scientific journal standards
  • Content can be copied to publications
  • Consistent across all documents

✗ Unicode/HTML (Option 4)

  • Subscripts drop too far below baseline
  • Greek letters in wrong font (upright instead of italic)
  • No control over mathematical spacing
  • Does not meet scientific standards
  • Cannot be used in publications
  • Looks unprofessional compared to published work


All three LaTeX options (MathJax 2.7, MathJax 4, KaTeX) produce visually identical or nearly identical output. The differences are technical, not visual:

MathJax 2.7 (Current CORSIPP Plugin)

  • Pro: Already installed and working on CORSIPP
  • Pro: Native DokuWiki plugin (no manual configuration)
  • Pro: Auto-updates via plugin system
  • Pro: Most comprehensive LaTeX support (includes legacy commands)
  • Con: Older version (maintenance mode, no new features)
  • Con: Slower rendering (100-200ms per page)
  • Con: Larger file size (~500KB)

MathJax 4 (Manual Implementation)

  • Pro: Modern, actively developed version
  • Pro: Faster than v2.7 (50-100ms per page)
  • Pro: Smaller file size (~350KB)
  • Pro: Better rendering on high-DPI screens (SVG output)
  • Pro: Full LaTeX support with modern syntax
  • Con: Requires manual HTML blocks on each page
  • Con: Need to manually update CDN links for new versions
  • Con: Different implementation from CORSIPP's plugin

KaTeX (Manual Implementation)

  • Pro: Extremely fast (renders instantly, <5ms)
  • Pro: Smallest file size (~150KB)
  • Pro: No perceptible rendering delay
  • Pro: Modern Cambria Math font (clean on all screens)
  • Pro: Actively developed by Khan Academy
  • Con: Requires manual HTML blocks on each page
  • Con: Need to manually update CDN links for new versions
  • Con: ~90% LaTeX coverage (missing some obscure commands)
  • Con: Different implementation from CORSIPP's plugin


All three LaTeX options (MathJax 2.7, MathJax 4, KaTeX) produce publication-quality output that meets scientific standards. Unicode/HTML produces visibly inferior output that does not meet professional standards for scientific documentation.

Option A: If you can install MathJax plugin on POLICE

→ Use MathJax 2.7 plugin on both projects. Identical implementation, zero manual work, auto-updates.

Option B: If MathJax plugin cannot be installed

→ Use KaTeX manual implementation for speed. Requires HTML blocks but renders instantly. Best performance.

Option C: Alternative if plugin unavailable

→ Use MathJax 4 manual implementation. Modern version with full LaTeX support. Slightly slower than KaTeX but more feature-complete.

Reject: Unicode/HTML

→ Does not meet visual quality standards for professional scientific documentation.

Bottom Line: Any LaTeX option produces acceptable quality. Unicode/HTML does not. The choice between LaTeX options is a technical decision about implementation convenience, not visual quality.

  • testing/math.txt
  • Last modified: 2025/10/20 13:19
  • by ayush