Format long number with a thousand separator in LaTeX
In order to format a long number with a thousand separator in LaTeX, you can do it manually by giving a small space with this \, or you can use the \num{} command provided by the siunitx package. This command will automatically format the long number with a thousand separator.
\documentclass{article}
\usepackage{siunitx}
\begin{document}
Do manually with \verb|\,|:
1\,000\,000\,000
Do automatically with \verb|\num{}|:
\num{1000000000}
\end{document}Output:

Leave a Reply