> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Word 导入和导出

> 将 Word 或 Markdown 文档转换为 LaTeX 项目，并将项目导出为 Word、Markdown 或 HTML。

> [!NOTE]
>
> 如果你看不到这些选项，请让管理员开启 [Pandoc Import and Export](https://ayakaleaf-pro.mintlify.site/zh-CN/on-premises/configuration/overleaf-toolkit/pandoc-import-and-export.md)。

## 导入文档

此操作会从 Word 文档（`.docx`）或 Markdown 文件（`.md`）创建一个新的 LaTeX 项目。项目名称取自文件名。

**1. 打开导入对话框**

在项目页面上，点击 **New project**。在 **Import** 下，点击 **Word document** 或 **Markdown document**。

![New project 菜单，Import 下有 Word document 和 Markdown document](https://mintcdn.com/ayakaleaf-pro/Obqf0nQWnHIHMjO7/images/on-premises/word-import-menu.png?fit=max\&auto=format\&n=Obqf0nQWnHIHMjO7\&q=85\&s=12769b856a9f5d23a1d992f7af8dab89)

New project 菜单

**2. 选择文件**

点击 **Select .docx file**，或将文件拖入对话框。对于 Markdown，按钮为 **Select .md file**。导入会立即开始。

![带有 Select .docx file 按钮的 Choose Word document 对话框](https://mintcdn.com/ayakaleaf-pro/Obqf0nQWnHIHMjO7/images/on-premises/word-import-dialog.png?fit=max\&auto=format\&n=Obqf0nQWnHIHMjO7\&q=85\&s=e89cecc87f88642c44458ee3a074bbd0)

选择 Word 文档

**3. 开始编辑**

新项目打开时会显示消息 **Document ready for editing**。点击 **Start editing**。

![带有 Start editing 按钮的 Document ready for editing 对话框](https://mintcdn.com/ayakaleaf-pro/Obqf0nQWnHIHMjO7/images/on-premises/word-import-ready.png?fit=max\&auto=format\&n=Obqf0nQWnHIHMjO7\&q=85\&s=192d417ae4188a72f675f40eb8a48fee)

导入已完成

**4. 检查结果**

文档现在位于 `main.tex` 中，其标题显示在文件大纲中。点击 **Recompile** 查看 PDF。请检查样式，尤其是表格、图片和引用，它们可能需要编辑。

![编辑器中导入的项目，包含 main.tex、文件大纲和编译后的 PDF](https://mintcdn.com/ayakaleaf-pro/Obqf0nQWnHIHMjO7/images/on-premises/word-import-project.png?fit=max\&auto=format\&n=Obqf0nQWnHIHMjO7\&q=85\&s=0ef0bc49c90f25df7c5b4daf05d6acc0)

导入的项目

### 如果导入失败

如果文件无法转换，对话框会显示 **Your document couldn't be imported**。展开 **Conversion error details** 查看原因。不会创建项目。

![带有错误消息和 Conversion error details 的导入对话框](https://mintcdn.com/ayakaleaf-pro/Obqf0nQWnHIHMjO7/images/on-premises/word-import-error.png?fit=max\&auto=format\&n=Obqf0nQWnHIHMjO7\&q=85\&s=fa68e3597eaa9ad25c44893845fc6c5a)

无法导入的文档

对话框只接受你所选的类型。在 Word 对话框中选择 `.md` 文件会显示 **You can only upload: .docx**。

## 导出项目

打开项目，然后点击编辑器顶部的项目名称。点击以下选项之一：

| 选项 | 你会得到 |
| - | - |
| **Export as Word document (.docx)** | 以项目命名的 `.docx` 文件 |
| **Export as Markdown (.md)** | 包含 `main.md` 的 `.zip` 文件 |
| **Export as HTML (.html)** | 包含 `main.html` 的 `.zip` 文件 |

下载会自动开始。转换无法还原所有 LaTeX 格式，因此请检查结果。

![项目名称下的菜单，包含三个 Export 选项](https://mintcdn.com/ayakaleaf-pro/Obqf0nQWnHIHMjO7/images/on-premises/word-export-menu.png?fit=max\&auto=format\&n=Obqf0nQWnHIHMjO7\&q=85\&s=46b94616369ede9fcc5091c7048df2d3)

导出选项


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.