Summary
This lesson sets up the environment used throughout the course. It explains what a TeX distribution is and which one suits each operating system: TeX Live, MiKTeX or MacTeX; it distinguishes a full installation from a basic one and shows how missing packages are installed later. It introduces Texmaker, the course editor, with its window, the choice of LuaLaTeX as the compiler, UTF-8 encoding and synchronization between the source and the PDF; it also introduces Overleaf, the in-browser alternative, with its advantages and its limits. It walks through the first compilation, with the project folder, the auxiliary files it leaves behind and the reasons why a PDF may fail to update, and it ends with two test documents that check that the installation works, the second with Greek and a font chosen by name.
Learning objectives
- Explain what a TeX distribution contains and choose one according to the operating system, the available disk space and the connection.
- Configure Texmaker to compile with LuaLaTeX, save in UTF-8 and move from the source to the PDF and from the PDF back to the source.
- Configure an Overleaf project to compile with LuaLaTeX and recognize what sets it apart from a local installation.
- Explain what each auxiliary file of a compilation is for and decide which ones to keep.
- Diagnose, from the log, why a document does not compile or why a change does not appear in the PDF.
The distribution
The previous lesson showed that LaTeX needs an engine. An engine alone, however, is not enough: it also needs the LaTeX files, the packages the document loads, the fonts, the hyphenation patterns of each language and several auxiliary programs, such as Biber for the bibliography. A TeX distribution gathers all of this into one coherent installation, and it comes with a package manager that installs what is missing and updates what is installed. There are three general-purpose distributions, and all three are free.
- TeX Live, maintained by the TeX user groups, runs on Linux, Windows and macOS, and releases a new version every year. Its package manager is the
tlmgrcommand. By default its installer installs everything, several gigabytes; a smaller scheme can be chosen, at the cost of installing whatever is missing later. - MiKTeX is the most widely used distribution on Windows, although it also exists for Linux and macOS. Its basic installer is small, and its distinctive feature is that it installs packages on the fly: if a document loads a missing package, MiKTeX downloads it during the compilation, according to the preference chosen at installation (ask first, always or never). Its updates are managed with its console, MiKTeX Console.
- MacTeX is the recommended way to install TeX Live on macOS: a native macOS installer that installs the full version. There is also BasicTeX, a reduced version for those who only want to try it out.
The difference between a full and a basic installation is a trade-off between disk space and convenience. A full installation takes several gigabytes and is slow to install, sometimes hours if it is downloaded over the network; in return, any document compiles without looking for anything else, even offline. A basic installation takes little space, but every package or font it does not include will have to be installed when it is needed: in MiKTeX, on the fly, provided there is a connection; in TeX Live, with a command like the following.
In a TeX Live installation of your own, these commands are typed in the terminal. The first installs reledmac, the package for critical editions; the second updates the manager itself and every installed package.
tlmgr install reledmactlmgr update --self --allIf TeX Live was installed system-wide, the commands require administrator privileges; if it was installed in a user folder, they do not.
On Linux there is one more route. Linux distributions such as Debian, Ubuntu or Fedora offer TeX Live in their own repositories, split into many system packages that are installed with the usual package manager. It is the simplest route, but it has two consequences. First, those packages are usually older than the latest TeX Live release, because they follow the Linux distribution's release schedule. Second, in such installations tlmgr is not used to add packages: whatever is missing is installed with the system's package manager. If the most recent version is needed, TeX Live can be installed with its own installer, which the TeX Live documentation calls a native installation; both can coexist on the same computer, and the one in use is the one that comes first in the program search path.
On Debian and Ubuntu, the following command installs the full TeX Live from the system repositories, with administrator privileges.
sudo apt install texlive-fullReduced versions are built by combining smaller packages; for this course the full one is advisable, because it includes every language, Greek among them, and every free font in TeX Live.
Loading the content…
Completed
Sign in to save your progress