Subject: Re: [bug#71602] [PATCH] gnu: texlive-scripts: add mktexfmt

From: Nicolas Goaziou <[email-masked]>
Date: Sun, 30 Jun 2024 19:10:42 +0200

Jorge Acereda <[email-masked]> writes:

> On Sun, Jun 30, 2024 at 4:32 PM Nicolas Goaziou <[email-masked]> wrote:
>> This is rather surprising. "mktexfmt" is not directly used to compile
>> documents, but rather to create format files. However, these format
>> files are pre-generated during build, without relying on "mktexfmt".
>>
>> Also, I can export from Org to LaTeX without issues. Your problem lies
>> elsewhere, IMO. Maybe an incomplete TeX Live installation ?
>>
>
> Oh, sorry. I mean org-latex-export-to-pdf. Maybe I'm missing something
> as you suggest. I have installed  texlive-bin, texlive-etex and
> texlive-scripts. This is what I'm getting:
>
> This is pdfTeX, Version 3.141592653-2.6-1.40.25 (TeX Live 2023/GNU
> Guix) (preloaded format=pdflatex)
>  restricted \write18 enabled.
>
> kpathsea: Running mktexfmt pdflatex.fmt
> mktexfmt: No such file or directory
> I can't find the format file `pdflatex.fmt'!

I see.

The first thing to know is the error above is a red herring. Formats
(i.e. ".fmt" files) are pre-generated when TeX Live packages are built.
When kpathsea library does not find one, it tries to generate it with
"mktexfmt", but the problem stems from the fact that you didn't install
the package containing the expected format in the first place. In this
case, the package texlive-latex-bin does provide it.

Anyway, the packages "texlive-bin, texlive-etex and texlive-scripts" are
clearly insufficient to compile any document. As indicated in the
manual, you should install collections of packages to create
a self-sufficient TeX Live distribution. For Org, at the very least, you
should start by installing texlive-collection-latexrecommended (and
remove the previous packages you had). The packages
texlive-collection-pictures (for PGF/TikZ) and
texlive-collection-fontsrecommended can be nice to have, too, but they
are optional for Org.

However, if you want a relatively small TeX Live installation, you may
want to stay away from texlive-collection-binextra,
texlive-collection-fontsextra, texlive-collection-fontutils, and
texlive-collection-latexextra, which can be quite large. I suggest to
pick the individual packages you need from them. Off the top of my head,
for Org, you may want:

- texlive-capt-of
- texlive-soul
- texlive-ulem
- texlilve-wrapfig

all from texlive-collection-latexextra.

Of course, if space is not an issue, installing
texlive-collection-latexextra (roughly 1500 packages, 1G) is an option.
There is also texlive-scheme-full (schemes are meta packages mixing
collections and sometimes individual packages), which installs all TeX
Live (4500 packages, 4G). But I really recommend to spend a few minutes
to select a sufficient TeX Live tree instead.

HTH,

Regards,
-- 
Nicolas Goaziou