> For the complete documentation index, see [llms.txt](https://overleaf-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://overleaf-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://overleaf-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.
