PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Tabellenprob zum X.Mal



Kieselsteinchen
30-09-2006, 20:28
Hallo,
ich habe hier zwei Seiten, auf denen jeweils eine große Tabelle steht.
Beide Seiten werden mit \newpage getrennt.
Dummerweise passt die zweite Tabelle dann nicht mehr auf ihre Seite.
Ich habe es stattdessen mal mit einem \clearpage zwischen den Tabellen probiert und siehe da, beiden Tabellen passen auf ihre Seite, allerdings ist auch nun zwischen ihnen eine leere Seite. Sehr dumm. Ich habe mit \tabcolsep0pt in Tabelle 2 rumgespielt, dann passt sie zwar wieder auf die Seite bei Nichtverwendung von \clearpage, aber der es ist kein Abstand mehr zwischen Text und Zeilen/Spaltenlinie.

Könntet ihr mir einen Tipp geben?

Unten befindet sich ein Minimalbeispiel. Na ja, soweit man das noch so nennen kann. Aber es funktioniert bei mir.
Hierzu die Fragen:
1. Wie bekommt man Tabelle 2 auf eine Seite oder am leichtesten umgebrochen auf 2 Seiten?
2. In Tabelle 2 ist überhaupt kein Abstand zwischen Text und Linien. Wie kann man das verbessern?
3. Wie bekommt man in Tabelle 1 "Salary scale" richtig in die Box.

Über jeden Verbesserungsvorschlag wäre ich super dankbar.


\documentclass[a5paper,twoside,10pt]{article}


% direct input of special characters like ��
\usepackage[latin1]{inputenc}

% support of english and german parts
\usepackage[ngerman,english]{babel}

% page layout
\usepackage[a5paper,includeheadfoot,twoside,bindingoffset=1.5c m,margin=1.3cm,top=1cm,bottom=1cm]{geometry}

% nicer font with EURO-symbol \euro
% fourier-package might cause some errors on older unix/linux systems
%\usepackage{fourier}
%\usepackage[scaled=0.875]{helvet}
%\renewcommand{\ttdefault}{lmtt}
\usepackage{eurosym}
%\usepackage{microtype} % nicer justify

% some usefull packages
\usepackage{pict2e}
\usepackage{array} % for better arrays (eg matrices) in maths
\usepackage{slashbox} % diagonal lines in a cell
\usepackage{tabularx} % width control of tables and more
\usepackage{booktabs} % nicer tables
\usepackage{subfigure} % make it possible to include more than one captioned figure/table in a single float
\usepackage{xspace}
\usepackage[pdftex]{graphicx} %[draft] erstezt Bilder durch leere Boxen mit Dateinamen
\usepackage{float}
\usepackage{multirow}
\usepackage{amsmath,amssymb,amsfonts}
%\numberwithin{equation}{section}
\usepackage{rotating}

% multiple bibliographys
%\usepackage[subsectionbib]{bibunits}
\usepackage{multibib}

% adaptation of section and subsection font style
\usepackage{titlesec}
\titleformat*{\section}{\normalsize\bfseries}
\titleformat*{\subsection}{\normalsize\bfseries}

% caption of figures
\usepackage{caption}
\captionsetup{font={small,sl},labelfont=bf,indenti on=0.5cm,width=.9\textwidth}

% headers and footers
\usepackage{fancyhdr}
\pagestyle{fancy}
\cfoot{\thepage}

% disable single lines at the start of a paragraph (Schusterjungen)
\clubpenalty = 10000

% disable single lines at the end of a paragraph (Hurenkinder)
\widowpenalty = 10000 \displaywidowpenalty = 10000


% right align text in columns
\newcolumntype{R}{>{\raggedleft\arraybackslash}X}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\newcolumntype{C}{>{\centering\arraybackslash}X}





%
% staffing table 3.7.1
%
\usepackage{longtable}
\newenvironment{staffing}{

% distatance to text before
% do not remove this empty line

\noindent
\\
\sideways %start rotate
% start table
\footnotesize

\tabularx{0.95\textheight}{|L|L|p{1.5cm}|L|L|p{1cm }|}
\cline{2-6}
\multicolumn{1}{C|}{}& Name, acad. Title, position & Field of research & Department of the university or non-university institution & Work performed in the project in hours/week (consultancy: C) & Salary scale \\
\hline
\multicolumn{6}{|L|}{Core support}\\
\hline
\multicolumn{1}{|L|}{ 3.8.1.1 Research assistants (incl. student assistants)}
%\hline
}%Hier zwischen die Inhalte.
{
% end of table
\endtabularx
\endsideways %end rotate
\\ %distance to text after
}

