I'm getting this error message in a document, which contains three tables.
Error: Missing } inserted. \end{center} (followed by: )
I have no idea why, I reviewed it like ten times, but might overvlook something. Have a look at my code:
\documentclass[a4paper]{article}
\usepackage[german]{babel}
\usepackage[utf8]{inputenc}
\usepackage[margin={2cm,2cm}]{geometry}
\usepackage{color, colortbl}
\title{Addendum \\ Beispieldatenbanken}
\author{}
\date{}
\definecolor{Gray}{gray}{0.9}
\begin{document}
\setlength{\parindent}{0pt}
\maketitle
\section{Kunden}
\begin{center}
\tiny
\bgroup
\def\arraystretch{1.5}
\begin{tabular}{|l|l|l|l|l|}
\hline
\rowcolor{Gray}
KNr & Name & Stadt & Saldo & Rabatt \\
\hline
1 & Legrand & Genf & -1080,00 & 0.10 \\
\hline
2 & Mart & Basel & -800,00 & 0.20 \\
\hline
3 & Frei & Basel & 0,00 & 0.10 \\
\hline
4 & Janvier & Genf & 0,00 & 0.10 \\
\hline
5 & Rosi & Lugano & 0,00 & 0.05 \\
\hline
6 & Meier & Z"urich & -3800,00 & 0.05 \\
\hline
\end{tabular}
\end{center}
\section{Produkte}
\begin{center}
\tiny
\bgroup
\def\arraystretch{1.5}
\begin{tabular}{|l|l|l|l|l|l|}
\hline
\rowcolor{Gray}
Pnr & Bez & Gewicht & Preis & Lagerort & Vorrat \\
\hline
1 & Papier & 2000 & 20.00 & Basel & 10000 \\
\hline
2 & Platte & 1000 & 2500.00 & Z"urich & 400 \\
\hline
3 & Drucker & 5000 & 2000.00 & Genf & 200 \\
\hline
4 & Bildschirm & 5000 & 3000.00 & Genf & 80 \\
\hline
5 & CDs & 0.500 & 20.00 & Basel & 5000 \\
\hline
6 & Maus & 0.250 & 100.00 & Basel & 200 \\
\hline
7 & Speicher & 0.100 & 200.00 & Bern & 2000 \\
\hline
\end{tabular}
\end{center}
(...) % two other tables of the same form
\end{document}
This error message appears at every \end{center}
line. How can I fix this?
Best Answer
Remove the spurious
\bgroup
at the beginning of the table. It translates into{
which has then no counterpart.As well, I have to say a note about
\tiny
: modifying font size to fit a table in a given space is a very bad idea. I recommend you to look at therotating
package.