ISO/JIS math typesetting rules

Scientific mathematics follows an international convention for what is set in italic (sloping) type and what is set upright (roman). The convention is laid down in ISO 80000-2, adopted in Japan as JIS Z 8000-2. The rule is simple: things that can vary (variables) are italic; things with a fixed meaning (constants, operators, function names, units) are upright — so the d in an integral’s dx, for instance, is set upright, distinct from a variable d. LaTeX’s defaults already satisfy many of these rules, but not all of them — e, i, d, and π are the awkward cases. This page sorts out the rules themselves and how to follow them correctly in LaTeX.

ISO 80000-2 and JIS Z 8000-2

ISO 80000-2 (Quantities and units — Part 2: Mathematics) is the international standard that fixes both the meaning of mathematical symbols and how they are to be set (their typeface). The current edition is from 2019 (the first was 2009). Japan adopted it as an identical standard (IDT): JIS Z 8000-2:2022 (“Quantities and units — Part 2: Mathematical signs and symbols”), issued in 2022, which superseded the older JIS Z 8201:1981. Older references and software still mention JIS Z 8201, or its ancestor ISO 31-11, but the current authority is ISO 80000-2 / JIS Z 8000-2.

Why should a standard reach all the way down to typeface? Because in mathematics the typeface itself carries meaning. The letter e, for example, can be a variable e or the base of the natural logarithm (2.718…) depending on context; writing the variable in italic and the constant in upright lets a reader tell them apart with no extra annotation. The standard fixes this distinction into a worldwide rule so that notation does not drift between papers, textbooks, and technical documents. Setting your mathematics in LaTeX is a strong starting point for compliance, because in math mode letters are slanted automatically while function names like \sin and ordinary digits are set upright.

The core rule: “variable → italic, fixed → upright”

A single idea sits at the centre of the standard: a quantity whose value can change with the context is italic, while anything with a uniquely fixed meaning or value is upright. Variables such as x and y, parameters like a and b that are “treated as constant for the moment,” and generic function symbols f and g all have unfixed values, so they are italic. These match LaTeX’s math-mode default, so you comply with no effort at all.

By contrast, the following have a fixed value or meaning and are therefore set upright: mathematical constants with a settled value (the base of the natural logarithm e, the imaginary unit i, the ratio π, and so on); the differential operator d and its relatives (the partial ∂, div, etc.); systematically defined function names (sin, exp, ln, Γ, …); and digits and unit symbols. The standard’s position is that since none of these is a variable, none should be set in the variable typeface (italic).

A useful intuition test is: “could this symbol be renamed to another letter?” You can rename x to t and the meaning of the formula survives — so it is a variable, set italic. But you cannot rename the d in an integral’s dx — it is an operator with a fixed meaning, so it is upright.

Upright vs. italic at a glance

The table below summarises the main typefaces the standard prescribes, whether LaTeX’s default already satisfies each, and what to write when it does not. “Default OK” means plain math mode already sets it per the standard; “Needs action” means you must make it upright explicitly.

ItemPer the standardHow to write it in LaTeX
variablesVariables / quantities x, y, tItalicx (default in math mode — OK)
parametersParameters & generic functions a, b, f, gItalica, f(x) (default — OK)
constant eBase of natural log, eUpright\mathrm{e} (plain e is italic = non-compliant; needs action)
constant iImaginary unit i (or j in EE)Upright\mathrm{i} (\mathrm{j}). Needs action
constant piThe constant πUpright\uppi (upgreek). Plain \pi is italic = non-compliant; needs action
differential dDifferential operator d (d/dx, ∫…dx)Upright\mathrm{d}x. Plain d is italic = non-compliant; needs action
partialPartial-derivative sign ∂Upright\partial (already upright — OK)
functionsDefined functions sin, exp, lnUpright\sin, \exp, \ln (already upright — OK)
capital greekCapital Greek as a function, e.g. ΓUpright\Gamma (upright by default in standard LaTeX — OK)
digitsDigits 0–9Upright123 (already upright — OK)
unitsUnit symbols m, kg, sUprightsiunitx \unit{} / \qty{}{}. Needs action
vectorsVectors & matrices a, ABold italic\bm{a} / isomath \vectorsym{a}. Needs action
tensorsTensors TSans-serif bold italicisomath \tensorsym{T}. Needs action

As the table shows, LaTeX already satisfies function names, the partial sign, digits, and capital Greek. What you must make upright yourself is e, i, π, the differential operator d, units, and vectors/tensors. The sections that follow take those “needs action” cases in turn.

The constants e, i, π and the differential d

Start with the three most-asked-about cases — the base e, the imaginary unit i, and the differential operator d. In LaTeX math mode e, i, and d are just letters, so they come out as italic variables. To follow the standard, wrap each in \mathrm{…}, which makes it upright: \mathrm{e} gives an upright e and \mathrm{d} an upright d, clearly distinct from the slanted e and d that a variable would produce.

latex
% 規格に従った書き方 — e, i, d を立体に
\[
  \mathrm{e}^{\mathrm{i}\pi} + 1 = 0,
  \qquad
  \frac{\mathrm{d}}{\mathrm{d}x} \mathrm{e}^{x} = \mathrm{e}^{x},
  \qquad
  \int_0^1 x^2 \,\mathrm{d}x = \frac{1}{3}.
\]

