I am having an alignment issue with the entries that I am entering in my table. I use inform3
class and the output looks like
Here are two important things: i) when I use .
in any of the entry, it messes up the entire table as shown here. ii) When I use math mode, it changes the numbers. For instance, if I use $67.1$
, it shows me 80 for some reason.
\begin{sidewaystable}
\vspace*{20\baselineskip}
\setcellgapes{0pt}
\makegapedcells
\setlength\tabcolsep{2pt}
\sisetup{group-four-digits}
\centering
\caption{My Table}
\small
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}} l
*{2}{S[table-format=5.0]}
*{16}{S[table-format=6.0]} }
\toprule[\heavyrulewidth]
& & \multicolumn{4}{l}{{[}1{]}} & \multicolumn{4}{l}{{[}2{]}} & \multicolumn{4}{l}{{[}3{]}} & \multicolumn{4}{l}{{[}4{]}} \\
\cmidrule[\heavyrulewidth](lr){3-6} \cmidrule[\heavyrulewidth](lr){7-10} \cmidrule[\heavyrulewidth](lr){11-14} \cmidrule[\heavyrulewidth]{15-18} % <--- changed
$\mathbf{|V|}$ & $\mathbf{|m|}$ & \textbf{Status} & \textbf{\begin{tabular}[c]{@{}l@{}}Time\\ (sec)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}l@{}}Gap\\ ($\%$)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}l@{}}BB\\ Nodes\end{tabular}} & \textbf{Status} & \textbf{\begin{tabular}[c]{@{}l@{}}Time\\ (sec)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}l@{}}Gap\\ ($\%$)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}l@{}}BB\\ Nodes\end{tabular}} & \textbf{Status} & \textbf{\begin{tabular}[c]{@{}l@{}}Time\\ (sec)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}l@{}}Gap\\ ($\%$)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}l@{}}BB\\ Nodes\end{tabular}} & \textbf{Status} & \textbf{\begin{tabular}[c]{@{}l@{}}Time\\ (sec)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}l@{}}Gap\\ ($\%$)\end{tabular}} & \textbf{\begin{tabular}[c]{@{}l@{}}BB\\ Nodes\end{tabular}} \\
\midrule
500 & 10 & {status1} & 67.1 & 0.00 & 9639 & {status1} & 25.3 & 0.00 & 2301 & {status2} & 66.9 & 0.00 & 1335 & {status2} & 201.3 & 0.00 & 1479 \\
\bottomrule
\end{tabular*}
\label{table1}
\end{sidewaystable}
Gap
column is not centered. Also, I believe, it is probably related to using.
in the entry. Here how my table looks when I enter three rows imgur.com/LG19Soe