Flip between the document viewer and gedit.
Tiffany Antopolski
tiffany@antopolski.com

Creative Commons Share Alike 3.0

# Search with SyncTeX

After you compile your TeX file with SyncTeX, you will be able to search. SyncTeX even supports forward and backward search from an included file.

# Forward search: from TeX to PDF (from gedit to the document viewer)

Forward search allows you to click on a specific section of TeX source code, and jump to the associated position in the PDF. To perform forward search:

Click on a line in the TeX file.

In gedit, click Tools Forward Search. The corresponding line in the PDF will be outlined in red.

Alternatively, you can press Ctrl Alt F, or Ctrlleft click. The corresponding line in the PDF will be outlined in red.

If the corresponding PDF file is not open, performing a forward search will open the PDF in the document viewer.

If you have a complex project with several TeX files you can put

% mainfile: mainfile.tex

either in the first or last three lines of each included TeX file, and forward search will work. Backward search should always work, even if you don't add the modeline.

# Backward search: from PDF to TeX (from the document viewer to gedit)

Backward search allows you to click on a specific line in the PDF file, and jump to the associated line in the TeX source code.

You can perform a backward search by pressing Ctrlleft click in the document viewer. The corresponding line in the TeX source code will be highlighted.