> For the complete documentation index, see [llms.txt](https://docs.postgresql.tw/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.postgresql.tw/19/appendixes/docguide/docguide-authoring.md). Agents can also search and read this documentation through its [MCP server](https://docs.postgresql.tw/~gitbook/mcp).

# J.5. 文件撰寫

### J.5. 文件撰寫 [#](#docguide-authoring) <a href="#docguide-authoring" id="docguide-authoring"></a>

[J.5.1. Emacs](#docguide-authoring-emacs)

使用具備 XML 編輯模式的編輯器最便於修改文件原始碼；若編輯器也瞭解 XML schema 語言， 能特別辨識 DocBook 語法，則更為方便。

請注意，基於歷史因素，文件原始碼檔案雖然現在是 XML 檔案，副檔名仍為 `.sgml`。 因此，你可能需要調整編輯器設定以選用正確的模式。

#### J.5.1. Emacs [#](#docguide-authoring-emacs) <a href="#docguide-authoring-emacs" id="docguide-authoring-emacs"></a>

nXML Mode 隨 Emacs 一同提供，是使用 Emacs 編輯 XML 文件最常見的模式。 它可讓你使用 Emacs 插入標籤並檢查標記的一致性，且原生支援 DocBook。詳細資訊請參閱 [nXML 手冊](https://www.gnu.org/software/emacs/manual/html_mono/nxml-mode.html)。

`src/tools/editors/emacs.samples` 包含此模式的建議設定。

***

原文：[PostgreSQL 18.6 Documentation](https://www.postgresql.org/docs/18/docguide-authoring.html)（原文版本：18.6；核對日期：2026-09-10）


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.postgresql.tw/19/appendixes/docguide/docguide-authoring.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
