I can create a longtable with numprint:
\documentclass{article}
\usepackage{numprint}
\usepackage{longtable}
\npdecimalsign{,}
\nprounddigits{2}
\begin{document}
\begin{longtable}{n{3}{2}}
-11,82405 \\[12ex] -12,44918 \\[12ex] -12,45381 \\[12ex] -12,52252 \\[12ex] -12,56154 \\[12ex] -12,41009 \\[12ex] -12,44918 \\[12ex] -12,41009 \\[12ex] -12,51782 \\[12ex] -12,48817 \\[12ex] -12,52252 \\[12ex] -12,56611 \\[12ex] -12,44918 \\[12ex] -12,37081 \\
\end{longtable}
\end{document}
However, I want to have the table rotated. (the MWE just shows a single one of several rows) I can do this with a regular tabular and sideways just fine:
\documentclass{article}
\usepackage{numprint}
\usepackage{rotating}
\begin{document}
\npdecimalsign{,}
\nprounddigits{2}
\begin{sideways}
\begin{tabular}{c|n{3}{2}||n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}}
& foo & \multicolumn{13}{c}{bar}\\
\hline
& -11,82405 & -12,44918 & -12,45381 & -12,52252 & -12,56154 & -12,41009 & -12,44918 & -12,41009 & -12,51782 & -12,48817 & -12,52252 & -12,56611 & -12,44918 & -12,37081 \\
\end{tabular}
\end{sideways}
\end{document}
All I get is an overfull HBox due to the height of the table. When I try to fix this with longtable, it explodes in my face with dozens of error messages that I do not understand at all:
\documentclass{article}
\usepackage{numprint}
\usepackage{rotating}
\usepackage{longtable}
\begin{document}
\npdecimalsign{,}
\nprounddigits{2}
\begin{sideways}
\begin{longtable}{c|n{3}{2}||n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}}
& foo & \multicolumn{13}{c}{bar}\\
\hline
& -11,82405 & -12,44918 & -12,45381 & -12,52252 & -12,56154 & -12,41009 & -12,44918 & -12,41009 & -12,51782 & -12,48817 & -12,52252 & -12,56611 & -12,44918 & -12,37081 \\
\end{longtable}
\end{sideways}
\end{document}
I use TexMaker 4.4.1, which didn't let me copy all the messages at once so I made a screenshot:
It looks like its complaining about internal stuff.
I have the feeling that the environments sideways and longtable do not go together well. Is this the case? How do I solve this?
Use the
landscapeenvironment (fromlscapeorpdflscapepackages) to rotate alongtable.
That doesn't seem to work. Using landscape instead of sideways, the longtable is not distributed across multiple pages, but shoots out above the top of page 1, as can be seen on the right in the following screenshot:
\documentclass{article}
\usepackage{numprint}
\usepackage{lscape}
\usepackage{longtable}
\begin{document}
\npdecimalsign{,}
\nprounddigits{2}
\begin{landscape}
\begin{longtable}{c|n{3}{2}||n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}|n{3}{2}}
& foo & \multicolumn{13}{c}{bar}\\
\hline
& -11,82405 & -12,44918 & -12,45381 & -12,52252 & -12,56154 & -12,41009 & -12,44918 & -12,41009 & -12,51782 & -12,48817 & -12,52252 & -12,56611 & -12,44918 & -12,37081 & -12,37081 & -12,37081 & -12,37081 & -12,37081 & -12,37081 & -12,37081 & -12,37081 & -12,37081 & -12,37081 \\
\end{longtable}
\end{landscape}
\end{document}

