如何为所有表格设置相同的字体大小?

如何为所有表格设置相同的字体大小?

我正在尝试使所有表格的字体大小相同。我有不同的表格,标题和列数和行数不同,这导致字体大小因情况而异。我尝试了在互联网上找到的不同方法,但尚未成功。

以下是一个例子:

\documentclass[12pt,twoside]{ociamthesis}

\usepackage{float}
\usepackage{geometry}
\usepackage{lipsum}
\usepackage{fancyhdr}
\pagestyle{fancy}
\renewcommand{\sectionmark}[1]{\markright{\thesection~- ~#1}}
\renewcommand{\chaptermark}[1]{\markboth{\chaptername~\thechapter~-~ #1}{}}
\fancypagestyle{main}{
\fancyhead[LE,RO]{\thepage}
\fancyhead[RE]{\nouppercase{\leftmark}}
\fancyhead[LO]{\nouppercase{\rightmark}}
}


\pagestyle{main}

\begin{document}

\begin{table}[htbp]
\centering
\begin{tabular}{|l|l|l|l|}
\hline
Layer     & T(°C) & $\mathrm{B(S^{-1}MPa^{-1})}$ & n    \\ \hline
TBC      & 1000  & 1.8e-7              & 1    \\ \hline
TGO       & 1000  & 7.3e-4              & 1    \\ \hline
BC        & 600   & 6.54e-19            & 4.57 \\ \hline
          & 700   & 2.2e-12             & 2.99 \\ \hline
          & 800   & 1.84e-7             & 1.55 \\ \hline
          & 850   & 2.15e-8             & 2.45 \\ \hline
Substrate & 10    & 4.85e-36            & 1    \\ \hline
          & 1200  & 2.25e-9             & 3    \\ \hline
\end{tabular}
\caption{Creep properties of TBC system}
\label{tab:matcreep}
\end{table}

\begin{table}[htbp]
    \centering
    \renewcommand{\arraystretch}{1.25}
    \resizebox{0.75\linewidth}{!}{
    \begin{tabular}{|*{5}{c|}}  % repeats {c|} 18 times
    \hline
    \multirow{3}*{Specimen type} & \multicolumn{4}{c|}{Bond coat type} \\ \cline{2-5}
    & \multicolumn{2}{c|}{LCO22} & \multicolumn{2}{c|}{PWA 286} \\ \cline{2-5}
    & hole diameter (mm) & Angle & hole diameter (mm) & Angle\\ \hline
    \multirow{2}*{Flash lamp, percussion} & 0.5 & 90 & 0.5 & 90 \\ \cline{2-5}
    & 0.5 & 30 & 0.5 & 30 \\    
    \hline
    Fiber, trepanation & 0.5 & 30 & 0.5 & 30  \\
    \hline  
    Fiber, percussion & 0.5 & 30 & 0.5 & 30 \\ \hline
    \end{tabular}}
    \caption{Test matrix for cyclic oxidation tests.}
    \label{tab:cycoxidplan}
\end{table} 

\begin{table}[ht]
    \centering
    \renewcommand{\arraystretch}{3}
    \resizebox{1\linewidth}{!}{
\begin{tabular}{|*{8}{c|}}
\hline
Crack length &  Test coloumn1 & Test coloumn2 & Test coloumn3 & Test coloumn4 & Test coloumn5  & Test coloumn6 & Test coloumn7 \\ \hline
TBC          & 37 $\pm$ 31                  & 103 $\pm$ 94                 & 142 $\pm$ 70                 & 337 $\pm$ 436                 &94 $\pm$ 74  & 100 $\pm$ 107& 41 $\pm$ 33  \\ \hline
BC-Sub int.   & 71 $\pm$ 15                  & 138 $\pm$ 42                 & 156 $\pm$ 7                 & 400 $\pm$ 50                 &47 $\pm$ 22  &136 $\pm$ 35 & 20 $\pm$ 10  \\ \hline
Substrate    & 42 $\pm$ 9                  & 52 $\pm$ 5                  & 58 $\pm$ 22                  & 91                  & 78 $\pm$ 12 &50 $\pm$ 26& 0 \\ \hline
\end{tabular}}
\caption{Measurement of averaged crack length in TBC layer, at BC/substrate interface (shown as BC-Sub int.), and in substrate.}
\label{tab:fibertrepperccracklength}
\end{table}


\begin{table}[ht]
    \centering
    \renewcommand{\arraystretch}{3}
    \resizebox{1\linewidth}{!}{
\begin{tabular}{|*{8}{c|}}
\hline
Recast thickness & Test coloumn1 & Test coloumn2 & Test coloumn3 & Test coloumn4 & Test coloumn5  & Test coloumn6 & Test coloumn7 \\ \hline
TBC recast          & 19 $\pm$ 8                  & 83 $\pm$ 46                 & 56 $\pm$ 17                 & 77 $\pm$ 24                 & 35 $\pm$ 12  & 33 $\pm$ 12 & 33 $\pm$ 19  \\ \hline
BC-Sub recast   & 23 $\pm$ 8                  & 27 $\pm$ 10                 & 46 $\pm$ 20                 & 60 $\pm$ 21                 &29 $\pm$ 20  & 20 $\pm$ 13 & 0  \\ \hline
\end{tabular}}
\caption{Measured averaged thickness of TBC and BC/substrate recast layers}
\label{tab:fibertreppercrecastt}
\end{table}



\end{document}

前两个表的输出是:

在此处输入图片描述

答案1

1)如果需要,不要缩放表格,而只是减小字体\normalsize标准较小尺寸:\small或者\footnotesize但请不要超出这个范围。请注意,这不仅会产生一致的尺寸,而且还会产生良好字体中的适当字形(例如,当缩放到相同尺寸时, a{\huge Q}将与 a 完全不同{\tiny Q})。顺便说一句,在表 1 和表 2 中,这不是必需的,假设文章的默认边距(抱歉,我没有该类ociamthesis

2) 如果这还不够(表格 3 和 4),或者(可能更好)尝试通过重新设计表格来获得水平空间和/或调整列宽并允许在单元格中换行。使用p列、m列(array包)和tabularxtabulary对于调整表格非常有用。

3) 最后与问题无关,但要避免使用垂直线和多余的水平线,使用更好的水平线(包 booktabs)并尝试使用siunitx包对齐/格式化数字。MWE 还展示了其他一些小技巧,以便在有/没有显式数学环境(新列 M)的情况下获得更好的间距\pm。我将标题移到前面,因为大多数期刊都使用这种风格,但显然是可选的。(四个表格位于同一个浮动中只是为了方便将 MWE 保持在单个页面中。)

姆韦

\documentclass[12pt]{article}
\usepackage{graphicx,multirow,booktabs,tabulary,tabularx,array,makecell,siunitx}
\newcolumntype{M}{>{$}X<{$}} 
\usepackage[tmargin=1cm,bmargin=1cm]{geometry}
\def\ch#1{\multicolumn{1}{X}{\centering #1}}
\pagestyle{empty}

\begin{document}

\begin{table}
\abovecaptionskip2em % some space between tables for the MWE only
\centering
\caption{Creep properties of TBC system}
\begin{tabular}{lrS[table-format=+1.2e+2]S}\toprule
Layer       & T(°C) & \hfil$\mathrm{B(S^{-1}MPa^{-1})}$ & n \\\midrule 
TBC         & 1000  & 1.8e-7    & 1 \\ 
TGO         & 1000  & 7.3e-4    & 1 \\ 
BC          & 600   & 6.54e-19  & 4.57 \\ 
            & 700   & 2.2e-12   & 2.99 \\ 
            & 800   & 1.84e-7   & 1.55 \\ 
            & 850   & 2.15e-8   & 2.45 \\ 
Substrate   & 10    & 4.85e-36  & 1 \\ 
            & 1200  & 2.25e-9   & 3 \\\bottomrule 
\end{tabular}

 \caption{Test matrix for cyclic oxidation tests.}
\begin{tabulary}{\linewidth}{LCcCc}\toprule
 \multirowcell{3}{Specimen\\type}   & \multicolumn{4}{c}{Bond coat type} \\ \cmidrule{2-5}
    & \multicolumn{2}{c}{LCO22} & \multicolumn{2}{c}{PWA 286} \\
    \cmidrule(rl){2-3}\cmidrule(rl){4-5}
    & hole diameter (mm)    & Angle & hole diameter (mm)    & Angle\\ 
 \multirowcell{2}{Flash lamp,\\percussion}  & 0.5   & 90    & 0.5   & 90 \\ \cmidrule{2-5} % ??????
    & 0.5   & 30    & 0.5   & 30 \\ 

 Fiber, trepanation & 0.5   & 30    & 0.5   & 30 \\

 Fiber, percussion  & 0.5   & 30    & 0.5   & 30 \\\bottomrule 
 \end{tabulary}

\footnotesize
\caption{Measurement of averaged crack length in TBC layer, at BC/substrate interface (shown as BC-Sub int.), and in substrate.}
\begin{tabulary}{\linewidth}{l*{7}{C}}\toprule
Crack length    & Test column1  & Test column2  & Test column3  & Test column4  & Test column5  & Test column6  & Test column7 \\\midrule 
TBC         & $37\pm31$     & $103\pm94$    & $142\pm70$    & $337\pm436$   & $94\pm74$ & $100\pm107$   & $41\pm33$ \\ 
BC-Sub int. & $71\pm15$     & $138\pm42$    & $156\pm7$     & $400\pm50$    & $47\pm22$ & $136\pm35$    & $20\pm10$ \\ 
Substrate   & $42\pm9$      & $5\pm5$       & $58\pm22$     & 91            & $78\pm12$ & $50\pm26$     & 0 \\\bottomrule 
\end{tabulary}

\caption{Measured averaged thickness of TBC and BC/substrate recast layers}

\begin{tabularx}{\linewidth}{l*{7}{M}}\toprule
Recast thickness    & \ch{Test column1} & \ch{Test column2} & \ch{Test column3} & \ch{Test column4} & \ch{Test column5} & \ch{Test column6} & \ch{Test column7} \\\midrule 
TBC recast      & 19\pm8    & 83\pm46   & 56\pm17   & 77\pm24   & 35\pm12   & 33\pm12   & 33\pm19 \\ 
BC-Sub recast   & 23\pm8    & 27\pm10   & 46\pm20   & 60\pm21   & 29\pm20   & 20\pm13   & 0 \\\bottomrule 
\end{tabularx}
\end{table}

\end{document}

相关内容