PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Floatrow und Sidewaystable



Wurst09
04-08-2010, 22:55
Guten Abend,
ich hab noch ein Problem beim Benutzen von Floatrow und Sidewaystable.
Beim Kompilen bekomme ich den Fehler

! Package floatrow Error: Caption(s) lost.
See the floatrow package documentation for explanation.

Das Handbuch von floatrow sagt aber nichts über sidewaystable...

Über Ideen wäre ich sehr dankbar.

Beste Grüße,

Wurst



\documentclass{scrreprt}
\usepackage[ngerman]{babel}
\usepackage[latin1]{inputenc}

\usepackage{subfig}
\usepackage{rotating}
\usepackage{floatrow}

\begin{document}

\begin{sidewaystable}[htb]
\centering
\begin{tabular}{l|ccc|ccc|ccc|ccc}
& \multicolumn{3}{c|}{Test 1} & \multicolumn{3}{c|}{Test 2} & \multicolumn{3}{c|}{Test 3} & \multicolumn{3}{c}{Test 4}\\
& Z & S & NN & Z & S & NN & Z & S & NN & Z & S & NN \\ \hline
A & 41497 & 20881 & 106684 & 44808 & 20881 & 109996 & 82824 & 20881 & 189196 & 69720 & 17569 & 159964 \\
B & 41497 & 20881 & 121248 & 44808 & 20881 & 124560 & 82824 & 20881 & 203760 & 69720 & 17569 & 174528 \\
\end{tabular}
\caption{Erste Tabelle}
\vspace{2em}
\begin{tabular}{l|ccc|ccc|ccc|ccc}
& \multicolumn{3}{c|}{Test 1} & \multicolumn{3}{c|}{Test 2} & \multicolumn{3}{c|}{Test 3} & \multicolumn{3}{c}{Test 4}\\
& Z & S & NN & Z & S & NN & Z & S & NN & Z & S & NN \\ \hline
A & 20453 & 17713 & 94484 & 4900 & 10585 & 60874 & 18878 & 8857 & 72286 & 18878 & 8857 & 71406 \\
B & 35017 & 17713 & 151696 & 12180 & 10585 & 80393 & 26160 & 8857 & 93200 & 26160 & 8857 & 93200 \\
\end{tabular}
\caption{Zweite Tabelle}
\end{sidewaystable}

\end{document}

lockstep
04-08-2010, 23:13
Verwende den Befehl \ttabbox - packe dabei die jeweilige tabular-Umgebung in das erste und \caption in das zweite Argument. (S. 14 der floatrow-Doku erwähnt die Fehlermeldung "lost caption" und Lösungsmöglichkeiten.)



\documentclass{scrreprt}
\usepackage[ngerman]{babel}
\usepackage[latin1]{inputenc}

\usepackage{subfig}
\usepackage{rotating}
\usepackage{floatrow}

\begin{document}

\begin{sidewaystable}[htb]
\centering
\ttabbox{%
\begin{tabular}{l|ccc|ccc|ccc|ccc}
& \multicolumn{3}{c|}{Test 1} & \multicolumn{3}{c|}{Test 2} & \multicolumn{3}{c|}{Test 3} & \multicolumn{3}{c}{Test 4}\\
& Z & S & NN & Z & S & NN & Z & S & NN & Z & S & NN \\ \hline
A & 41497 & 20881 & 106684 & 44808 & 20881 & 109996 & 82824 & 20881 & 189196 & 69720 & 17569 & 159964 \\
B & 41497 & 20881 & 121248 & 44808 & 20881 & 124560 & 82824 & 20881 & 203760 & 69720 & 17569 & 174528 \\
\end{tabular}
}{\caption{Erste Tabelle}}
\vspace{2em}
\ttabbox{%
\begin{tabular}{l|ccc|ccc|ccc|ccc}
& \multicolumn{3}{c|}{Test 1} & \multicolumn{3}{c|}{Test 2} & \multicolumn{3}{c|}{Test 3} & \multicolumn{3}{c}{Test 4}\\
& Z & S & NN & Z & S & NN & Z & S & NN & Z & S & NN \\ \hline
A & 20453 & 17713 & 94484 & 4900 & 10585 & 60874 & 18878 & 8857 & 72286 & 18878 & 8857 & 71406 \\
B & 35017 & 17713 & 151696 & 12180 & 10585 & 80393 & 26160 & 8857 & 93200 & 26160 & 8857 & 93200 \\
\end{tabular}
}{\caption{Zweite Tabelle}}
\end{sidewaystable}

\end{document}


lockstep

Wurst09
05-08-2010, 08:51
Hallo lockstep,
danke für die schnelle Antwort, klappt einwandfrei. Ich habe zwar die floatrow-Doku gelesen und auch den Abschnitt über "lost caption" gefunden. Allerdings war mir nicht bewusst, dass sich die dort erwähnt Lösung so einfach auch auf sidewaystables übertragen lässt.
Nächstes Mal werde ich wohl noch ein wenig mehr herumexperimentieren...

Schöne Grüße,

Wurst