Longtable mit Zeilenumbruch

Antwort erstellen


Diese Frage dient dazu, das automatisierte Versenden von Formularen durch Spam-Bots zu verhindern.
Smilies
:D :) :( :o :shock: :? 8) :lol: :-x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:

BBCode ist eingeschaltet
[img] ist eingeschaltet
[flash] ist ausgeschaltet
[url] ist eingeschaltet
Smilies sind eingeschaltet

Die letzten Beiträge des Themas

Ich habe die Datenschutzerklärung gelesen und bin damit einverstanden.

   

Wenn du eine Datei oder mehrere Dateien anhängen möchtest, gib die Details unten ein.

Ansicht erweitern Die letzten Beiträge des Themas: Longtable mit Zeilenumbruch

von Bartman » Do 15. Nov 2018, 10:44

Sieh Dir in der Dokumentation von xcolor den Abschnitt 2.12 an.

von Gast007 » Do 15. Nov 2018, 10:32

Danke für den Hinweis, bei meiner Tabelle mit Messwerten sieht es tatsächlich ohne vertikale Linien besser aus. Ich habe aber auch eine Stückliste und da finde ich persönlich die Linien besser.

Gibt es eigentlich ein Paket, das die Aufgabe übernimmt oder müsste ich dann alles von Hand machen?

Off-Topic: Typografie von Tabellen

von Gast » Do 15. Nov 2018, 07:23

Ich würde stattdessen übrigens empfehlen, auf die ganzen vertikalen Linien zu verzichten. Die sind nicht nur überflüssig, sondern verschlechtern auch noch die Lesbarkeit, weil sie das Auge aus der Horizontalen zwingen. Stattdessen würde ich sogar überlegen, die Zeilen alternierend mit einem hellen Grau (oder einer anderen blassen Farbe) zu hinterlegen oder alle 3 oder 5 Zeilen den Zeilenabstand etwas zu vergrößern, um die Zeilenorientierung zu verbessern.

von Gast007 » Do 15. Nov 2018, 00:38

Perfekt, jetzt sehen alle Tabellen schön einheitlich aus. Vielen Dank!

von Bartman » Mi 14. Nov 2018, 18:47

Benutze den \multicolumn-Befehl aus Deinem Eröffnungsbeitrag.

von Gast007 » Mi 14. Nov 2018, 18:33

gibt es eine Möglichkeit um "Continued on next page" auch noch einen Rahmen zu zeichnen?

\documentclass{article}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage[per-mode=symbol]{siunitx}

\begin{document}
\begin{longtable}{|S|S|S|l|}
\caption{A sample long table.} 
\label{tab:long} \\
\hline
{Abstand} & {Kraft} & {Messunsicherheit} & Anmerkungen \\ 
{$s$ in \si{\mm}} & {$F$ in \si{\N}} & {$u$ in \si{\km\per\hour}} &\\
\hline
\endfirsthead

