我有一张表格,我想将其放在多页上,因此longtable
。现在它无法适应页面宽度。
表格很大...第二列和第三列是坐标,遗憾的是不能缩短...
\hline
\multicolumn{1}{|l|}{} &
\multicolumn{2}{c|}{Design} &
\multicolumn{2}{c|}{Kontrol} &
\multicolumn{2}{c|}{Differens} &
\multicolumn{1}{l|}{Gns.snit} &
\multicolumn{1}{l|}{Sigma} &
\multicolumn{1}{l|}{d\_max} \\ \hline
\endfirsthead
%
\endhead
%
\multicolumn{1}{|l|}{Pkt.} &
\multicolumn{1}{l|}{Easting} &
\multicolumn{1}{l|}{Northing} &
\multicolumn{1}{l|}{Easting} &
\multicolumn{1}{l|}{Northing} &
\multicolumn{1}{l|}{Easting} &
\multicolumn{1}{l|}{Northing} &
{\color[HTML]{202122} μ {[}m{]}} &
{\color[HTML]{202122} σ {[}m{]}} &
{[}m{]} \\ \hline
1 & \multicolumn{1}{r|}{729598,741} & 6171261,02 & \multicolumn{1}{r|}{729598,743} & 6171261,029 & \multicolumn{1}{r|}{-0,002} & -0,009 & & & \\ \cline{1-7}
2 & \multicolumn{1}{r|}{729598,897} & 6171260,664 & \multicolumn{1}{r|}{729598,909} & 6171260,669 & \multicolumn{1}{r|}{-0,012} & -0,005 & & & \\ \cline{1-7}
3 & \multicolumn{1}{r|}{729598,973} & 6171260,489 & \multicolumn{1}{r|}{729598,987} & 6171260,491 & \multicolumn{1}{r|}{-0,014} & -0,002 & & & \\ \cline{1-7}
4 & \multicolumn{1}{r|}{729591,938} & 6171258,298 & \multicolumn{1}{r|}{729591,935} & 6171258,284 & \multicolumn{1}{r|}{0,003} & 0,014 & & & \\ \cline{1-7}
5 & \multicolumn{1}{r|}{729592,087} & 6171257,93 & \multicolumn{1}{r|}{729592,087} & 6171257,926 & \multicolumn{1}{r|}{0,000} & 0,004 & & & \\ \cline{1-7}
6 & \multicolumn{1}{r|}{729592,181} & 6171257,727 & \multicolumn{1}{r|}{729592,184} & 6171257,726 & \multicolumn{1}{r|}{-0,003} & 0,001 & & & \\ \cline{1-7}
7 & \multicolumn{1}{r|}{729586,791} & 6171256,205 & \multicolumn{1}{r|}{729586,792} & 6171256,222 & \multicolumn{1}{r|}{-0,001} & -0,017 & & & \\ \cline{1-7}
8 & \multicolumn{1}{r|}{729586,931} & 6171255,84 & \multicolumn{1}{r|}{729586,935} & 6171255,830 & \multicolumn{1}{r|}{-0,004} & 0,01 & & & \\ \cline{1-7}
9 & \multicolumn{1}{r|}{729587,022} & 6171255,644 & \multicolumn{1}{r|}{729587,020} & 6171255,648 & \multicolumn{1}{r|}{0,002} & -0,004 & & & \\ \cline{1-7}
10 & \multicolumn{1}{r|}{729583,342} & 6171254,816 & \multicolumn{1}{r|}{729583,347} & 6171254,816 & \multicolumn{1}{r|}{-0,005} & 0,000 & & & \\ \cline{1-7}
11 & \multicolumn{1}{r|}{729583,489} & 6171254,435 & \multicolumn{1}{r|}{729583,499} & 6171254,431 & \multicolumn{1}{r|}{-0,010} & 0,004 & & & \\ \cline{1-7}
12 & \multicolumn{1}{r|}{729583,576} & 6171254,245 & \multicolumn{1}{r|}{729583,561} & 6171254,249 & \multicolumn{1}{r|}{0,015} & -0,004 & & & \\ \cline{1-7}
13 & \multicolumn{1}{r|}{729579,337} & 6171253,176 & \multicolumn{1}{r|}{729579,336} & 6171253,173 & \multicolumn{1}{r|}{0,001} & 0,003 & & & \\ \cline{1-7}
14 & \multicolumn{1}{r|}{729579,438} & 6171252,864 & \multicolumn{1}{r|}{729579,449} & 6171252,857 & \multicolumn{1}{r|}{-0,011} & 0,007 & & & \\ \cline{1-7}
15 & \multicolumn{1}{r|}{729579,562} & 6171252,6 & \multicolumn{1}{r|}{729579,553} & 6171252,603 & \multicolumn{1}{r|}{0,009} & -0,003 & & & \\ \cline{1-7}
16 & \multicolumn{1}{r|}{729575,731} & 6171251,687 & \multicolumn{1}{r|}{729575,729} & 6171251,683 & \multicolumn{1}{r|}{0,002} & 0,004 & & & \\ \cline{1-7}
17 & \multicolumn{1}{r|}{729575,814} & 6171251,419 & \multicolumn{1}{r|}{729575,834} & 6171251,411 & \multicolumn{1}{r|}{-0,020} & 0,008 & & & \\ \cline{1-7}
18 & \multicolumn{1}{r|}{729575,958} & 6171251,135 & \multicolumn{1}{r|}{729575,952} & 6171251,134 & \multicolumn{1}{r|}{0,006} & 0,001 & & & \\ \cline{1-7}
19 & \multicolumn{1}{r|}{729568,597} & 6171248,783 & \multicolumn{1}{r|}{729568,580} & 6171248,789 & \multicolumn{1}{r|}{0,017} & -0,006 & & & \\ \cline{1-7}
20 & \multicolumn{1}{r|}{729568,73} & 6171248,412 & \multicolumn{1}{r|}{729568,726} & 6171248,417 & \multicolumn{1}{r|}{0,004} & -0,005 & & & \\ \cline{1-7}
21 & \multicolumn{1}{r|}{729568,795} & 6171248,231 & \multicolumn{1}{r|}{729568,803} & 6171248,223 & \multicolumn{1}{r|}{-0,008} & 0,008 & & & \\ \cline{1-7}
22 & \multicolumn{1}{r|}{729562,201} & 6171246,188 & \multicolumn{1}{r|}{729562,204} & 6171246,191 & \multicolumn{1}{r|}{-0,003} & -0,003 & & & \\ \cline{1-7}
23 & \multicolumn{1}{r|}{729562,341} & 6171245,81 & \multicolumn{1}{r|}{729562,334} & 6171245,818 & \multicolumn{1}{r|}{0,007} & -0,008 & & & \\ \cline{1-7}
24 & \multicolumn{1}{r|}{729562,41} & 6171245,628 & \multicolumn{1}{r|}{729562,408} & 6171245,631 & \multicolumn{1}{r|}{0,002} & -0,003 & & & \\ \cline{1-7}
25 & \multicolumn{1}{r|}{729555,891} & 6171243,616 & \multicolumn{1}{r|}{729555,895} & 6171243,617 & \multicolumn{1}{r|}{-0,004} & -0,001 & & & \\ \cline{1-7}
26 & \multicolumn{1}{r|}{729556,006} & 6171243,377 & \multicolumn{1}{r|}{729556,003} & 6171243,377 & \multicolumn{1}{r|}{0,003} & 0,000 & & & \\ \cline{1-7}
27 & \multicolumn{1}{r|}{729556,112} & 6171243,069 & \multicolumn{1}{r|}{729556,105} & 6171243,079 & \multicolumn{1}{r|}{0,007} & -0,010 & & & \\ \cline{1-7}
28 & \multicolumn{1}{r|}{729550,186} & 6171241,296 & \multicolumn{1}{r|}{729550,182} & 6171241,300 & \multicolumn{1}{r|}{0,004} & -0,004 & & & \\ \cline{1-7}
29 & \multicolumn{1}{r|}{729550,305} & 6171241,07 & \multicolumn{1}{r|}{729550,310} & 6171241,064 & \multicolumn{1}{r|}{-0,005} & 0,006 & & & \\ \cline{1-7}
30 & \multicolumn{1}{r|}{729550,411} & 6171240,743 & \multicolumn{1}{r|}{729550,415} & 6171240,747 & \multicolumn{1}{r|}{-0,004} & -0,004 & & & \\ \cline{1-7}
31 & \multicolumn{1}{r|}{729538,652} & 6171236,606 & \multicolumn{1}{r|}{729538,662} & 6171236,611 & \multicolumn{1}{r|}{-0,010} & -0,005 & & & \\ \cline{1-7}
32 & \multicolumn{1}{r|}{729538,803} & 6171236,231 & \multicolumn{1}{r|}{729538,816} & 6171236,234 & \multicolumn{1}{r|}{-0,013} & -0,003 & & & \\ \cline{1-7}
33 & \multicolumn{1}{r|}{729538,879} & 6171236,044 & \multicolumn{1}{r|}{729538,889} & 6171236,045 & \multicolumn{1}{r|}{-0,010} & -0,001 & & & \\ \cline{1-7}
34 & \multicolumn{1}{r|}{729533,279} & 6171234,425 & \multicolumn{1}{r|}{729533,290} & 6171234,444 & \multicolumn{1}{r|}{-0,011} & -0,019 & & & \\ \cline{1-7}
35 & \multicolumn{1}{r|}{729533,426} & 6171234,044 & \multicolumn{1}{r|}{729533,440} & 6171234,043 & \multicolumn{1}{r|}{-0,014} & 0,001 & & & \\ \cline{1-7}
36 & \multicolumn{1}{r|}{729533,505} & 6171233,85 & \multicolumn{1}{r|}{729533,499} & 6171233,856 & \multicolumn{1}{r|}{0,006} & -0,006 & & & \\ \cline{1-7}
37 & \multicolumn{1}{r|}{729528,457} & 6171232,45 & \multicolumn{1}{r|}{729528,465} & 6171232,451 & \multicolumn{1}{r|}{-0,008} & -0,001 & & & \\ \cline{1-7}
38 & \multicolumn{1}{r|}{729528,608} & 6171232,081 & \multicolumn{1}{r|}{729528,612} & 6171232,077 & \multicolumn{1}{r|}{-0,004} & 0,004 & & & \\ \cline{1-7}
39 & \multicolumn{1}{r|}{729528,686} & 6171231,903 & \multicolumn{1}{r|}{729528,680} & 6171231,902 & \multicolumn{1}{r|}{0,006} & 0,001 & & & \\ \cline{1-7}
40 & \multicolumn{1}{r|}{729521,837} & 6171229,747 & \multicolumn{1}{r|}{729521,841} & 6171229,753 & \multicolumn{1}{r|}{-0,004} & -0,006 & & & \\ \cline{1-7}
41 & \multicolumn{1}{r|}{729521,985} & 6171229,364 & \multicolumn{1}{r|}{729521,982} & 6171229,360 & \multicolumn{1}{r|}{0,003} & 0,004 & & & \\ \cline{1-7}
42 & \multicolumn{1}{r|}{729522,063} & 6171229,185 & \multicolumn{1}{r|}{729522,063} & 6171229,184 & \multicolumn{1}{r|}{0,000} & 0,001 & & & \\ \cline{1-7}
43 & \multicolumn{1}{r|}{729517,553} & 6171227,989 & \multicolumn{1}{r|}{729517,560} & 6171227,989 & \multicolumn{1}{r|}{-0,007} & 0,000 & & & \\ \cline{1-7}
44 & \multicolumn{1}{r|}{729517,709} & 6171227,629 & \multicolumn{1}{r|}{729517,708} & 6171227,634 & \multicolumn{1}{r|}{0,001} & -0,005 & & & \\ \cline{1-7}
45 & \multicolumn{1}{r|}{729517,78} & 6171227,442 & \multicolumn{1}{r|}{729517,774} & 6171227,442 & \multicolumn{1}{r|}{0,006} & 0,000 & & & \\ \cline{1-7}
46 & \multicolumn{1}{r|}{729513,038} & 6171226,164 & \multicolumn{1}{r|}{729513,042} & 6171226,161 & \multicolumn{1}{r|}{-0,004} & 0,003 & & & \\ \cline{1-7}
47 & \multicolumn{1}{r|}{729513,198} & 6171225,787 & \multicolumn{1}{r|}{729513,201} & 6171225,791 & \multicolumn{1}{r|}{-0,003} & -0,004 & & & \\ \cline{1-7}
48 &
\multicolumn{1}{r|}{729513,265} &
6171225,606 &
\multicolumn{1}{r|}{729513,284} &
6171225,557 &
\multicolumn{1}{r|}{-0,019} &
\cellcolor[HTML]{FF0000}0,049 &
&
&
\\ \cline{1-7}
49 & \multicolumn{1}{r|}{729507,361} & 6171223,854 & \multicolumn{1}{r|}{729507,357} & 6171223,858 & \multicolumn{1}{r|}{0,004} & -0,004 & & & \\ \cline{1-7}
50 & \multicolumn{1}{r|}{729507,515} & 6171223,487 & \multicolumn{1}{r|}{729507,510} & 6171223,491 & \multicolumn{1}{r|}{0,005} & -0,004 & & & \\ \cline{1-7}
51 & \multicolumn{1}{r|}{729507,589} & 6171223,298 & \multicolumn{1}{r|}{729507,591} & 6171223,302 & \multicolumn{1}{r|}{-0,002} & -0,004 & & & \\ \cline{1-7}
52 & \multicolumn{1}{r|}{729502,897} & 6171222,041 & \multicolumn{1}{r|}{729502,891} & 6171222,026 & \multicolumn{1}{r|}{0,006} & 0,015 & & & \\ \cline{1-7}
53 & \multicolumn{1}{r|}{729503,061} & 6171221,668 & \multicolumn{1}{r|}{729503,062} & 6171221,659 & \multicolumn{1}{r|}{-0,001} & 0,009 & & & \\ \cline{1-7}
54 & \multicolumn{1}{r|}{729503,12} & 6171221,49 & \multicolumn{1}{r|}{729503,117} & 6171221,496 & \multicolumn{1}{r|}{0,003} & -0,006 & & & \\ \cline{1-7}
55 & \multicolumn{1}{r|}{729498,329} & 6171220,185 & \multicolumn{1}{r|}{729498,328} & 6171220,177 & \multicolumn{1}{r|}{0,001} & 0,008 & & & \\ \cline{1-7}
56 & \multicolumn{1}{r|}{729498,478} & 6171219,801 & \multicolumn{1}{r|}{729498,488} & 6171219,807 & \multicolumn{1}{r|}{-0,010} & -0,006 & & & \\ \cline{1-7}
57 & \multicolumn{1}{r|}{729498,557} & 6171219,624 & \multicolumn{1}{r|}{729498,552} & 6171219,632 & \multicolumn{1}{r|}{0,005} & -0,008 & & & \\ \cline{1-7}
58 & \multicolumn{1}{r|}{729584,389} & 6171255,864 & \multicolumn{1}{r|}{729584,388} & 6171255,868 & \multicolumn{1}{r|}{0,001} & -0,004 & & & \\ \cline{1-7}
59 & \multicolumn{1}{r|}{729517,339} & 6171228,518 & \multicolumn{1}{r|}{729517,338} & 6171228,516 & \multicolumn{1}{r|}{0,001} & 0,002 & & & \\ \cline{1-7}
60 & \multicolumn{1}{r|}{729543,328} & 6171239,092 & \multicolumn{1}{r|}{729543,333} & 6171239,102 & \multicolumn{1}{r|}{-0,005} & -0,010 & & & \\ \cline{1-7}
61 &
\multicolumn{1}{r|}{729558,679} &
6171245,372 &
\multicolumn{1}{r|}{729558,693} &
6171245,371 &
\multicolumn{1}{r|}{-0,014} &
0,001 &
\multirow{-61}{*}{-0,001} &
\multirow{-61}{*}{0,008} &
\multirow{-61}{*}{0,025} \\ \hline
\caption{Beregning af afsætning - undergruppe 3a}
\label{tab:afs_beregn_3a}\\
\end{longtable}```
答案1
第 8 列至第 10 列的内容似乎在所有行中都相同。因此,为什么不将其从表中移除并将列数从 10 减少到 7 呢?
如果不允许,我建议您以longtable
横向模式排版,如下面的代码和相关屏幕截图所示。
我还会将数字的小数点对齐。此外,为了提高表格的整体可读性,我建议您删除所有\cline
指令,而是每隔 5 行左右插入一点空格,以创建更好的视觉分组感。
最后但同样重要的一点是,请去掉无用的\multicolumn{1}{r|}
包装。
\documentclass{article} % or some other suitable document class
\usepackage[T1]{fontenc}
\usepackage[danish]{babel}
\usepackage{longtable}
\usepackage{xcolor,colortbl}
% new:
\usepackage{pdflscape} % for 'landscape' environment
\usepackage{siunitx} % for 'S' col. type
\sisetup{output-decimal-marker={,}, group-digits=false}
\usepackage{booktabs} % for well-spaced horizontal rules
\begin{document}
\begin{landscape}
\begin{longtable}{@{}
S[table-format= 2.0]
*{2}{S[table-format= 6.3]S[table-format= 7.3]}
*{3}{S[table-format=-1.3]}
*{2}{S[table-format= 1.3]}
@{}}
%% headers and footers
\toprule
{Pkt.} &
\multicolumn{2}{c}{Design} &
\multicolumn{2}{c}{Kontrol} &
\multicolumn{2}{c}{Differens} &
{Gns.snit $\mu$} &
{Sigma $\sigma$} &
{d\_max} \\
\cmidrule(lr){2-3} \cmidrule(lr){4-5} \cmidrule(lr){6-7}
& {Easting} & {Northing}
& {Easting} & {Northing}
& {Easting} & {Northing} &
{\color[HTML]{202122} [m]} &
{\color[HTML]{202122} [m]} &
{[m]} \\
\midrule
\endhead
\bottomrule
\addlinespace
\caption{Beregning af afsætning - undergruppe 3a}
\label{tab:afs_beregn_3a}
\endlastfoot
%% body of longtable
1 & 729598,741 & 6171261,02 & 729598,743 & 6171261,029 & -0,002 & -0,009 & -0,001 & 0,008 & 0,025 \\
2 & 729598,897 & 6171260,664 & 729598,909 & 6171260,669 & -0,012 & -0,005 \\
3 & 729598,973 & 6171260,489 & 729598,987 & 6171260,491 & -0,014 & -0,002 \\
4 & 729591,938 & 6171258,298 & 729591,935 & 6171258,284 & 0,003 & 0,014 \\
5 & 729592,087 & 6171257,93 & 729592,087 & 6171257,926 & 0,000 & 0,004 \\ \addlinespace
6 & 729592,181 & 6171257,727 & 729592,184 & 6171257,726 & -0,003 & 0,001 \\
7 & 729586,791 & 6171256,205 & 729586,792 & 6171256,222 & -0,001 & -0,017 \\
8 & 729586,931 & 6171255,84 & 729586,935 & 6171255,830 & -0,004 & 0,01 \\
9 & 729587,022 & 6171255,644 & 729587,020 & 6171255,648 & 0,002 & -0,004 \\
10 & 729583,342 & 6171254,816 & 729583,347 & 6171254,816 & -0,005 & 0,000 \\ \addlinespace
11 & 729583,489 & 6171254,435 & 729583,499 & 6171254,431 & -0,010 & 0,004 \\
12 & 729583,576 & 6171254,245 & 729583,561 & 6171254,249 & 0,015 & -0,004 \\
13 & 729579,337 & 6171253,176 & 729579,336 & 6171253,173 & 0,001 & 0,003 \\
14 & 729579,438 & 6171252,864 & 729579,449 & 6171252,857 & -0,011 & 0,007 \\
15 & 729579,562 & 6171252,6 & 729579,553 & 6171252,603 & 0,009 & -0,003 \\ \addlinespace
16 & 729575,731 & 6171251,687 & 729575,729 & 6171251,683 & 0,002 & 0,004 \\
17 & 729575,814 & 6171251,419 & 729575,834 & 6171251,411 & -0,020 & 0,008 \\
18 & 729575,958 & 6171251,135 & 729575,952 & 6171251,134 & 0,006 & 0,001 \\
19 & 729568,597 & 6171248,783 & 729568,580 & 6171248,789 & 0,017 & -0,006 \\
20 & 729568,73 & 6171248,412 & 729568,726 & 6171248,417 & 0,004 & -0,005 \\ \addlinespace
21 & 729568,795 & 6171248,231 & 729568,803 & 6171248,223 & -0,008 & 0,008 \\
22 & 729562,201 & 6171246,188 & 729562,204 & 6171246,191 & -0,003 & -0,003 \\
23 & 729562,341 & 6171245,81 & 729562,334 & 6171245,818 & 0,007 & -0,008 \\
24 & 729562,41 & 6171245,628 & 729562,408 & 6171245,631 & 0,002 & -0,003 \\
25 & 729555,891 & 6171243,616 & 729555,895 & 6171243,617 & -0,004 & -0,001 \\ \addlinespace
26 & 729556,006 & 6171243,377 & 729556,003 & 6171243,377 & 0,003 & 0,000 \\
27 & 729556,112 & 6171243,069 & 729556,105 & 6171243,079 & 0,007 & -0,010 \\
28 & 729550,186 & 6171241,296 & 729550,182 & 6171241,300 & 0,004 & -0,004 \\
29 & 729550,305 & 6171241,07 & 729550,310 & 6171241,064 & -0,005 & 0,006 \\
30 & 729550,411 & 6171240,743 & 729550,415 & 6171240,747 & -0,004 & -0,004 \\ \addlinespace
31 & 729538,652 & 6171236,606 & 729538,662 & 6171236,611 & -0,010 & -0,005 \\
32 & 729538,803 & 6171236,231 & 729538,816 & 6171236,234 & -0,013 & -0,003 \\
33 & 729538,879 & 6171236,044 & 729538,889 & 6171236,045 & -0,010 & -0,001 \\
34 & 729533,279 & 6171234,425 & 729533,290 & 6171234,444 & -0,011 & -0,019 \\
35 & 729533,426 & 6171234,044 & 729533,440 & 6171234,043 & -0,014 & 0,001 \\ \addlinespace
36 & 729533,505 & 6171233,85 & 729533,499 & 6171233,856 & 0,006 & -0,006 \\
37 & 729528,457 & 6171232,45 & 729528,465 & 6171232,451 & -0,008 & -0,001 \\
38 & 729528,608 & 6171232,081 & 729528,612 & 6171232,077 & -0,004 & 0,004 \\
39 & 729528,686 & 6171231,903 & 729528,680 & 6171231,902 & 0,006 & 0,001 \\
40 & 729521,837 & 6171229,747 & 729521,841 & 6171229,753 & -0,004 & -0,006 \\ \addlinespace
41 & 729521,985 & 6171229,364 & 729521,982 & 6171229,360 & 0,003 & 0,004 \\
42 & 729522,063 & 6171229,185 & 729522,063 & 6171229,184 & 0,000 & 0,001 \\
43 & 729517,553 & 6171227,989 & 729517,560 & 6171227,989 & -0,007 & 0,000 \\
44 & 729517,709 & 6171227,629 & 729517,708 & 6171227,634 & 0,001 & -0,005 \\
45 & 729517,78 & 6171227,442 & 729517,774 & 6171227,442 & 0,006 & 0,000 \\ \addlinespace
46 & 729513,038 & 6171226,164 & 729513,042 & 6171226,161 & -0,004 & 0,003 \\
47 & 729513,198 & 6171225,787 & 729513,201 & 6171225,791 & -0,003 & -0,004 \\
48 & 729513,265 & 6171225,606 & 729513,284 & 6171225,557 & -0,019 & \cellcolor[HTML]{FF0000} 0,049 \\
49 & 729507,361 & 6171223,854 & 729507,357 & 6171223,858 & 0,004 & -0,004 \\
50 & 729507,515 & 6171223,487 & 729507,510 & 6171223,491 & 0,005 & -0,004 \\ \addlinespace
51 & 729507,589 & 6171223,298 & 729507,591 & 6171223,302 & -0,002 & -0,004 \\
52 & 729502,897 & 6171222,041 & 729502,891 & 6171222,026 & 0,006 & 0,015 \\
53 & 729503,061 & 6171221,668 & 729503,062 & 6171221,659 & -0,001 & 0,009 \\
54 & 729503,12 & 6171221,49 & 729503,117 & 6171221,496 & 0,003 & -0,006 \\
55 & 729498,329 & 6171220,185 & 729498,328 & 6171220,177 & 0,001 & 0,008 \\ \addlinespace
56 & 729498,478 & 6171219,801 & 729498,488 & 6171219,807 & -0,010 & -0,006 \\
57 & 729498,557 & 6171219,624 & 729498,552 & 6171219,632 & 0,005 & -0,008 \\
58 & 729584,389 & 6171255,864 & 729584,388 & 6171255,868 & 0,001 & -0,004 \\
59 & 729517,339 & 6171228,518 & 729517,338 & 6171228,516 & 0,001 & 0,002 \\
60 & 729543,328 & 6171239,092 & 729543,333 & 6171239,102 & -0,005 & -0,010 \\ \addlinespace
61 & 729558,679 & 6171245,372 & 729558,693 & 6171245,371 & -0,014 & 0,001 \\
\end{longtable}
\end{landscape}
\end{document}
答案2
使用tabularray
. 包的 @Mico 答案 (+1) 的变体。表格宽度等于\linewidth
(= \textheight
):
编辑(1):
现在对第三列和第五列进行了更正。原始答案中的 6 个整数数字已更正为 7 个,因为这些列中的数字已经更改。
编辑(2):
添加了基于 HTML 颜色模型的颜色使用代码。此外,还对表格规范进行了微小的更改,使行距更加正确:
\documentclass{article} % or some other suitable document class
\usepackage[T1]{fontenc}
\usepackage[danish]{babel}
%\usepackage{longtable}
\usepackage{pdflscape} % for 'landscape' environment
\usepackage{xcolor,
%colortbl % not needed
}
% new:
\usepackage{tabularray}
\UseTblrLibrary{booktabs, siunitx}
\NewTblrTheme{fancy}{
\SetTblrStyle{head}{font=\small}
\SetTblrStyle{foot}{font=\footnotesize}
\SetTblrStyle{caption-tag}{font=\bfseries}
}
\makeatletter % new, added
\ExplSyntaxOn
\NewChildSelector{eachfive}
{
\int_step_inline:nnnn {1}{5}{\l_tblr_childs_total_tl}
{ \clist_put_right:Nn \l_tblr_childs_clist {##1} }
}
% HTML coloring in table <--- new, added
\pretocmd{\@declaredcolor}{\my@hack@color{#1}}{}{}
\def\my@hack@color#1{\@ifundefined{\@backslashchar color@#1}{\MyDefineColor{#1}}{\relax}}
\cs_generate_variant:Nn \seq_set_split:Nnn { Nnx }
\NewDocumentCommand \MyDefineColor { m } {
\seq_set_split:Nnx \l_tmpa_seq {|} {#1}
\exp_args:Nnxx \definecolor{#1} { \seq_item:Nn \l_tmpa_seq {1} } { \seq_item:Nn \l_tmpa_seq {2} }
}
\ExplSyntaxOff
\makeatother % new, added
\NewTableCommand\SCC[1]{\SetCell{bg=#1}} % for coloring of a (lonely) cell
\sisetup{output-decimal-marker={,},
table-auto-round, % changed from
group-digits=false
}
\begin{document}
\begin{landscape}
\begin{longtblr}[
theme = fancy,
caption = {Beregning af afsætning - undergruppe 3a},
label = {tab:afs_beregn_3a}
]{colspec = {@{} Q[r, si={table-format=2.0}]
*{2}{X[c, si={table-format=6.3}] % <---
X[c, si={table-format=7.3}]} % <---
*{3}{Q[c, si={table-format=-1.3}]}
*{2}{Q[c, si={table-format= 1.3}]}
@{}},
cell{1}{even[2-6]} = {c=2}{},
cell{2}{8-10} = {fg={HTML|202122}},
% chaanged from {fg=blue!60!black},
row{1,2} = {guard},
row{3-Y} = {rowsep=0pt},
row{3} = {abovesep=2pt}, row{Z} = {belowsep=2pt},
row{eachfive} = {belowsep=1ex},
rowhead = 2
}
%% headers
\toprule
Pkt. & Design &
& Kontrol &
& Differens &
& Gns.snit $\mu$ &
{Sigma $\sigma$} &
{d\_max} \\
\cmidrule[lr]{2-3} \cmidrule[lr]{4-5} \cmidrule[lr]{6-7}
& Easting & Northing
& Easting & Northing
& Easting & Northing
& [m]
& [m]
& [m] \\
\midrule
%% body of longtblr
1 & 729598,741 & 6171261,02 & 729598,743 & 6171261,029 & -0,002 & -0,009
& -0,001 & 0,008 & 0,025 \\
2 & 729598,897 & 6171260,664 & 729598,909 & 6171260,669 & -0,012 & -0,005 \\
3 & 729598,973 & 6171260,489 & 729598,987 & 6171260,491 & -0,014 & -0,002 \\
4 & 729591,938 & 6171258,298 & 729591,935 & 6171258,284 & 0,003 & 0,014 \\
5 & 729592,087 & 6171257,93 & 729592,087 & 6171257,926 & 0,000 & 0,004 \\
6 & 729592,181 & 6171257,727 & 729592,184 & 6171257,726 & -0,003 & 0,001 \\
7 & 729586,791 & 6171256,205 & 729586,792 & 6171256,222 & -0,001 & -0,017 \\
8 & 729586,931 & 6171255,84 & 729586,935 & 6171255,830 & -0,004 & 0,01 \\
9 & 729587,022 & 6171255,644 & 729587,020 & 6171255,648 & 0,002 & -0,004 \\
10 & 729583,342 & 6171254,816 & 729583,347 & 6171254,816 & -0,005 & 0,000 \\
11 & 729583,489 & 6171254,435 & 729583,499 & 6171254,431 & -0,010 & 0,004 \\
12 & 729583,576 & 6171254,245 & 729583,561 & 6171254,249 & 0,015 & -0,004 \\
13 & 729579,337 & 6171253,176 & 729579,336 & 6171253,173 & 0,001 & 0,003 \\
14 & 729579,438 & 6171252,864 & 729579,449 & 6171252,857 & -0,011 & 0,007 \\
15 & 729579,562 & 6171252,6 & 729579,553 & 6171252,603 & 0,009 & -0,003 \\
16 & 729575,731 & 6171251,687 & 729575,729 & 6171251,683 & 0,002 & 0,004 \\
17 & 729575,814 & 6171251,419 & 729575,834 & 6171251,411 & -0,020 & 0,008 \\
18 & 729575,958 & 6171251,135 & 729575,952 & 6171251,134 & 0,006 & 0,001 \\
19 & 729568,597 & 6171248,783 & 729568,580 & 6171248,789 & 0,017 & -0,006 \\
20 & 729568,73 & 6171248,412 & 729568,726 & 6171248,417 & 0,004 & -0,005 \\
21 & 729568,795 & 6171248,231 & 729568,803 & 6171248,223 & -0,008 & 0,008 \\
22 & 729562,201 & 6171246,188 & 729562,204 & 6171246,191 & -0,003 & -0,003 \\
23 & 729562,341 & 6171245,81 & 729562,334 & 6171245,818 & 0,007 & -0,008 \\
24 & 729562,41 & 6171245,628 & 729562,408 & 6171245,631 & 0,002 & -0,003 \\
25 & 729555,891 & 6171243,616 & 729555,895 & 6171243,617 & -0,004 & -0,001 \\
26 & 729556,006 & 6171243,377 & 729556,003 & 6171243,377 & 0,003 & 0,000 \\
27 & 729556,112 & 6171243,069 & 729556,105 & 6171243,079 & 0,007 & -0,010 \\
28 & 729550,186 & 6171241,296 & 729550,182 & 6171241,300 & 0,004 & -0,004 \\
29 & 729550,305 & 6171241,07 & 729550,310 & 6171241,064 & -0,005 & 0,006 \\
30 & 729550,411 & 6171240,743 & 729550,415 & 6171240,747 & -0,004 & -0,004 \\
31 & 729538,652 & 6171236,606 & 729538,662 & 6171236,611 & -0,010 & -0,005 \\
32 & 729538,803 & 6171236,231 & 729538,816 & 6171236,234 & -0,013 & -0,003 \\
33 & 729538,879 & 6171236,044 & 729538,889 & 6171236,045 & -0,010 & -0,001 \\
34 & 729533,279 & 6171234,425 & 729533,290 & 6171234,444 & -0,011 & -0,019 \\
35 & 729533,426 & 6171234,044 & 729533,440 & 6171234,043 & -0,014 & 0,001 \\
36 & 729533,505 & 6171233,85 & 729533,499 & 6171233,856 & 0,006 & -0,006 \\
37 & 729528,457 & 6171232,45 & 729528,465 & 6171232,451 & -0,008 & -0,001 \\
38 & 729528,608 & 6171232,081 & 729528,612 & 6171232,077 & -0,004 & 0,004 \\
39 & 729528,686 & 6171231,903 & 729528,680 & 6171231,902 & 0,006 & 0,001 \\
40 & 729521,837 & 6171229,747 & 729521,841 & 6171229,753 & -0,004 & -0,006 \\
41 & 729521,985 & 6171229,364 & 729521,982 & 6171229,360 & 0,003 & 0,004 \\
42 & 729522,063 & 6171229,185 & 729522,063 & 6171229,184 & 0,000 & 0,001 \\
43 & 729517,553 & 6171227,989 & 729517,560 & 6171227,989 & -0,007 & 0,000 \\
44 & 729517,709 & 6171227,629 & 729517,708 & 6171227,634 & 0,001 & -0,005 \\
45 & 729517,78 & 6171227,442 & 729517,774 & 6171227,442 & 0,006 & 0,000 \\
46 & 729513,038 & 6171226,164 & 729513,042 & 6171226,161 & -0,004 & 0,003 \\
47 & 729513,198 & 6171225,787 & 729513,201 & 6171225,791 & -0,003 & -0,004 \\
48 & 729513,265 & 6171225,606 & 729513,284 & 6171225,557 & -0,019 & \SCC{HTML|FF0000} 0,049 \\
49 & 729507,361 & 6171223,854 & 729507,357 & 6171223,858 & 0,004 & -0,004 \\
50 & 729507,515 & 6171223,487 & 729507,510 & 6171223,491 & 0,005 & -0,004 \\
51 & 729507,589 & 6171223,298 & 729507,591 & 6171223,302 & -0,002 & -0,004 \\
52 & 729502,897 & 6171222,041 & 729502,891 & 6171222,026 & 0,006 & 0,015 \\
53 & 729503,061 & 6171221,668 & 729503,062 & 6171221,659 & -0,001 & 0,009 \\
54 & 729503,12 & 6171221,49 & 729503,117 & 6171221,496 & 0,003 & -0,006 \\
55 & 729498,329 & 6171220,185 & 729498,328 & 6171220,177 & 0,001 & 0,008 \\
56 & 729498,478 & 6171219,801 & 729498,488 & 6171219,807 & -0,010 & -0,006 \\
57 & 729498,557 & 6171219,624 & 729498,552 & 6171219,632 & 0,005 & -0,008 \\
58 & 729584,389 & 6171255,864 & 729584,388 & 6171255,868 & 0,001 & -0,004 \\
59 & 729517,339 & 6171228,518 & 729517,338 & 6171228,516 & 0,001 & 0,002 \\
60 & 729543,328 & 6171239,092 & 729543,333 & 6171239,102 & -0,005 & -0,010 \\
61 & 729558,679 & 6171245,372 & 729558,693 & 6171245,371 & -0,014 & 0,001 \\
\bottomrule
\end{longtblr}
\end{landscape}
\end{document}
答案3
减小表格的宽度;我是个 GOM,所以我以为你可能想到了这一点。从你展示的代码中,你可以从第一列和第三列中删除开头的“72”——这是给读者的练习。