Here the exponential base e, the imaginary unit i, and the d of the derivative and integral are all upright, while only the variable x stays slanted. In integrals it is conventional to put a thin space \, between the integrand and the d, as in \,\mathrm{d}x (the standard itself does not fix the amount of space, but this is widely done for legibility). Note that \mathrm sets its argument upright, so \mathrm{e} denotes the single upright letter “e.”

Because writing \mathrm{d} every time is tedious, the standard practice is to define your own short commands in the preamble. With the definitions below you can then write \dd x, \eu, and \iu in the body. Defining them with \newcommand also means that if you later change your typeface policy, you edit one definition rather than the whole document.

latex
% プリアンブルで定義 / define once in the preamble
\newcommand{\dd}{\mathrm{d}}   % 立体の微分演算子 d / upright differential d
\newcommand{\eu}{\mathrm{e}}   % 自然対数の底 / base of natural log
\newcommand{\iu}{\mathrm{i}}   % 虚数単位 / imaginary unit

% 本文 / in the body
\[ \int_0^\infty \eu^{-x}\,\dd x = 1. \]

The ratio π is a little more involved. The standard makes the constant π upright, but **standard LaTeX’s \pi is italic** (lowercase Greek is designed to be slanted by default). To comply strictly, load the upgreek package and use the **upright \uppi**. That said, a great many documents use an italic π by convention, and this is often regarded as acceptable. Decide a policy for your document: \uppi to be strict, or \pi to follow common practice.

Function names and units

For function names, LaTeX’s default already satisfies the standard. \sin, \cos, \log, \ln, \exp, \lim, and the rest are all upright with the correct spacing around them. Typing sin x literally looks like the product of three italic variables s, i, n, so always use the dedicated command, \sin x. To set a function name that is not predefined (such as rank) in upright type, use amsmath’s \operatorname{rank} or define a command with \DeclareMathOperator{\rank}{rank}. The details are covered on the “Log-like functions & mod” page.

Units must always be upright, with appropriate space between the number and the unit — that is the standard’s requirement. Writing them yourself as \mathrm{m} and the like tends to produce inconsistent spacing, compound units, and exponents. In practice the standard tool is the siunitx package, which sets units and quantities-with-numbers by a consistent set of rules. In the current version you write a unit as \unit{…} and a quantity as \qty{…}{…} (the older \si and \SI still work).

latex
\usepackage{siunitx}   % プリアンブル / preamble

光速はおよそ \qty{2.998e8}{m/s} である。
The speed of light is about \qty{2.998e8}{m/s}.

単位だけなら \unit{kg.m/s^2}(= ニュートン)。

Here the number 2.998 × 10⁸ and the unit m/s are set upright with the spacing the rules call for. You write compound units with separators (the period) and powers, as in kg.m/s^2, and siunitx handles the upright type, the spacing, and the multiplication/division. Its real value is that it prevents, at the root, the mistake of setting a unit as an italic variable.

Vectors, matrices and tensors

The standard also prescribes a typeface by the “kind” of quantity. Symbols for vectors and matrices are bold italic, and symbols for tensors are sans-serif bold italic. So vectors and matrices share one face (bold, slanted), and only tensors switch alphabet to set them apart. There is also a fine point that a numeric vector, such as the zero vector, is set bold upright.

A pitfall worth flagging: the popular \mathbf{v} produces bold upright, which is *not* the “bold italic” the standard means. For a bold-italic vector, the easy route is \bm{v} from the bm package (\bm makes a symbol bold while keeping it slanted). If you want to claim compliance with the standard, the isomath package is the best fit: it provides semantically named commands for vectors, matrices, and tensors.

latex
\usepackage{isomath}   % プリアンブル / preamble

\[
  \vectorsym{v} = \matrixsym{A}\,\vectorsym{x},
  \qquad
  \tensorsym{T}_{ij}.
\]

In this example the vector v and matrix A are bold italic, and the tensor T is sans-serif bold italic. isomath is a package that applies an ISO 80000-2-conforming typeface policy wholesale; besides \vectorsym, \matrixsym, and \tensorsym it also provides math alphabets such as the bold-italic \mathbfit.

One further point of strict compliance: isomath makes capital Greek letters italic by default. In standard LaTeX capital Greek (such as \Gamma) is upright, but because ISO 80000-2 prescribes that capital Greek used as a *variable* be italic, isomath aligns with that. This can clash with places where you want an upright Γ as a function name, so in documents that mix the two, take care to distinguish them.

A practical policy

Whether to follow the standard strictly or lean toward common practice depends on the document. If your target journal or publisher requires ISO/JIS compliance, the following is a sound setup.

  • Set e, i, d upright. Define \dd, \eu, \iu as \mathrm{…} in the preamble and use them in the body.
  • For a strict π, load upgreek and use \uppi; if you keep an italic \pi by convention, be consistent throughout the document.
  • Leave units to siunitx. Avoid hand-written \mathrm{…}; set them with \unit{} / \qty{}{}.
  • Vectors and matrices are bold italic. Use \bm, or the standard-conforming isomath (\vectorsym, etc.) — not \mathbf (bold upright).
  • Leave function names, the partial sign, digits, and capital Greek as-is. \sin, \partial, \Gamma already meet the standard by default.
  • Keep one policy per document. Manage it through commands so the same symbol never appears both italic and upright.

As an aside, the physics package offers an easy upright \dd for differentials and \dv for derivatives, but it is known to clash with other packages such as siunitx (there is even a physics-patch to repair this), and lately alternatives like the derivative package are also used. It is worth knowing as an option when you want something quick. Either way, the essence of compliance is to be conscious of what a typeface *means* and to apply it consistently.