Periodische Midrule in Longtable mit Booktabs

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: Periodische Midrule in Longtable mit Booktabs

von u_fischer » Mi 10. Apr 2013, 23:10

Ich würde hinter jeden \\ ein Befehl \myrule einfügen und der kann dann die Zeilen zählen.

Periodische Midrule in Longtable mit Booktabs

von naku » Mi 10. Apr 2013, 22:45

Hallo liebe Latex-Community,

da ich hier im Forum keine Lösung für mein Problem gefunden habe, öffne ich einen neuen Thread.

Ich importiere große Datensätze mit OpenOffice und lasse sie dann via Calc2Latex umwandeln. Die Tabellen haben dann mehrere Hundert Zeilen, so dass ich Longtable verwende. Zudem benutze ich Booktabs. Nun will ich zur besseren Übersicht neben top- und bottomrule auch nach jeder 8-ten Zeile eine midrule einfügen. Kann ich das in irgendeiner Form automatisieren? Per Hand komm ich da nicht mehr hin...

Oder gibt es eine OpenOffice-Lösung dafür, bevor ich Calc2Latex anwende?

Im folgenden Beispiel (128 Zeilen, gekürzt auf 64 Zeilen) habe ich per Hand nach jeder 8-ten Zeile eine midrule eingefügt, damit die Ausgabe so wird, wie sie soll. Kann ich mir das nun irgendwie sparen und trotzdem diese midrules in der Ausgabe erhalten?
\documentclass[11pt,a4paper]{scrartcl}

\usepackage[english]{babel}
\usepackage{longtable}
\usepackage{booktabs}

\begin{document}
\noindent

\begin{center}
\begin{longtable}{ccccccccccc}
\toprule
rank & \#A & \#B & \multicolumn{7}{c}{order} & ev \\
\midrule
\endfirsthead

\multicolumn{11}{c}{{continued from previous page}} \\[4.5mm]
\toprule
rank & \#A & \#B & \multicolumn{7}{c}{order} & ev \\
\midrule
\endhead

\multicolumn{11}{c}{} \\[-2mm]
\multicolumn{11}{c}{continued on next page} \\
\endfoot

\endlastfoot

