我正在尝试制作这个表格,但它的宽度太大,所以它超出了页面。我尝试了很多方法来解决它,但无法将它保持在页边距内。有什么方法可以调整大小吗?
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\setlength{\arrayrulewidth}{0.4mm}
\setlength{\tabcolsep}{18pt}
\renewcommand{\arraystretch}{1.5}
\begin{document}
\begin{tabular}{ |p{2cm}|p{3.5cm}|p{3.5cm}|p{3.5cm}|p{3.5cm}| }
\hline
\multicolumn{5}{|c|}{Numerical Comparison} \\
\hline
Region & FIESTA & MB & Old MOB & New MOB \\
\hline
$\bm{\mathcal{R}_{1}}$ (s=0.5, t=0.5, m=1, $\epsilon=0.1$) & \textbf{5.200296953044144} & \textbf{5.200296953044144} & \textbf{5.200296953044144} & \textbf{5.200296953044144}\\
$\bm{\mathcal{R}_{2}}$ (s=0.5, t=0.5, m=1, $\epsilon=0.1$) & \textbf{5.200296953044144} & \textbf{5.200296953044144} & \textbf{5.200296953044144} & \textbf{5.200296953044144}\\
$\bm{\mathcal{R}_{3}}$ (s=0.5, t=0.5, m=1, $\epsilon=0.1$) & \textbf{5.200296953044144} & \textbf{5.200296953044144} & \textbf{5.200296953044144} & \textbf{5.200296953044144} \\
$\bm{\mathcal{R}_{4}}$ (s=0.5, t=0.5, m=1, $\epsilon=0.1$) & \textbf{5.200296953044144} & \textbf{5.200296953044144} & \textbf{5.200296953044144} & \textbf{5.200296953044144} \\
$\bm{\mathcal{R}_{5}}$ (s=0.5, t=0.5, m=1, $\epsilon=0.1$) & \textbf{5.200296953044144} & \textbf{5.200296953044144} & \textbf{5.200296953044144} & \textbf{5.200296953044144} \\
\hline
\end{tabular}
\end{document}
答案1
我建议一种变体布局,其中第一列中的规格被分组为带有的表格注释,并且使用来自的列类型threeparttable
将数字四舍五入到十进制数 10 位,以便您获得格式正确且对齐的数字。S
siunitx
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{siunitx, threeparttable}
\usepackage{bm}
\setlength{\arrayrulewidth}{0.4mm}
\renewcommand{\arraystretch}{1.5}
\begin{document}
\centering
\begin{threeparttable}[flushleft, online]
\sisetup{table-format=1.10, table-number-alignment=center, round-mode=places, round-precision=10}
\setlength{\tabcolsep}{4pt}
\noindent\begin{tabular}{ |>{$}l <{$}|*{4}{S|}}
%\hline
\multicolumn{5}{c}{Numerical Comparison} \\
\hline
\text{Region} & {FIESTA} & {MB} & {Old MOB} & {New MOB} \\
\hline
\bm{\mathcal{R}_{1}}\tnote{a}& 5.200296953044144 & 5.200296953044144 & 5.200296953044144 & 5.200296953044144\\
\bm{\mathcal{R}_{2}}\tnote{b}& 5.200296953044144 & 5.200296953044144 & 5.200296953044144 & 5.200296953044144\\
\bm{\mathcal{R}_{3}}\tnote{c} & 5.200296953044144 & 5.200296953044144 & 5.200296953044144 & 5.200296953044144 \\
\bm{\mathcal{R}_{4}}\tnote{d}& 5.200296953044144 & 5.200296953044144 & 5.200296953044144 & 5.200296953044144 \\
\bm{\mathcal{R}_{5}}\tnote{e} & 5.200296953044144 & 5.200296953044144 & 5.200296953044144 & 5.200296953044144 \\
\hline
\end{tabular}
\small
\begin{tablenotes}[para]
\item[a]s=0.5, t=0.5, m=1, $\epsilon=0.1$%
\item[b]s=0.5, t=0.5, m=1, $\epsilon=0.1$ \\
\item[c]s=0.5, t=0.5, m=1, $\epsilon=0.1$%
\item[d]s=0.5, t=0.5, m=1, $\epsilon=0.1$ \\
\item[e]s=0.5, t=0.5, m=1, $\epsilon=0.1$
\end{tablenotes}
\end{threeparttable}
\end{document}
答案2
如果您确实想要(或需要)在所有四个数据列中显示 15 位小数,那么唯一明智的做法是以横向格式显示材料。无论您做什么,都不要通过以横向格式显示所有数字来给读者造成视觉冲击大胆的。
在以下解决方案中,我采用了一种tabularx
环境。第一列设置为允许自动换行,从第二行开始使用悬挂缩进。我还删除了所有垂直线,以使材料看起来更加开放。
\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{bm,tabularx,amssymb,rotating,booktabs,caption}
\begin{document}
\begin{sidewaystable}
\caption*{Numerical Comparison}
\begin{tabularx}{\textwidth}{@{}
>{\raggedright\hangafter1\hangindent2em}X llll @{}}
\toprule
Region & FIESTA & MB & Old MOB & New MOB \\
\midrule
$\bm{\mathcal{R}}_{1}$ (s=0.5, t=0.5, m=1, $\epsilon=0.1$) & 5.200296953044144 & 5.200296953044144 & 5.200296953044144 & 5.200296953044144\\
\addlinespace
$\bm{\mathcal{R}}_{2}$ (s=0.5, t=0.5, m=1, $\epsilon=0.1$) & 5.200296953044144 & 5.200296953044144 & 5.200296953044144 & 5.200296953044144\\
\addlinespace
$\bm{\mathcal{R}}_{3}$ (s=0.5, t=0.5, m=1, $\epsilon=0.1$) & 5.200296953044144 & 5.200296953044144 & 5.200296953044144 & 5.200296953044144\\
\addlinespace
$\bm{\mathcal{R}}_{4}$ (s=0.5, t=0.5, m=1, $\epsilon=0.1$) & 5.200296953044144 & 5.200296953044144 & 5.200296953044144 & 5.200296953044144\\
\addlinespace
$\bm{\mathcal{R}}_{5}$ (s=0.5, t=0.5, m=1, $\epsilon=0.1$) & 5.200296953044144 & 5.200296953044144 & 5.200296953044144 & 5.200296953044144\\
\bottomrule
\end{tabularx}
\end{sidewaystable}
\end{document}