PYMPRESS(1) | pympress | PYMPRESS(1) |
pympress - pympress documentation
Pympress is a PDF presentation tool designed for dual-screen setups such as presentations and public talks. Highly configurable, fully-featured, and portable
It comes with many great features (more below):
Pympress is a free software, distributed under the terms of the GPL license (version 2 or, at your option, any later version).
Pympress was originally created and maintained by Schnouki, on his repo.
apt-get install pympress libgtk-3-0 libpoppler-glib8 libcairo2 python3-gi python3-gi-cairo gobject-introspection libgirepository-1.0-1 gir1.2-gtk-3.0 gir1.2-poppler-0.18
You can get pympress from the pympress COPR repo of your system.
With yum or dnf, simply do:
dnf copr enable cimbali/pympress dnf install python3-pympress
With zypper, fetch the link of the .repo in the table at the bottom of the COPR page and add it as a source.
zypper addrepo https://copr.fedorainfracloud.org/coprs/cimbali/pympress/repo/opensuse-tumbleweed/cimbali-pympress-opensuse-tumbleweed.repo zypper install python3-pympress
git clone https://aur.archlinux.org/python-pympress.git cd python-pympress makepkg -si pacman -S poppler-glib # dependency temporarily missing from AUR package
Or using any other tool to manage AUR packages (yay, pacaur, etc.):
yay -S python-pympress pacman -S poppler-glib # dependency temporarily missing from AUR package
brew install pympress
choco install pympress
Or download the latest installer from the latest Github release.
python3 -m pip install "pympress"
To support playing embedded videos in the PDFs, your system must have VLC installed (with the same bitness as pympress). VLC is not distributed with pympress, but it is certainly available in your system’s package manager and on their website.
Simply start Pympress and it will ask you what file you want to open. You can also start pympress from the command line with a file to open like so: pympress slides.pdf or python3 -m pympress slides.pdf
All functionalities are available from the menus of the window with slide previews. Don't be afraid to experiment with them!
Keyboard shortcuts are also listed in these menus. Some more usual shortcuts are often available, for example Ctrl+L, and F11 also toggle fullscreen, though the main shortcut is just F.
A few of the fancier functionalities are listed here:
A spin box will appear, and you will be able to navigate through your slides in the presenter window only by scrolling your mouse, with the Home/Up/Down/End keys, with the + and - buttons of the spin box, or simply by typing in the number of the slide. Press Enter to validate going to the new slide or Esc to cancel.
To enable media playback, you need to have either:
To produce PDFs with media inclusion, the ideal method is to use beamer’s multimedia package, always with \movie:
\documentclass{beamer} \usepackage{multimedia} \begin{frame}{Just a mp4 here}
\centering
\movie[width=0.3\textwidth]{\includegraphics[width=0.9\textwidth]{frame1.png}}{movie.mp4}
\movie[width=0.3\textwidth]{}{animation.gif}
\movie[width=0.3\textwidth]{}{ding.ogg} \end{frame}
If you desire autoplay, ensure you have pympress ≥ 1.7.0 and poppler ≥ 21.04, and use the movie15 package as follows:
\documentclass{beamer} \usepackage{movie15} \begin{document} \begin{frame}
\begin{center}
\includemovie[attach=false,autoplay,text={%
\includegraphics{files/mailto.png}%
}]{0.4\linewidth}{0.3\linewidth}{files/random.mpg}
\end{center} \end{frame} \end{document}
Pympress relies on:
The dependencies are often installed by default, or easily available through your package or software manager. For example, on ubuntu, you can run the following as root to make sure you have all the prerequisites assuming you use python3:
apt-get install python3 python3-pip libgtk-3-0 libpoppler-glib8 libcairo2 python3-gi python3-cairo python3-gi-cairo gobject-introspection libgirepository-1.0-1 libgirepository1.0-dev gir1.2-gtk-3.0 gir1.2-poppler-0.18
Different distributions might have different package naming conventions, for example the equivalent on OpenSUSE would be:
zypper install python3 python3-pip libgtk-3-0 libpoppler-glib8 libcairo2 python3-gobject python3-gobject-Gdk python3-cairo python3-gobject-cairo typelib-1_0-GdkPixbuf-2_0 typelib-1_0-Gtk-3_0 typelib-1_0-Poppler-0_18
On CentOS/RHEL/Fedora the dependencies would be:
yum install python36 python3-pip gtk3 poppler-glib cairo gdk-pixbuf2 python3-gobject python3-cairo
And on Arch Linux:
pacman -S --needed python python-pip gtk3 poppler cairo gobject-introspection poppler-glib python-gobject
Dependencies can be installed using Homebrew:
brew install --only-dependencies pympress
The binary installer for windows comes with pympress and all its dependencies packaged.
Alternately, in order to install from pypi or from source on windows, there are two ways to get the dependencies:
Warning: this can take a substantial amount of disk size as it requires a full software distribution and building platform.
pacman -S --needed mingw-w64-x86_64-gtk3 mingw-w64-x86_64-cairo mingw-w64-x86_64-poppler mingw-w64-x86_64-python3 mingw-w64-x86_64-vlc python3-pip mingw-w64-x86_64-python3-pip mingw-w64-x86_64-python3-gobject mingw-w64-x86_64-python3-cairo
This is also the strategy used to automate builds on appveyor.
Alternately, you can build your Gtk+3 stack from source using MSVC, see the Gnome wiki and this python script that compiles the whole Gtk+3 stack. This strategy has not been used successfully yet, due to problems building Poppler with its introspection bidings (i.e. typelib) − see #109.
Feel free to clone this repo and use it, modify it, redistribute it, etc, under the GPLv2+. A number of contributors have taken part in the development of pympress and submitted pull requests to improve it.
Be respectful of everyone and keep this community friendly, welcoming, and harrasment-free. Abusive behaviour will not be tolerated, and can be reported by email at me@cimba.li − wrongdoers may be permanently banned.
Pympress has inline sphinx documentation (Google style, contains rst syntax), and the docs generated from it are hosted on the github pages of this repo.
If you want to add or contribute to a translation, check pympress’ page on POEditor and add your efforts to make pympress available in your own language to those of @Vulpeculus, @polaksta, @susobaco, Agnieszka, Ferdinand Fichtner, FriedrichFröbel, Jaroslav Svoboda, Jeertmans, Kristýna, Lorenzo. pacchiardi, Luis Sibaja, Nico, Saulpierotti, and Cimbali.
Official releases are made to PyPI and with github releases. The community maintains a number of other packages or recipes to install pympress (see Install section). Any additions welcome.
Pympress has a number of options available from its configuration file.
This file is usually located in:
The path to the currently used configuration file can be checked in the Help > About information window.
The shortcuts are parsed using Gtk.accelerator_parse():
The parser is fairly liberal and allows lower or upper case, and also abbreviations such as “<Ctl>” and “<Ctrl>”. Key names are parsed using Gdk.keyval_from_name(). For character keys the name is not the symbol, but the lowercase name, e.g. one would use “<Ctrl>minus” instead of “<Ctrl>-”.
This means that any value in this list of key constants is valid (removing the initial Gdk.KEY_ part). You can verify that this value is parsed correctly from the Help > Shortcuts information window.
The panes (current slide, next slide, notes, annotations, etc.) can be rearranged arbitrarily by setting the entries of the layout section in the configuration file. Here are a couple examples of layouts, with Cu the current slide, No the notes half of the slide, Nx the next slide:
+----+----+----+ | Cu | No | Nx | +----+----+----+
Setting:
notes = {"children": ["current", "notes", "next"], "proportions": [0.33, 0.33, 0.33], "orientation": "horizontal", "resizeable": true}
+----+ | Cu | +----+ | No | +----+ | Nx | +----+
Setting:
notes = {"children": ["current", "notes", "next"], "proportions": [0.33, 0.33, 0.33], "orientation": "vertical", "resizeable": true}
+----+----+ | Cu | No | +----+----+ | Nx | +---------+
Setting:
notes = {"children": [
{"children": ["current", "notes"], "proportions": [0.5, 0.5], "orientation": "horizontal", "resizeable": true},
"next"
], "proportions": [0.5, 0.5], "orientation": "vertical", "resizeable": true}
+----+----+ | | Nx | + Cu +----+ | | No | +---------+
Setting:
notes = {"children": [
"current",
{"children": ["next", "notes"], "proportions": [0.5, 0.5], "orientation": "vertical", "resizeable": true}
], "proportions": [0.5, 0.5], "orientation": "horizontal", "resizeable": true}
And so on. You can play with the items, their nesting, their order, and the orientation in which a set of widgets appears.
For each entry the widgets (strings that are leaves of "children" nodes in this representation) must be:
A few further remarks:
Pympress uses the default Gtk theme of your system, which makes it easy to change on many OSs either globally via your Gtk preferences or per application. Here’s the way to do it on windows:
There are 2 locations, either install the theme for all your gtk apps, e.g. in C:\Users\%USERNAME%\AppData\Local\themes, or just for pympress, so in %INSTALLDIR%\share\themes (for me that’s C:\Users\%USERNAME%\AppData\Local\Programs\pympress\share\themes)
Basically pick a theme e.g. from this list of dark themes and make sure to unpack it in the selected directory, it needs at least %THEMENAME%\gtk-3.0\gtk.css and %THEMENAME%\index.theme, where THEMENAME is the name of the theme.
There are 2 pitfalls to be aware of, to properly install a theme:
Create a settings.ini file, either under C:\Users\%USERNAME%\AppData\Local\gtk-3.0 (global setting) or %INSTALLDIR%\etc\gtk-3.0 (just pympress) and set the contents:
[Settings] gtk-theme-name=THEMENAME
In testing this found these 2 stackoverflow questions useful:
This page contains the inline documentation, generated from the code using sphinx.
The code is documented in the source using the Google style for docstrings. Sphinx has gathered a set of examples which serves as a better crash course than the full style reference.
Retructured text (rst) can be used inside the comments and docstrings.
Thomas Jost, Cimbali
2009-2022, Thomas Jost; 2015-2020 Cimbali
27 November, 2022 | 1.7.1 |