1 & 3 & 4 & B & A & B & A & B & B & A & 4.033671874 \\ 
2 & 4 & 3 & A & B & A & B & A & A & B & 4.033651139 \\ 
3 & 4 & 3 & A & A & B & A & B & B & A & 4.033519588 \\ 
4 & 3 & 4 & B & B & A & B & A & A & B & 4.033502080 \\ 
5 & 3 & 4 & B & B & A & A & B & B & A & 4.033347817 \\ 
6 & 4 & 3 & A & A & B & B & A & A & B & 4.033337570 \\ 
7 & 3 & 4 & A & B & B & A & B & B & A & 4.033317602 \\ 
8 & 4 & 3 & B & A & A & B & A & A & B & 4.033299359 \\ 
\midrule
9 & 4 & 3 & A & A & A & B & B & B & A & 4.033045989 \\ 
10 & 3 & 4 & B & B & B & A & A & A & B & 4.033027828 \\ 
11 & 2 & 5 & B & B & B & B & A & B & A & 4.033003398 \\ 
12 & 5 & 2 & A & A & A & A & B & A & B & 4.032997244 \\ 
13 & 3 & 4 & A & B & B & B & A & B & A & 4.032955690 \\ 
14 & 4 & 3 & B & A & A & A & B & A & B & 4.032947081 \\ 
15 & 4 & 3 & A & B & A & A & B & B & A & 4.032770657 \\ 
16 & 3 & 4 & B & A & B & B & A & A & B & 4.032763614 \\ 
\midrule
17 & 3 & 4 & B & A & A & B & B & B & A & 4.032652415 \\ 
18 & 2 & 5 & B & B & B & A & B & B & A & 4.032649036 \\ 
19 & 4 & 3 & A & B & B & A & A & A & B & 4.032635587 \\ 
20 & 5 & 2 & A & A & A & B & A & A & B & 4.032632237 \\ 
21 & 3 & 4 & B & A & B & B & A & B & A & 4.032484054 \\ 
22 & 4 & 3 & A & B & A & A & B & A & B & 4.032482889 \\ 
23 & 3 & 4 & A & B & A & B & B & B & A & 4.031689696 \\ 
24 & 4 & 3 & B & A & B & A & A & A & B & 4.031673850 \\ 
\midrule
25 & 4 & 3 & B & A & A & A & B & B & A & 4.031637119 \\ 
26 & 3 & 4 & A & B & B & B & A & A & B & 4.031636126 \\ 
27 & 3 & 4 & B & B & A & A & B & A & B & 4.031573465 \\ 
28 & 4 & 3 & A & A & B & B & A & B & A & 4.031572505 \\ 
29 & 4 & 3 & A & A & B & A & B & A & B & 4.031035994 \\ 
30 & 3 & 4 & B & B & A & B & A & B & A & 4.031031852 \\ 
31 & 2 & 5 & B & B & A & B & B & B & A & 4.030444339 \\ 
32 & 5 & 2 & A & A & B & A & A & A & B & 4.030429397 \\ 
\midrule
\vdots &&&&&&&&&&\\
\midrule
97 & 3 & 4 & A & B & A & A & B & B & B & 3.996442357 \\ 
98 & 4 & 3 & B & A & B & B & A & A & A & 3.996441193 \\ 
99 & 5 & 2 & B & A & A & A & B & A & A & 3.993117527 \\ 
100 & 2 & 5 & A & B & B & B & A & B & B & 3.993107827 \\ 
101 & 5 & 2 & A & A & B & B & A & A & A & 3.991472935 \\ 
102 & 2 & 5 & B & B & A & A & B & B & B & 3.991470476 \\ 
103 & 4 & 3 & B & B & A & B & A & A & A & 3.988789407 \\ 
104 & 3 & 4 & A & A & B & A & B & B & B & 3.988786662 \\
\midrule 
105 & 6 & 1 & A & A & A & A & B & A & A & 3.988005469 \\ 
106 & 1 & 6 & B & B & B & B & A & B & B & 3.987994786 \\ 
107 & 5 & 2 & A & B & A & B & A & A & A & 3.983227037 \\ 
108 & 2 & 5 & B & A & B & A & B & B & B & 3.983221282 \\ 
109 & 5 & 2 & B & A & A & B & A & A & A & 3.976374384 \\ 
110 & 2 & 5 & A & B & B & A & B & B & B & 3.976371714 \\ 
111 & 4 & 3 & B & B & B & A & A & A & A & 3.975971016 \\ 
112 & 3 & 4 & A & A & A & B & B & B & B & 3.975969631 \\ 
\midrule
113 & 5 & 2 & A & B & B & A & A & A & A & 3.969920542 \\ 
114 & 6 & 1 & A & A & A & B & A & A & A & 3.969918241 \\ 
115 & 1 & 6 & B & B & B & A & B & B & B & 3.969913575 \\ 
116 & 2 & 5 & B & A & A & B & B & B & B & 3.969910135 \\ 
117 & 5 & 2 & B & A & B & A & A & A & A & 3.962202267 \\ 
118 & 2 & 5 & A & B & A & B & B & B & B & 3.962195557 \\ 
119 & 6 & 1 & A & A & B & A & A & A & A & 3.954635672 \\ 
120 & 1 & 6 & B & B & A & B & B & B & B & 3.954620928 \\ 
\midrule
121 & 5 & 2 & B & B & A & A & A & A & A & 3.950449109 \\ 
122 & 2 & 5 & A & A & B & B & B & B & B & 3.950447957 \\ 
123 & 6 & 1 & A & B & A & A & A & A & A & 3.942291061 \\ 
124 & 1 & 6 & B & A & B & B & B & B & B & 3.942283944 \\ 
125 & 6 & 1 & B & A & A & A & A & A & A & 3.932515232 \\ 
126 & 1 & 6 & A & B & B & B & B & B & B & 3.932504177 \\ 
127 & 7 & 0 & A & A & A & A & A & A & A & 3.923906222 \\ 
128 & 0 & 7 & B & B & B & B & B & B & B & 3.923893897 \\ 
\bottomrule

\end{longtable}
\end{center}

\end{document}
Vielen Dank für eure Antworten!

Nach oben