1、首先上绝杀,这个制作表格真的是太方便啦!
当然也不是万能的。
https://www.tablesgenerator.com/#
2、Latex 表格内的公式实现换行的方法
首先在导言区添加:
\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}} %放在导言区
如下:
然后在tabular内的格子内使用 \tabincell{c}{} 插入相应内容, 就可以在表格中自动换行
如下:
\begin{table}
\newcommand{\tabincell}[2]{\begin{tabular}{@{}#1@{}}#2\end{tabular}} %导言区
\centering
\begin{tabular}{|c|c|c|}
\hline
1 & \tabincell{c}{the first line \\ the next\\the next\\ last} & \tabincell{c}{one \\ one}\\ %换行,单元格内的每个元素用\tabincell{c}{放表格内容}
\hline
2 & \tabincell{c}{hello\\ aha\\ ok \\yes \\en} & \tabincell{c}{two \\ two \\ two} \\
\hline
\end{tabular}
3、表格里的字体大小更改
Latex 设置字体大小命令由小到大依次为:
\tiny
\scriptsize
\footnotesize
\small
\normalsize
\large
\Large
\LARGE
\huge
\Huge
添加位置:
\begin{table}[h]\footnotesize%此处为表格字体设置
\begin{tabular}
\end{tabular}
\end{table}
4、(对于我这个小白来说)
\begin{table}
\end{table}
表格只跨一栏
\begin{table*}
\end{table*}
可以使表格跨两栏