Latex学习笔记二——Overleaf在线练习

 

锵锵~本文是基于Overleaf的Latex学习的第二部分。


目录

1. 结构化文档

2. 添加图表,让论文更生动可读

2.1 Graphics

2.2 Floats

2.3 Tables

3. Bibliographies


1. 结构化文档

这一部分更像是论文的写作,包括标题、摘要、引用等内容

\documentclass{article} %告诉Latex文档类型为Article
\title{The Title} %{}里面是标题
\author{A. Author}%{}作者
\date{\today} %{\today}Latex会智能的显示文档编辑时的日期
\begin{document} %开始写文档
\maketitle %在文档中显示之前写好的标题
\begin{abstract} %摘要部分从下面开始,注意,这里{}内就是abstract,不要改
Abstract goes here...
\end{abstract}
\end{document}

运行结果:

接下来,我们尝试为论文添加Introduction, Method, Results等部分:

\documentclass{article}
\begin{document}
\section{Introduction}
The problem of \ldots
\section{Method}
We investigate \ldots
\subsection{Sample Preparation}
\subsection{Data Collection}
\section{Results}
\section{Conclusion}
\end{document}

注意:\section不需要\end{section}。

运行结果:

好~,至此,论文的框架有了,那么如果我们想在文中(尤其是摘要中),介绍我们这几个部分的大体内容或提到我们的某个公式时,该怎么样显得好看又不会出错呢?接下来就是 \label 和 \ref大显身手的时候啦(要引用公式的话,需要用到 \eqref 即 equation reference)

\documentclass{article}
\usepackage{amsmath} % for \eqref
\begin{document}
\section{Introduction}
\label{sec:intro}
In Section \ref{sec:method}, we \ldots
\section{Method}
\label{sec:method}
\begin{equation}
\label{eq:euler}
e^{i\pi} + 1 = 0
\end{equation}
By \eqref{eq:euler}, we have \ldots
\end{document}

运行结果:

到这一步就把Overleaf官网上Free online introduction to LaTeX (part 2)的第一部分Structured Documents的知识点都练习一遍了,在随后附上的Exercise中,我犯了一个错误:在要引用处写的是 \label{...}

正确的写法应该是:\ref{...},在被引用的地方才是要给加label之处。

下面,贴出第一篇正儿八经自己打的Latex论文:

\documentclass{article}
\usepackage{amsmath}
\title{The Relationship Between the UNIVAC Computer and Evolutionary Programming}
\author{Bob, Carol and Alice}
\date{February 20, 2014}
\begin{document}
\maketitle

\begin{abstract}
    Many electrical engineers would agree that, had it not been for online algorithms, the evaluation of red-black trees might never have occurred. In our research, we demonstrate the significant unification of massive multiplayer online role-playing games and the location-identity split. We concentrate our efforts on demonstrating that reinforcement learning can be made peer-to-peer, autonomous, and cacheable.
\end{abstract}

\section{Introduction}

Many analysts wo
  • 6
    点赞
  • 28
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值