Latex基本语句

Posted by Kelly Yang on April 1, 2022

简介

使用Latex的基本语句和用法,为了备用,防止下一次写论文又忘了

使用vscode 好用呐,需要啥加入啥包。直接上大牛的介绍包,记得要下载TeX Live或者MiKTeX

ref: https://zhuanlan.zhihu.com/p/166523064

ref: https://github.com/EthanDeng/vscode-latex/blob/master/main.pdf

#基础的

\label{tab:02} %给这个加一个标签,方便引用
\citep{conference} %引用文献、专利、著作
\ref{tab:02} %引用图、表、公式
$^{2}$ %指数
$CI_{green}$ %下划线

#图片

位置h(此处),t(上方),b(下方),p(浮动页)。

\begin{figure}[htbp]
\begin{center}
\includegraphics[width=15cm]{figure1studyarea}
\end{center}
\caption{Enter the caption for your figure here.  Repeat as  necessary for each of your figures}\label{fig:1}
\end{figure}

表格中用到的

首先利用Excel2Latex进行表格编辑

ref: https://www.ctan.org/tex-archive/support/excel2latex/

其次从word中打的公式利用 Mathpix软件进行截图翻译成Latex

ref: https://mathpix.com/#downloads

强推两个工具,极其好用。。。。

最后小修小补用的代码如下:

\usepackage{multirow} %用表格中的multirow需要加在前头
\usepackage{booktabs} %用表格中的\bottomrule等需要加在前头
\rm %用于公式中倾斜转正
\begin{tabular}{lllllll} %大概就是左对齐
\, %用于公式中加小空格