Seite 1 von 1

Tabelle passt nicht auf eine Seite -> passt doch?

Verfasst: So 18. Mai 2014, 18:16
von BlackDevil
Hallo zusammen,

ich habe eine Tabelle und die macht Probleme (sach bloß ... :D ).

Erstmal die Tabelle:
\documentclass{scrartcl}
	\usepackage{multirow}
	\usepackage{ltxtable}
	\usepackage{booktabs}
	\usepackage[locale=DE]{siunitx}
    
\begin{document}
\begin{table}[h]
				\centering
				\begin{tabularx}{\linewidth}{S S S S S}
					\toprule
	\multirow{2}{*}{Factor} & \multicolumn{2}{c}{Number of neurons} & \multirow{2}{*}{Mean BMU} & \multirow{2}{*}{Topology Error} \\
                        & \multicolumn{1}{c}{Computed}  &\multicolumn{1}{c}{Neuro}   &                           &                                \\\midrule
					5 & 28 & 27 & 689E-3 & 28.169\% \\
					10 & 57 & 60 & 420E-3 & 7.746\%\\
					100 & 566 & 612 & 12.8E-03 & 9.155\%\\
					1000 & 5657 & 6213 & 0.911E-03 & 1.409\%\\
					10000 & 56569 & 62062 & 0.780E-03 & 2.817\%\\
				\end{tabularx}
				\caption{Summary of the experiment}
				\label{fig:summary_dif_mapsize}
			\end{table}
\end{document}
Kann ich nun die Zahlen irgendwie an den Zehnerpotenz ausrichten? So sieht es blöd aus und ich würde ungern unterschiedliche Zehnerpotenzen verwenden (wegen der Vergleichbarkeit)

Ich hoffe mir kann jemand weiter helfen.

Viele Grüße

Verfasst: So 18. Mai 2014, 20:46
von Johannes_B
\documentclass{scrartcl}
   \usepackage{multirow}
   \usepackage{ltxtable}
   \usepackage{booktabs}
   \usepackage[locale=DE]{siunitx}
   
\begin{document}
\begin{table}[h]
            \centering
            \caption{Summary of the experiment}
            \label{fig:summary_dif_mapsize}
            \begin{tabularx}{\linewidth}{S S S S S}
               \toprule
   \multirow{2}{*}{Factor} & \multicolumn{2}{c}{Number of
   neurons} & \multirow{2}{*}{Mean BMU /\num{e-3}} &
   \multirow{2}{*}{Topology Error /\si{\percent}} \\
                        & \multicolumn{1}{c}{Computed}  &\multicolumn{1}{c}{Neuro}   &                           &                                \\\midrule
               5     & 28    & 27    & 689   & 28.169 \\
               10    & 57    & 60    & 420   & 7.746\\
               100   & 566   & 612   & 12.8  & 9.155\\
               1000  & 5657  & 6213  & 0.911 & 1.409\\
               10000 & 56569 & 62062 & 0.780 & 2.817\\
            \end{tabularx}
         \end{table}
\end{document} 

Verfasst: Di 20. Mai 2014, 12:51
von sudo
Es gibt bei siunitx auch noch den \tablenum Befehl.

Verfasst: Di 20. Mai 2014, 15:32
von BlackDevil
Danke Johannes, aber das war immer noch etwas wirr an den Kommas sortiert :)

Danke sudo, du hast mich auf den richtigen Weg gebracht:
\documentclass{scrartcl} 
   \usepackage{multirow} 
   \usepackage{ltxtable} 
   \usepackage{booktabs} 
   \usepackage[copy-decimal-marker,locale=DE]{siunitx} 
    
\begin{document} 
\begin{table}[h] 
            \centering 
            \sisetup{table-sign-exponent}
            \begin{tabularx}{\linewidth}{S S S S S} 
               \toprule 
   \multirow{2}{*}{Factor} & \multicolumn{2}{c}{Number of neurons} & \multirow{2}{*}{Mean BMU} & \multirow{2}{*}{Topology Error} \\ 
                        & \multicolumn{1}{c}{Computed}  &\multicolumn{1}{c}{Neuro}   &                           &                                \\\midrule 
               5 & 28 & 27 & 689.000 E-3 & 28.169\% \\ 
               10 & 57 & 60 & 420.000 E-3 & 7.746\%\\ 
               100 & 566 & 612 & 12.800 E-03 & 9.155\%\\ 
               1000 & 5657 & 6213 & 0.911 E-03 & 1.409\%\\ 
               10000 & 56569 & 62062 & 0.780 E-03 & 2.817\%\\ 
            \end{tabularx} 
            \caption{Summary of the experiment} 
            \label{fig:summary_dif_mapsize}  
\end{table} 
\end{document}
So passt das