Latex详细教程——图片、表格、公式

一、图片

1、占地一栏普通图片

使用figure环境,[thpb]表示希望在文中占地的优先级,[t] ~ top,顶部;[h] ~ here,当前位置;[p] ~ page of its own,浮动页;[b] ~ bottom,底部。

\begin{figure}[thpb]
\centering
\includegraphics[width=3in]{图像文件名称}
\caption{图例内容}
\label{fig1}
\end{figure}

2、占地两栏普通图片 

使用figure*环境实现。

\begin{figure*}[thpb]
\centering
\includegraphics[width=3in]{图像文件名称}
\caption{图例内容}
\label{fig1}
\end{figure*}

3、子图

多张图片组成一组图像,下面的例子展示了6张图片,每3张为一组子图的展示形式,子图图例为(a)、(b)...,整体的图例为Fig. 1。采用\subfloat工具使得多张图像为一组。该工具需要提前加载\usepackage[caption=false,font=footnotesize,labelfont=rm,textfont=rm]{subfig}宏包,同时规定了子图图例和总的图例的字体。

\begin{figure}[t]
\graphicspath{{图像所在文件夹(与tex文件同目录下的文件夹)/}}
\centering
\subfloat[第一组子图的图例]{\includegraphics[width=1in]{图片文件名1}%
\hspace{5pt}%
\includegraphics[width=1in]{图片文件名2}%
\hspace{5pt}%
\includegraphics[width=1in]{图片文件名3}%
\label{fig_first_case}}
\\
\subfloat[第二组子图的图例]{\includegraphics[width=1in]{图片文件名1}%
\hspace{5pt}%
\includegraphics[width=1in]{图片文件名2}%
\hspace{5pt}%
\includegraphics[width=1in]{图片文件名3}%
\label{fig_seconed_case}}
\caption{总图例说明}
\label{fig_sim}
\end{figure}

二、表格

1、普通三线表

其中\toprule和\bottomrule是表格顶端和底端的线,\midrule是中间的线,不写则没有线。

\begin{tabular}{ *{6}{>{\centering\arraybackslash}p{0.98cm}} }这种命令方式可消除表格内的竖线。

\begin{table}[t]
\caption{\textsc{表头}}
\label{table1}
\begin{center}
\begin{tabular}{ *{6}{>{\centering\arraybackslash}p{0.98cm}} }
\toprule
(1) & (2) &  (3) &  (4) &  (5) &  (6)\\
\midrule
$0$
& $0$
& $0$
& $0$
& $0$
& $0$\\
\bottomrule
\end{tabular}
\end{center}
\end{table}

2、内容跨两个横向单元格或者跨两个竖向单元格

跨两个横向:下面的例子一共占据9列,其中Sequence占据一列,剩下的占据两列

\begin{tabular}{ p{2.75cm} *{8}{>{\centering\arraybackslash}p{1.3cm}} }
\toprule
Sequence & \multicolumn{2}{c}{内容} & \multicolumn{2}{c}{内容} & \multicolumn{2}{c}{内容}& \multicolumn{2}{c}{内容}\\
\cmidrule(lr){2-3} \cmidrule(lr){4-5} \cmidrule(lr){6-7} \cmidrule(lr){8-9} 

跨两个横向以及跨两个竖向:

\begin{tabular}{ p{2.75cm} *{10}{>{\centering\arraybackslash}p{0.96cm}} }
\toprule
Sequence & \multicolumn{2}{c}{\multirow{2}{*}{\centering 内容}} & \multicolumn{2}{c}{\multirow{2}{*}{\centering 内容}} & \multicolumn{2}{c}{\multirow{2}{*}{\centering 内容}} &  \multicolumn{2}{c}{内容} &  \multicolumn{2}{c}{内容}\\
& & & & & & &\multicolumn{2}{c}{内容} &  \multicolumn{2}{c}{内容}\\
\cmidrule(lr){2-3} 
\cmidrule(lr){4-5} \cmidrule(lr){6-7} \cmidrule(lr){8-9} \cmidrule(lr){10-11}

三、公式

1、上下标:


H_{下标}^{上标}

2、求和:

sum_{i=1}^{n} h_{i}

3、分式:

\frac {分子}{分母}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值