A split-pane LaTeX editor pairs your source code directly with the rendered document, letting you jump from a sentence in the PDF back to its exact line of code. This two-way link relies on an auxiliary file called SyncTeX, which tracks where every paragraph and box lands across page breaks.
The short answer: double-click or Ctrl-click text in the PDF preview to jump straight to that line in your source code. To navigate in the opposite direction, trigger forward sync from your editor cursor to reveal the rendered output on the page.
Traditional typesetting treated source text and finished pages as completely separate artifacts. You typed commands into a plain text file, handed the document to a compiler, and received a binary PDF file with no obvious breadcrumbs leading back to the original source. Finding a misspelled word in a two-hundred-page dissertation meant copying a phrase into the editor's search bar and hoping it was unique enough to find the right paragraph.
Jerome Laurens created SyncTeX in 2008 to solve that disconnect. When your TeX engine compiles with the -synctex=1 flag enabled, it outputs a compressed map file named jobname.synctex.gz alongside the standard PDF. Inside this archive sits a coordinate index that pairs character ranges, lines, and source file paths with geometric bounding boxes on specific PDF pages.
Your editor's preview window reads this coordinate map alongside the PDF viewer. When you click on the rendered page, the viewer queries the map for the box underneath your mouse cursor, extracts the corresponding file path and line number, and focuses your editor cursor on that line. Forward synchronization does the exact inverse: it asks the map where a specific line and column from the active buffer appeared in the visual output.
The mechanical gestures for jumping back and forth depend slightly on whether you edit in a browser or inside a desktop application.
Texeno handles SyncTeX automatically during every compilation pass. Double-click anywhere on the PDF preview pane to jump directly to the matching line in your source file. If your project contains multiple subfiles, Texeno automatically opens the correct chapter tab and highlights the paragraph. To jump from code to PDF, place your cursor on a line and click the arrow icon between panes.
In VS Code, backward sync defaults to Ctrl-click (Cmd-click on macOS) inside the internal PDF viewer tab. Forward sync from the editor to the PDF uses the shortcut Ctrl+Alt+J on Windows and Linux, or Cmd+Option+J on macOS. You can also right-click anywhere in the editor buffer and select SyncTeX from cursor.
TeXstudio integrates its editor and internal viewer tightly out of the box. Left-clicking text in the PDF preview while holding Ctrl jumps immediately to the matching code line. Pressing Ctrl+Left Click in the source pane highlights the matching sentence on the PDF side.
External desktop PDF viewers like SumatraPDF on Windows, Skim on macOS, and Zathura on Linux communicate with terminal editors over command-line protocols or D-Bus signals. They require passing command patterns like code -g %f:%l to tell the viewer which executable to invoke on reverse click.
When clicking the PDF fails to jump, the coordinate map is usually broken, out of date, or obscured by macro expansion.
| Symptom | Underlying cause | Direct fix |
|---|---|---|
| Clicking the PDF does nothing at all | Missing .synctex.gz archive | Enable -synctex=1 in your compiler arguments or run a full clean rebuild. |
| Cursor lands 20 to 50 lines away from the text | Heavy macro expansion or TikZ blocks | Click plain body text rather than math displays, tables, or complex environments. |
| Sync works for main.tex but fails in chapters | Relative path confusion across nested folders | Use standard \input or \include paths relative to the root directory. |
If your editor previously jumped without trouble but suddenly lost track of your position, work through these concrete adjustments in sequence.
When running LaTeX locally via latexmk, the engine skips the coordinate file unless explicitly instructed. Verify that your configuration or build command includes the synctex switch. In Texeno, this flag is enabled by default on all compiler engines.
latexmk -pdf -synctex=1 -interaction=nonstopmode main.tex
If an earlier compilation aborted midway due to a fatal syntax error, the .synctex.gz file on disk may be truncated while the old PDF remains intact. Delete auxiliary files or run a clean recompile from scratch so both files regenerate in unison.
SyncTeX registers positions for textual boxes created during paragraph shaping. Math displays such as align, tabular rows, and figure floats get wrapped into abstract boxes that often point only to the enclosing \begin{...} line. To land precisely inside a section, click on a regular sentence rather than a formula or caption.
When documents split content across multiple directories, custom path macros can prevent the SyncTeX parser from resolving relative file references back to disk. Standardize your chapter inclusions using clean relative paths starting from the project root.
% In main.tex
\include{chapters/introduction}
\include{chapters/methodology}In a multi-file project, the TeX engine records each file opening and closing event as a new record in the sync archive. Modern online editors like Texeno track these file switches automatically, so double-clicking text from chapter two will seamlessly switch the active editor tab to chapters/chapter2.tex without losing your place.
Certain LaTeX packages interfere directly with coordinate recording. The microtype package adjusts character margins and font expansion; while subtle font stretching rarely breaks SyncTeX, extreme letterspacing can occasionally introduce small coordinate offsets. Packages that completely swallow and re-parse their body, such as listings or minted, may map every rendered code token back to the single line containing \begin{minted} rather than internal lines.
Engine selection also plays a part. pdfLaTeX, XeLaTeX, and LuaLaTeX all support SyncTeX, but LuaLaTeX writes its coordinate stream through Lua callbacks in newer TeX Live releases. Texeno compiles with TeX Live 2026 (with older versions available down to 2026, 2025, 2023 and 2020), maintaining full synchronization fidelity regardless of whether you choose pdfLaTeX for speed or LuaLaTeX for modern system fonts.
Unlike LaTeX, where SyncTeX is an auxiliary layer bolted onto a fifty-year-old macro language, modern typesetting systems like Typst build document mapping directly into the core compiler runtime.
In Typst, every abstract syntax tree node retains exact byte offsets into the source file throughout evaluation and layout. Because Typst recompiles incrementally in milliseconds, clicking the preview jumps instantaneously to the exact character offset rather than an approximate paragraph box. Texeno supports native Typst projects alongside LaTeX, offering instantaneous click-to-source navigation without requiring auxiliary .synctex.gz files.
SyncTeX is a utility that records the spatial coordinates of every word and paragraph produced during a LaTeX compile. It creates a compressed map linking positions in your source text to physical bounding boxes on the output PDF.
In browser editors like Texeno, double-click on any text in the PDF preview pane. In desktop editors like VS Code or TeXstudio, hold Ctrl (or Cmd on a Mac) and click the text in the preview window.
Large macros, floating figure environments, and multi-line equation arrays bundle multiple source lines into single output boxes. SyncTeX generally links to the beginning of the macro or environment rather than individual lines inside it. Clicking standard body text yields far more accurate jumps.
Yes. The SyncTeX coordinate file tracks file boundary transitions from \input and \include statements. When you click a sentence that belongs to an external chapter file, the editor automatically loads that specific .tex file and places your cursor there.
The overhead of writing the coordinate index is negligible for standard documents, usually adding only a fraction of a second to total compile time. For documents with thousands of complex TikZ nodes, the coordinate map can grow large, but it rarely accounts for significant compilation delays.
Yes. Both XeLaTeX and LuaLaTeX include built-in SyncTeX functionality using the same -synctex=1 command flag used by pdfLaTeX. Texeno enables synchronization across all supported TeX engines automatically.
If a compilation halts on a fatal LaTeX syntax error, the output PDF and .synctex.gz file do not finish updating. The preview continues showing your last successful build, meaning jumps may be inaccurate or point to outdated line positions until you clear the error and compile successfully.
No. Typst does not use SyncTeX because its compiler architecture retains source token positions natively during layout. Source-to-preview jumping in Typst is built directly into the engine, making navigation faster and accurate down to the character level.
Start free, upload a project as a .zip and press Recompile. Upgrade when you need longer compiles.
Start writing| Out-of-date PDF cache after compilation error |
| Clear auxiliary cache files and fix existing TeX syntax errors before jumping. |
| External viewer gives a file not found error | Spaces or special characters in the folder name | Rename project directories to avoid spaces, commas, and non-ASCII glyphs. |
|---|