Latex打怪升级
列表
LaTeX中三种列举的形式:itemize和enumerate还有description
itemize(意为分条目):
\begin{itemize}
\item[*] a
\item[*] b
\end{itemize}
这样出来的形式为
* a
* b12345678
item的方括号里的内容是为定制前面的符号,可以不要(连同括号),那么前面的符号就是默认的黑点,也可以换为其他的符号,如-,+,等
(2)enumerate(意为编号):
\begin{enumerate}[1)]
\item a
\item b
\end{enumerate}
这样出来的形式为:
1) a
2) b12345678
方括号里的内容是定制前面的编号的形式,可以不加,默认就是简单的数字,也可以换成[step 1],[(i)]等,LaTeX可以自动识别。但是要注意,使用了方括号,必须在前面加\usepackage{enumerate}.
(3)description(意为描述):
\begin{description}
\item[item a] a
\item[item b] b
\end{description}
出来的形式为:
item a a
item b b12345678
方括号的词会作为一个描述出现在item的前面。
图片
latex可以很方便地插入EPS、PDF、PNG、JPEG格式的图片。
一般图形都是处在浮动环境中。之所以称为浮动是指最终排版效果图形的位置不一定与源文件中的位置对应,这也是刚使用LATEX同学可能遇到的问题。如果要强制固定浮动图形的位置,请使用float宏包,它提供了[H]参数。
单个图形
图要有图题,研究生图题采用中英文对照,并置于图的编号之后,图的编号和图题应置于图下方的居中位置。引用图应在图题右上角标出文献来源。当插图中组成部件由数字或字母等编号表示时,可在插图下方添加图注进行说明,如图2–1所示。
\begin{figure}[!htp]
\centering
\includegraphics[width=4cm]{cn_100t.png} \\
1.立柱 2.提升释放机构 3.标准冲击加速度计 \\
4.导轨 5.重锤 6.被校力传感器 7.底座 \\
\bicaption[出现在插图索引中]
{单个图形示例\cite{he1999}。如果表格的标题很长,那么在表格索引中就会很不美观。可
以在前面用中括号写一个简短的标题,这个标题会出现在索引中。}
{Stay hungry, stay foolish.}
\label{fig:cn_100t}
\end{figure}
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-E7ThasG6-1615470771784)(img/image-20201223102348204.png)]
多个图形
简单插入多个图形的例子如图2–2所示。这两个水平并列放置的子图共用一个图形计数器,没有各自的子图题。
\begin{figure}[!htp]
\centering
\includegraphics[height=2cm]{sjtu-vi-badge-blue.pdf}
\hspace{1cm}
\includegraphics[height=2cm]{sjtu-vi-badge-blue.pdf}
\bicaption{中文题图}{English caption}
\label{fig:SRR}
\end{figure}
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-NoFVxn0q-1615470771786)(img/image-20201223102704992.png)]
如果多个图形相互独立,并不共用一个图形计数器,那么用minipage
或者parbox
就可以,如图2–3与图2–4。
\begin{figure}[!htp]
\begin{minipage}{0.48\textwidth}
\centering
\includegraphics[height=1.5cm]{sjtu-vi-name-blue.pdf}
\caption{并排第一个图}
\label{fig:parallel1}
\end{minipage}\hfill
\begin{minipage}{0.48\textwidth}
\centering
\includegraphics[height=1.5cm]{sjtu-vi-name-blue.pdf}
\caption{并排第二个图}
\label{fig:parallel2}
\end{minipage}
\end{figure}
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-nwQ1peI1-1615470771787)(img/image-20201223102724275.png)]
如果要为共用一个计数器的多个子图添加子图题,建议使用较新的subcaption
宏包,不建议使用subfigure
或subfig
等宏包。
推荐使用subcaption
宏包的\subcaptionbox
并排子图,子图题置于子图之下,子图号用a)、b)等表示。也可以使用subcaption
宏包的\subcaption
(放在minipage
中,用法同\caption
)。
搭配bicaption
宏包时,可以启用\subcaptionbox
和\subcaption
的双语变种\bisubcaptionbox
和\bisubcaption
,如图2–5所示。
\begin{figure}[!hbtp]
\centering
\bisubcaptionbox{$R_3 = 1.5\text{mm}$ 时轴承的压力分布云图}%
{Pressure contour of bearing when $R_3 = 1.5\text{mm}$}%
[6.4cm]{\includegraphics[height=2.5cm]{pressure15.jpg}}
\hspace{1cm}
\bisubcaptionbox{$R_3 = 2.5\text{mm}$ 时轴承的压力分布云图}%
{Pressure contour of bearing when $R_3 = 2.5\text{mm}$}%
[6.4cm]{\includegraphics[height=2.5cm]{/pressure25.jpg}}
\bicaption{包含子图题的范例(使用 subcaptionbox)}
{Example with subcaptionbox}
\label{fig:bisubcaptionbox}
\end{figure}
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-z3ue7WI7-1615470771788)(img/image-20201223102757426.png)]
subcaption
宏包也提供了subfigure
和subtable
环境,如图2–6。
\begin{figure}[!htp]
\centering
\begin{subfigure}{0.3\textwidth}
\centering
\includegraphics[height=2cm]{sjtu-vi-badge-blue.pdf}
\caption{校徽}
\end{subfigure}
\hspace{1cm}
\begin{subfigure}{0.4\textwidth}
\centering
\includegraphics[height=1.5cm]{sjtu-vi-name-blue.pdf}
\caption{校名。注意这个图略矮些,subfigure 中同一行的子图在顶端对齐。}
\end{subfigure}
\caption{包含子图题的范例(使用 subfigure)}
\label{fig:subfigure}
\end{figure}
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-VqdVDthA-1615470771789)(img/image-20201223102830769.png)]
具体命令说明见: Formatting captions and subcaptions in LaTeX