From NixOS Wiki
Revision as of 10:58, 6 April 2024 by Maintenance script (talk | contribs) (rollback unauthorized mass edits)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

According to Wikipedia:

TeX Live is a free software distribution for the TeX typesetting system that includes major TeX-related programs, macro packages, and fonts.


Since TeX Live consist of thousands of packages, to make managing it easier, NixOS replicates the organization of TeX Live into 'schemes' and 'collections'

The following Tex Live schemes are available:

Name of TeX Live package Name of Nixos-derivation Comment
Scheme-full nixpkgs.texlive.combined.scheme-full Contains every TeX Live package
Scheme-medium nixpkgs.texlive.combined.scheme-medium contains everything in the small scheme + more packages and languages
Scheme-small nixpkgs.texlive.combined.scheme-small contains everything in the basic scheme + xetex, metapost, a few languages.
Scheme-basic nixpkgs.texlive.combined.scheme-basic contains everything in the plain scheme but includes latex.
Scheme-minimal nixpkgs.texlive.combined.scheme-minimal contains plain only.
Scheme-teTeX nixpkgs.texlive.combined.scheme-tetex contains more than the medium scheme, but nowhere near the full scheme.
Scheme-ConTeXt nixpkgs.texlive.combined.scheme-context contains ConTeXt
Scheme-GUST nixpkgs.texlive.combined.scheme-gust contains gust

Combine Sets

You can install a set with extra packages by using something like

(texlive.combine { inherit (texlive) scheme-medium xifthen ifmtarg framed paralist titlesec; })

For a minimal set of packages needed for Emacs Orgmode, as described in org-latex-default-packages-alist variable, install these packages:

{ config, pkgs, ... }:
  tex = (pkgs.texlive.combine {
    inherit (pkgs.texlive) scheme-basic
      dvisvgm dvipng # for preview and export as html
      wrapfig amsmath ulem hyperref capt-of;
      #(setq org-latex-compiler "lualatex")
      #(setq org-preview-latex-default-process 'dvisvgm)
{ # home-manager
  home.packages = with pkgs; [


Missing lmodern.sty

If LaTex (perhaps through Pandoc) complains about missing lmodern.sty, make sure you have at least texlive.combined.scheme-medium installed (-full should work as well; while -small worked for some, but not for all).

Invalid fontname ‘Latin Modern Roman/ICU’

If you get an error message saying “Invalid fontname ‘Latin Modern Roman/ICU’. . . ”, then you need to add the entry lmodern into your configuration in the section fonts.fonts and rebuild.

Further reading