⇦ Back

macOS

Sonoma

On macOS you want to download and install MacTeX.

  • You can go to The LaTeX Project website’s Getting LaTeX page which will link you to the TeX Users Group’s page for MacTeX from where you can go to the Download page, but it’s easier to just go to this last link.
  • Click MacTeX.pkg to download it (FYI it’s quite large)
  • In your Downloads folder, double-click the downloaded package file and click through the installation wizard
  • In your Applications folder a TeX sub-folder will be created with TeXShop inside it. This programme can be used for creating LaTeX documents.
  • Alternatively, the following commands will also now be available from the terminal (although if your terminal was already open you will need to close and re-open it):
    • pdflatex
    • pdftex
    • latex
    • lualatex
    • bibtex

Another option is to use LaTeX through an IDE such as Sublime Text. It should work automatically but see this page for more info.

⇦ Back

Ubuntu

20.04 and 22.04

Install LaTeX

  • Option 1: install TexStudio (which will install LaTeX as well). This can be downloaded from here or from within the Ubuntu Software app (aka the Snap Store).

  • Option 2: install it from the terminal with:

    sudo apt install texlive-latex-base

Check the Installation

You can check that it has worked by running the following in the terminal:

latex --version
pdflatex --version
lualatex --version
bibtex --version

Each of the above should return a block of text with version, author and license information.

Another way to check that it has worked is to actually create and compile a document:

echo '\documentclass{article}\begin{document}Hello, World!\end{document}' > test.tex
pdflatex test.tex

Additional Steps

Next, install some extra things that are missing from the base LaTeX installation:

sudo apt install dvipng
sudo apt install texlive-latex-extra
sudo apt install texlive-fonts-recommended
sudo apt install texlive-pictures
sudo apt install texlive-extra-utils
sudo apt install magick
sudo apt install texlive-font-utils  # Needed for eps figures to work
sudo apt install latexmk  # Needed for running LaTeX in Sublime Text
sudo apt install texlive-lang-greek  # Needed for the textgreek package
sudo apt install cm-super  # Needed for using LaTeX in Matplotlib plot labels

⇦ Back

16.04 and 18.04

Install LaTeX

  • Download TeXLive from here (don’t install it via the terminal!)
  • Unpack the .tar.gz file
  • Open the terminal, cd into the unpacked install-tl-* folder and run the following:
sudo su
./install-tl
i
PATH=/usr/local/texlive/2017/bin/x86_64-linux:$PATH
apt-get install latexmk

For help, see here.

Additional Steps

Install extra things that aren’t in TexLive:

sudo apt-get -y install texlive-latex-recommended texlive-pictures texlive-latex-extra

Also install ImageMagick:

cd ~/Downloads
wget https://www.imagemagick.org/download/ImageMagick.tar.gz
tar xvzf ImageMagick.tar.gz
cd ImageMagick-7.0.x-xx/  # Replace the "x"s with the right version numbers
./configure
make
sudo make install
sudo ldconfig /usr/local/lib

⇦ Back

Windows

On Windows 7, 8 and 10:

  • Install the TexStudio programme as this will install LaTeX as well. It can be downloaded from here.
  • Make sure it is working by running a LaTeX file and ensure you know how to install packages (hint: TexStudio does it automatically).
  • You may need to install Sumatra PDF before you can re-build a PDF that you have open

⇦ Back