Skip to content

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

  1. Preserve the semantic meaning of the expression
  2. Maintain consistent notation across the document
  3. Use standard LaTeX packages when needed
  4. Handle subscripts and superscripts unambiguously
  5. Distinguish between different fonts and stylings of the same character
  6. Use appropriate LaTeX packages for specialized symbols
  7. 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:

  1. Full LaTeX (pdflatex / xelatex with the packages listed above)
  2. KaTeX (as used by GitHub Pages with MkDocs, Obsidian, and many Markdown renderers)
  3. 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

  1. Italic (variable) vs. upright (constant) Greek:
  2. Italic π (variable): \pi → \pi
  3. Upright π (constant): \uppi → \uppi (portable shim; see above)
  4. Policy/choice variable 𝜋: \pi → \pi (italic by default in math mode)

  5. Different weights/styles:

  6. Regular β: \beta → \beta
  7. Bold β: \boldsymbol{\beta} → \boldsymbol{\beta}

Latin Letters

  1. Different fonts:
  2. Regular R: R → R
  3. Blackboard bold ℝ: \mathbb{R} → \mathbb{R}
  4. Script 𝒜: \mathscr{A} → \mathscr{A}
  5. Fraktur 𝔭: \mathfrak{p} → \mathfrak{p}

  6. Different weights:

  7. Regular x: x → x
  8. Bold x: \mathbf{x} → \mathbf{x}
  9. 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

  1. Derivative Notation
  2. Partial derivatives should use \partial not prime notation
  3. Unicode: ∂r/∂𝜋
  4. LaTeX: \frac{\partial r}{\partial \pi}
  5. NOT: r' or \frac{d r}{d \pi}

  6. Expectation Operators

  7. Unicode: E_μₐ[⋅]
  8. LaTeX: \mathbb{E}_{\mu_{\mathrm{a}}}[\cdot]
  9. Include subscript in braces

  10. Information Sets

  11. Unicode: 𝓘_{t,s,m}
  12. LaTeX: \mathscr{I}_{t,s,m}
  13. Multiple subscripts separated by commas

  14. Cross Derivatives

  15. Unicode: ∂²𝒜/∂k∂γ
  16. LaTeX: \frac{\partial^2 \mathscr{A}}{\partial k \partial \gamma}
  17. NOT: \mathscr{A}^{(k,\gamma)}

  18. Function Arguments

  19. Unicode: 𝒱(xᵥ)
  20. LaTeX: \mathscr{V}(x_{\mathrm{v}})
  21. Use \mathrm for descriptive subscripts

  22. Set Notation

  23. Unicode: j ∈ N₊
  24. LaTeX: j \in N_{+}
  25. Use \in not \epsilon

  26. Measure Spaces

  27. Unicode: μᵥ(𝓧ᵥ)
  28. LaTeX: \mu_{\mathrm{v}}(\mathscr{X}_{\mathrm{v}})
  29. Maintain consistency in subscript style

  30. Indicator Functions

  31. Unicode: 1{gₑₐ₊(xₑ) ∈ A}
  32. LaTeX: \mathbf{1}\{g_{\mathrm{ea}+}(x_{\mathrm{e}}) \in A\}
  33. Use \mathbf{1} not 1 for indicator

Special Cases

  1. Tilde Notation
  2. Unicode: R̃
  3. LaTeX: \tilde{R}
  4. Place tilde above symbol

  5. Hat Notation

  6. Unicode: ω̂
  7. LaTeX: \hat{\omega}
  8. Place hat above symbol

  9. Arrow Mappings

  10. Unicode: ↦
  11. LaTeX: \mapsto
  12. Use for function mapping

  13. Correspondence Symbol

  14. Unicode: ⟷
  15. LaTeX: \leftrightarrow
  16. Use for correspondence relations

Mathematical Environments

  1. Equations

    \begin{equation}
    \mathscr{V}(x_{\mathrm{v}}) = \max_{\pi \in \Pi(x_{\mathrm{v}})} [r(x_{\mathrm{v}}, \pi) + \beta(x_{\mathrm{v}})\mathscr{E}(g_{\mathrm{ve}}(x_{\mathrm{v}}, \pi))]
    \end{equation}
    

  2. Aligned Equations

    \begin{align}
    \frac{\partial r}{\partial \pi} &= \beta \mathscr{E}_{\mathrm{a}} \circ g_{\mathrm{ve}} \\
    \pi &\in \Pi
    \end{align}
    

Common Mistakes to Avoid

  1. Don't use prime notation (') for derivatives
  2. Don't mix text and math mode subscripts inconsistently
  3. Don't omit braces around complex subscripts
  4. Don't use \epsilon for set membership
  5. Don't use regular letters for special function spaces
  6. Don't use the same LaTeX command for different fonts/styles of the same character
  7. Don't mix math and text modes inappropriately
  8. Don't omit font commands
  9. Don't use incorrect derivative notation

Implementation Notes

  1. When implementing these conventions in a LaTeX document:
  2. Include all required packages in the preamble
  3. Include the portable shim definitions (see "Required LaTeX Packages" above)
  4. Define common notation as macros for consistency
  5. Use appropriate mathematical environments

  6. When targeting web rendering (KaTeX or MathJax):

  7. Include the portable shim definitions in your renderer's macro configuration
  8. For KaTeX: pass shims via the macros option, e.g., macros: {"\\uppi": "\\text{π}"}
  9. For MathJax 3: define shims in tex.macros, e.g., tex: { macros: { uppi: "\\text{π}" } }
  10. The boldsymbol extension is autoloaded in default MathJax configurations

  11. For complex expressions, use the align environment:

    \begin{align*}
    \mathscr{V}(x_{\mathrm{v}}) &= \max_{\pi \in \Pi} [r(x_{\mathrm{v}},\pi) + \beta \mathscr{E}(g_{\mathrm{ve}}(x_{\mathrm{v}},\pi))] \\
    \mathscr{A}(x_{\mathrm{a}}) &= \mathbb{E}_{\zeta}[\mathscr{V}(g_{\mathrm{av}}(x_{\mathrm{a}},\zeta))]
    \end{align*}
    

  12. For repeated notation, define LaTeX macros:

    \newcommand{\arvl}{\mathrm{a}}
    \newcommand{\dcsn}{\mathrm{v}}
    \newcommand{\cntn}{\mathrm{e}}