Next: , Previous: , Up: GNU Guix   [Contents][Index]


18 Using TeX and LaTeX

Guix provides packages for the TeX, LaTeX, ConTeXt, LuaTeX, and related typesetting systems, taken from the TeX Live distribution. However, because TeX Live is so huge and because finding one’s way in this maze is tricky, so this section provides some guidance on how to deploy the relevant packages to compile TeX and LaTeX documents.

TeX Live currently comes in two mutually exclusive flavors in Guix:

So to insist, these two flavors cannot be combined53. If in the modular setting your document does not compile, the solution is not to add the monolithic texlive package, but to add the set of missing packages from the modular distribution.

Building a coherent system that provides all the essential tools and, at the same time, satisfies all of its internal dependencies can be a difficult task. It is therefore recommended to start with sets of packages, called collections, and schemes, the name for collections of collections. The following command lists available schemes and collections (see Invoking guix package):

guix search texlive-\(scheme\|collection\) | recsel -p name,description

If needed, you may then complete your system with individual packages, particularly when they belong to a large collection you’re not otherwise interested in.

For instance, the following manifest is a reasonable, yet frugal starting point for a French LaTeX user:

(specifications->manifest
 '("rubber"

   "texlive-scheme-basic"
   "texlive-collection-latexrecommended"
   "texlive-collection-fontsrecommended"
   "texlive-babel-french"

   ;; From "latexextra" collection.
   "texlive-tabularray"
   ;; From "binextra" collection.
   "texlive-texdoc"))

If you come across a document that does not compile in such a basic setting, the main difficulty is finding the missing packages. In this case, pdflatex and similar commands tend to fail with obscure error messages along the lines of:

doc.tex: File `tikz.sty' not found.
doc.tex:7: Emergency stop.

or, for a missing font:

kpathsea: Running mktexmf phvr7t
! I can't find file `phvr7t'.

How do you determine what the missing package is? In the first case, you will find the answer by running:

$ guix search texlive tikz
name: texlive-pgf
version: 59745
…

In the second case, guix search turns up nothing. Instead, you can search the TeX Live package database using the tlmgr command:

$ tlmgr info phvr7t
tlmgr: cannot find package phvr7t, searching for other matches:

Packages containing `phvr7t' in their title/description:

Packages containing files matching `phvr7t':
helvetic:
        texmf-dist/fonts/tfm/adobe/helvetic/phvr7t.tfm
        texmf-dist/fonts/tfm/adobe/helvetic/phvr7tn.tfm
        texmf-dist/fonts/vf/adobe/helvetic/phvr7t.vf
        texmf-dist/fonts/vf/adobe/helvetic/phvr7tn.vf
tex4ht:
        texmf-dist/tex4ht/ht-fonts/alias/adobe/helvetic/phvr7t.htf

The file is available in the TeX Live helvetic package, which is known in Guix as texlive-helvetic. Quite a ride, but you found it!


Footnotes

(53)

No rule without exception! As the monolithic TeX Live does not contain the biber executable, it is okay to combine it with texlive-biber, which does.


Next: Actualizaciones de seguridad, Previous: Instalación de archivos de depuración, Up: GNU Guix   [Contents][Index]