PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : problem mit setspace und threeparttable



René Geppert
03-01-2009, 14:53
\documentclass[listof=totoc]{scrartcl}
\usepackage[flushleft]{threeparttable}
\usepackage{tabularx,booktabs}
\usepackage{setspace}
\onehalfspacing

\begin{document}

\tableofcontents
\listoftables

\newpage

\begin{table}%
\begin{tabular}{lcr}
test & test2 & test3 \\
\end{tabular}
\caption{}
\label{}
\end{table}

\begin{threeparttable}\captionabove{Comparison1}
\begin{tabularx}{\textwidth}{@{}lX@{}}
\toprule
\multicolumn{2}{l}{\bfseries Commonalities} \\ \midrule
Election date & Generally at initial recognition or when assumptions that require the current recognition methods are no longer met. \\
Credit rating relevance & For financial liabilities the company's own credit standing has to be taken into account.\\
\bottomrule
\end{tabularx}
\end{threeparttable}

\begin{table}\captionabove{Comparison2}
\begin{threeparttable}
\begin{tabularx}{\textwidth}{@{}lX@{}}
\toprule
\multicolumn{2}{l}{\bfseries Commonalities} \\ \midrule
Election date & Generally at initial recognition or when assumptions that require the current recognition methods are no longer met. \\
Credit rating relevance & For financial liabilities the company's own credit standing has to be taken into account.\\
\bottomrule
\end{tabularx}
\end{threeparttable}
\end{table}

\end{document}


2 probleme:

1. setspace ändert den zeilenabstand einer threeparttable; allerdings nicht, wenn man die threeparttable in eine tableumgebung packt, was eigentlich sinnlos ist, da threeparttable ein eigene captionfunktion hat
gibts ne elegantere lösung?
2. wieso ist die tabellenreihenfolge im tabellenverzeichnis vertauscht?

mfg

mechanicus
03-01-2009, 15:07
1. setspace ändert den zeilenabstand einer threeparttable; allerdings nicht, wenn man die threeparttable in eine tableumgebung packt, was eigentlich sinnlos ist, da threeparttable ein eigene captionfunktion hat
gibts ne elegantere lösung?
Table ist eine eigene Umgebung, mit vordefinierten Zeilenabstand. Würdest du nur Tabular in den Fließtext einbinden, hätte diese Umgebung auch den Zeilenabstand von setspace.



2. wieso ist die tabellenreihenfolge im tabellenverzeichnis vertauscht?

Weil sie auch im Text vertauscht ist. Das liegt an der Gleitumgebung. Threeparttable alleine gleitet nicht.


\documentclass[listof=totoc]{scrartcl}
\usepackage[flushleft]{threeparttable}
\usepackage{tabularx,booktabs}
\usepackage{setspace}
\onehalfspacing

\begin{document}

\tableofcontents
\listoftables

\newpage

\begin{table}[ht]\centering
\begin{tabular}{lcr}
test & test2 & test3 \\
\end{tabular}
\caption{}
\label{}
\end{table}

\begin{threeparttable}\captionabove{Comparison1}
\begin{tabularx}{\textwidth}{@{}lX@{}}
\toprule
\multicolumn{2}{l}{\bfseries Commonalities} \\ \midrule
Election date & Generally at initial recognition or when assumptions that require the current recognition methods are no longer met. \\
Credit rating relevance & For financial liabilities the company's own credit standing has to be taken into account.\\
\bottomrule
\end{tabularx}
\end{threeparttable}

\begin{table}[ht]\captionabove{Comparison2}
\begin{threeparttable}
\begin{tabularx}{\textwidth}{@{}lX@{}}
\toprule
\multicolumn{2}{l}{\bfseries Commonalities} \\ \midrule
Election date & Generally at initial recognition or when assumptions that require the current recognition methods are no longer met. \\
Credit rating relevance & For financial liabilities the company's own credit standing has to be taken into account.\\
\bottomrule
\end{tabularx}
\end{threeparttable}
\end{table}

\end{document}