Graphics, Figures & TablesCan't use siunitx and beamer because I get an error message

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
LavaTyper
Posts: 69
Joined: Sat Feb 11, 2012 2:38 am

Can't use siunitx and beamer because I get an error message

Post by LavaTyper »

Greetings I brought a table from a document that was using siunitx into a beamer presentation and now the table won't work. I get an error message and it just keeps repeating:

"Missing control sequence inserted.
<inserted text>
\inaccessible"

What's going on?

Code: Select all

\documentclass{beamer}
\usepackage{siunitx}

\begin{document}


\begin{frame}

\begin{table}[h]
\centering
\begin{tabular}{rcS[table-number-alignment = center, table-figures-integer=5]}
\textbf{Right1} & \textbf{Center2} & \textbf{Siunitx3} \\
\hline
content & A & 114 \\
content content & B & 307 \\
content & C & 171 & 44 \\
content & D & 170 & 76 \\
\hline
\end{tabular}
\end{table}

\end{frame}


\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

esdd
Posts: 36
Joined: Sat Jan 25, 2014 9:13 pm

Can't use siunitx and beamer because I get an error message

Post by esdd »

There are four columns instead of three in the last two rows. And you have to use {\textbf{Siunitx3}}

Code: Select all

\documentclass{beamer}
\usepackage{siunitx}
\usepackage{lmodern}

\begin{document}
\begin{frame}
  \centering
  \begin{tabular}{rcS[table-number-alignment = center, table-figures-integer=5]}
    \textbf{Right1} & \textbf{Center2} & {\textbf{Siunitx3}} \\
    \hline
    content & A & 114 \\
    content content & B & 307 \\
    content & C & 171 \\
    content & D & 170 \\
    \hline
  \end{tabular}
\end{frame}
\end{document}
Best regards
Elke
Post Reply