# [转载]使用Latex制作表格

## 方法1

1. 程序算例1：注意黑色部分的标记，与图对应

\begin{figure}

\centering

\begin{tabular}{|c|c|}

\hline

% after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...

AAA & BBB \\

CCC & DDD \\

\hline

\end{tabular}

\caption{SSSS}

\end{figure}

%%

END

## 方法2

1. 程序算例2：注意黑色部分的标记，与图对应

\begin{figure}

\centering

\begin{tabular}{|c|c|}

% \hline

% after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...

AAA & BBB \\

CCC & DDD \\

% \hline

\end{tabular}

\caption{SSSS}

\end{figure}

END

## 放法3

1. 程序算例3：注意黑色部分的标记，与图对应

\begin{figure}

\centering

\begin{tabular}{cc}

% \hline

% after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...

AAA & BBB \\

CCC & DDD \\

% \hline

\end{tabular}

\caption{SSSS}

\end{figure}

END

## 方法4

\begin{table}

\tbl{Radio-band beaming model parameters for\\ {FSRQs and BL Lacs.}}

{\begin{tabular}[l]{@{}lcccccc}

\toprule

Class$^{\rm a}$ & $\gamma _1$ & $\gamma _2$$^{\rm b}$

& $\langle \gamma \rangle$

& $G$ & $|{\bm f}|$ & $\theta _{c}$ \\

\colrule

BL Lacs &5 & 36 & 7 & $-4.0$ & $1.0\times 10^{-2}$ & 10$^\circ$ \\

FSRQs & 5 & 40 & 11 & $-2.3$ & $0.5\times 10^{-2}$ & 14$^\circ$ \\

\botrule

\end{tabular}}

\tabnote{$^{\rm a}$This footnote shows what footnote symbols to use.}

\tabnote{$^{\rm b}$This footnote shows the text turning over when a long footnote is added.}

\label{symbols}

\end{table}

END

## 方法5

1. 程序算例1：注意黑色部分的标记

% \begin{table}[!h]

\begin{table}

\centering

\caption{Optimal results for two different load cases}

\label{Tab:03}

\begin{tabular}{ccccc}

\hline

% after \\: \hline or \cline{col1-col2} \cline{col3-col4} ...

Cases & Component shapes & Initial layout & Optimized layout & Objective function\\

\hline

\multirow{3}{*}{Case 1}  &rectellipse & \tabincell{c}{(50, 30, $0$) \\ (70, 30, $0$)}

& \tabincell{c}{(35.145, 24.633, 2.0298) \\ (85.182, 24.542, -0.7411)}

& \multirow{3}{*}{67.359}  \\

\cline{2-4}

& calabash-shaped & \tabincell{c}{(10, 30, $\pi /2$) \\ (110, 30, $\pi /2$)}

& \tabincell{c}{(8.635, 28.556, 0.836) \\ (110.299, 28.578, 2.283)}

&   \\

\cline{1-5}

\multirow{3}{*}{Case 2} &rectellipse & \tabincell{c}{(50, 30, $0$) \\ (70, 30, $0$)}

& \tabincell{c}{(36.049, 35.603, 0.506) \\ (83.621, 35.087, 0.885)}

& \multirow{3}{*}{199.781}  \\

\cline{2-4}

& calabash-shaped & \tabincell{c}{(10, 30, $\pi /2$) \\ (110, 30, $\pi /2$)}

& \tabincell{c}{(8.469, 31.537, 0.788)$^a$ \\ (112.882, 30.057, 1.864)}

&  \\

\cline{1-5}

\hline

\end{tabular}

\footnotesize{$^a$ The smallest spatial unit is county}\\

\end{table}

END

## 方法6

\begin{table}

% table caption is above the table

\label{tab:1}       % Give a unique label

% For LaTeX tables use

\begin{tabular}{lll}

\hline\noalign{\smallskip}

first & second & third  \\

\noalign{\smallskip}\hline\noalign{\smallskip}

number & number & number \\

number & number & number \\

\noalign{\smallskip}\hline

\end{tabular}

\end{table}

END

## 方法7

% \usepackage{multirow}

\begin{table*}[]

\scriptsize

\centering

\caption{Optimized results of the circular arch for different slenderness and opening angles}

\label{Tab03}

\begin{tabular}{cccccccccc}

\toprule

\multirow{2}{*}{Opening angle} & \multicolumn{3}{c}{$R/r=10$} & \multicolumn{3}{c}{$R/r=25$} & \multicolumn{3}{c}{$R/r=50$} \\

\cmidrule(r){2-4} \cmidrule(r){5-7} \cmidrule(r){8-10}

&  $\omega_{1} (\%)$      &  $r_{{\rm min}}/r_0$   &   $r_{{\rm max}}/r_0$

&  $\omega_{1} (\%)$      &  $r_{{\rm min}}/r_0$   &   $r_{{\rm max}}/r_0$

&  $\omega_{1} (\%)$      &  $r_{{\rm min}}/r_0$   &   $r_{{\rm max}}/r_0$  \\

\midrule

$\varphi=60^{\circ}$             &3.920                          & 0.793                    & 1.355                   & 5.243           & 0.558           & 1.122          & 6.694           & 0.503           & 1.133          \\

$\varphi=90^{\circ}$             &4.061                          & 0.660                    & 1.106                   & 7.242           & 0.500           & 1.136          & 8.060           & 0.501           & 1.140          \\

$\varphi=120^{\circ}$             &6.480                          & 0.558                    & 1.127                   & 9.011           & 0.500           & 1.145          & 9.535           & 0.500           & 1.147           \\

$\varphi=150^{\circ}$             &8.756                          & 0.500                    & 1.142                   & 10.763           & 0.500          & 1.153          & 11.126           & 0.500          & 1.155            \\

\bottomrule

\end{tabular}

\end{table*}

END

http://blog.sciencenet.cn/blog-812827-1221783.html

## 相关博文

GMT+8, 2021-4-12 05:20