I am trying to make the follwing longtable shown in the picture below
I have however two questions ?
- How can I center the items of the 1st,2nd,3rd and 5th column ( Rotation, Material etc..)
- How can I set the width of the 3 column (a lot of white space)
I would be very thankful if anybody could give me a hint here.
Here is the code I used
\usepackage[ngerman]{babel}
%Tabellen
\usepackage{longtable} % Paket für Tabellen, die über mehrere Seiten gehen
\usepackage{multicol}
\usepackage{array}
\usepackage{caption}
\begin{document}
\centering
\begin{longtable}{|c|c|c|c|c|c|c|}
\caption[Darstellung der verschiedenen Parameter beider Versuchsgeneratoren]{Darstellung der verschiedenen Parameter beider Versuchsgeneratoren} \label{tab:Darstellung der verschiedenen Parameter beider Versuchsgeneratoren} \\
\hline
\multicolumn{1}{|c|}{\textbf{-}} &
\multicolumn{1}{c|}{\textbf{-}} &
\multicolumn{2}{c|}{\textbf{Druckplatte}} &
\multicolumn{2}{c|}{\textbf{Pressfinger}} &
\multicolumn{1}{c|}{\textbf{Polschuh}}\\
\hline
\endfirsthead
\multicolumn{3}{c}%
{{\bfseries \tablename\ \thetable{} -- Fortsetzung von vorheriger Seite}} \\
\hline
\multicolumn{1}{|c|}{\textbf{-}} &
\multicolumn{1}{c|}{\textbf{-}} &
\multicolumn{2}{c|}{\textbf{Druckplatte}} &
\multicolumn{2}{c|}{\textbf{Pressfinger}} &
\multicolumn{1}{c|}{\textbf{Polschuh}}\\
\hline
\endhead
\hline
\multicolumn{3}{|r|}{{Fortsetzung auf der nächsten Seite}} \\ \hline
\endfoot
\hline
\hline
\endlastfoot
\textbf{Nr.} & Luftspaltsflussdichte & Material & Axiale & Rotation in ° & Radiale & Axiale \\
& & & Position & & Position & Position \\
\hline
& & & & & & \\
\hline
& & & & & & \\
\hline
& & & & & & \\
\hline
& & & & & & \\
\hline
& & & & & &\\
\hline
& & & & & & \\
\hline
& & & & & & \\
\hline
& & & & & & \\
\hline
& & & & & & \\
\hline
& & & & & & \\
\hline
& & & & & & \\
\hline
& & & & & & \\
\hline
& & & & & & \\
\hline
& & & & & &\\
\hline
& & & & & & \\
\hline
& & & & & & \\
\hline
& & & & & & \\
\hline
& & & & & & \\
\hline
& & & & & & \\
\hline
& & & & & & \\
\end{longtable}
\end{document}
\begin{tabular}{|P{3cm}|P{2cm}|P{2cm}|P{2cm}|P{2cm}|P{2cm}|} \hline My first column & Data & Data & Data & Data & Data \\ \hline & & & & &\\ \hline \end{tabular}
and you can you this code inside the\begin{table} \end{table}
environment hope this can help in any way