% commands for staffing-table
\newcommand{\coreresearchassistants}[5]{ & #1 & #2 & #3 & #4 &#5\\ \cline{2-6}}
%\newcommand{\auxcorenon}{\hline \multicolumn{1}{|L|}{3.8.1.2 Non-scientific assistants}}
\newcommand{\corenon}{\hline \multicolumn{1}{|L|}{ 3.8.1.2 Non-scientific assistants}}
\newcommand{\corenonscientificassistant}[3]{ & #1& ---& #2& #3 & --- \\ \cline{2-6}}
\newcommand{\auxres}{\hline \multicolumn{6}{|L|}{ Auxiliary support}\\
\hline
\multicolumn{1}{|L|}{ 3.8.1.3 Research assistants (incl. student assistants)}}
\newcommand{\auxresearchassistants}[5]{ & #1 & #2 & #3 & #4 & #5\\ \cline{2-6}}
\newcommand{\auxnonsci}{\hline \multicolumn{1}{|L|}{ 3.8.1.4 Non-scientific assistants}}
\newcommand{\auxnonscientificassistant}[4]{ & #1 & ---& #2 & #3 & #4 \\ \hline}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%

%
% table 3.7
%

\newlength{\auxcol}
\setlength{\auxcol}{0.1\textheight}
\newlength{\auxcolinstru}
\settowidth{\auxcolinstru}{instrumentation}
\newcolumntype{I}{>{\centering\arraybackslash}p{\auxcolinstru}}
\newenvironment{auxsupport}{
% distance to text before
% do not remove this empty line
\footnotesize

\noindent
\\
\sideways %start rotate
% start table
\tabularx{\textheight}{|p{\auxcol}|*{15}{X|}}
\hline
& \multicolumn{ 3}{|I}{test}& \multicolumn{ 3}{|I}{test}& \multicolumn{ 3}{|I}{test}& \multicolumn{ 3}{|I}{test}& \multicolumn{ 3}{|I|}{test}\\
\hline
\multicolumn{16}{|l|}{}\\
\hline
Funding for staff &
Salary scale& No.& Sum k\euro&
Salary scale& No.& Sum k\euro&
Salary scale& No.& Sum k\euro&
Salary scale& No.& Sum k\euro&
Salary scale& No.& Sum k\euro \\
\hline
}
{% end of table
\endtabularx
\endsideways %end rotate
\\ %distance to text after
}

% commands for staffing-table
% splitted becaus of 9-argument-limitation for latex-commands
\newcommand{\auxstafffirst}[9]{ & #1& #2& #3& #4& #5& #6& #7& #8& #9&}
\newcommand{\auxstafflast}[6]{#1& #2& #3& #4& #5& #6 \\ \hline}
\newcommand{\auxstafftotalfirst}[6]{& total: & #1& #2& total:& #3& #4& total:& #5& #6&}
\newcommand{\auxstafftotallast}[4]{total:& #1& #2& total:& #3& #4 \\ \hline}

\newcommand{\smallequipment}[5]{
\multicolumn{16}{|l|}{}\\
\hline
Funding for direct costs & \multicolumn{ 3}{|I}{Sum \euro}& \multicolumn{ 3}{|I}{Sum \euro}& \multicolumn{ 3}{|I}{Sum \euro}& \multicolumn{ 3}{|I}{Sum \euro}& \multicolumn{ 3}{|I|}{Sum \euro}\\
\hline
Small equipment (up to \euro 10,000) & \multicolumn{ 3}{|I}{#1}& \multicolumn{ 3}{|I}{#2}& \multicolumn{ 3}{|I}{#3}& \multicolumn{ 3}{|I}{#4}& \multicolumn{ 3}{|I|}{#5} \\
\hline}

\newcommand{\consumables}[5]{
Consumables & \multicolumn{ 3}{|I}{#1}& \multicolumn{ 3}{|I}{#2}& \multicolumn{ 3}{|I}{#3}& \multicolumn{ 3}{|I}{#4}& \multicolumn{ 3}{|I|}{#5} \\
\hline}

\newcommand{\labanimals}[5]{
Laboratory animals & \multicolumn{ 3}{|I}{#1}& \multicolumn{ 3}{|I}{#2}& \multicolumn{ 3}{|I}{#3}& \multicolumn{ 3}{|I}{#4}& \multicolumn{ 3}{|I|}{#5} \\
\hline}

\newcommand{\travel}[5]{
Travel & \multicolumn{ 3}{|I}{#1}& \multicolumn{ 3}{|I}{#2}& \multicolumn{ 3}{|I}{#3}& \multicolumn{ 3}{|I}{#4}& \multicolumn{ 3}{|I|}{#5} \\
\hline}

\newcommand{\other}[5]{
Other & \multicolumn{ 3}{|I}{#1}& \multicolumn{ 3}{|I}{#2}& \multicolumn{ 3}{|I}{#3}& \multicolumn{ 3}{|I}{#4}& \multicolumn{ 3}{|I|}{#5} \\
\hline}

\newcommand{\fundinginstrumentation}[5]{
\multicolumn{16}{|l|}{}\\
\hline
Funding for instrumentation (instruments exceeding \euro 10,000 gross) & \multicolumn{ 3}{|I}{Funding for instrumentation Total}& \multicolumn{ 3}{|I}{Funding for instrumentation Total}& \multicolumn{ 3}{|I}{Funding for instrumentation Total}& \multicolumn{ 3}{|I}{Funding for instrumentation Total}& \multicolumn{ 3}{|I|}{Funding for instrumentation Total}\\
\hline
~ & \multicolumn{ 3}{|I}{#1}& \multicolumn{ 3}{|I}{#2}& \multicolumn{ 3}{|I}{#3}& \multicolumn{ 3}{|I}{#4}& \multicolumn{ 3}{|I|}{#5} \\
\hline}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%

\begin{document}
\subsection{Auxiliary support for the project}
% --###--

\begin{auxsupport}
% funding for staff
\auxstafffirst
{test}{3}{testt}
{testt}{3}{testt}
{testt}{3}{testt}
\auxstafflast
{testt}{3}{testt}
{testt}{3}{testt}
{testt}{3}{testt}
% add more \auxstafffirst and \auxstafflast blocks for further lines

\auxstafftotalfirst
{2}{test}
{2}{test}
{2}{test}
\auxstafftotallast
{2}{test}
{2}{test}

% funding in direct costs
\smallequipment
{-} %
{-} %
{-} %
{-} %
{-} %

\consumables
{test} %
{test} %
{test} %
{Tesesttt} %
{test} %

\labanimals
{-} %
{-} %
{-} %
{-} %
{-} %

\travel
{-} %
{-} %
{-} %
{-} %
{-} %

\other
{-} %{1}
{-} %{2}
{-} %{3}
{-} %{4}
{-} %{5} %

\fundinginstrumentation
{testtest} %
{-}
{-}
{-}
{-}
\end{auxsupport}


% --### Please do not change the following lines! ###--
\clearpage
\subsubsection{Kellner bei der Arbeit}

% --###--
\begin{staffing}
\coreresearchassistants
{Einstein, Dr., Postdoc} % name, acad. title, position
{Relativität, Buuh RRRRRR Hhdhdhhd TestTest} % field of research
{Dampfschiff auf der Donau Dampfschiff auf der Donau} % department (german name)
{15} % work performed in project in hours/week (consultancy: C)
{Test} % Salary scale
\coreresearchassistants
{Einstein, Prof. Dr., Director} % name, acad. title, position
{Relativität, Buuh RRRRRR Hhdhdhhd TestTest} % field of research
{Dampfschiff auf der Donau Dampfschiff auf der Donau} % department (german name)
{5} % work performed in project in hours/week (consultancy: C)
{Test4} % Salary scale
\corenon
\corenonscientificassistant
{Newton, Dipl. Ing. Phys. Tech., Physicist}%{6} % name, acad. title, position
{Dampfschiff auf der Donau Dampfschiff auf der Donau} % department (german name)
{4} % work performed in project in hours/week (consultancy: C)
\corenonscientificassistant
{Frank, , Electronic Technician}%{6} % name, acad. title, position
{Dampfschiff auf der Donau Dampfschiff auf der Donau} % department (german name)
{4} % work performed in project in hours/week (consultancy: C)
\auxres
\auxresearchassistants
{N.N.} % name, acad. title, position
{Mechanik} % field of research
{Dampfschiff auf der Donau Dampfschiff auf der Donau} % department (german name)
{40} % work performed in project in hours/week (consultancy: C)
{Test} % Salary scale
\auxresearchassistants
{N.N.} % name, acad. title, position
{Dampfschiff auf der Donau} % field of research
{Dampfschiff auf der Donau Dampfschiff auf der Donau } % department (german name)
{40} % work performed in project in hours/week (consultancy: C)
{Test} % Salary scale
\auxresearchassistants
{N.N.} % name, acad. title, position
{Mechanik} % field of research
{Dampfschiff auf der Donau Dampfschiff auf der Donau Dampfschiff auf der Donau} % department (german name)
{40} % work performed in project in hours/week (consultancy: C)
{Test} % Salary scale
\auxnonsci
\auxnonscientificassistant
{}%{14} % name, acad. title, position
{}%{15} % department (german name)
{}%{16} % work performed in project in hours/week (consultancy: C)
{}%{17} % Salary scale
\end{staffing}
\end{document}