> 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/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}`

将在文件大纲中显示“Chapter One”，而不是仅仅使用 `\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://ayakaleaf-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.
