18

I used to just compile my tex files using overleaf, which took care of everything under the hood. Now I'm trying to figure out what the different programs do. I know that e.g. Texlive and MikTex perform the same functionality, and so do pdflatex and LuaTex, and then there is latexmk (which is a make system, not sure what that is). It seems pdflatex is a compiler, but then I'm not sure what TeXLive is, though I've read it's just a set of libraries.

I haven't read any overview of this, so hopefully it can be clarified: What are the functionalities of programs like TexLive, pdfLatex, Latexmk? How do they relate to each other? Maybe one way to clarify this would be to explain how these different programs get called when one compiles a .tex file using an IDE like overleaf.

gernot
  • 49,614
user56834
  • 463
  • few clarifications: (1) texlive and miktex are not software, but rather latex distributions, meaning that they include all the packages,programs, etc that are necessary to compile your document; (2) pdflatex and lualatex are egines and even though they share some similarities, they differentiate in nature; (3) as far as i know latexmk is a perl script that calls pdflatx and/or bibtex. – Yorgos Oct 29 '21 at 07:44
  • 1
    TexLive (and MikTex) is not a program, it's a distribution, i.e. a collection of all the necessary programs and assorted files. Just install one or the other, and you should be good to go. It also includes the various *TeX engines, which are used to actually create your document from the source for you, like pdf(La)TeX, Lua(La)TeX or Xe(La)TeX. Latexmk is just a make script, that will run the programs and scripts for you automatically if and when needed. – Ingmar Oct 29 '21 at 07:44
  • you can have a look at https://tex.stackexchange.com/questions/28642/frequently-loaded-packages-differences-between-pdflatex-and-lualatex – Yorgos Oct 29 '21 at 07:47

1 Answers1

27

To use TeX you need:

  • An implementation of TeX "a tex engine" in modern terminology that converts your source file into PDF (or DVI). pdftex the most used variant at present.
  • An editor to write the tex file. (I use emacs but texstudio, texshop, vim, notepad, ...)
  • A large collection of input files to use: fonts, latex packages, bibliography styles...
  • Documentation of the various parts.
  • Auxiliary programs to do related jobs like sorting indices and bibliographies: bibtex, biber, makeindex, xindy, ...
  • Optionally a wrapper script that helps decide which programs to run in which order. Some editor menu options do this or utilitities such as latexmk, arara, ...
  • A previewer to see the generated PDF: acrobat reader, most web browsers, xpdf, ...

To get all these different parts most people use a distribution such as texlive or miktex which provides them all and provides update utilities. Linux systems include variants of texlive in their standard linux package managers or you can install texlive or miktex directly.

Overleaf provides a hosted texlive system together with an online editor (ACE) and a cross-browser PDF viewer (pdf.js, which is essentially the PDF reader used in firefox, but packaged as a cross browser javascript library.) It uses latexmk to control the processing so that the document is processed through pdflatex/bibtex/makeindex etc as often as needed to produce the displayed PDF,

David Carlisle
  • 757,742