> 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-tw/tex-latex-ji-ben-ming-ling/12-synctex.md).

# \synctex

該 `\synctex` primitive 是 TEX 的一項附加功能，由 [SyncTEX 擴充功能](https://ctan.org/tex-archive/support/synctex-parser?lang=en)。可透過 TEX 引擎的命令列選項啟用或停用 SyncTEX，或直接在 TEX 原始檔中透過 `\synctex` primitive：

**使用範例**

* 要啟用 SyncTEX，使用 `\synctex=1` 到你的 `.tex` 檔案；
* 要停用 SyncTEX，使用 `\synctex=0` 到你的 `.tex` 檔案；

以下描述引自 [CTAN](https://ctan.org/tex-archive/support/synctex-parser?lang=en):

> Synchronization TeXnology，名為 SyncTEX，是 TEX 引擎的一項功能。它可讓輸入與輸出之間同步，這表示可以從原始文件導覽到排版後的內容，反之亦然。其運作方式如下：在 `foo.tex`的排版過程中，TEX 引擎會將一些幾何資訊寫入一個名為 `foo.synctex`的輔助檔案中，之後編輯器或檢視器會使用這些資訊在輸入與輸出之間導覽。

Overleaf 支援 SyncTEX。

#### 更多關於 SyncTEX 的資訊

* [Jérôme Laurens 撰寫的 TUGBoat 文章](http://www.tug.org/TUGboat/tb29-3/tb93laurens.pdf)，SyncTEX 的作者。
* 該 [GitHub 儲存庫](https://github.com/jlaurens/synctex) SyncTEX 剖析器的


---

# 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-tw/tex-latex-ji-ben-ming-ling/12-synctex.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.
