UNICODE TO LATEX TRANSLATION CONVENTIONS¶
This document provides guidelines for translating Unicode mathematical expressions from the unified framework into LaTeX. The goal is to ensure consistent and unambiguous translation while preserving the mathematical meaning.
General Principles¶
- Preserve the semantic meaning of the expression
- Maintain consistent notation across the document
- Use standard LaTeX packages when needed
- Handle subscripts and superscripts unambiguously
- Distinguish between different fonts and stylings of the same character
- Use appropriate LaTeX packages for specialized symbols
- Ensure all prescribed LaTeX renders correctly in full LaTeX, KaTeX, and MathJax 3
Required LaTeX Packages¶
Packages¶
\usepackage{amsmath} % For mathematical environments and symbols
\usepackage{amssymb} % For additional mathematical symbols
\usepackage{mathrsfs} % For script letters (\mathscr)
% \usepackage{upgreek} % For upright Greek letters (full LaTeX only; see shim below)
Portable shims (for KaTeX / MathJax compatibility)¶
The following \newcommand definitions provide web-compatible fallbacks for commands that require packages unavailable in KaTeX or MathJax 3. Include these in the preamble of any LaTeX document, or in the KaTeX/MathJax macro configuration.
% \uppi: upright (constant) pi
% - In full LaTeX with upgreek: produces a font-matched upright pi glyph
% - This shim: places the Unicode character π in text mode, which renders
% upright in all three targets. The glyph may differ slightly from the
% upgreek version in full LaTeX.
\newcommand{\uppi}{\text{π}}
Web Rendering Compatibility¶
All conventions in this document are designed to render correctly in three targets:
- Full LaTeX (pdflatex / xelatex with the packages listed above)
- KaTeX (as used by GitHub Pages with MkDocs, Obsidian, and many Markdown renderers)
- MathJax 3 (as used by Jupyter notebooks and many web-based math renderers)
Commands that required a shim¶
| Command | Issue | Shim | Visual difference |
|---|---|---|---|
\uppi |
Requires the upgreek package, which is not available in KaTeX and requires an extension in MathJax 3 |
\newcommand{\uppi}{\text{π}} |
The shim uses a text-mode Unicode π. In full LaTeX with upgreek, the glyph is font-matched to the math font; the shim version may have slightly different weight or spacing. |
All other commands¶
Every other command prescribed in this document (\mathscr, \mathfrak, \mathbb, \mathrm, \mathbf, \boldsymbol, \newcommand, all standard Greek letters, all math operators, equation/align/align* environments) is natively supported by KaTeX and MathJax 3 with no extensions or shims needed.
MathJax extensions¶
If using MathJax 3, the boldsymbol extension is needed for \boldsymbol{...}. This extension is autoloaded by default MathJax configurations, so no explicit configuration is normally required.
Font and Style Distinctions¶
Greek Letters¶
- Italic (variable) vs. upright (constant) Greek:
- Italic π (variable):
\pi→ \pi - Upright π (constant):
\uppi→ \uppi (portable shim; see above) -
Policy/choice variable 𝜋:
\pi→ \pi (italic by default in math mode) -
Different weights/styles:
- Regular β:
\beta→ \beta - Bold β:
\boldsymbol{\beta}→ \boldsymbol{\beta}
Latin Letters¶
- Different fonts:
- Regular R:
R→ R - Blackboard bold ℝ:
\mathbb{R}→ \mathbb{R} - Script 𝒜:
\mathscr{A}→ \mathscr{A} -
Fraktur 𝔭:
\mathfrak{p}→ \mathfrak{p} -
Different weights:
- Regular x:
x→ x - Bold x:
\mathbf{x}→ \mathbf{x} - Bold Greek:
\boldsymbol{\pi}→ \boldsymbol{\pi}
Basic Symbol Translations¶
Value Functions and State Spaces¶
| Unicode | LaTeX | Notes |
|---|---|---|
| 𝒜 | \mathscr{A} |
Arrival value function (script) |
| 𝒱 | \mathscr{V} |
Value function (script) |
| ℰ | \mathscr{E} |
Continuation value function (script) |
| 𝓧 | \mathscr{X} |
State space (bold script) |
| 𝒵 | \mathscr{Z} |
Shock space (script) |
| 𝓘 | \mathscr{I} |
Information set (script) |
| ℬ | \mathscr{B} |
Borel σ-algebra (script) |
| Π | \Pi |
Choice set |
| 𝔭 | \mathfrak{p} |
Parameters (fraktur) |
| ℝ | \mathbb{R} |
Real numbers (blackboard bold) |
| 𝕊 | \mathbb{S} |
Stage space (blackboard bold) |
| π | \uppi |
Constant pi (upright; portable shim) |
| 𝜋 | \pi |
Policy/choice variable (italic in math mode by default; U+1D70B) |
| β | \beta |
Discount factor |
| γ | \gamma |
Production parameter |
| μ | \mu |
Measure |
| ω | \omega |
Portfolio share |
| ζ | \zeta |
Shock realization |
| ξ | \xi |
Target equity premium |
| ϕ | \phi |
Scale parameter |
| η | \eta |
Bound parameter |
| ⍴ | \rho |
Risk aversion (U+2374; see also ρ U+03C1 below) |
| ρ | \rho |
Risk aversion (U+03C1; same meaning as ⍴ U+2374 above) |
| ∂ | \partial |
Partial derivative |
| ∇ | \nabla |
Gradient |
| ∑ | \sum |
Summation |
| ∈ | \in |
Element of |
| → | \to |
Maps to |
| ↦ | \mapsto |
Maps to (alternative) |
| κ | \kappa |
Stage kind |
| σ | \sigma |
Scale parameter |
| χ | \chi |
Optimal policy function (concrete examples) |
| ε | \varepsilon |
Convergence tolerance |
| Γ | \Gamma |
Transition operator |
| ℓ | \ell |
Liquidity / script l |
Subscript and Superscript Conventions¶
Special Subscripts¶
| Unicode | LaTeX | Description |
|---|---|---|
| ₐ | _{\mathrm{a}} |
Arrival state |
| ᵥ | _{\mathrm{v}} |
Decision (value) state |
| ₑ | _{\mathrm{e}} |
Continuation (end) state |
| ₊ | _{+} |
Next stage |
| ₜ | _{t} |
Time period |
| ₀ | _{0} |
Initial/terminal value |
Multiple Subscripts¶
When multiple subscripts appear, maintain their relative order and use braces:
| Unicode | LaTeX | Example |
|---|---|---|
| μₐ₊ⱼ | \mu_{\mathrm{a}+j} |
Branch-specific arrival measure |
| gᵥₑ | g_{\mathrm{ve}} |
Decision-to-continuation transition |
| gₑₐ₊ | g_{\mathrm{ea}+} |
Sequential stage connector |
Potentially Ambiguous Cases¶
- Derivative Notation
- Partial derivatives should use
\partialnot prime notation - Unicode: ∂r/∂𝜋
- LaTeX:
\frac{\partial r}{\partial \pi} -
NOT:
r'or\frac{d r}{d \pi} -
Expectation Operators
- Unicode: E_μₐ[⋅]
- LaTeX:
\mathbb{E}_{\mu_{\mathrm{a}}}[\cdot] -
Include subscript in braces
-
Information Sets
- Unicode: 𝓘_{t,s,m}
- LaTeX:
\mathscr{I}_{t,s,m} -
Multiple subscripts separated by commas
-
Cross Derivatives
- Unicode: ∂²𝒜/∂k∂γ
- LaTeX:
\frac{\partial^2 \mathscr{A}}{\partial k \partial \gamma} -
NOT:
\mathscr{A}^{(k,\gamma)} -
Function Arguments
- Unicode: 𝒱(xᵥ)
- LaTeX:
\mathscr{V}(x_{\mathrm{v}}) -
Use
\mathrmfor descriptive subscripts -
Set Notation
- Unicode: j ∈ N₊
- LaTeX:
j \in N_{+} -
Use
\innot\epsilon -
Measure Spaces
- Unicode: μᵥ(𝓧ᵥ)
- LaTeX:
\mu_{\mathrm{v}}(\mathscr{X}_{\mathrm{v}}) -
Maintain consistency in subscript style
-
Indicator Functions
- Unicode: 1{gₑₐ₊(xₑ) ∈ A}
- LaTeX:
\mathbf{1}\{g_{\mathrm{ea}+}(x_{\mathrm{e}}) \in A\} - Use
\mathbf{1}not1for indicator
Special Cases¶
- Tilde Notation
- Unicode: R̃
- LaTeX:
\tilde{R} -
Place tilde above symbol
-
Hat Notation
- Unicode: ω̂
- LaTeX:
\hat{\omega} -
Place hat above symbol
-
Arrow Mappings
- Unicode: ↦
- LaTeX:
\mapsto -
Use for function mapping
-
Correspondence Symbol
- Unicode: ⟷
- LaTeX:
\leftrightarrow - Use for correspondence relations
Mathematical Environments¶
-
Equations
-
Aligned Equations
Common Mistakes to Avoid¶
- Don't use prime notation (') for derivatives
- Don't mix text and math mode subscripts inconsistently
- Don't omit braces around complex subscripts
- Don't use
\epsilonfor set membership - Don't use regular letters for special function spaces
- Don't use the same LaTeX command for different fonts/styles of the same character
- Don't mix math and text modes inappropriately
- Don't omit font commands
- Don't use incorrect derivative notation
Implementation Notes¶
- When implementing these conventions in a LaTeX document:
- Include all required packages in the preamble
- Include the portable shim definitions (see "Required LaTeX Packages" above)
- Define common notation as macros for consistency
-
Use appropriate mathematical environments
-
When targeting web rendering (KaTeX or MathJax):
- Include the portable shim definitions in your renderer's macro configuration
- For KaTeX: pass shims via the
macrosoption, e.g.,macros: {"\\uppi": "\\text{π}"} - For MathJax 3: define shims in
tex.macros, e.g.,tex: { macros: { uppi: "\\text{π}" } } -
The
boldsymbolextension is autoloaded in default MathJax configurations -
For complex expressions, use the align environment:
-
For repeated notation, define LaTeX macros: