How to Install TeXworks on Ubuntu 24.04/22.04/20.04

TeXworks offers a powerful and user-friendly environment tailored to prepare LaTeX documents. It’s an essential tool for anyone looking to create professional-quality typesetting, making it ideal for both novices and experienced users.

Key Features of TeXworks:

  • Intuitive Interface: Clean, simple, and easy to navigate.
  • Integrated PDF Viewer: Real-time document preview.
  • Auto-completion: Speeds up writing with LaTeX command suggestions.
  • Syntax Highlighting: Enhances readability and error identification.
  • Cross-Platform Compatibility: Available on Windows, macOS, and Linux.

With the introduction out of the way, let’s explore how to install TeXworks on Ubuntu 24.04, 22.04, or 20.04 LTS utilizing the command-line terminal.

Method 1: Install TeXworks ia TeXworks PPA

Update Ubuntu Before TeXworks Installation

First, run a quick update and upgrade to ensure your system is updated and prepared for a new installation of software with the following command:

sudo apt update && sudo apt upgrade

Next, we will install TeXworks using the official LaunchPAD PPA that the “TeXworks” team maintains. Many prefer this method because it offers the most recent stable versions without depending on container software installations like Flatpak or Snapcraft.

Add TeXworks Launchpad PPA

The latest stable version and the latest-build version, essentially a nightly build release, are the two available options. The latest stable version, updated frequently, should suffice for most users. However, you can choose either version based on your preference.

Import the stable PPA of TeXworks:

sudo add-apt-repository ppa:texworks/stable -y

Import the latest-builds (development) PPA of TeXworks:

sudo add-apt-repository ppa:texworks/ppa -y

Install TeXworks on Ubuntu via APT Command

Before running the installation command, execute an apt update to reflect the newly imported PPA.

sudo apt update

Install TeXworks using the following command:

sudo apt install texworks

Method 2: Install TeXworks via Flatpak and Flathub

An alternative approach to installing TeXworks is leveraging Flatpak, a versatile package management system with a sandboxed application environment. To install TeXworks via Flatpak, you must include the Flathub repository, which contains the TeXworks package.

Note: If Flatpak is not yet installed on your system, refer to How to Install Flatpak on Ubuntu with the Flatpak Team Official LaunchPAD PPA, which provides instructions for using the Flatpak Team Official LaunchPAD PPA to obtain the most recent supported version.

Verify Flathub is Enabled to Install TeXworks

Start by opening the terminal and entering the following command to integrate the Flathub repository:

sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Install TeXworks on Ubuntu via Flatpak Command

With the repository now in place, proceed to install TeXworks by executing the command below:

flatpak install flathub org.tug.texworks

Launch TeXworks via CLI or GUI Path

Once you have installed TeXworks using either the APT or Flatpak method, you can launch it from the command terminal or by locating the application icon in your system.

CLI Methods to Launch TeXworks

If you have installed TeXworks using the APT method, open the terminal and type the following command

texworks

If you have installed TeXworks using the Flatpak method, open the terminal and type the following command:

flatpak run org.tug.texworks

GUI Method to Launch TeXworks

  1. Access your system’s application menu. This can typically be done by clicking the menu icon in your screen’s lower-left or upper-left corner. Depending on your Linux distribution and desktop environment, the icon might look like a grid of dots, the Ubuntu logo, or a different symbol.
  2. Search for TeXworks in the application menu. You can browse through the list of installed applications or use the search functionality provided by your desktop environment. Type “TeXworks” in the search bar, and the application icon should appear.
  3. Launch TeXworks by clicking on the application icon. This will start the program, and you can begin creating and managing your LaTeX documents.

Additional TeXworks Commands

Update TeXworks

The software should update automatically with your system packages for desktop users using the APT package manager. For users who would like to check manually, use the following command in your terminal:

sudo apt update && sudo apt upgrade

Alternatively, Flatpak users can use the following command to update TeXworks:

flatpak update org.tug.texworks

Remove TeXworks

When installed, TeXworks adds quite a few dependencies. Ideally, using the autoremove command is best to keep your system clean and not bloated.

sudo apt remove texworks

Next, remove the imported PPA if you have no desire to re-install the software:

sudo add-apt-repository --remove ppa:texworks/stable -y
sudo add-apt-repository --remove ppa:texworks/ppa -y

Alternatively, Flatpak installations will require running the following command to remove TeXworks:

flatpak uninstall org.tug.texworks

Conclusion

In this guide, we covered how to install TeXworks on Ubuntu 24.04, 22.04, and 20.04 LTS using both APT with the TeXworks Team LaunchPAD PPA and the Flatpak Package Manager. We provided tips for optimizing your workspace and leveraging community resources to enhance your experience. Our goal is to make your initial setup simple and effective. Remember, regular practice and exploration are key to mastering TeXworks.

Leave a Comment