> 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/164-working-offline-in-overleaf.md).

# 在 Overleaf 中离线工作

Overleaf 提供了多种集成方式，使您能够创建并同步项目的本地副本，这样您就可以使用本地文本编辑器离线工作，并且在重新联网后将这些副本与 Overleaf 保持同步。

您可以使用任何纯文本编辑器在本地编辑项目，而且您也可以下载一个免费的 LaTeX 安装包来在本地编译您的项目。您可以在这里查看一些安装 LaTeX 的选项： <https://www.latex-project.org/get/> 。为了确保您能够“开箱即用”地运行 Overleaf 的所有宏包，您可以下载 TeXLive 发行版，并且可以使用 Latexmk 一次性编译全部内容（参见 [这篇文章](/latex/zh-cn/zhi-shi-ku/064-how-does-overleaf-compile-my-project.md) 了解 Overleaf 如何编译您的项目的更多信息）。

请注意，目前在离线状态下无法使用 Overleaf 托管的网页编辑器，因为所有编译都在我们的服务器上运行。

## Dropbox 同步

Overleaf 提供 Overleaf 与 Dropbox 之间的自动双向同步。拥有 [高级订阅](https://www.overleaf.com/user/subscription/plans) 的用户可以将他们的 Overleaf 账户与 Dropbox 关联。关联后，您在 Overleaf 中对项目所做的任何更改都会自动同步到您电脑上的 Dropbox 文件夹，而您在本地 Dropbox 中所做的任何更改都会显示在您在线的项目中。

有关 Overleaf 中 Dropbox 同步的更多信息，请访问： [Dropbox 同步](/latex/zh-cn/zhi-shi-ku/034-dropbox-synchronization.md)

请注意，开启 Dropbox 同步并不意味着协作者也能将项目同步到他们本地的 Dropbox 文件夹（除非他们也拥有高级订阅）。因此，这可以看作是一项“个人”功能。对于希望让协作者也能本地同步的高级用户，我们建议使用下文所述的 Git 或 GitHub 同步选项。

## Git 和 GitHub

Overleaf 还提供 Git 和 GitHub 同步选项。除了提供另一种快速备份方式之外，它们还使团队协作更加容易，尤其适用于不同作者希望以不同方式处理 LaTeX 文档的情况。

例如，如果您喜欢在浏览器中使用 Overleaf，而您的协作者更喜欢使用本地安装的 LaTeX 编辑器进行工作，您可以使用 Git 或 GitHub 同步来确保您的工作保持连接。其工作方式会根据您选择的选项略有不同：

**GitHub：** 拥有高级订阅的用户可以将其拥有的任何项目链接到 GitHub 仓库。一旦项目链接完成，项目中的所有用户都可以点击按钮进行同步。因此，这可以看作一种“按项目”功能。

**Git：** 如果项目由拥有高级订阅的用户拥有，项目中的所有成员都可以对其进行 git clone/push/pull。如果用户拥有高级订阅，他们可以对其有访问权限的所有项目进行 git clone/push/pull。这类似于 GitHub 和 Dropbox 权限模型的超集——它既是个人级的，也是按项目级的。

有关如何进行设置的更多信息，请访问： [使用 Git 和 GitHub](/latex/zh-cn/zhi-shi-ku/041-git-integration-and-github-synchronization.md)

请注意，要在 Overleaf 中使用 GitHub 同步，用户需要拥有一个 GitHub 账户。免费的 GitHub 账户允许您创建公开或私有仓库。


---

# 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/164-working-offline-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.
