I'd like to have a table aligned by decimal point. I'm using tabu instead of table for exploit rowfont because I need row with smaller character. I've read different posts on dcolumn and siunitx packages but I didn't solve my problem. Here is part of my table:
\documentclass{article}
\usepackage[latin1]{inputenc}
\usepackage[british]{babel}
\usepackage[T1]{fontenc}
\usepackage{indentfirst}
\usepackage{fancyhdr}
\usepackage{natbib}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{breqn}
\usepackage{amssymb}
\usepackage{latexsym}
\usepackage[labelfont=bf]{caption}
\usepackage{tabu}
\usepackage{rotating}
\usepackage{collcell}
\usepackage{datatool}
\usepackage{multirow}
\usepackage{array,colortbl,xcolor}
\begin{document}
\begin{sidewaystable}[]
\begin{center}
\resizebox*{\textheight}{0.70\textwidth}{%
\setlength\extrarowheight{5mm}
\Huge
\begin{tabu}{|c|l|ccccc|ccccccccc|cccc|cc|}
\cline{3-20}
\multicolumn{2}{c}{} & \multicolumn{5}{|c|}{P1} & \multicolumn{9}{c|}{P2} & \multicolumn{4}{c|}{P4} & \multicolumn{2}{c}{} \\ \hline
X1 & \multicolumn{1}{|c|}{X2} & $\omega^*$ & $\alpha_1$ & $\alpha_0$ & $\beta_1$ & $\beta_2$ & $m$ & $\alpha_{1,d}$ & $\beta_{1,d}$ & $\beta_{1,w}$ & $\beta_{1,m}$ & $\theta_d$ & $\theta_h$ & $\omega_d$ & $\omega_h$ & $a$ & $b$ & $c$ & $\pi$ & $\mathcal{L}(\boldsymbol{y})$ & $BIC$ \\ \hline
\multirow{10}{*}{T1} & M1 & 0.042 & \textbf{0.304} & -0.005 & 0.345 & 0.309 & - & - & - & - & - & - & - & - & - & 3.189 & 0.738 & 1.185 & 0.999 & -20939.5 & 41963.7 \vspace*{-6mm} \\ \rowfont{\huge}
& & & 0.007 & {[}0.043{]} & 0.016 & 0.016 & & & & & & & & & & 0.172 & 0.052 & 0.099 & 0.000 & & \\ \hline
\end{tabu}%
}
\end{center}
{\footnotesize Table description.}
\end{sidewaystable}
\end{document}
Are there any solution? Thanks!!!!
\usepackage{graphicx} \usepackage{amsmath} \usepackage{breqn} \usepackage{amssymb} \usepackage{latexsym} \usepackage[labelfont=bf]{caption} \usepackage{tabu} \usepackage{rotating} \usepackage{datatool} \usepackage{multirow} \usepackage{array,colortbl,xcolor}
Thanks for your help!
– antonio Mar 18 '19 at 21:33\Hugefont size? With such a large font size a table with 22 columns will not fit onto a standard page. Using\resizeboxto scale a table doeas lead to inconsistend sizes and as you can pbserve in your example, an extremely distorted (and unreadable) text. By the way, you can add information to your question by unsing theeditbutton. – leandriis Mar 18 '19 at 21:39\begin{document}and\end{document}into tex code? – Sebastiano Mar 18 '19 at 21:51\resizeboxespecially in combination with the\Hugefont size as I don't see any improved readability: https://i.stack.imgur.com/JbwqK.png Instead you might be interested in redesigning your table (e.g. by splitting or transposing). – leandriis Mar 18 '19 at 22:04siunitxpackage (especially if one number is bold) see: https://tex.stackexchange.com/a/66256/134144 – leandriis Mar 18 '19 at 22:07siunitxpackage to horizontally center the numbers:\documentclass{article} \usepackage{siunitx} \usepackage{etoolbox} \robustify\bfseries \sisetup{detect-weight=true,detect-inline-weight=math} \begin{document} \begin{tabular}{|c|l| S[table-format=1.3] S[table-format=1.3] S[table-format=-1.3] } X1 & \multicolumn{1}{c|}{X2}& {$\omega^*$} & {$\alpha_1$} & {$\alpha_0$} \\ \hline T1 & M1 & 0.042 & \bfseries 0.304 & -0.005 \\ & & & 0.007 & [0.043] \\ \hline \end{tabular} \end{document}– leandriis Mar 18 '19 at 22:36