LaTex随笔

  最近简单接触了LaTex排版,留下一些笔记供日后参考。

  1.基本格式

documentclass{article}
itle{……}
egin{document}
maketitle
section{……}

……\……
subsection{……}

……
subsubsection{……}
……
subsection{Hello Guangzhou}

……
end{document}

  2.{it ……}斜体

     {f ……}粗体

   另外,$…$间的内容将被当做公式,而文字为斜体。

  3.插入图片

egin{figure}[!htbp]
centering
includegraphics[width=3.0in]{fig1.jpg}
DeclareGraphicsExtensions.

caption{Sequential constraints}
label{fig1}
end{figure}

  4.代码段的一种方式

fbox{shortstack[l]{
……
}}

  5.表格

caption{Results of four systems under test with sequential constraints}
label{tab1}
centering
egin{tabular}{|c|c|c|c|} %c的数量表示有几列,“|”来表示网格线
hline   %表示一整条表格横线
VCAP & {f Strategy} & { bf Size of test suite} & {f Time} \ 

hline
multirow{2}{*}{$VCAP_1$} & Existing strategy & 1444 & 0.281s \ %合并行
cline{2-4} %表示2-4行的表格横线;如此书写,下行自动从2列开始;若不写,下行需要为之前合并的行留出位置;即:依行绘制表格,合并的单元格若无内容需要空出来
& Our strategy & 1444 & 0.281s \

hline
end{tabular}
end{table}

原文地址:https://www.cnblogs.com/libcan/p/4052767.html