TeXiFy-IDEA documentation Help

PDF viewers

PDF Viewer IntelliJ plugin

Since b0.7.4

TeXiFy supports using the PDF Viewer plugin to view PDFs inside the IDE. This includes forward and inverse search functionality.

To forward search, use Tools | LaTeX | Forward search or the shortcut listed there. To inverse search, use Ctrl + click.

To use the PDF Viewer plugin, install it via the plugin settings in your IDE. In IntelliJ: Settings | Plugins | search in marketplace, and select it in your LaTeX run configuration as the PDF viewer. After compilation it will open the PDF viewer on the right.

At the moment of writing (April 2023), a newer version with bug fixes is available at https://github.com/slideclimb/intellij-pdf-viewer/releases

built-in-pdf-viewer

Thanks to Ivan Posti from JetBrains for this plugin.

For any bugs, questions, or feature requests for the PDF viewer, please refer to the PDF Viewer’s GitHub.

SumatraPDF

On Windows, TeXiFy supports SumatraPDF as a pdf viewer with forward and inverse search.

It can be downloaded from https://www.sumatrapdfreader.org/download-free-pdf-viewer.html. If you know you are on a 64-bit system you can download the 64-bit build installer. If you have no idea, download the normal installer which is the top-most link.

Shortcuts

The default shortcut for forward search in IntelliJ is Ctrl + Alt + Shift + .. The default shortcut for backward search in SumatraPDF is a double left mouse click.

Explanation

When your cursor is in IntelliJ and you have just compiled a document, you can look up which line in the pdf corresponds to the line your cursor is at by going in IntelliJ to the menu Tools | LaTeX | SumatraPDF | Forward Search, or using the shortcut Ctrl + Alt + Shift + . which is listed there. This shortcut can also be used to bring the SumatraPDF window in view when you recompiled a document but you do not see it.

You can also do the reverse of the forward search lookup. To configure this, the first time you have to press Tools | LaTeX | SumatraPDF | Configure Inverse Search, this will update a setting in SumatraPDF. You also have to do this every time after you update IntelliJ.

Now you can double left-click in SumatraPDF in a pdf you just compiled, and it should make your cursor go to the correct location in IntelliJ.

Portable SumatraPDF

Since b0.6.6

There also is support for portable SumatraPDF installations, in case you cannot install use the normal installer for example if you do not have administrator rights. Open your run configuration, click Select custom SumatraPDF path and specify in the text field the folder which contains SumatraPDF.exe, either by editing the field or by clicking the folder icon on the right. When you run the run configuration, SumatraPDF should open.

Note that to use forward and inverse search, the folder containing SumatraPDF.exe should be added to your PATH, or the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\SumatraPDF.exe should be set to the path to SumatraPDF.exe.

"No synchronization info at this position" or "Synchronization file cannot be opened"

