对 LaTeX 表格绘图感到沮丧

  • 本文关键字:绘图 LaTeX 表格 latex
  • 更新时间 :
  • 英文 :


我正在尝试在 LaTeX 中绘制一个适合正常页边距的 6 列表,并且数据在每个列标题下居中。可以换行列标题。在过去的 3 个小时里,我阅读了各种答案,似乎与绘制表格相关的每个问题都有不同的解决方案。结果,我不知道该怎么做。我的表格目前从页边距向右延伸。我不允许使用任何包,如 tabularx 等,因此必须在表格环境中绘制表,并且在开始表调用上方的文档中不会加载其他包。下面是用于绘制表的当前代码:

begin{table}
caption{Experimental Details for PRE1}
centering
begin{tabular}{cccccc}
hline
PRE1 Interval & Elapsed Time (min) & Flow (lps) & Sediment Feed (kg/min) & Avg. Flux (kg/min) & DEM/Photo\
hline
1 & 19 & 42 & 0.50 & 0.009 & yes\
2 & 50 & 42 & 0.50 &  0.027 & yes \
3 & 110 & 42 & 0.50 & 0.064 & yes \
4 & 230 & 42 & 0.50 & 0.048 & yes \
5 & 470 & 42 & 0.50 & 0.027 & yes \
6 & 710 & 42 & 0.50 & 0.050 & yes \
7 & 950 & 42 & 0.50 & 0.030 & yes \
8 & 1190 & 42 & 0.50 & 0.016 & yes \
9 & 1430 & 42 & 0.50 & 0.099 & yes \
10 & 1670 & 42 & 0.50 & 0.058 & yes \
11 & 1910 & 42 & 0.50 & 0.055 & yes \
12 & 2150 & 42 & 0.50 & 0.031 & yes \
13a & 2180 & 60 & 0.50 & 4.284 & no \
13b & 2195 & 60 & 0.80 & 7.113 & no \
13c & 2225 & 60 & 0.80 & 3.670 & yes \
14a & 2270 & 60 & 0.80 & 2.296 & no \
14b & 2390 & 60 & 0.80 & 0.917 & yes \
15a & 2405 & 80 & 1.00 & 3.848 & no \
15b & 2429 & 80 & 1.00 & 3.840 & no \
15c & 2450 & 80 & 1.00 & 3.303 & yes \
16a & 2480 & 80 & 1.00 & 2.554 & no \
16b & 2525 & 80 & 1.00 & 1.336 & no \
16c & 2570 & 80 & 1.00 & 0.927 & yes \
17 & 2630 & 80 & 1.00 & 1.067 & yes \
18 & 2870 & 42 & 0.50 & 0.033 & yes \
19 & 3110 & 42 & 0.50 & 0.016 & yes \
20 & 3350 & 42 & 0.50 & 0.013 & yes \
21 & 3590 & 42 & 0.50 & 0.018 & yes \
22 & 3830 & 42 & 0.50 & 0.022 & yes \
23 & 4070 & 42 & 0.50 & 0.143 & yes \
24 & 4310 & 42 & 0.50 & 0.509 & yes \
25a & 4336 & 60 & 0.80 & 4.488 & no \
25b & 4351 & 60 & 0.80 & 9.622 & no \
25c & 4370 & 60 & 0.80 & 5.479 & no \
25d & 4385 & 60 & 0.80 & 4.527 & yes \
26a & 4430 & 60 & 0.80 & 2.436 & no \
26b & 4550 & 60 & 0.80 & 0.595 & yes \
27a & 4565 & 80 & 0.80 & 2.231 & no \
27b & 4589 & 80 & 0.80 & 6.212 & no \
27c & 4610 & 80 & 0.80 & 5.062 & yes \
28a & 4640 & 80 & 0.80 & 2.069 & no \
28b & 4685 & 80 & 0.80 & 1.132 & no \
28c & 4730 & 80 & 0.80 & 0.892 & yes \
29 & 4790 & 80 & 0.80 & 0.600 & yes \
hline
multicolumn{2}{l}{$^{a}$The repeat phase of PRE1 began at elapse time 2630 minutes.}\
multicolumn{2}{l}{$^{b}$The elapse time indicates the end time for the specified experimental interval.}
label{tab1}
end{tabular}
end{table}

