> 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/zhi-shi-ku/147-using-the-file-outline-in-overleaf.md).

# 在 Overleaf 中使用文件大纲

您可以查看您的 `.tex` 文件，使用我们的文件大纲功能。此功能会在侧边栏中显示大多数标准 LaTeX 分节元素，以便在打开的 `.tex` 文件。文件大纲显示在左侧面板底部，该面板也包含文件树。

![文件大纲概述](/files/fc9f7e7c16799263830555e1411a086c945885fd)

此功能显示的是您在编辑器中打开的文件的大纲，而不是整个项目的大纲。如果您有一个多文件项目，在编辑器中打开不同文件时，会显示新的大纲。

与此相关，请注意，文件大纲目前不会显示通过 \input、\include 或 \import 命令包含的分节标题。对此，一种变通方法是在一个 [受支持的标题命令](#supported-heading-commands)之后使用这些命令。例如，使用：

`\chapter{Chapter One}`

`\include{chapter1.tex}`

将在文件大纲中显示“第一章”，而不是仅使用 `\include{chapter1.tex}`，而这不会显示在文件大纲中。

## 展开和折叠文件大纲

使用文件大纲左侧的箭头来展开或折叠树。您还可以通过单击并上下拖动把手来调整文件大纲的大小。

![展开和折叠文件大纲](/files/4d71efbeadfc2f043abcf4f0509cc77320db08d9)

## 使用文件大纲在文件中导航

对于较长的 `.tex` 文件，您可能希望快速跳转到文件中的另一个分节标题。文件大纲功能可让您做到这一点。单击您要跳转到的标题，光标将移动到编辑窗格中的该标题。在编辑文件时，所选标题会在文件大纲列表中高亮显示，供您参考。

## 支持的标题命令

文件大纲功能支持标准的 [LaTeX 分节标题命令](/latex/zh-cn/wen-dang-jie-gou/01-sections-and-chapters.md#document-sectioning):

* `\book` （来自 memoir 文档类）
* `\part` （适用于 book 和 report 文档类）
* `\chapter` （适用于 book 和 report 文档类）
* `\section`
* `\subsection`
* `\subsubsection`
* `\paragraph`
* `\subparagraph`

这些命令带星号的无编号标题变体也受支持。

并非所有 `.tex` 文件都会使用每个标题级别。如果您的文件不包含所有这些级别，也没关系。文件大纲区域将根据我们在文件中检测到的标题级别显示您文件的结构。

文件大纲功能不会运行完整的 LaTeX 引擎，因此并非所有分节标题中的 LaTeX 命令都受支持。特别是，自定义宏的展开以及数学模式内容不会在文件大纲列表中呈现。其他非标准用法，例如多个 `\label`s 跟随在分节命令后，或跨越多行源代码的分节命令，在所有情况下也不会被文件大纲检测到。


---

# 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/zhi-shi-ku/147-using-the-file-outline-in-overleaf.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.
