TEX on Linux

This is not really a Web Dev tip, but I thought it worth quickly noting for those who have a need to produce properly formatted mathematical (and other) high quality textual output on Linux.

TEX is a typesetting system - it lets you format text at the quality of a formal publication like a book, magazine or journal, including complex text formats like equations.  It includes a (Turing-complete) language making it extremely powerful.

Installing it to use on Linux, is not difficult, however installing MiKTeX with TexWorks on Ubuntu/Pop!_OS 19.10 as I have requires some additional steps.

MiKTeX

MiKTeX is a system that brings together a large set of TEX related programs.  One system that comes bundled with it is TexWorks.  Using these two works well for normal mathematical formulae that I've tested.

TexWorks

TexWorks is a convenient TEX editor.  You can write your TEX and immediately create PDF output so that you can see your work.

 


Installation

MiKTeX has a package so that installing it is basically following its instructions:

Register GPG key

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D6BC243565B2087BC3F897C9277A7293F59E4889

Register Installation Source

The package is for Ubuntu 18.04 LTS however this is not a problem at this stage:
echo "deb http://miktex.org/download/ubuntu bionic universe" | sudo tee /etc/apt/sources.list.d/miktex.list

Install MiKTeX

sudo apt update
sudo apt install miktex

Additional Packages

MiKTeX comes along with many packages, including TexWorks - however it won't function as is.  This is likely due to MiKTeX being a 18.04 package and therefore not including up-to-date
dependencies.
To overcome this, you need two more packages not currently available in 19.10 or 20.04 Ubuntus:

libhunspell

wget http://archive.ubuntu.com/ubuntu/pool/main/h/hunspell/libhunspell-1.6-0_1.6.2-1_amd64.deb
sudo apt install ./libhunspell-1.6-0_1.6.2-1_amd64.deb

libicu60

wget http://archive.ubuntu.com/ubuntu/pool/main/i/icu/libicu60_60.2-3ubuntu3_amd64.deb
sudo apt install ./libicu60_60.2-3ubuntu3_amd64.deb

Running TexWorks

TexWorks can be run at this point simply with

miktex-texworks
in the shell, but integrating with the GUI can be completed by creating MiKTeX-TexWorks.desktop in ~/.local/share/applications:

[Desktop Entry]
Name=TexWorks (MiKTeX)
Comment=Create TEX!
Exec=/usr/bin/miktex-texworks
Icon=TeXworks
Type=Application

This can be run from your normal applications menu.

Comments

Popular posts from this blog

Freeze Changing HTML Element in Chrome Developer Tools

Change Unix terminal Title