我尝试使用维基教科书帮助页面中的以下语法类型,因为这些列可以被视为相同,但没有运气:

begin{tabular}{l*{6}{c}r}

我将不胜感激可以提供的任何帮助。提前谢谢。

我想出了我的问题。困难在于脚注。在脚注中,我只为第一个多列参数指定值 2,因此第 3-6 列被推到右侧,具体取决于脚注 a 和 b 中的文本量。这是更正的工作代码。

begin{table}
caption{Experimental Details for PRE1}
centering
begin{tabular}{l*{5}{c}r}
hline
PRE1 Interval & Elapsed Time (min) & Flow (lps) & Sediment Feed (kg/min) & Avg. Flux (kg/min) & DEM/Photo\
hline
0 & 0 & - & - & - & yes\
1 & 19 & 42 & 0.50 & 0.009 & yes\
2 & 50 & 42 & 0.50 &  0.027 & yes \
3 & 110 & 42 & 0.50 & 0.064 & yes \
4 & 230 & 42 & 0.50 & 0.048 & yes \
5 & 470 & 42 & 0.50 & 0.027 & yes \
6 & 710 & 42 & 0.50 & 0.050 & yes \
7 & 950 & 42 & 0.50 & 0.030 & yes \
8 & 1190 & 42 & 0.50 & 0.016 & yes \
9 & 1430 & 42 & 0.50 & 0.099 & yes \
10 & 1670 & 42 & 0.50 & 0.058 & yes \
11 & 1910 & 42 & 0.50 & 0.055 & yes \
12 & 2150 & 42 & 0.50 & 0.031 & yes \
13a & 2180 & 60 & 0.50 & 4.284 & no \
13b & 2195 & 60 & 0.80 & 7.113 & no \
13c & 2225 & 60 & 0.80 & 3.670 & yes \
14a & 2270 & 60 & 0.80 & 2.296 & no \
14b & 2390 & 60 & 0.80 & 0.917 & yes \
15a & 2405 & 80 & 1.00 & 3.848 & no \
15b & 2429 & 80 & 1.00 & 3.840 & no \
15c & 2450 & 80 & 1.00 & 3.303 & yes \
16a & 2480 & 80 & 1.00 & 2.554 & no \
16b & 2525 & 80 & 1.00 & 1.336 & no \
16c & 2570 & 80 & 1.00 & 0.927 & yes \
17 & 2630 & 80 & 1.00 & 1.067 & yes \
18 & 2870 & 42 & 0.50 & 0.033 & yes \
19 & 3110 & 42 & 0.50 & 0.016 & yes \
20 & 3350 & 42 & 0.50 & 0.013 & yes \
21 & 3590 & 42 & 0.50 & 0.018 & yes \
22 & 3830 & 42 & 0.50 & 0.022 & yes \
23 & 4070 & 42 & 0.50 & 0.143 & yes \
24 & 4310 & 42 & 0.50 & 0.509 & yes \
25a & 4336 & 60 & 0.80 & 4.488 & no \
25b & 4351 & 60 & 0.80 & 9.622 & no \
25c & 4370 & 60 & 0.80 & 5.479 & no \
25d & 4385 & 60 & 0.80 & 4.527 & yes \
26a & 4430 & 60 & 0.80 & 2.436 & no \
26b & 4550 & 60 & 0.80 & 0.595 & yes \
27a & 4565 & 80 & 0.80 & 2.231 & no \
27b & 4589 & 80 & 0.80 & 6.212 & no \
27c & 4610 & 80 & 0.80 & 5.062 & yes \
28a & 4640 & 80 & 0.80 & 2.069 & no \
28b & 4685 & 80 & 0.80 & 1.132 & no \
28c & 4730 & 80 & 0.80 & 0.892 & yes \
29 & 4790 & 80 & 0.80 & 0.600 & yes \
hline
multicolumn{6}{l}{$^{a}$The repeat phase of PRE1 began at elapse time 2630 minutes.}\
multicolumn{6}{l}{$^{b}$The elapse time indicates the end time for the   specified experimental interval.}
label{tab1}
end{tabular}
end{table}

请注意,我在 \begin{tabular} 调用中使用了多个相同的列解决方案。 下面是更正后的表的图像。这个问题已经得到了回答。

最新更新