Preview ‐ Linux⧸KDE - rzukic/zed-latex GitHub Wiki
The default document viewer packaged into desktop linux distributions using KDE is called okular.
[!CAUTION] This currently does not work with
okular
installed via flatpak, but this is unlikely if using a standard KDE distro.
[!IMPORTANT] If having issues with next section, see issue guidance here.
Build and Preview on Save (forwards+inverse search incl.)
When working correctly, Zed will automatically build (with latexmk
) and forward-search (including opening the okular window the first time) on save unless any user workspace settings for texlab
specify otherwise.
- Just save to forwards-search, the window opens on its own the first time
Shift+Click
to inverse-search
[!WARNING] On save, the position of the cursor is not communicated, so the forward-search location is only an estimate based on LSP communications. See just below for more accurate forward-search using keybinds.
Manual Build and Preview
As with other PDF viewers, you can disable build+preview on save.
One could then in principle use Zed tasks for forward search, and also give them keybindings. As a by-product, the forward search will be more accurate by using the actual position of the cursor in Zed. Such tasks are likely to be added to this extension soon.
Requirements
The only requirement is bash
.