I used siunitx
package to align numbers as suggested here.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{siunitx}
\title{Test}
\date{August 2018}
\begin{document}
\maketitle
\section{Introduction}
\begin{tabular}{rS[table-format=8.2]}
\hline
True sigma used & \ 9.117647 \\
True pixel value & 67.000000 \\
\hline
Pixel Value & 67.025372 \\
Error & \ 0.025372 \\
Squared Error & \ 0.000643 \\
Predicted Sigma & \ 8.787887 \\
Iteration Number & \text{87/100} \\
\hline
\end{tabular}
\end{document}
However, the \hline
s do not go well with this I guess:
How do I fix this? Also, how do center align 87/100
or anything that's not a number?
Update : After @egreg 's comment, I noticed that changing table-format=8.2
to table-format=8.6
or table-format=x.6
(telling it to expect 6 digits after the decimal and x before it), hline alignment is gone :) Thanks.
I still have centering the text issue :/
r
toc
:\begin{tabular}{cS[table-format=8.2]}