> For the complete documentation index, see [llms.txt](https://ayakaleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayakaleaf-pro.ayaka.space/latex/zh-cn/geng-duo-zhu-ti/32-latex-video-tutorial-for-beginners-video-2.md).

# LaTeX 新手视频教程（视频 2）

[视频 1](/latex/zh-cn/geng-duo-zhu-ti/31-latex-video-tutorial-for-beginners-video-1.md) | 视频 2 | [视频 3](/latex/zh-cn/geng-duo-zhu-ti/33-latex-video-tutorial-for-beginners-video-3.md) | [视频 4](/latex/zh-cn/geng-duo-zhu-ti/34-latex-video-tutorial-for-beginners-video-4.md) | [视频 5](/latex/zh-cn/geng-duo-zhu-ti/35-latex-video-tutorial-for-beginners-video-5.md) | [视频 6](/latex/zh-cn/geng-duo-zhu-ti/36-latex-video-tutorial-for-beginners-video-6.md) | 视频 7

这套分为七部分的 LaTeX 教程视频最初发布于 2013 年；因此，由于 ShareLaTeX 的发展以及后来 ShareLaTeX 与 Overleaf 的合并，如今的编辑器界面已经发生了很大变化。不过，视频内容仍然具有相关性，并会教你 LaTeX 的基础知识——这些技能和经验适用于所有平台。你不需要任何先前的背景知识，在这些 LaTeX 指南结束时，你将能够创建和编写基本的 LaTeX 文档，并具备开始学习如何创建更复杂文档的知识。每个视频都附有一份文字稿（列在视频下方）——这些就地文字稿取代了每个教程开头显示的 URL。

### LaTeX 中的段落和章节

**注意：** 你可以通过以下方式打开视频中使用的项目： [点击此链接](https://www.sharelatex.com/project/51e68895fdf7a9bd7b305993).

{% embed url="<https://www.youtube.com/embed/3Ja6WZoXW3U>" %}

### 视频文字稿

在 [上一个视频](/latex/zh-cn/geng-duo-zhu-ti/31-latex-video-tutorial-for-beginners-video-1.md) 我们帮助你完成了 ShareLaTeX 的设置，向你展示了一些它的功能，并帮助你创建了第一个文档。在这个视频中，我们将看看如何使用章节和段落来划分文档。让我们打开上次创建的文档。

目前我们的文档只有一个名为“Introduction”的章节。让我们再添加几个，使它更像一份实验报告。通常将章节进一步拆分为更低一级的层次或小节会很有帮助。这些可以使用 `\subsection` 命令创建。如果你愿意，还可以继续向下添加子小节。

现在让我们来谈谈段落。如果你想开始写一个新段落，必须在代码中留出一个空行。这会为你开始新的一行并自动缩进。请注意，留出多于一个空行的效果与留出一个空行相同。不过，如果你只使用单个换行，LaTeX 会忽略它。如果你希望 LaTeX 在不开始新段落的情况下换行，那么可以使用双反斜杠，但不建议这样做，因为这会导致不良的排版风格。

在 [上一个视频](/latex/zh-cn/geng-duo-zhu-ti/31-latex-video-tutorial-for-beginners-video-1.md) 我们简要提到了 `\maketitle` 命令，它会添加标题以及作者和日期信息，所有这些信息都从导言区收集。你可能并不总是想要文档上有一个大标题，所以你可以很容易地通过注释掉它来移除它。为此，只需在命令前直接加一个百分号。

这就引出了注释的话题。注释是代码中的一部分，LaTeX 在编译文档时会忽略它们。要告诉 LaTeX 你写的是注释，只需在文本前放一个百分号，那么该行中百分号后面的任何文本都会被忽略。注释是用来给阅读你代码的人提供关于代码作用或目的的信息。经常给代码添加注释是一个好习惯。例如，我可能会在代码顶部写一个注释来说明文档的目的。我也可能会写一个注释来提醒自己某个章节还没有完成。注释还有助于关闭代码而不删除它，就像我们对 make title 命令所做的那样。

那么，关于章节和段落的讨论就到此结束。下一个视频中，我们将看看如何使用 LaTeX 来编写基础数学和公式。

[视频 1](/latex/zh-cn/geng-duo-zhu-ti/31-latex-video-tutorial-for-beginners-video-1.md) | 视频 2 | [视频 3](/latex/zh-cn/geng-duo-zhu-ti/33-latex-video-tutorial-for-beginners-video-3.md) | [视频 4](/latex/zh-cn/geng-duo-zhu-ti/34-latex-video-tutorial-for-beginners-video-4.md) | [视频 5](/latex/zh-cn/geng-duo-zhu-ti/35-latex-video-tutorial-for-beginners-video-5.md) | [视频 6](/latex/zh-cn/geng-duo-zhu-ti/36-latex-video-tutorial-for-beginners-video-6.md) | 视频 7


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ayakaleaf-pro.ayaka.space/latex/zh-cn/geng-duo-zhu-ti/32-latex-video-tutorial-for-beginners-video-2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
