失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > latex中表格 图片的排版

latex中表格 图片的排版

时间:2022-02-17 10:01:58

相关推荐

latex中表格 图片的排版

一、图、表位置

1. 第一行标记图像、表格位置:

(1) [h]here; [t]top; [b]bottom;[p]浮动

(2) 强行固定位置,不浮动:加包\usepackage{float},用[H]

2. 标记与引用

标记:\label{Tab1};引用:Table~\ref{Tab1}

二、表格的排版

1. center:表格居中

2. 表格列数{cccc}: 四列内容居中;l: 居左;r: 居右。

{|c|c|c|}: 竖线表示列与列之间有竖线

\hline:表示行与行之间的横线

3. 表格内容输入

xx & xx& xx& ~\\

列与列之间用&间隔,换行用\\,无输入用~或者不写

\begin{table}[htbp]\caption{diet.}\begin{center}\begin{tabular}{cccc}\hline& moring& afternoon & evening \\\hlineI & 10&20&15\\U & 10&30&15\hline\end{tabular}\label{tab1}\end{center}\vs{-4mm}\end{table}

4. 合并单元格

合并行:\multirow{2}*{内容} 合并两行,下一行对应列用~代替

\begin{table}[h!]\caption{diet.}\begin{center}\begin{tabular}{c|c|c|c}\hline& \multirow{2}*{moring of today}& afternoon & evening \\&~& a&b\\\hlineI & 10&20&15\\U & 10&30&15\\\hline\end{tabular}\label{tab18}\end{center}\vs{-4mm}\end{table}

合并列:

\hline& moring & \multicolumn{2}{c}{afternoon vs evening} \\\hline

表头三叉:加包\usepackage{diagbox}

\diagbox{people}{amount}{time}& moring & afternoon&evening \\

三、图像的插入与排列

1. 单张图

\begin{figure}[h!]\begin{center}\includegraphics[width=9.0cm]{Figure8}\caption{Image of orange.}\label{fig8}\end{center}\vs{-4mm}\end{figure}

插入pdf格式的图,或者一般需要figure8.eps

2.两张图并排

加包 \usepackage{caption} \usepackage{subfigure}

\begin{figure}[H]\subfigure[]{\centering\includegraphics[width=0.48\textwidth]{Figure5(a).pdf}}\subfigure[]{\centering\includegraphics[width=0.48\textwidth]{Figure5(b).pdf}}\caption{Images of a and b\label{fig5}}\end{figure}

如果觉得《latex中表格 图片的排版》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。