After compiling your file and after SumatraPDF opens up, if you get errors in SumatraPDF such as "No synchronization info at this position" or "Synchronization file cannot be opened", it might be an issue with SumatraPDF itself (see here : https://github.com/sumatrapdfreader/sumatrapdf/discussions/2741, https://github.com/sumatrapdfreader/sumatrapdf/issues/2642). The issue doesn’t seem to appear when closing the file in SumatraPDF, and then opening it without compiling. The issue seems to appear only after a compilation. A fix that seems to work is to install the portable version of SumatraPDF. Don’t forget to add "SumatraPDF.exe" to your PATH variables or in the registry editor (see above in Portable SumatraPDF section).

Evince

Since b0.6.6

On non-Windows systems, TeXiFy supports Evince as a pdf viewer with forward and inverse search.

Shortcuts

The default shortcut for forward search in IntelliJ is Ctrl + Alt + Shift + .. The default shortcut for backward search in Evince is Ctrl + Left mouse click.

Note that spaces in your path (including filename) are not allowed.

When your cursor is in IntelliJ and you have just compiled a document, you can look up which line in the pdf corresponds to the line your cursor is at by going in IntelliJ to the menu Tools | LaTeX | Evince | Forward Search, or using the shortcut Ctrl + Alt + Shift + . which is listed there. This shortcut can also be used to bring the Evince window in view when you do not see it.

You can also do the reverse: press Ctrl and click in Evince in a pdf you just compiled, and it should make your cursor go to the correct location in IntelliJ.

Note you need at least Evince 2.32 for this, you can check your version with evince --version. Especially on Linux Mint it may be that your version is too old, in which case simply apt install evince to update.

Okular

Since b0.6.7

On Linux systems, TeXiFy supports Okular as a pdf viewer with forward and inverse search.

Shortcuts

The default shortcut for forward search in IntelliJ is is Ctrl + Alt + Shift + .. The default shortcut for inverse search in Okular is Shift + Left mouse click.

Note that inverse search only works when you’re viewing the pdf in browse mode (Ctrl + 1)

  • In Okular, open the settings and go to the Editor tab.

  • Specify the correct binary for your Jetbrains IDE

  • General instructions:

    • custom Text editor and add {bin} --line %l %f

  • For IDEA:

    • For Okular version > 1.8.3, select TeXiFy-IDEA from the list. For Okular 1.8.3 or less, select the Custom Text Editor in the editor field, and type the command idea --line %l %f

  • For Pycharm

    • pycharm-community --line %l %f

  • If you have problems ensure that your binary is in the system path. You can check with the which {bin} command, so for IDEA: which idea and for pycharm community edition which pycharm-community

  • If the binary is missing from the system path you may need to add it e.g. via echo export PATH="$PATH:/bin/pest" >> ~/.bashrc. Some users have needed to enable the "Generate shell scripts" settings in Jetbrains Toolbox; however I have had success with a snap installed pycharm (no Jetbrains Toolbox installed). For more information on the Jetbrains Toolbox see the IntelliJ documentation.

See the Okular documentation for more information on inverse search with Okular.

Zathura

Since b0.7.1

On non-Windows systems, TeXiFy supports Zathura as a pdf viewer with forward and inverse search.

Shortcuts

The default shortcut for forward search in IntelliJ is Ctrl + Alt + Shift + .. The default shortcut for backward search in Zathura is Ctrl + Left mouse click.

Note that spaces in your path (including filename) are not allowed.

When your cursor is in IntelliJ and you have just compiled a document, you can look up which line in the pdf corresponds to the line your cursor is at by going in IntelliJ to the menu Tools | LaTeX | Zathura | Forward Search, or using the shortcut Ctrl + Alt + Shift + . which is listed there. This shortcut can also be used to bring the Zathura window in view when you do not see it.

You can also do the reverse: press Ctrl and click in Zathura in a pdf you just compiled, and it should make your cursor go to the correct location in IntelliJ.

Skim

Since b0.6.8

On MacOS, TeXiFy supports Skim as a pdf viewer with forward and inverse search.

Shortcuts

The default shortcut for forward search in IntelliJ is is ⌥ + ⇧ + ⌘ + .. The default shortcut for inverse search in Skim is ⌘ + ⇧ + Click.

  • In Skim, open the settings (⌘ + ,) and go to the Sync tab.

  • Select the Custom as preset, and fill in idea as command and --line %line %file as arguments (for PyCharm replace idea with pycharm).

  • Check that idea is available with which idea. If it isn’t, you might have to enable the "Generate shell scripts" settings in Jetbrains Toolbox, see the IntelliJ documentation for more information.

See the Skim documentation for more information on inverse search with Skim.

Other pdf viewers

If none of the known PDF viewers are detected, TeXiFy will try to open the system default pdf viewer.

If you have a different pdf viewer not in the list, you can still let TeXiFy automatically open it after compilation, see Run configuration settings.

Last modified: 01 May 2024