%\multicolumn{4}{c}%
%{{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\caption[]{continued from previous page}\\
\hline
{Abstand} & {Kraft} & {Messunsicherheit} & Anmerkungen \\ 
{$s$ in \si{\mm}} & {$F$ in \si{\N}} & {$u$ in \si{\km\per\hour}} &\\
\hline
\endhead

\hline
\multicolumn{4}{r}{{Continued on next page}} \\ 
\hline
\endfoot

\hline
\endlastfoot
1   &   55,55   &   123,4567   &   abcdef ghjkl   \\
2   &   55,55   &   123,4567   &   abcdef ghjkl   \\
3   &   55,55   &   123,4567   &   abcdef ghjkl   \\
4   &   55,55   &   123,4567   &   abcdef ghjkl   \\
5   &   55,55   &   123,4567   &   abcdef ghjkl   \\
6   &   55,55   &   123,4567   &   abcdef ghjkl   \\
7   &   55,55   &   123,4567   &   abcdef ghjkl   \\
8   &   55,55   &   123,4567   &   abcdef ghjkl   \\
9   &   55,55   &   123,4567   &   abcdef ghjkl   \\
10   &   55,55   &   123,4567   &   abcdef ghjkl   \\
11   &   55,55   &   123,4567   &   abcdef ghjkl   \\
12   &   55,55   &   123,4567   &   abcdef ghjkl   \\
13   &   55,55   &   123,4567   &   abcdef ghjkl   \\
14   &   55,55   &   123,4567   &   abcdef ghjkl   \\
15   &   55,55   &   123,4567   &   abcdef ghjkl   \\
16   &   55,55   &   123,4567   &   abcdef ghjkl   \\
17   &   55,55   &   123,4567   &   abcdef ghjkl   \\
18   &   55,55   &   123,4567   &   abcdef ghjkl   \\
19   &   55,55   &   123,4567   &   abcdef ghjkl   \\
20   &   55,55   &   123,4567   &   abcdef ghjkl   \\
21   &   55,55   &   123,4567   &   abcdef ghjkl   \\
22   &   55,55   &   123,4567   &   abcdef ghjkl   \\
23   &   55,55   &   123,4567   &   abcdef ghjkl   \\
24   &   55,55   &   123,4567   &   abcdef ghjkl   \\
25   &   55,55   &   123,4567   &   abcdef ghjkl   \\
26   &   55,55   &   123,4567   &   abcdef ghjkl   \\
27   &   55,55   &   123,4567   &   abcdef ghjkl   \\
28   &   55,55   &   123,4567   &   abcdef ghjkl   \\
29   &   55,55   &   123,4567   &   abcdef ghjkl   \\
30   &   55,55   &   123,4567   &   abcdef ghjkl   \\
31   &   55,55   &   123,4567   &   abcdef ghjkl   \\
32   &   55,55   &   123,4567   &   abcdef ghjkl   \\
33   &   55,55   &   123,4567   &   abcdef ghjkl   \\
34   &   55,55   &   123,4567   &   abcdef ghjkl   \\
35   &   55,55   &   123,4567   &   abcdef ghjkl   \\
36   &   55,55   &   123,4567   &   abcdef ghjkl   \\
37   &   55,55   &   123,4567   &   abcdef ghjkl   \\
38   &   55,55   &   123,4567   &   abcdef ghjkl   \\
39   &   55,55   &   123,4567   &   abcdef ghjkl   \\
40   &   55,55   &   123,4567   &   abcdef ghjkl   \\
41   &   55,55   &   123,4567   &   abcdef ghjkl   \\
42   &   55,55   &   123,4567   &   abcdef ghjkl   \\
43   &   55,55   &   123,4567   &   abcdef ghjkl   \\
44   &   55,55   &   123,4567   &   abcdef ghjkl   \\
45   &   55,55   &   123,4567   &   abcdef ghjkl   \\
46   &   55,55   &   123,4567   &   abcdef ghjkl   \\
47   &   55,55   &   123,4567   &   abcdef ghjkl   \\
48   &   55,55   &   123,4567   &   abcdef ghjkl   \\
49   &   55,55   &   123,4567   &   abcdef ghjkl   \\
50   &   55,55   &   123,4567   &   abcdef ghjkl   \\
51   &   55,55   &   123,4567   &   abcdef ghjkl   \\
52   &   55,55   &   123,4567   &   abcdef ghjkl   \\
53   &   55,55   &   123,4567   &   abcdef ghjkl   \\
54   &   55,55   &   123,4567   &   abcdef ghjkl   \\
55   &   55,55   &   123,4567   &   abcdef ghjkl   \\
\end{longtable}
\end{document}

von Bartman » Mi 14. Nov 2018, 18:29

Eine vorstellbare Version mit \hline:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[ngerman]{babel}
\usepackage{longtable}
\usepackage{siunitx}

\sisetup{
   locale=DE,
   per-mode=symbol
}

\begin{document}
\begin{longtable}{|S|S|S|l|}
\caption{A sample long table.} 
\label{tab:long} \\
\hline
{Abstand} & {Kraft} & {Messunsicherheit} & Anmerkungen \\ 
{$s$ in \si{\mm}} & {$F$ in \si{\N}} & {$u$ in \si{\km\per\hour}} &\\
\hline
\endfirsthead

%\multicolumn{4}{c}%
%{{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\caption[]{continued from previous page}\\
\hline
{Abstand} & {Kraft} & {Messunsicherheit} & Anmerkungen \\ 
{$s$ in \si{\mm}} & {$F$ in \si{\N}} & {$u$ in \si{\km\per\hour}} &\\
\hline
\endhead

\hline
\multicolumn{4}{r}{{Continued on next page}} \\ 
\endfoot

\hline
\endlastfoot
1   &   55,55   &   123,4567   &   abcdef ghjkl   \\
2   &   55,55   &   123,4567   &   abcdef ghjkl   \\
3   &   55,55   &   123,4567   &   abcdef ghjkl   \\
4   &   55,55   &   123,4567   &   abcdef ghjkl   \\
5   &   55,55   &   123,4567   &   abcdef ghjkl   \\
6   &   55,55   &   123,4567   &   abcdef ghjkl   \\
7   &   55,55   &   123,4567   &   abcdef ghjkl   \\
8   &   55,55   &   123,4567   &   abcdef ghjkl   \\
9   &   55,55   &   123,4567   &   abcdef ghjkl   \\
10   &   55,55   &   123,4567   &   abcdef ghjkl   \\
11   &   55,55   &   123,4567   &   abcdef ghjkl   \\
12   &   55,55   &   123,4567   &   abcdef ghjkl   \\
13   &   55,55   &   123,4567   &   abcdef ghjkl   \\
14   &   55,55   &   123,4567   &   abcdef ghjkl   \\
15   &   55,55   &   123,4567   &   abcdef ghjkl   \\
16   &   55,55   &   123,4567   &   abcdef ghjkl   \\
17   &   55,55   &   123,4567   &   abcdef ghjkl   \\
18   &   55,55   &   123,4567   &   abcdef ghjkl   \\
19   &   55,55   &   123,4567   &   abcdef ghjkl   \\
20   &   55,55   &   123,4567   &   abcdef ghjkl   \\
21   &   55,55   &   123,4567   &   abcdef ghjkl   \\
22   &   55,55   &   123,4567   &   abcdef ghjkl   \\
23   &   55,55   &   123,4567   &   abcdef ghjkl   \\
24   &   55,55   &   123,4567   &   abcdef ghjkl   \\
25   &   55,55   &   123,4567   &   abcdef ghjkl   \\
26   &   55,55   &   123,4567   &   abcdef ghjkl   \\
27   &   55,55   &   123,4567   &   abcdef ghjkl   \\
28   &   55,55   &   123,4567   &   abcdef ghjkl   \\
29   &   55,55   &   123,4567   &   abcdef ghjkl   \\
30   &   55,55   &   123,4567   &   abcdef ghjkl   \\
31   &   55,55   &   123,4567   &   abcdef ghjkl   \\
32   &   55,55   &   123,4567   &   abcdef ghjkl   \\
33   &   55,55   &   123,4567   &   abcdef ghjkl   \\
34   &   55,55   &   123,4567   &   abcdef ghjkl   \\
35   &   55,55   &   123,4567   &   abcdef ghjkl   \\
36   &   55,55   &   123,4567   &   abcdef ghjkl   \\
37   &   55,55   &   123,4567   &   abcdef ghjkl   \\
38   &   55,55   &   123,4567   &   abcdef ghjkl   \\
39   &   55,55   &   123,4567   &   abcdef ghjkl   \\
40   &   55,55   &   123,4567   &   abcdef ghjkl   \\
41   &   55,55   &   123,4567   &   abcdef ghjkl   \\
42   &   55,55   &   123,4567   &   abcdef ghjkl   \\
43   &   55,55   &   123,4567   &   abcdef ghjkl   \\
44   &   55,55   &   123,4567   &   abcdef ghjkl   \\
45   &   55,55   &   123,4567   &   abcdef ghjkl   \\
46   &   55,55   &   123,4567   &   abcdef ghjkl   \\
47   &   55,55   &   123,4567   &   abcdef ghjkl   \\
48   &   55,55   &   123,4567   &   abcdef ghjkl   \\
49   &   55,55   &   123,4567   &   abcdef ghjkl   \\
50   &   55,55   &   123,4567   &   abcdef ghjkl   \\
51   &   55,55   &   123,4567   &   abcdef ghjkl   \\
52   &   55,55   &   123,4567   &   abcdef ghjkl   \\
53   &   55,55   &   123,4567   &   abcdef ghjkl   \\
54   &   55,55   &   123,4567   &   abcdef ghjkl   \\
55   &   55,55   &   123,4567   &   abcdef ghjkl   \\
\end{longtable}
\end{document}

von Gast007 » Mi 14. Nov 2018, 18:25

Ich schreibe in deutsch, ich habe jedoch eine englische longtable-Vorlage verwendet. Ich war nur zu faul alles einzudeutschen, weil die Tabelle noch nicht meinen Vorstellungen entspricht

von Bartman » Mi 14. Nov 2018, 18:24

Die Abstände sind bei booktabs beabsichtigt. Wenn Du die senkrechten Linien beibehalten musst oder möchtest, dann bleib bei \hline.

von Gast007 » Mi 14. Nov 2018, 18:19

Vielen Dank für deine Mühe, der Tabellenkopf in deinem Vorschlag sieht sehr gut aus. Leider haben die Tabellen in meinen Dokument vertikale Trennlinien und wenn ich die dort hinzufüge werden aus irgendeinem Grund nicht geschlossen
\documentclass{article}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage[per-mode=symbol]{siunitx}

\begin{document}
\begin{longtable}{|S|S|S|l|}
\caption{A sample long table.} 
\label{tab:long} \\
\toprule
{Abstand} & {Kraft} & {Messunsicherheit} & Anmerkungen \\ 
{$s$ in \si{\mm}} & {$F$ in \si{\N}} & {$u$ in \si{\km\per\hour}} &\\
\midrule
\endfirsthead

%\multicolumn{4}{c}%
%{{\bfseries \tablename\ \thetable{} -- continued from previous page}} \\
\caption[]{continued from previous page}\\
\toprule
{Abstand} & {Kraft} & {Messunsicherheit} & Anmerkungen \\ 
{$s$ in \si{\mm}} & {$F$ in \si{\N}} & {$u$ in \si{\km\per\hour}} &\\
\midrule
\endhead

\midrule
\multicolumn{4}{r}{{Continued on next page}} \\ 
\bottomrule
\endfoot

\bottomrule
\endlastfoot
1   &   55,55   &   123,4567   &   abcdef ghjkl   \\
2   &   55,55   &   123,4567   &   abcdef ghjkl   \\
3   &   55,55   &   123,4567   &   abcdef ghjkl   \\
4   &   55,55   &   123,4567   &   abcdef ghjkl   \\
5   &   55,55   &   123,4567   &   abcdef ghjkl   \\
6   &   55,55   &   123,4567   &   abcdef ghjkl   \\
7   &   55,55   &   123,4567   &   abcdef ghjkl   \\
8   &   55,55   &   123,4567   &   abcdef ghjkl   \\
9   &   55,55   &   123,4567   &   abcdef ghjkl   \\
10   &   55,55   &   123,4567   &   abcdef ghjkl   \\
11   &   55,55   &   123,4567   &   abcdef ghjkl   \\
12   &   55,55   &   123,4567   &   abcdef ghjkl   \\
13   &   55,55   &   123,4567   &   abcdef ghjkl   \\
14   &   55,55   &   123,4567   &   abcdef ghjkl   \\
15   &   55,55   &   123,4567   &   abcdef ghjkl   \\
16   &   55,55   &   123,4567   &   abcdef ghjkl   \\
17   &   55,55   &   123,4567   &   abcdef ghjkl   \\
18   &   55,55   &   123,4567   &   abcdef ghjkl   \\
19   &   55,55   &   123,4567   &   abcdef ghjkl   \\
20   &   55,55   &   123,4567   &   abcdef ghjkl   \\
21   &   55,55   &   123,4567   &   abcdef ghjkl   \\
22   &   55,55   &   123,4567   &   abcdef ghjkl   \\
23   &   55,55   &   123,4567   &   abcdef ghjkl   \\
24   &   55,55   &   123,4567   &   abcdef ghjkl   \\
25   &   55,55   &   123,4567   &   abcdef ghjkl   \\
26   &   55,55   &   123,4567   &   abcdef ghjkl   \\
27   &   55,55   &   123,4567   &   abcdef ghjkl   \\
28   &   55,55   &   123,4567   &   abcdef ghjkl   \\
29   &   55,55   &   123,4567   &   abcdef ghjkl   \\
30   &   55,55   &   123,4567   &   abcdef ghjkl   \\
31   &   55,55   &   123,4567   &   abcdef ghjkl   \\
32   &   55,55   &   123,4567   &   abcdef ghjkl   \\
33   &   55,55   &   123,4567   &   abcdef ghjkl   \\
34   &   55,55   &   123,4567   &   abcdef ghjkl   \\
35   &   55,55   &   123,4567   &   abcdef ghjkl   \\
36   &   55,55   &   123,4567   &   abcdef ghjkl   \\
37   &   55,55   &   123,4567   &   abcdef ghjkl   \\
38   &   55,55   &   123,4567   &   abcdef ghjkl   \\
39   &   55,55   &   123,4567   &   abcdef ghjkl   \\
40   &   55,55   &   123,4567   &   abcdef ghjkl   \\
41   &   55,55   &   123,4567   &   abcdef ghjkl   \\
42   &   55,55   &   123,4567   &   abcdef ghjkl   \\
43   &   55,55   &   123,4567   &   abcdef ghjkl   \\
44   &   55,55   &   123,4567   &   abcdef ghjkl   \\
45   &   55,55   &   123,4567   &   abcdef ghjkl   \\
46   &   55,55   &   123,4567   &   abcdef ghjkl   \\
47   &   55,55   &   123,4567   &   abcdef ghjkl   \\
48   &   55,55   &   123,4567   &   abcdef ghjkl   \\
49   &   55,55   &   123,4567   &   abcdef ghjkl   \\
50   &   55,55   &   123,4567   &   abcdef ghjkl   \\
51   &   55,55   &   123,4567   &   abcdef ghjkl   \\
52   &   55,55   &   123,4567   &   abcdef ghjkl   \\
53   &   55,55   &   123,4567   &   abcdef ghjkl   \\
54   &   55,55   &   123,4567   &   abcdef ghjkl   \\
55   &   55,55   &   123,4567   &   abcdef ghjkl   \\
\end{longtable}
\end{document}

Nach oben