Sorry for my incorrect English.
This question is probably already asked by someone, but I found nothing related, so
Here is my code:
\documentclass[paper = landscape, pagesize, twocolumn, table, ngerman]{scrartcl}%table: for color tables
\usepackage[margin = 5mm, bottom = 25mm]{geometry}
\usepackage{babel, xcolor, float}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenx}
\rowcolors{2}{black!10}{black!30}%alternating row colors in tables
\begin{document}
\section{Punktetabelle}
\begin{table}[H]
\caption{Punktetabelle}
\begin{tabular*}{\linewidth}{cr}\rowcolor{black!50}%makes the first line darker
Aufgabe & erreichbare Punktzahl\\
\multicolumn{2}{c}{1.~Vorbereitung}\\
a) & /9\\
b) & /3\\
c) & /2\\
d) & /2\\
$\Sigma$ & /16\\
2.~Durchführung & /8\\
\multicolumn{2}{c}{3.~Auswertung}\\
a) & /3\\
b) & /2\\
c) & /2\\
d) & /2\\
$\Sigma$ & /9\\
4.~Fazit & /2
\end{tabular*}
\end{table}
\textbf{Gesamt}:\quad/35
\end{document}
And the result:
The table is left aligned. Why? I wish a centering aligning. How can I make this?
Using \centering
or \begin{center}
... \end{center}
changes nothing. Here the code besides:
\documentclass[paper = landscape, pagesize, twocolumn, table, ngerman]{scrartcl}%table: for color tables
\usepackage[margin = 5mm,bottom = 25mm]{geometry}
\usepackage{babel, xcolor, float}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenx}
\rowcolors{2}{black!10}{black!30}
\begin{document}
\section{Punktetabelle}
\begin{table}[H]
\caption{Punktetabelle}
\centering
\begin{tabular*}{\linewidth}{cr}\rowcolor{black!50}
Aufgabe & erreichbare Punktzahl\\
\multicolumn{2}{c}{1.~Vorbereitung}\\
a) & /9\\
b) & /3\\
c) & /2\\
d) & /2\\
$\Sigma$ & /16\\
2.~Durchführung & /8\\
\multicolumn{2}{c}{3.~Auswertung}\\
a) & /3\\
b) & /2\\
c) & /2\\
d) & /2\\
$\Sigma$ & /9\\
4.~Fazit & /2
\end{tabular*}
\end{table}
\textbf{Gesamt}:\quad/35
\end{document}
The result is the same as above. And:
\documentclass[paper = landscape, pagesize, twocolumn, table, ngerman]{scrartcl}
\usepackage[margin = 5mm, bottom = 25mm]{geometry}
\usepackage{babel, xcolor, float}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenx}
\rowcolors{2}{black!10}{black!30}
\begin{document}
\section{Punktetabelle}
\begin{table}[H]
\caption{Punktetabelle}
\begin{center}
\begin{tabular*}{\linewidth}{cr}\rowcolor{black!50}
Aufgabe & erreichbare Punktzahl\\
\multicolumn{2}{c}{1.~Vorbereitung}\\
a) & /9\\
b) & /3\\
c) & /2\\
d) & /2\\
$\Sigma$ & /16\\
2.~Durchführung & /8\\
\multicolumn{2}{c}{3.~Auswertung}\\
a) & /3\\
b) & /2\\
c) & /2\\
d) & /2\\
$\Sigma$ & /9\\
4.~Fazit & /2
\end{tabular*}
\end{center}
\end{table}
\textbf{Gesamt}:\quad/35
\end{document}
Again the same result as above.
Also any other optimization is welcome too.
Thank you for your help and effort in advance!
\begin{table*}...\end{table*}
\centering
works, if you change to the non-starred version oftabular
. I guess forcing the table to stretch to\linewidth
(even though there is no content requiring it) makes centering impossible.