> 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/vi/co-so-tri-thuc/069-how-to-jump-to-the-source-code-from-the-typeset-pdf-synctex.md).

# Cách nhảy đến mã nguồn từ PDF đã dàn trang (SyncTeX)

Overleaf cho phép bạn đi từ một vị trí trong tệp PDF đã dàn trang đến vị trí tương ứng trong mã nguồn LaTeX của bạn, và ngược lại. **Lưu ý**: Tính năng này sẽ không hoạt động nếu tệp chính của dự án của bạn `.tex` được lưu trong một thư mục (tức là, nó phải được đặt ở cấp cao nhất (gốc) của dự án). Một số nguyên nhân có thể khác được liệt kê [ở đây](/latex/vi/co-so-tri-thuc/132-synctex-errors.md).

Bạn có thể:

* nhấp đúp vào PDF, khi đó trình soạn thảo của Overleaf sẽ cuộn đến vị trí tương ứng trong mã nguồn, hoặc
* sử dụng các nút mũi tên nằm trên thanh phân cách giữa bảng mã nguồn và bảng xem trước để chuyển từ nguồn sang xem trước, hoặc từ xem trước sang nguồn:

![Hình ảnh hiển thị các mũi tên của Overleaf cho chuyển từ nguồn sang xem trước, hoặc từ xem trước sang nguồn](/files/2c203e088cae18d8082cd441ce494883e20518e4)

Nếu bạn không thấy các mũi tên đó, hoặc việc nhấp đúp vào PDF không hoạt động, bạn cần đảm bảo trình xem PDF của dự án được đặt thành “Overleaf” chứ không phải “Browser”. Đây là một video ngắn cho thấy cách thiết lập trình xem PDF của dự án và minh họa các tính năng đồng bộ nguồn/PDF của Overleaf.

{% embed url="<https://videos.ctfassets.net/nrgyaltdicpt/2xt7xSOvXcVqKZEAkxoaJi/76436c82c9382f8e78c84140c96deb40/SyncTeX_video.mp4>" %}

### SyncTeX: Công nghệ đằng sau tính năng này của Overleaf

Khả năng “nhảy đến vị trí mã nguồn” và “nhảy đến vị trí PDF” của Overleaf được triển khai bằng SyncTeX, một tính năng tiêu chuẩn được tích hợp trong tất cả các bộ máy TeX. Những độc giả quan tâm đến phần giới thiệu ngắn gọn về SyncTeX có thể tìm hiểu thêm trong [bài viết này của Overleaf](/latex/vi/chu-de-khac/39-mltex-enctex-and-synctex-tex-extensions.md).


---

# 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/vi/co-so-tri-thuc/069-how-to-jump-to-the-source-code-from-the-typeset-pdf-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.
