Mit xltabular eine mehrseitige und 3 spaltige Tabelle erstellen

Tabellen und Grafiken erstellen und anordnen


AaronK
Forum-Fortgeschrittener
Forum-Fortgeschrittener
Beiträge: 77
Registriert: So 2. Mai 2021, 09:29

Mit xltabular eine mehrseitige und 3 spaltige Tabelle erstellen

Beitrag von AaronK »

Ich möchte eine 3 spaltige und eine mehreitige Tabelle mithilfe xltabular erstellen. °F & °C & K sollen in je einer Spalte auf der Seite stehen. Bei 3 Spalten soll die Tabelle wie folgt aussehen:
°F | °C | K °F | °C | K °F | °C | K

Ich bekomme folgende Fehlermeldung: ! Package longtable Error: longtable not in 1-column mode.

\documentclass[a5paper,8pt,twoside,openany]{extbook}

%% Packages
\usepackage[a5paper,total={114mm,190mm},top=10mm, bindingoffset=10mm,includeheadfoot]{geometry}
\usepackage{array}
\usepackage{booktabs}
\usepackage{multicol}
\usepackage{parskip}
\usepackage[tiny]{titlesec}
\usepackage{xltabular}

\begin{document}

\chapter{Technische Tabellen}

\section{Umrechnungstabelle Fahrenheit, Celsius, Kelvin, Rankine}

