TeXworks is a powerful open-source, free document editor with support for various typesetting engines. With TeXworks, you can generate PDF documents as your formatted output or configure your processing path to use DVI instead. TeXworks also has a built-in PDF viewer that supports source/preview synchronization, making it easy to see your changes in real time. TeXworks has the tools you need to get the job done right, whether you’re typesetting a simple document or a complex academic paper.
In the following tutorial, you will learn how to install the latest version of TeXworks on Linux Mint 21 LTS release series using a recommended Launchpad PPA repository to provide the most up-to-date version using the command line terminal.
Table of Contents
Update Linux Mint
Update your system to ensure all existing packages are up to date to avoid any conflicts during the installation.
sudo apt update && sudo apt upgrade
Install TeXworks TeX Document Editor PPA
First, make sure the following dependencies are installed.
sudo apt install dirmngr ca-certificates software-properties-common gnupg gnupg2 apt-transport-https -y
Next, import the GPG key needed for all the repositories.
sudo gpg --no-default-keyring --keyring /usr/share/keyrings/texworks.gpg --keyserver keyserver.ubuntu.com --recv-keys 3EAF6A811849A711A6D5F781ACBAE083CDF2E7E8
If you have issues importing the GPG key from LaunchPAD, please see the end section on GPG troubleshooting at the end of the article.
gpg: keybox '/usr/share/keyrings/texworks.gpg' created gpg: key ACBAE083CDF2E7E8: public key "Launchpad Latest Builds" imported gpg: Total number processed: 1 gpg: imported: 1
Import the “TeXworks” team PPA repository containing the latest version. You have two choices, the stable or the latest. I recommend the latest repository version for most users, but if you import both repositories, the one containing the latest version is always chosen automatically.
Option 1. Import TeXworks Stable Repository
echo 'deb [signed-by=/usr/share/keyrings/texworks.gpg] https://ppa.launchpadcontent.net/texworks/stable/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list.d/texworks.list
Option 2. Import TeXworks Latest Repository
echo 'deb [signed-by=/usr/share/keyrings/texworks.gpg] https://ppa.launchpadcontent.net/texworks/ppa/ubuntu jammy main' | sudo tee -a /etc/apt/sources.list.d/texworks.list
Before running the installation command, run an apt update to reflect the new imported PPA.
sudo apt-get update
Install the software using the following command.
sudo apt install texworks -y
Launch TeXworks TeX Document Editor
Launching can be done in a few ways now that you have the software installed.
In your terminal, use the following command.
However, this isn’t practical for desktop users, and you would use the following path on your desktop.
Taskbar > Office > TeXworks
Once the application has launched, you will arrive at your default landing screen.
How to Update/Upgrade TeXworks TeX Document Editor
The software should update by itself with your system packages for desktop users using the APT package manager. For users who want to check manually, use the following command in your terminal.
sudo apt update && sudo apt upgrade
How to Remove (Uninstall) TeXworks TeX Document Editor
TeXworks, when installed, adds quite a few dependencies, so ideally, using the autoremove command is best to keep your system clean and not bloated.
sudo apt autoremove texworks
Next, remove the imported PPAs. Reimporting the stable repository would be the quickest option if you want to downgrade from the latest to stable.
sudo rm /etc/apt/sources.list.d/texworks.list
For users that will never install TeXworks again, you can remove the GPG that was imported as follows.
sudo rm /usr/share/keyrings/texworks.gpg
How to Fix Broken LaunchPAD GPG Import
Users that have installed Linux Mint for the first time or have not imported a GPG key before using the command line terminal will often have issues importing GPG keys from LaunchPAD PPAs due to the directories not being created. This is an easy fix. Use the following command that will, in turn, generate the directories.
sudo gpg --list-keys
As above, the necessary directories have been created. This can be skipped, and use the following GPG import command below. If you have any issues with directories missing for this and any other PPA GPG key in the future, just run the above command.
Comments and Conclusion
If you’re looking for an open-source, free document editor with support for various typesetting engines, TeXworks is the tool for you. With TeXworks, you can generate PDF documents as your formatted output or configure your processing path to use DVI instead. TeXworks also has a built-in PDF viewer that supports source/preview synchronization, making it easy to see your changes in real time. TeXworks has the tools you need to get the job done right, whether you’re typesetting a simple document or a complex academic paper.
For more information about using TeXworks, visit the official documentation.