latex 真香

目录

前言

准备

正文

0. 基本操作

1.  参考文献

2.  公式

(1) 单一公式{equation}  

(2)多个公式 {gather}

(3)花括号  cases

(4) 正文中引用公式 

3. 图

(1)单图显示

(2)两个图片并排显示 minipage

(3) 多个图像,但是只有一个大标题  subfigure  

(4)图引用

4. 表

5. 小tips



前言

以前都是一个word走天下,奈何投稿某期刊,只有latex模板,遂赶鸭子上架,两天速成。不得不说,真香。 (最好是先在word上写好,然后用latex排版)

准备

1. 时间太紧,没有下载专门的latex软件(看了一下软件太大了,小破电脑的内存不够),找到了一个线上版的,叫overleaf,网址 https://www.overleaf.com/project ,这个真的还挺好用的。

2. 搜到了一个表格神器,可以直接将word表格转为latex, 网址 https://www.tablesgenerator.com/# , 不香来找我。

3.参考文献复制粘贴神器, 直接谷歌学术, 网站  https://scholar.google.com.hk/scholar?hl=zh-CN&as_sdt=0%2C5&as_vis=1&q=&btnG=

4. 符号识别神器, http://detexify.kirelabs.org/classify.html  ,以后各种符号直接转latex不是问题。

3. 其实我还想要一个公式神器,师弟推荐用mathtype, mathpix (可以将截图转为latex),但是目前还没有找到比较满意的,后面找到了再说。

4. 一定要先找到期刊的latex模板!!!

 

正文

已Elsevier为例, 先从简单的开始

0. 基本操作

\begin{document}    %文件从这里开始

\section{Introduction}   %一级标题

\section{Related work}  

\section{Method}

\subsection{XXXXXXXXXXXXXXXXXx}  %二级标题

\subsubsection{XXXXXXXXXXXXXXXXXXXX}    %三级标题

\section{Results}

\section{Conclusion}

\section*{Acknowledgement}   #没有序号的标题

\bibliographystyle{elsarticle-num-names}
\bibliography{reference.bib}  %参考文献库的名字Ref

\end{document}    %文件到这里结束

1.  参考文献

(1)首先下载参考文献模板  http://www.ctan.org/tex-archive/macros/latex/contrib/elsarticle

(2) 要投的期刊使用的是 num_names.bst,把这个加到文件下, 然后新建一个reference.bib 用来存参考文献。

(3) 在main.tex的结尾,加上参考文献

\bibliographystyle{elsarticle-num-names} %参考文献的格式
\bibliography{reference.bib}  %参考文献库的名字Ref
\printbibliography{}  %打印参考文献

(4) 我们在reference.bib里面加入参考文献。

在谷歌学术里面输入论文标题 ,点击引用 , 然后选择bibtex的格式

直接将里面的内容粘贴复制到reference.bib里面

@article{feng2020point,
  title={Point attention network for semantic segmentation of 3D point clouds},
  author={Feng, Mingtao and Zhang, Liang and Lin, Xuefei and Gilani, Syed Zulqarnain and Mian, Ajmal},
  journal={Pattern Recognition},
  volume={107},
  pages={107446},
  year={2020},
  publisher={Elsevier}
}

(5)  在正文中引用 \cite {feng2020point}

2.  公式

(1) 单一公式{equation}  

\begin{equation}
\varphi(C_x\otimes X)=\varphi(R*(C_y\otimes Y)+t)
\label{Eq.1}
\end{equation}

输出: 

(2)多个公式 {gather}

\begin{gather}
C_{x_i}=
\left\{  
        \begin{array} {ll}
        1,~C_{x_i}^*\geq 0.5 &  \\  
        0,~C_{x_i}^*<0.5  
        \end{array}  
\right. \\ \label{Eq.6}
C_{y_j}=
\left\{  
        \begin{array} {ll}
        1, C_{y_j}^*\geq 0.5 &  \\  
        0, C_{y_j}^*<0.5  
        \end{array}  
\right.  
\label{Eq.7}
\end{gather}

输出:

(3)花括号  cases

\begin{equation}
	D(x) = \begin{cases}
	1, &\text{如果} x \in \mathbb{Q}\\%mathbb花体字符
	0, &\text{如果} x \in \mathbb{R}\setminus\mathbb{Q}	
		   \end{cases}%\text是为了在数学公式中处理中文
\end{equation}

(4) 正文中引用公式 

\ref{Eq. 7}

3. 图

(1)单图显示

\begin{figure}%[b]
    \centering
    \includegraphics[width=17cm]{Fig2.png}
    \caption{Architecture of XXX.}
    \label{fig:2}
\end{figure}

如果是双栏时,图片跨两栏显示, 将figure 换成figure* 即可。

(2)两个图片并排显示 minipage

\begin{figure*}%[b]
\begin{center}
\centering
\begin{minipage}[c]{0.5\textwidth}
\centering
\includegraphics[angle=0,width=8cm,height=5.6cm]{Fig4.png}
\centering
\caption{XXXXXXXXXXXXXXXXXXXXXX.}
\label{fig:4}
\end{minipage}%
\centering
\begin{minipage}[c]{0.5\textwidth} 
\centering
\includegraphics[angle=0,width=8cm,height=5.6cm]{Fig5.png}
\caption{XXXXXXXXXXXXXXXXXXXXXXX}
\label{fig:5}
\end{minipage}
\end{center}
\end{figure*}

(3) 多个图像,但是只有一个大标题  subfigure  

\begin{figure*}%[!]
\centering  %图片全局居中
\subfigure{
\label{Fig.6.1}
\includegraphics[width=17cm,height = 4.5cm]{Fig6a.png}
\subcaption{(a)XXXXXXXXXXXXXXXX.}}
\subfigure{
\label{Fig.6.2}
\includegraphics[width=17cm,height = 4.5cm]{Fig6b.png}
\subcaption{(b) XXXXXXXXXXXXXXXXXXXXXXX.}}
\subfigure{
\label{Fig.6.3}
\includegraphics[width=17cm,height = 4.5cm]{Fig6c.png}
\subcaption{(c) XXXXXXXXXXXXXXXXXXXXXXXXXXXX}
\caption{Results of XXXXXXXXXXXXXXXXXXXXXXX}
\label{fig:6}
\end{figure*}

(4)图引用

\ref{fig:6}

4. 表

用之前说的表格神器   https://www.tablesgenerator.com/#

(1)先在word里面画好表 ,然后将表格直接粘贴到到转换器里面

然后直接复制下面的latex 格式 即可。

(2) 跨双栏 table换成table*

5. 小tips

(1)文字过长,没有正确换行时, 用 ' \- ' 来手动换行

 

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值