\begin{multicols}{3}
\begin{xltabular}{\textwidth}{@{}rrr@{}}\toprule
\textbf{°F} & \textbf{°C} & \textbf{K} \\\midrule
\endhead
100 & 212,00 & 373,15 \\
99 & 210,20 & 372,15 \\
98 & 208,40 & 371,15 \\
97 & 206,60 & 370,15 \\
96 & 204,80 & 369,15 \\
95 & 203,00 & 368,15 \\
94 & 201,20 & 367,15 \\
93 & 199,40 & 366,15 \\
92 & 197,60 & 365,15 \\
91 & 195,80 & 364,15 \\
90 & 194,00 & 363,15 \\
89 & 192,20 & 362,15 \\
88 & 190,40 & 361,15 \\
87 & 188,60 & 360,15 \\
86 & 186,80 & 359,15 \\
85 & 185,00 & 358,15 \\
84 & 183,20 & 357,15 \\
83 & 181,40 & 356,15 \\
82 & 179,60 & 355,15 \\
81 & 177,80 & 354,15 \\
80 & 176,00 & 353,15 \\
79 & 174,20 & 352,15 \\
78 & 172,40 & 351,15 \\
77 & 170,60 & 350,15 \\
76 & 168,80 & 349,15 \\
75 & 167,00 & 348,15 \\
74 & 165,20 & 347,15 \\
73 & 163,40 & 346,15 \\
72 & 161,60 & 345,15 \\
71 & 159,80 & 344,15 \\
70 & 158,00 & 343,15 \\
69 & 156,20 & 342,15 \\
68 & 154,40 & 341,15 \\
67 & 152,60 & 340,15 \\
66 & 150,80 & 339,15 \\
65 & 149,00 & 338,15 \\
64 & 147,20 & 337,15 \\
63 & 145,40 & 336,15 \\
62 & 143,60 & 335,15 \\
61 & 141,80 & 334,15 \\
60 & 140,00 & 333,15 \\
59 & 138,20 & 332,15 \\
58 & 136,40 & 331,15 \\
57 & 134,60 & 330,15 \\
56 & 132,80 & 329,15 \\
55 & 131,00 & 328,15 \\
54 & 129,20 & 327,15 \\
53 & 127,40 & 326,15 \\
52 & 125,60 & 325,15 \\
51 & 123,80 & 324,15 \\
50 & 122,00 & 323,15 \\
49 & 120,20 & 322,15 \\
48 & 118,40 & 321,15 \\
47 & 116,60 & 320,15 \\
46 & 114,80 & 319,15 \\
45 & 113,00 & 318,15 \\
44 & 111,20 & 317,15 \\
43 & 109,40 & 316,15 \\
42 & 107,60 & 315,15 \\
41 & 105,80 & 314,15 \\
40 & 104,00 & 313,15 \\
39 & 102,20 & 312,15 \\
38 & 100,40 & 311,15 \\
37 & 98,60 & 310,15 \\
36 & 96,80 & 309,15 \\
35 & 95,00 & 308,15 \\
34 & 93,20 & 307,15 \\
33 & 91,40 & 306,15 \\
32 & 89,60 & 305,15 \\
31 & 87,80 & 304,15 \\
30 & 86,00 & 303,15 \\
29 & 84,20 & 302,15 \\
28 & 82,40 & 301,15 \\
27 & 80,60 & 300,15 \\
26 & 78,80 & 299,15 \\
25 & 77,00 & 298,15 \\
24 & 75,20 & 297,15 \\
23 & 73,40 & 296,15 \\
22 & 71,60 & 295,15 \\
21 & 69,80 & 294,15 \\
20 & 68,00 & 293,15 \\
19 & 66,20 & 292,15 \\
18 & 64,40 & 291,15 \\
17 & 62,60 & 290,15 \\
16 & 60,80 & 289,15 \\
15 & 59,00 & 288,15 \\
14 & 57,20 & 287,15 \\
13 & 55,40 & 286,15 \\
12 & 53,60 & 285,15 \\
11 & 51,80 & 284,15 \\
10 & 50,00 & 283,15 \\
9 &	48,20 &	282,15 \\
8 &	46,40 &	281,15 \\
7 &	44,60 &	280,15 \\
6 &	42,80 &	279,15 \\
5 &	41,00 &	278,15 \\
4 &	39,20 &	277,15 \\
3 &	37,40 &	276,15 \\
2 &	35,60 &	275,15 \\
1 &	33,80 &	274,15 \\
0 &	32,00 &	273,15 \\
-1 &	30,20 &	272,15 \\
-2 &	28,40 &	271,15 \\
-3 &	26,60 &	270,15 \\
-4 &	24,80 &	269,15 \\
-5 &	23,00 &	268,15 \\
-6 &	21,20 &	267,15 \\
-7 &	19,40 &	266,15 \\
-8 &	17,60 &	265,15 \\
-9 &	15,80 &	264,15 \\
-10 &	14,00 &	263,15 \\
-11 &	12,20 &	262,15 \\
-12 &	10,40 &	261,15 \\
-13 &	8,60 &	260,15 \\
-14 &	6,80 &	259,15 \\
-15 &	5,00 &	258,15 \\
-16 &	3,20 &	257,15 \\
-17 &	1,40 &	256,15 \\
-18 &	-0,40 &	255,15 \\
-19 &	-2,20 &	254,15 \\
-20 &	-4,00 &	253,15 \\
-21 &	-5,80 &	252,15 \\
-22 &	-7,60 &	251,15 \\
-23 &	-9,40 &	250,15 \\
-24 &	-11,20 &	249,15 \\
-25 &	-13,00 &	248,15 \\
-26 &	-14,80 &	247,15 \\
-27 &	-16,60 &	246,15 \\
-28 &	-18,40 &	245,15 \\
-29 &	-20,20 &	244,15 \\
-30 &	-22,00 &	243,15 \\
-31 &	-23,80 &	242,15 \\
-32 &	-25,60 &	241,15 \\
-33 &	-27,40 &	240,15 \\
-34 &	-29,20 &	239,15 \\
-35 &	-31,00 &	238,15 \\
-36 &	-32,80 &	237,15 \\
-37 &	-34,60 &	236,15 \\
-38 &	-36,40 &	235,15 \\
-39 &	-38,20 &	234,15 \\
-40 &	-40,00 &	233,15 \\
-41 &	-41,80 &	232,15 \\
-42 &	-43,60 &	231,15 \\
-43 &	-45,40 &	230,15 \\
-44 &	-47,20 &	229,15 \\
-45 &	-49,00 &	228,15 \\
-46 &	-50,80 &	227,15 \\
-47 &	-52,60 &	226,15 \\
-48 &	-54,40 &	225,15 \\
-49 &	-56,20 &	224,15 \\
-50 &	-58,00 &	223,15 \\
-51 &	-59,80 &	222,15 \\
-52 &	-61,60 &	221,15 \\
-53 &	-63,40 &	220,15 \\
-54 &	-65,20 &	219,15 \\
-55 &	-67,00 &	218,15 \\
-56 &	-68,80 &	217,15 \\
-57 &	-70,60 &	216,15 \\
-58 &	-72,40 &	215,15 \\
-59 &	-74,20 &	214,15 \\
-60 &	-76,00 &	213,15 \\
-61 &	-77,80 &	212,15 \\
-62 &	-79,60 &	211,15 \\
-63 &	-81,40 &	210,15 \\
-64 &	-83,20 &	209,15 \\
-65 &	-85,00 &	208,15 \\
-66 &	-86,80 &	207,15 \\
-67 &	-88,60 &	206,15 \\
-68 &	-90,40 &	205,15 \\
-69 &	-92,20 &	204,15 \\
-70 &	-94,00 &	203,15 \\
-71 &	-95,80 &	202,15 \\
-72 &	-97,60 &	201,15 \\
-73 &	-99,40 &	200,15 \\
-74 &	-101,20 &	199,15 \\
-75 &	-103,00 &	198,15 \\
-76 &	-104,80 &	197,15 \\
-77 &	-106,60 &	196,15 \\
-78 &	-108,40 &	195,15 \\
-79 &	-110,20 &	194,15 \\
-80 &	-112,00 &	193,15 \\
-81 &	-113,80 &	192,15 \\
-82 &	-115,60 &	191,15 \\
-83 &	-117,40 &	190,15 \\
-84 &	-119,20 &	189,15 \\
-85 &	-121,00 &	188,15 \\
-86 &	-122,80 &	187,15 \\
-87 &	-124,60 &	186,15 \\
-88 &	-126,40 &	185,15 \\
-89 &	-128,20 &	184,15 \\
-90 &	-130,00 &	183,15 \\
-91 &	-131,80 &	182,15 \\
-92 &	-133,60 &	181,15 \\
-93 &	-135,40 &	180,15 \\
-94 &	-137,20 &	179,15 \\
-95 &	-139,00 &	178,15 \\
-96 &	-140,80 &	177,15 \\
-97 &	-142,60 &	176,15 \\
-98 &	-144,40 &	175,15 \\
-99 &	-146,20 &	174,15 \\
-100 &	-148,00 &	173,15 \\
-101 &	-149,80 &	172,15 \\
-102 &	-151,60 &	171,15 \\
-103 &	-153,40 &	170,15 \\
-104 &	-155,20 &	169,15 \\
-105 &	-157,00 &	168,15 \\
-106 &	-158,80 &	167,15 \\
-107 &	-160,60 &	166,15 \\
-108 &	-162,40 &	165,15 \\
-109 &	-164,20 &	164,15 \\
-110 &	-166,00 &	163,15 \\
-111 &	-167,80 &	162,15 \\
-112 &	-169,60 &	161,15 \\
-113 &	-171,40 &	160,15 \\
-114 &	-173,20 &	159,15 \\
-115 &	-175,00 &	158,15 \\
-116 &	-176,80 &	157,15 \\
-117 &	-178,60 &	156,15 \\
-118 &	-180,40 &	155,15 \\
-119 &	-182,20 &	154,15 \\
-120 &	-184,00 &	153,15 \\
-121 &	-185,80 &	152,15 \\
-122 &	-187,60 &	151,15 \\
-123 &	-189,40 &	150,15 \\
-124 &	-191,20 &	149,15 \\
-125 &	-193,00 &	148,15 \\
-126 &	-194,80 &	147,15 \\
-127 &	-196,60 &	146,15 \\
-128 &	-198,40 &	145,15 \\
-129 &	-200,20 &	144,15 \\
-130 &	-202,00 &	143,15 \\
-131 &	-203,80 &	142,15 \\
-132 &	-205,60 &	141,15 \\
-133 &	-207,40 &	140,15 \\
-134 &	-209,20 &	139,15 \\
-135 &	-211,00 &	138,15 \\
-136 &	-212,80 &	137,15 \\
-137 &	-214,60 &	136,15 \\
-138 &	-216,40 &	135,15 \\
-139 &	-218,20 &	134,15 \\
-140 &	-220,00 &	133,15 \\
-141 &	-221,80 &	132,15 \\
-142 &	-223,60 &	131,15 \\
-143 &	-225,40 &	130,15 \\
-144 &	-227,20 &	129,15 \\
-145 &	-229,00 &	128,15 \\
-146 &	-230,80 &	127,15 \\
-147 &	-232,60 &	126,15 \\
-148 &	-234,40 &	125,15 \\
-149 &	-236,20 &	124,15 \\
-150 &	-238,00 &	123,15 \\
-151 &	-239,80 &	122,15 \\
-152 &	-241,60 &	121,15 \\
-153 &	-243,40 &	120,15 \\
-154 &	-245,20 &	119,15 \\
-155 &	-247,00 &	118,15 \\
-156 &	-248,80 &	117,15 \\
-157 &	-250,60 &	116,15 \\
-158 &	-252,40 &	115,15 \\
-159 &	-254,20 &	114,15 \\
-160 &	-256,00 &	113,15 \\
-161 &	-257,80 &	112,15 \\
-162 &	-259,60 &	111,15 \\
-163 &	-261,40 &	110,15 \\
-164 &	-263,20 &	109,15 \\
-165 &	-265,00 &	108,15 \\
-166 &	-266,80 &	107,15 \\
-167 &	-268,60 &	106,15 \\
-168 &	-270,40 &	105,15 \\
-169 &	-272,20 &	104,15 \\
-170 &	-274,00 &	103,15 \\
-171 &	-275,80 &	102,15 \\
-172 &	-277,60 &	101,15 \\
-173 &	-279,40 &	100,15 \\
-174 &	-281,20 &	99,15 \\
-175 &	-283,00 &	98,15 \\
-176 &	-284,80 &	97,15 \\
-177 &	-286,60 &	96,15 \\
-178 &	-288,40 &	95,15 \\
-179 &	-290,20 &	94,15 \\
-180 &	-292,00 &	93,15 \\
-181 &	-293,80 &	92,15 \\
-182 &	-295,60 &	91,15 \\
-183 &	-297,40 &	90,15 \\
-184 &	-299,20 &	89,15 \\
-185 &	-301,00 &	88,15 \\
-186 &	-302,80 &	87,15 \\
-187 &	-304,60 &	86,15 \\
-188 &	-306,40 &	85,15 \\
-189 &	-308,20 &	84,15 \\
-190 &	-310,00 &	83,15 \\
-191 &	-311,80 &	82,15 \\
-192 &	-313,60 &	81,15 \\
-193 &	-315,40 &	80,15 \\
-194 &	-317,20 &	79,15 \\
-195 &	-319,00 &	78,15 \\
-196 &	-320,80 &	77,15 \\
-197 &	-322,60 &	76,15 \\
-198 &	-324,40 &	75,15 \\
-199 &	-326,20 &	74,15 \\
-200 &	-328,00 &	73,15 \\
-201 &	-329,80 &	72,15 \\
-202 &	-331,60 &	71,15 \\
-203 &	-333,40 &	70,15 \\
-204 &	-335,20 &	69,15 \\
-205 &	-337,00 &	68,15 \\
-206 &	-338,80 &	67,15 \\
-207 &	-340,60 &	66,15 \\
-208 &	-342,40 &	65,15 \\
-209 &	-344,20 &	64,15 \\
-210 &	-346,00 &	63,15 \\
-211 &	-347,80 &	62,15 \\
-212 &	-349,60 &	61,15 \\
-213 &	-351,40 &	60,15 \\
-214 &	-353,20 &	59,15 \\
-215 &	-355,00 &	58,15 \\
-216 &	-356,80 &	57,15 \\
-217 &	-358,60 &	56,15 \\
-218 &	-360,40 &	55,15 \\
-219 &	-362,20 &	54,15 \\
-220 &	-364,00 &	53,15 \\
-221 &	-365,80 &	52,15 \\
-222 &	-367,60 &	51,15 \\
-223 &	-369,40 &	50,15 \\
-224 &	-371,20 &	49,15 \\
-225 &	-373,00 &	48,15 \\
-226 &	-374,80 &	47,15 \\
-227 &	-376,60 &	46,15 \\
-228 &	-378,40 &	45,15 \\
-229 &	-380,20 &	44,15 \\
-230 &	-382,00 &	43,15 \\
-231 &	-383,80 &	42,15 \\
-232 &	-385,60 &	41,15 \\
-233 &	-387,40 &	40,15 \\
-234 &	-389,20 &	39,15 \\
-235 &	-391,00 &	38,15 \\
-236 &	-392,80 &	37,15 \\
-237 &	-394,60 &	36,15 \\
-238 &	-396,40 &	35,15 \\
-239 &	-398,20 &	34,15 \\
-240 &	-400,00 &	33,15 \\
-241 &	-401,80 &	32,15 \\
-242 &	-403,60 &	31,15 \\
-243 &	-405,40 &	30,15 \\
-244 &	-407,20 &	29,15 \\
-245 &	-409,00 &	28,15 \\
-246 &	-410,80 &	27,15 \\
-247 &	-412,60 &	26,15 \\
-248 &	-414,40 &	25,15 \\
-249 &	-416,20 &	24,15 \\
-250 &	-418,00 &	23,15 \\
-251 &	-419,80 &	22,15 \\
-252 &	-421,60 &	21,15 \\
-253 &	-423,40 &	20,15 \\
-254 &	-425,20 &	19,15 \\
-255 &	-427,00 &	18,15 \\
-256 &	-428,80 &	17,15 \\
-257 &	-430,60 &	16,15 \\
-258 &	-432,40 &	15,15 \\
-259 &	-434,20 &	14,15 \\
-260 &	-436,00 &	13,15 \\
-261 &	-437,80 &	12,15 \\
-262 &	-439,60 &	11,15 \\
-263 &	-441,40 &	10,15 \\
-264 &	-443,20 &	9,15 \\
-265 &	-445,00 &	8,15 \\
-266 &	-446,80 &	7,15 \\
-267 &	-448,60 &	6,15 \\
-268 &	-450,40 &	5,15 \\
-269 &	-452,20 &	4,15 \\
-270 &	-454,00 &	3,15 \\
-271 &	-455,80 &	2,15 \\
-272 &	-457,60 &	1,15 \\
-273 &	-459,40 &	0,15 \\
-273,15 &	-459,67 &	0,00 \\
\end{xltabular}
\end{multicols}

