Physical dimensional quantities typesetting

Cover Page

Cite item

Full Text

Abstract

The siunitx package is designed for typographically correct and consistent typesetting of physical quantities (numbers with units of measurement) in LaTeX documents. It automates formatting according to the rules of the International System of Units (SI), eliminating the need to manually manage spaces, fonts, and separators.

Full Text

1.      Introduction

We use version 3 of the siunitx package. In version 3, the core commands of the siunitx package have changed:

  • Old syntax (v2): \SI{number}{unit} and \si{unit}.
  • New syntax (v3): \qty{number}{unit} and \unit{unit}.

Global formatting settings for the entire document are set with the \sisetup command in the preamble.

For example, Russian-language texts often require a comma as a decimal separator:

\sisetup{

locale = DE, % or output-decimal-marker = {,} }

Here, the locale = DE option will automatically adjust the format for German (and many other European languages), using a comma as a decimal separator and a period to separate groups of thousands.

2.      Basic commands

The package provides three basic commands.

\num{<number>} — for formatting numbers only:

© 2026 Kulyabov, D. S., Korolkova, A. V., Sevastianov, L. A., Rybakov, Y. P.

                                This work is licensed under a Creative Commons “Attribution-NonCommercial 4.0 International” license.

 

The command automatically inserts spaces between digit groups, handles scientific notation, and replaces decimal points with commas, if configured. \unit{<unit>} — for formatting units only.

Formatting Units of Measurement

Units can be entered using special macros (\kilogram, \metre) or plain text. The package will automatically convert the font to roman (not italic) and insert the correct spacing. To multiply units, use a period (.), and to divide units, use \per or the / symbol.

\qty{<number>}{<unit>} is the basic command for outputting a quantity (number + unit).

It combines the actions of \num and \unit.

3.      Additional commands

For more complex cases, separate commands are provided.

Angles (degrees, minutes, seconds):

4.     Tables

One of the features of siunitx is the ability to align numbers in tables by decimal separators. For this, a special column type, S, is used.

The numbers in both columns will be aligned so that the decimal separators (periods or commas) are located below each other. Text in column headings should be enclosed in curly braces to prevent it from trying to align as a number.

Can be used in conjunction with the tabularray [1] package.

For this to work, you must include tabularray and explicitly load its siunitx library. This is done with the \UseTblrLibrary{siunitx} command. The siunitx package will be loaded automatically. To pass global options to siunitx, the \PassOptionsToPackage command must be used before loading the library.

\documentclass{article}

\PassOptionsToPackage{locale=DE}{siunitx}

\usepackage{tabularray}

\UseTblrLibrary{siunitx} % This command will load siunitx with the options specified above.

\begin{document}

\end{document}

The main strength of siunitx in tables is the ability to align numbers by decimal separators using a column of type S. In tabularray, this column becomes available after including the library. In the colspec argument, you can use S just like in regular LaTeX tables. The header must be enclosed in curly braces to prevent it from being aligned as a number.

Thanks to built-in support, you can use almost all the capabilities of siunitx within tabularray.

You can set column-specific siunitx options directly in colspec, for example, to control the number of characters.

Since siunitx is loaded, you can use its commands in table cells. For example, you can separate units of measurement into a separate column and format them using \unit.

5.     Global settings

Here are some useful options for \sisetup.

  • locale = DE — quick setup for European standards (comma, spaces).
  • output-decimal-marker = {,} — explicitly set the comma as the decimal separator.
  • group-separator = {\,} — set the character to separate groups of digits (e.g., thin space).
  • range-phrase = {\,--\,} — set the text for the range (default: “to”, can be replaced with a dash).
  • per-mode = symbol — how to display a symbol to the minus first power: /𝑠 instead of 𝑠−1. You can also use fraction to display it as a fraction.
  • exponent-mode = scientific — force all numbers to scientific notation.
×

About the authors

Dmitry S. Kulyabov

RUDN University; Joint Institute for Nuclear Research

Email: kulyabov-ds@rudn.ru
ORCID iD: 0000-0002-0877-7063
Scopus Author ID: 35194130800
ResearcherId: I-3183-2013

Professor, Doctor of Sciences in Physics and Mathematics, Professor of Department of Probability Theory and Cyber Security of RUDN University; Senior Researcher of Laboratory of Information Technologies, Joint Institute for Nuclear Research

6 Miklukho-Maklaya St, Moscow, 117198, Russian Federation; 6 Joliot-Curie St, Dubna, 141980, Russian Federation

Anna V. Korolkova

RUDN University

Email: korolkova-av@rudn.ru
ORCID iD: 0000-0001-7141-7610
Scopus Author ID: 36968057600
ResearcherId: I-3191-2013

Docent, Candidate of Sciences in Physics and Mathematics, Associate Professor of Department of Probability Theory and Cyber Security

6 Miklukho-Maklaya St, Moscow, 117198, Russian Federation

Leonid A. Sevastianov

RUDN University; Joint Institute for Nuclear Research

Email: sevastianov-la@rudn.ru
ORCID iD: 0000-0002-1856-4643

Professor, Doctor of Sciences in Physics and Mathematics, Professor at the Department of Applied Probability and Informatics of Peoples’ Friendship University of Russia named after Patrice Lumumba (RUDN University); Leading Researcher of Bogoliubov Laboratory of Theoretical Physics, Joint Institute for Nuclear Research

6, Miklukho-Maklaya St., Moscow, 117198, Russian Federation; 6, Joliot-Curie St., Dubna, Moscow Region, 141980, Russian Federation

Yuri P. Rybakov

RUDN University

Author for correspondence.
Email: rybakov-yup@rudn.ru
ORCID iD: 0000-0002-7744-9725
Scopus Author ID: 16454766600
ResearcherId: S-4813-2018

Professor, Doctor of Sciences in Physics and Mathematics, Professor at the Institute of Physical Research and Technologies

6 Miklukho-Maklaya St, Moscow, 117198, Russian Federation

References

  1. Kulyabov, D. S., Korolkova, A. V., Sevastianov, L. A. & Rybakov, Y. P. Typesetting tables. Discrete and Continuous Models and Applied Computational Science 33, 235–241. doi: 10.22363/2658-4670-2025-33-3-235-241 (Oct. 2025).

Supplementary files

Supplementary Files
Action
1. JATS XML

Copyright (c) 2026 Kulyabov D.S., Korolkova A.V., Sevastianov L.A., Rybakov Y.P.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.