latex表格

2022-02-27  本文已影响0人  Y_166d

分享一款可以自动生成表格代码,支持excel直接复制www.tablesgenerator.com


基本表格代码

\begin{table}[参数]
    \label{tab:1}       % 标注
    \begin{tabular}{c|ccccc}
        a & 1 & 1 & -13 & -1 & -12 \\ 
        c &   & 3 & 12  & -3 & -12 \\ \cline{1-6}
        b & 1 & 4 & -1  & -4 & -24($b_0$=P(3)) 
    \end{tabular}
\end{table}
  1. 表格位置的控制

参考
第一行代码\begin{table}[!htbp]
其中htbp是可选的,它们分别代表
!-忽略“美学”标准
h-here
t-top
b-bottom
p-page-of-its-own

  1. 表格内的线
    第二行代码:\begin{tabular}{c|ccccc} ,指在第一二列之间添加实线,并且第一到六列居中。
    第四行代码c & & 3 & 12 & -3 & -12 \\ \cline{1-6},其中\cline{1-6}指在改行1-6列添加下划线
    另,在每一行开头\hline可以添加上划线(不能控制长度)
    \\表示跳到下一行
上一篇 下一篇

猜你喜欢

热点阅读