小白第一次用Latex的心得体会
小白第一次用Latex的心得体会
这是我的第一篇博客,就先写写我第一次使用Latex的经历吧!
一、软件安装过程
网上很多安装教程相关的,这里我选取了一个写得非常详细的博主分享的内容,网址附在后面了。
官方网站:https://www.tug.org/texlive/
耐心等待下载,待下载完成之后,解压文件
注意:这里下载的这个iso文件最好放在英文路径下
ps:2019版本的是以前的,解压缩就懒得换图了
这里的路径一定是英文的,不要出现中文以及符号
ps:最高别装在c盘,不然以后c盘空间不够了不好整
安装时间随着电脑配置不同而不同,耐心等着就好了
出现下面的界面就证明安装完成了
下面进行测试
1.找到应用程序并且打开
2.输入下面代码
\documentclass[UTF8]{ctexart}
\begin{document}
\section{中文} 中文论文排版测试,还不错。
\end{document}
注意:如果是第一次用此软件,上面的这几行代码一定要复制粘贴进去,避免出错。
然后保存文件,路径必须是英文,文件名这要是英文
然后选择:XeLaTex,点击左边的小绿色三角按钮
接着就自动弹出编译后的结果了
上述内容来自:https://www.jianshu.com/p/a8d46d00b833
二、Latex输入希腊字母等
其实除了希腊字母,很多特殊字符在latex中也会经常用到,这里选取了一些常用的以供大家参考:二元运算
关系运算
箭头符号
杂类符号
数学结构上述基本就够用了,当然也会有些更特殊的我这边也没有列出了,到时候就靠度娘了吧。
三、Latex输入公式
1)带有矩阵的公式,如
\begin{equation}
\tau =\begin{bmatrix} \tau_1 \ \tau_2\ \tau_3\end{bmatrix}
\end{equation}
注意:如果想让公式和上下文档距离更近可以采用下述代码
{\setlength\abovedisplayskip{3pt}
\setlength\belowdisplayskip{1pt}
\begin{equation}
\tau =\begin{bmatrix} \tau_1 \ \tau_2\ \tau_3\end{bmatrix}
\end{equation}}
*%%%这里必须空一行不然后面的额文本就会前端缩进。~~ *
\noindent%%用于置顶
文本
2)带大括号的公式,如
\begin{equation}
\left{
\begin{array}{lcl}
{\dot z=x+y} \
{\ddot z=x-y} \
\end{array}
\right.
\end {equation}
注:1)如果大括号中设计到两列,可以改写为
\begin{equation}
a_{ij}=\left{
\begin{array}{lcl}
{0,}&{i=j}\
{\rho_h,}&{i\neq{j}}
\end{array}
\right.
\end {equation}
2)若想公式不显示编号,可以在在上述表格代码的table后加*号
四、Latex输入表格
双栏模式下,一般论文模板都会给简单的表格模板,这里列举两类特殊的:
1)需要行合并或列合并
\begin{table}[H]
\caption{Trigger situation.}\label{tab:1}
{\footnotesize
\begin{tabularx}{\columnwidth}
{|X|m{31pt}|m{38pt}|m{31pt}|m{38pt}|}
\hline % horizontal line
\multirow{2}{*}{ } & \multicolumn{2}{c|}{A} & \multicolumn{2}{c|}{B}\ %end line
\cline{2-5} %short partial horizontal lines from column 2 to column 5
& numbers & ratio ({%}) & numbers & ratio({%}) \ %first cell is occupied by the multirow
\hline
1 & aa & 59.4 & ee & 31.8\
\hline
2 & bb & 53.9 & ff & 42.3\
\hline
3 & cc & 56.4 & gg & 42.6\
\hline
4 & dd & 62.5 & hh & 37.7\
\hline
\end{tabularx}
}
\vskip -1pc
\end{table}
2)三线表
\begin{table}[H]
\caption{The algorithm.}\label{tab:1}
\centering
{\footnotesize
\begin{tabular}{l}
\hline
\quad Algorithm\
\hline
\quad Given the initial state x=1, y=2,z=3,o=4, p=5,q=6.\
hello word!.\
\hline
\end{tabular}
}
\vskip -1pc
\end{table}
五、Latex输入图片
这里主要提到了子图的模板
\begin{figure*}
\begin{minipage}[ht]{0.33\linewidth}
\centering
\includegraphics[width=2in]{5a.png}
\centering{(a) The position component}
\label{fig:side:a}
\end{minipage}
\begin{minipage}[ht]{0.33\linewidth}
\centering
\includegraphics[width=2in]{5b.png}
\centering{(b) The position component}
\label{fig:side:b}
\end{minipage}
\begin{minipage}[ht]{0.33\linewidth}
\centering
\includegraphics[width=2in]{5c.png}
\centering{© The position component }
\label{fig:side:c}
\end{minipage}
\caption{The convergence curves.}
\label{fig:The system performance }
\end{figure*}