JohnPaul
I have this `tabularray`. I want to use \num fucntion in column 4, e.g `\num{12000}`. How can I add `\num` function in column 4 of the following table
```
\documentclass[12pt,a4paper]{article}
\usepackage[left=2cm, right=2cm, top=2cm, bottom=2cm]{geometry}
\usepackage{amsmath}
\usepackage{tabularray}
\UseTblrLibrary{siunitx}
\sisetup{output-decimal-marker={,}}
\sisetup{group-minimum-digits=4}
\UseTblrLibrary{diagbox}
\UseTblrLibrary{booktabs}
\UseTblrLibrary{varwidth}
\begin{document}
\begin{tblr}{cccc}
0 & 80 & 150 & \num{12000} \\
1 & 90 & 140 & 12600 \\
2 & 100 & 130 & 13000 \\
3 & 110 & 120 & 13200 \\
4 & 120 & 110 & 13200 \\
5 & 130 & 100 & 13000 \\
6 & 140 & 90 & 12600 \\
7 & 150 & 80 & 12000 \\
8 & 160 & 70 & 11200 \\
9 & 170 & 60 & 10200 \\
10 & 180 & 50 & 9000 \\
11 & 190 & 40 & 7600 \\
12 & 200 & 30 & 6000 \\
13 & 210 & 20 & 4200 \\
14 & 220 & 10 & 2200 \\
15 & 230 & 0 & 0 \\
\end{tblr}
\end{document}
```
Top Answer
samcarter
Instead of `\num{...}`, I would suggest using an `S` column. This way all the numbers will be aligned properly:
```
\documentclass[12pt,a4paper]{article}
\usepackage[left=2cm, right=2cm, top=2cm, bottom=2cm]{geometry}
\usepackage{amsmath}
\usepackage{tabularray}
\UseTblrLibrary{siunitx}
\sisetup{output-decimal-marker={,}}
\sisetup{group-minimum-digits=4}
\UseTblrLibrary{diagbox}
\UseTblrLibrary{booktabs}
\UseTblrLibrary{varwidth}
\begin{document}
\begin{tblr}{cccS[table-format=5.0]}
0 & 80 & 150 & 12000 \\
1 & 90 & 140 & 12600 \\
2 & 100 & 130 & 13000 \\
3 & 110 & 120 & 13200 \\
4 & 120 & 110 & 13200 \\
5 & 130 & 100 & 13000 \\
6 & 140 & 90 & 12600 \\
7 & 150 & 80 & 12000 \\
8 & 160 & 70 & 11200 \\
9 & 170 & 60 & 10200 \\
10 & 180 & 50 & 9000 \\
11 & 190 & 40 & 7600 \\
12 & 200 & 30 & 6000 \\
13 & 210 & 20 & 4200 \\
14 & 220 & 10 & 2200 \\
15 & 230 & 0 & 0 \\
\end{tblr}
\end{document}
```
![Screenshot 2024-10-29 at 17.17.22.png](/image?hash=97f8e1ce27e0106e654b0b86c8aea0f922332d035cdfc279fc925f31612138f4)