> 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/knowledge-base/069-how-to-jump-to-the-source-code-from-the-typeset-pdf-synctex.md).

# How to jump to the source code from the typeset PDF (SyncTeX)

Overleaf enables you to go from a location in the typeset PDF to the corresponding location in your LaTeX source code, and vice-versa. **Note**: This feature will not work if your project’s main `.tex` file is stored inside a folder (i.e., it must be placed at the top (root) level of your project). Several other possible causes are listed [here](/latex/knowledge-base/132-synctex-errors.md).

You can either:

* double-click on the PDF which causes Overleaf’s editor to scroll to the corresponding location in the source code, or
* use the arrow keys that sit on the divider between the source code panel and the preview panel, to jump from source-to-preview, or preview-to-source:

![Image showing Overleaf arrows for source-to-preview, or preview-to-source](/files/3AUyccR6a2Pg8Ma4pBj5)

If you don’t see those arrows, or double-clicking the PDF doesn’t work, you need to make sure your project’s PDF viewer is set to “Overleaf” and not “Browser”. Here is a short video showing how to set your project’s PDF viewer and demonstrating Overleaf’s source/PDF synchronization features.

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

### SyncTeX: The TeXnology behind this Overleaf feature

Overleaf’s “jump to source code location” and “jump to PDF location” capability is implemented using SyncTeX, a standard feature that is incorporated in all TeX engines. Readers interested in a brief introduction to SyncTeX can find out more in [this Overleaf article](/latex/more-topics/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/knowledge-base/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.
