Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Xreader, refresh support for Evince #1557

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions LaTeXTools.sublime-settings
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,12 @@
"texpath" : "$PATH:/usr/texbin",
// Command to invoke Python. Useful if you have Python installed in a
// non-standard location or want to use a particular version of python.
// Both Python2 and Python3 are supported, but must have the DBus bindings
// installed.
// Only Python3 is supported, but must have the DBus bindings installed.
"python": "",
// The name of the ST2 or ST3 executable. On Ubuntu, both subl and sublime-text are
// available for ST2; adjust as needed for other platforms, and for ST3
"sublime": "sublime-text",
// How long to wait after evince or okular has launched before sending a sync message
// How long to wait after evince, xreader or okular has launched before sending a sync message
// in seconds, floating point; choose 2.0 or 3.0 on a slower machine, 0.5 on a fast one
// Note: only tweak this if sync after launching the PDF viewer does not seem to work,
// or if the PDF viewer opens instantly and you don't want to wait.
Expand Down Expand Up @@ -486,6 +485,8 @@
//
// "okular" uses Okular to open the pdf
//
// "xreader" uses XReader to open the pdf
//
// "preview" uses Preview.app to open the pdf
//
// "skim" uses Skim to open the pdf; this is the
Expand Down
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The easiest way to install LaTeXTools is via [Package Control](https://packageco

If you prefer a more hands-on approach, you can always clone the git repository, or else just grab this plugin's .zip file from GitHub and extract it to your Packages directory (you can open it easily from ST, by clicking on **Preferences > Browse Packages**). Then, (re)launch ST. Please note that if you do a manual installation, the Package **must** be named **LaTeXTools**.

Finally, you'll need to have a working TeX installation and a PDF viewer. LaTeXTools supports [MacTeX](https://www.tug.org/mactex/), [MiKTeX](http://www.miktex.org/) and [TeXLive](https://www.tug.org/texlive/) as TeX systems and [Skim](http://skim-app.sourceforge.net/), [Sumatra PDF](http://sumatrapdfreader.org/free-pdf-reader.html), [Evince](https://wiki.gnome.org/Apps/Evince), [Okular](https://okular.kde.org/), and [Zathura](https://pwmt.org/projects/zathura/) as PDF viewers. For detailed instructions on how to set these up, please see [our online documentation](http://latextools.readthedocs.io/en/latest/install/)!
Finally, you'll need to have a working TeX installation and a PDF viewer. LaTeXTools supports [MacTeX](https://www.tug.org/mactex/), [MiKTeX](http://www.miktex.org/) and [TeXLive](https://www.tug.org/texlive/) as TeX systems and [Skim](http://skim-app.sourceforge.net/), [Sumatra PDF](http://sumatrapdfreader.org/free-pdf-reader.html), [Evince](https://wiki.gnome.org/Apps/Evince), [Okular](https://okular.kde.org/), [XReader](https://github.com/linuxmint/xreader) and [Zathura](https://pwmt.org/projects/zathura/) as PDF viewers. For detailed instructions on how to set these up, please see [our online documentation](http://latextools.readthedocs.io/en/latest/install/)!

## Bugs, issues & feature requests

Expand Down
422 changes: 422 additions & 0 deletions dbus_viewers/sync

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions docs/available-viewers.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,15 @@ The Preview.app viewer is very straight-forward. It simply launches Preview.app

Evince is the default viewer on Linux. On most installs that include the Gnome Desktop, it should work out of the box, but some distributions do not install some of the needed files. In particular, you will need to ensure that your system Python install has the bindings for `dbus` and one or both of `python-gobject` or `python-gi` (the Python Gnome interface).

There is one feature unique to Evince. If the `bring_evince_forward` setting in the `viewer_settings` block is set to `true` and `keep_focus` remains set to `true`, Evince will first be brought to the foreground and then focus will be returned ST.
There is one feature unique to Evince and XReader. If the `bring_forward` (formerly `bring_evince_forward`) setting in the `viewer_settings` block is set to `true` and `keep_focus` remains set to `true`, Evince will first be brought to the foreground and then focus will be returned ST.

Evince is the default viewer since Gnome appears to be the most widely-used Linux desktop. However, LaTeXTools offers support for both [Okular](#okular) and [Zathura](#zathura). Additional viewers can be suppored use the [Command Viewer](#command-viewer).
Evince is the default viewer since Gnome appears to be the most widely-used Linux desktop. However, LaTeXTools offers support for [Okular](#okular), [Zathura](#zathura) and [XReader](#xreader). Additional viewers can be suppored use the [Command Viewer](#command-viewer).

## XReader

XReader is the default viewer on Linux Mint. Like Evince, it should work out of the box, but some distributions do not install some of the needed files. In particular, you will need to ensure that your system Python install has the bindings for `dbus` and one or both of `python-gobject` or `python-gi` (the Python Gnome interface).

Like Evince, if the `bring_forward` setting in the `viewer_settings` block is set to `true` and `keep_focus` remains set to `true`, XReader will first be brought to the foreground and then focus will be returned ST.

## Okular

Expand Down
4 changes: 2 additions & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ Once again, you can use the **LaTeXTools: Check System** command to verify that

### Setup Viewer

By default, LaTeXTools assumes you are using Evince (Document Viewer) as your PDF viewer. Support is also available for Okular and Zathura and other viewers that can be run via the command line. See the section on [available-viewers](available-viewers.md) for details on how to setup other viewers.
By default, LaTeXTools assumes you are using Evince (Document Viewer) as your PDF viewer. Support is also available for Okular, Zathura and XReader and other viewers that can be run via the command line. See the section on [available-viewers](available-viewers.md) for details on how to setup other viewers.

Evince is already installed by default on any distro that provides the Gnome desktop environment, but if it hasn't been, it can be installed using your distribution's package manager. In addition to Evince, you will need to ensure you have the Python bindings for `dbus` and the Python bindings for Gnome, i.e. `gobject` or `python-gi`, depending on your distribution. If you use the Gnome desktop, you likely already have these, but if not, you will need to install them using your distribution's package manager. In particular, they are reportedly not installed on Arch Linux by default.
Evince is already installed by default on any distro that provides the Gnome desktop environment, but if it hasn't been, it can be installed using your distribution's package manager. In addition to Evince, you will need to ensure you have the Python bindings for `dbus` and the Python bindings for Gnome, i.e. `gobject` or `python-gi`, depending on your distribution. This is also necessary if you are using XReader, which is installed by default in Linux Mint. If you use the Gnome desktop, you likely already have these, but if not, you will need to install them using your distribution's package manager. In particular, they are reportedly not installed on Arch Linux by default.

Unlike other viewers and platforms, Evince forward and backward search should work out of the box thanks to the magic of `dbus`, but if not, please let us know!

Expand Down
1 change: 1 addition & 0 deletions docs/keybindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ Inverse search (i.e., going from the PDF file back to the TeX document in ST) de
* <kbd>Ctrl+left-click</kbd> in **Evince** (Linux)
* <kbd>Shift+left-click</kbd> in **Okular** (Linux)
* <kbd>Ctrl+left-click</kbd> in **Zathura** (Linux)
* <kbd>Ctrl+left-click</kbd> in **XReader** (Linux)


This will bring you to the corresponding location in the source text document.
Expand Down
208 changes: 0 additions & 208 deletions evince/evince_backward_search

This file was deleted.

72 changes: 0 additions & 72 deletions evince/evince_forward_search

This file was deleted.

34 changes: 0 additions & 34 deletions evince/evince_sync

This file was deleted.

Loading