\end{document}

Grummelgast

Re: Mit xltabular eine mehrseitige und 3 spaltige Tabelle erstellen

Beitrag von Grummelgast »

Die Fehlermeldung ist eigentlich recht eindeutig: Das geht nicht. Man kann eine longtable und damit auch eine davon abgeleitete xltabular nicht in einer multicols-Umgebung setzen. Das steht auch in der longtable-Anleitung in Abschnitt 6:

longtable now issues an error if started in the scope of \twocolumn, or the
multicols environment.

Übrigens: Wenn keine x-Spalten verwendet werden, genügt eigentlich eine normale longtable an Stelle einer xltabular. Und \textwidth ist auch nicht dasselbe wie \linewidth oder \columnwidth. Das sei aber nur der Vollständigkeit halber erwähnt. Da das ganze so ohnehin nicht funktioniert, ist es eher nebensächlich.


Grummelgast

Re: Mit xltabular eine mehrseitige und 3 spaltige Tabelle erstellen

Beitrag von Grummelgast »

Nebenbei erwähnt: Mit supertabular geht es AFAIK auch nicht. Das meldet zwar keinen Fehler, verteilt die Tabelle aber ebenfalls nicht auf drei Spalten. Ich kenne für so etwas – von der manuellen Verteilung auf mehrere einzeln umbrochene Tabellen abgesehen – eigentlich nur eine halbwegs automatische Möglichkeit: Setzen der Tabelle als eigenes, einspaltiges Dokument ohne Rand und dann mit \includepdf jeweils drei Seiten nebeneinander auf eine (oder auch mehrere) Seite(n) setzen.


Antworten