I am trying the following table that I found online, but there is an error in the specific lines:
\begin{tabular}{%
>{\begin{math}}c<{\end{math}}
I don't know what is causing the latex compiler to complain. The error message is
unclosed \begin{tabular} found at \end{math} unclosed open group { found at \end{math}
Any ideas?
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{array,booktabs}
\usepackage{siunitx}
\usepackage{etoolbox}
\begin{document}
\begin{tabular}{%
>{\begin{math}}c<{\end{math}} % first column centered in math mode
S[% second column uses siunitx
output-exponent-marker = {\mathrm{E}},% use `E' as exponent marker
print-implicit-plus,% add + to positive numbers
reset-text-family=false,% use active text font (\ttfamily)
mode=text,% print as text
table-format=1.15e2,% one integer digit, 14 decimal digits, 2 exponent digits
minimum-decimal-digits=15,% pad to 14 decimal places
group-digits=false% don't put digits in blocks of 3
]}
\midrule
\multicolumn{1}{c}{\textrm{\textbf{Variable}}} & \multicolumn{1}{c}{\textrm{\textbf{magnitude}}} \\
\toprule
x_{1} & 8.337723370858222e-01 \\
y_{2} & -3.690152225162680e-01 \\
z_{3} & 7.763961719898990e-01 \\
\bottomrule
\end{tabular}
\end{document}
\endgroup
after table. Remove it!