Seite 1 von 1

table zerstört Layout von tabular

Verfasst: Mi 18. Mär 2015, 10:42
von yvlu
Hallo

Ich habe eine schöne Tabelle mit tabular* erstellt, wenn ich nun die Umgebung von table integriere damit ich eine caption einfügen kann wird die Tabelle unansehnlich verdrückt. Kann man das irgendwie verhindern?

Vielen Dank für euere Hilfe!

Yves
\begin{table}[!ht]

\begin{tabular*}{\textwidth}{@{\extracolsep{\fill} }lllllllllll}
\cline{1-3}
\textbf{Job \emph{j}} & \textbf{1} & \textbf{2} & \textbf{3} & \textbf{4} & \textbf{5} & \textbf{6} & \textbf{7} & \textbf{8} & \textbf{9} & \textbf{10} \\
\hline
process time \emph{$p_{j}$} & 6 & 1 & 9 & 9 & 7 & 6 & 10 & 9 & 2 & 1  \\
due date \emph{$d_{j}$} & 5 & 20 & 15 & 8 & 30 & 55 & 52 & 56 & 39 & 32 \\
\hline
\textbf{Job \emph{j}} & \textbf{11} & \textbf{12} & \textbf{13} & \textbf{14} & \textbf{15} & \textbf{16} & \textbf{17} & \textbf{18} & \textbf{19} & \textbf{20}\\
\hline
process time \emph{$p_{j}$} & 7 & 5 & 5 & 7 & 2 & 5 & 20 & 15 & 8 & 30  \\
due date \emph{$d_{j}$} & 77 & 79 & 60 & 63 & 85 & 86 & 95 & 109 & 108 & 100  \\
\hline
\textbf{Job \emph{j}} & \textbf{21} & \textbf{22} & \textbf{23} & \textbf{24} & \textbf{25} & \textbf{26} & \textbf{27} & \textbf{28} & \textbf{29} & \textbf{30}\\
\hline
process time \emph{$p_{j}$} & 55 & 52 & 56 & 39 & 32 & 77 & 79 & 60 & 63 & 85\\
due date \emph{$d_{j}$} & 140 & 121 & 127 & 139 & 135 & 145 & 166 & 158 & 155 & 176 \\
\hline
\end{tabular*}

\caption{a floating test table.}
\label{tab:testtab1}
\end{table}

Verfasst: Mi 18. Mär 2015, 11:25
von Besserwisser
Das Problem ist wieder einmal wegen der Verwendung eines Code-Schnippsels anstelle eines Minimalbeispiels nicht reproduzierbar. Wenn ich das zu einem Minimalbeispiel ergänze, erhalte ich mit oder ohne table-Umgebung immer dieselbe Tabelle. Wirklich schön ist die in beiden Fällen nicht. was man aber mit Hilfe von booktabs durchaus leicht beheben kann, indem man die \cline und \hline durch dessen Linien-Befehle ersetzt.

Verfasst: Mi 18. Mär 2015, 18:18
von yvlu
Vielen Dank für deine Antwort. Dies hat mein Problem jedoch noch nicht ganz gelöst. Sobald ich table drum rum hänge wird der Abstand zur oberen Line verkleinert. Kann man das nicht beheben?

Neuer versuch mit einem Minimalbeispiel
\documentclass[11pt, oneside]{article}


\usepackage[square, numbers, comma, sort&compress]{natbib}

\usepackage{booktabs}
\usepackage{array}

\begin{document}

\begin{table}
 \begin{tabular}{@{}llr@{}} \toprule
 \multicolumn{2}{c}{Artikel} \\ \cmidrule(r){1-2}
 Tier  & Beschreibung & Preis (\$)\\ \midrule
 Mucke & pro Gramm    & 13.65 \\
       & pro Stuck    & 0.01 \\
 Gnu   & ausgestopft  & 92.50 \\
 Emu   & ausgestopft  & 33.33 \\
 Gurteltier & gefroren & 8.99 \\ \bottomrule
 \end{tabular}
\end{table}
 \begin{tabular}{@{}llr@{}} \toprule
 \multicolumn{2}{c}{Artikel} \\ \cmidrule(r){1-2}
 Tier  & Beschreibung & Preis (\$)\\ \midrule
 Mucke & pro Gramm    & 13.65 \\
       & pro Stuck    & 0.01 \\
 Gnu   & ausgestopft  & 92.50 \\
 Emu   & ausgestopft  & 33.33 \\
 Gurteltier & gefroren & 8.99 \\ \bottomrule
 \end{tabular}

\end{document}

Verfasst: Mi 18. Mär 2015, 18:35
von Noch so einer
Stell mal eine andere Vergrößerungsstufe im Viewer ein oder mach einen Ausdruck. Ich kann das Problem nämlich nicht sehen (hier absichtlich groß):

Bild

Bei Verkleinerung im Viewer und der geringen Auflösung des Bildschirms kommt es durch Rundung schon mal um eine Verschiebung um einen Pixel. Auch eigentlich gleich dicke Linien werden je nach Position mal dicker oder dünner angezeigt. Davon sollte man sich nicht irritieren lassen.

Verfasst: Mi 18. Mär 2015, 18:54
von yvlu
Jap, vielen Dank! Dummer Fehler...