LaTex 学习笔记(二)基本文档结构

LaTex 学习笔记之基本文档结构

接下来,我们将探讨摘要以及如何将LATEX文档划分为不同的章节、节和段落。

Abstracts

科学文章通常提供摘要,即对其核心主题或论点的简要概述/总结。下面的例子演示了如何使用LATEX的抽象环境来排版一个抽象对象:
\documentclass[12pt,a4paper]{article}
\begin{document}
    \begin{abstract}
        This is a simple paragraph at the beginning of the 
document. A brief introduction about the main subject.
    \end{abstract}
\end{document}

结果为
在这里插入图片描述

开始一个新的自然段,有两种方法:1是敲两次“enter”键(这种方法会有缩进) 2是通过使用命令 \ 或者 \newline (这个方法不会有缩进)

例如

\documentclass[12pt,a4paper]{article}
\begin{document}
    \begin{abstract}
        This is a simple paragraph at the beginning of the 
document. A brief introduction about the main subject.
    \end{abstract}
After our abstract we can begin the first paragraph, then press ``enter'' twice to start the second one.

hello world\\hello latex\newline hello java

how do you do?
\end{document}

结果为
在这里插入图片描述

建议新用户不要使用多个\\或\newline来“模拟”间距较大的段落,因为这会干扰LATEX的排版算法

较长的文档,无论使用何种创作软件,通常都被划分为部分、章节、节、子节等等。LaTeX还提供了文档结构命令,但是可用的命令及其实现(它们做什么)取决于所使用的文档类。例如,使用book类创建的文档可以分成部分、章节、节、子节等等,但是letter类不提供(支持)任何这样做的命令

例如

\documentclass{book}
\begin{document}

\chapter{First chapter}

\section{Introduction}
This is the first section.

Lorem  ipsum  dolor  sit  amet,  consectetuer  adipiscing  
elit. Etiam  lobortisfacilisis sem.  Nullam nec mi et 
neque pharetra sollicitudin.  Praesent imperdietmi nec ante. 
Donec ullamcorper, felis non sodales...

\section{Second section}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.  
Etiam lobortis facilisissem.  Nullam nec mi et neque pharetra 
sollicitudin.  Praesent imperdiet mi necante...

\subsection{Subsection}
Praesent imperdietmi nec ante. Donec ullamcorper, felis non sodales...

\section*{Unnumbered Section}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.  
Etiam lobortis facilisissem...
\end{document}

结果
在这里插入图片描述

节、子节等的编号是自动的,但可以通过使用在末尾带有星号(*)的相应命令的所谓星号版本来禁用,例如 \section*{...} 和 \subsection*{...}.

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

我是一只小小小小龙

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值