入门学习使用overleaf和latex

发布于:2024-08-10 ⋅ 阅读:(117) ⋅ 点赞:(0)

1.下载对应的latex论文模板

1.1以Transactions on Cybernetics为例
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
至于其他论文的模板,可以去对应的官网搜索下载,但是一定要是latex格式的

2.overleaf平台的使用

2.1overleaf平台的介绍

一个可以对latex格式的论文进行在线文字编辑的网站,方便快捷

overleaf官网点这里

2.2overleaf平台模板文件的上传

2.2.1上传模板文件
在这里插入图片描述
在这里插入图片描述
最后上传成功显示如下界面即可
在这里插入图片描述

2.3latex语法的学习

#####2.3.1以tex结尾的文件就是我们现在打开的文件
在这里插入图片描述

2.3.2 分段(如下图显示)

在这里插入图片描述

2.3.3 其他

\section{内容}表示罗马数字的分段,比如I IV这样的大段落

\subsection{内容}表示大段落下的子部分A/B

公式的书写:访问网站公式编辑网站写好后复制到论文即可
\begin{equation} ----\end{equation}

表格的书写:访问网站在线表格编辑写好好复制到论文即可

图片的插入: 论文中以\begin{figure} \end{figure}为起始和结束

2.3.4简单latex实操
\documentclass{article}

\title{First documeent}
\author{keke cs}
\date{\today}


\begin{document}


\maketitle


\begin{abstract}
This is a simple paragraph at the beginning of the document. A brief introdution to the main subject
\end{abstract}

\section{Introduction}

Introduction Introduction IntroductionIntroduction Introduction Introduction

\section{Method}
Method Method Method Method Method Method Method Method Method

\subsection{Method1}
Method1 Method1 Method1 Method1 Method1 Method1 Method1

\section{Experiment}
ExperimentExperiment Experiment Experiment Experiment 

\end{document}

结果显示如下图右侧,表示如何起标题,如何分段落以及小段落
在这里插入图片描述

2.3.5 换行符和换页符

换行符:
空行 \par 下一个段落自动首行缩进
\ \newline \hfill\break 下一个段落不会首行缩进

分页符
\newpage :下一个段落自动分配到下一页
在这里插入图片描述

2.3.6左右居中对齐
\begin{center}
\end{center}

\begin{flushleft}
\end{flushleft}

\begin{flushright}
\end{flushright}

在这里插入图片描述

2.3.7 字体设置

见下图左侧和右侧的对应关系,设置字体的大小
在这里插入图片描述

2.3.8插入固定位置图片

在这里插入图片描述

\documentclass{article}
\usepackage{graphicx} # 导入使用图表的包
\usepackage[export]{adjustbox}
\graphicspath{ {./images/} }

\begin{document}

As the sun began to dip below the horizon, casting long shadows across the rolling hills, the sky transformed into a breathtaking canvas of vibrant oranges, deep purples, and soft pinks, while a gentle breeze whispered through the trees, carrying the faint scent of blooming flowers and the promise of a peaceful evening.

\includegraphics{fig1.png}

There's a picture of a galaxy above 

\includegraphics[scale=1.5, angle=45]{fig1.png}

\includegraphics[width=3cm, height=4cm]{fig1.png}

\begin{center}
\includegraphics[width=3cm, height=4cm]{fig1.png}
\end{center}

\includegraphics[width=3cm, height=4cm, right]{fig1} # 这里使用必须导入\usepackage[export]{adjustbox}
\includegraphics[width=3cm, height=4cm, left]{fig1}
\includegraphics[width=3cm, height=4cm, center]{fig1}

\end{document}
2.3.9文字包围图片

在这里插入图片描述

\begin{wrapfigure}{r}{0.25\textwidth}
    \includegraphics[width=0.25\textwidth]{fig1.png}
\end{wrapfigure}
2.3.10图片加标题和图片引用

在这里插入图片描述
在这里插入图片描述

2.3.11插入表格

显示效果图
在这里插入图片描述
代码实现

\documentclass{article}
\usepackage{array}
\usepackage{multirow}
\begin{document}

\begin{center}
\begin{tabular}{c c c}
 cell1 & cell2 & cell3  \\
 cell4 & cell5 & cell6  \\ 
 cell7 & cell8 & cell9  \\ 
\end{tabular}
\end{center}

\begin{center}
\begin{tabular}{|c | c | c |}
\hline
 cell1 & cell2 & cell3  \\
 cell4 & cell5 & cell6  \\ 
 cell7 & cell8 & cell9  \\ 
\hline
\end{tabular}
\end{center}\

\begin{center}
\begin{tabular}{||c | c | c ||}
\hline
 cell1 & cell2 & cell3  \\
 cell4 & cell5 & cell6  \\ 
 cell7 & cell8 & cell9  \\ 
\hline
\end{tabular}
\end{center}

\begin{center}
\begin{tabular}{| m{3cm} | m{1cm} | m{1cm} <{\centering} |}
\hline
 cell1 & cell2 & cell3  \\
 cell4 & cell5 & cell6  \\ 
 cell7 & cell8 & cell9  \\ 
\hline
\end{tabular}
\end{center}

\begin{center}
\begin{tabular}{| m{3cm} | m{3cm} | m{3cm} |}
\hline
\multicolumn{2}{|c|}{Country List} & s\\
\hline
 cell1 & cell2 & cell3  \\
 cell4 & cell5 & cell6  \\ 
 cell7 & cell8 & cell9  \\ 
\hline
\end{tabular}
\end{center}

\begin{center}
\begin{tabular}{|c | c | c |}
\hline
col1 & col2 & col3 \\
\hline
\multirow{3}{2cm}{Mutiply row} 
  & cell2 & cell3  \\
  & cell5 & cell6  \\ 
  & cell8 & cell9  \\ 
\hline
\end{tabular}
\end{center}


\end{document}

网站公告

今日签到

点亮在社区的每一天
去签到