2022美赛备赛之LaTeX的使用

目录

一、LaTeX常用网站

二、 LaTeX的使用

常用功能

1. 有序列表

2. 无序列表

3. 表格

4. 公式

5.图片

6. 浮动体

7.参考文献 


一、LaTeX常用网站

1. 截图公式生成 Mathpix Snip

2. 手写公式生成 math (myscript.com)

3. 表格生成 Create LaTeX tables online – TablesGenerator.com

二、 LaTeX的使用

字体设置 导航栏->LaTex->字体格式

加粗 \textbf{hello} Ctrl+B

斜体  \textit{yez} Ctrl+I

符号 在目录栏里


1. 不进行首行缩进:代码前加  \noindent

2. 第一端首行缩进2字符:\hspace*{2em}

3. 上下端间隔: \vspace{2em}


常用功能

1. 有序列表

有序列表的每一项用item开始

\begin{enumerate}
   \item 
\end{enumerate}

2. 无序列表

 \begin{itemize}
    \item The first is***.
    \\%换行%
   \item The second is***.            	
 \end{itemize}

3. 表格

改变表格整体大小

包:\usepackage{graphicx}

在tabular外加上

\scalebox{1.2}{

}

1.2为放大的倍数

\begin{table}[h]
			\centering
			\caption{The value of the two assessment indicators}%标题
			\vspace{1em}
			\scalebox{1.2}{
			\begin{tabular}{|l|l|l|}
				\hline
				 & Percent of pass & Accuracy rate \\ \hline
				BTC      & 97.65\%   & 99.7\%  \\ \hline
				GOLD      & 97.15\%   & 100.00\%  \\ \hline
			\end{tabular}}
		\label{t3}
		\end{table}
  • 普通表格
 \begin{table}[h]
    	\centering
    	\begin{tabular}{|l|l|l|}
    		\hline
    		number & name & age \\ \hline
    		1      & xx   & 12  \\ \hline
    		2      & ee   & 15  \\ \hline
    	\end{tabular}
    \end{table}
  • 三线表
 \begin{table}[h]
    	\begin{center}%表格居中
    		\caption{National vulnerability classification}%标题
    		\begin{tabular}{ccc}%第几个c表示第几列居中
    			\toprule
    			\multicolumn{1}{m{2cm}}{\centering Symbol}
    			&\multicolumn{1}{m{10cm}}{\centering Definition}
    			&\multicolumn{1}{m{2cm}}{\centering Unit}\\
    			\midrule
    			$E_0$&Single photon energy&ev\\
    			$h$&Planck constant&eV·s\\
    			$v$&Photon frequency&hz\\
    			$E_0$&Single photon energy&ev\\
    			$\lambda$&Wavelength&m\\
    			$E$&The energy of all the photons&ev\\
    			$N$&the total number of photons participating in the transition&mol\\
    			$I$&Projection of strength&ev\\
    			$I_0$&Illumination intensity&ev\\
    			$\epsilon$&Molar absorption coefficient&L/(mol·cm)\\
    			$b$&Optical path length&$\mu$m\\
    			$c$&The concentration of light-absorbing substances&mol/L\\
    			$T$&Transmissivity&\\
    			$\alpha$&The absorption coefficient&1/m\\
    			$k$&extinction coefficient&\\
    			$d$&The thickness of the metal&$\mu$m\\
    			\bottomrule
    		\end{tabular}\label{tb: lable}
    	\end{center}
    \end{table}
  • 斜线分割单元格

样式:

加一个包:    \usepackage{diagbox}

diagbox[width=斜线的长度和宽度]

\begin{table}[]
	\caption{The predicted value of ***}%标题
	\vspace{1em}
	\centering
	\begin{tabular}{@{}ccccccc@{}}
		\toprule
		\multicolumn{2}{c}{\begin{tabular}[c]{@{}c@{}}\diagbox[width=10em,trim=l]{Number of\\ Hidden Neurons}{Number of\\ delays d}\end{tabular}} & 2                                                         & 4                                                         & 6                                                         & 8                                                         & 10                                                        \\ \midrule
		5   & \begin{tabular}[c]{@{}c@{}}Testing\\ All\end{tabular}  & \begin{tabular}[c]{@{}c@{}}0.99802\\ 0.99626\end{tabular} & \begin{tabular}[c]{@{}c@{}}0.99769\\ 0.99643\end{tabular} & \begin{tabular}[c]{@{}c@{}}0.99619\\ 0.99687\end{tabular} & \begin{tabular}[c]{@{}c@{}}0.99583\\ 0.99727\end{tabular} & \begin{tabular}[c]{@{}c@{}}0.99162\\ 0.99634\end{tabular} \\
 0.99596\end{tabular} & \begin{tabular}[c]{@{}c@{}}0.99267\\ 0.99592\end{tabular} & \begin{tabular}[c]{@{}c@{}}0.99201\\ 0.99535\end{tabular} & \begin{tabular}[c]{@{}c@{}}0.97491\\ 0.99211\end{tabular} \\ \bottomrule
	\end{tabular}
\end{table}

4. 公式

  • 无序公式
\[

\]
  • 有序公式
\begin{equation}

\end{equation}
  • 多行连等公式
%多行连等公式
    \begin{align}
    	a & = b + c + d + e \\
    	& = g + f\\
    	&=m
    \end{align}

5.图片

图片排版问题:解决图片不紧跟在所需段落的下方

在编辑器头部加入宏包 \usepackage{float}
在插入图片的语句后加个[H]   \begin{figure}[H] 

  • 单张图片 

\begin{figure}[htpb]
              \centering               
            \includegraphics[scale=0.4]{figures/111.png}
                \vspace{-.5em}
                \caption{The name of this figure}
                \label{fig:1}
            \end{figure}

 引用图片:\ref{fig:1}

  •  图片并排 subfigure

导入包:

\usepackage{graphicx}
 \usepackage{subfigure} 

\begin{figure}[htbp]        	       	
        	\subfigure[name of the subfigure] %第一张子图
        	{
        		\begin{minipage}{7cm}
        			\centering          %子图居中
        			\includegraphics[scale=0.5]{six.png}   %以pic.jpg的0.5倍大小输出
        		\end{minipage}
        	}    	
        	\subfigure[name of the subfigure] %第二张子图
        	{
        		\begin{minipage}{7cm}
        			\centering      %子图居中
        			\includegraphics[scale=0.5]{se.png}   %以pic.jpg的0.5倍大小输出
        		\end{minipage}
        	}       	
        	\caption{name of the figure} %  %大图名称
        	\label{fig:2}  %图片引用标记
        \end{figure}

6. 浮动体

根据页面大小自动调整图片和表格的位置

浮动体的位置参数

h 当前位置(代码所处的上下文)
t 顶部
b 底部
p 单独成页
! 在决定位置时忽视限制

7.参考文献 

\begin{thebibliography}{99}
            \bibitem{1}
            Steven J. Leon.
            Linear Algebra with Applications.
            China Machine Press, 51 (2019).
            \bibitem{2}
            Steven J. Leon.
            Linear Algebra with Applications.
            China Machine Press, 51 (2019).
        \end{thebibliography}

引用 \cite{1}

8. 附录

一般不放目录,放置正文中未放完的图片和表格

  • 6
    点赞
  • 60
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值