GNU bug report logs - #71602
[PATCH] gnu: texlive-scripts: add mktexfmt

Previous Next

Package: guix-patches;

Reported by: spencerpeters <spencerpeters <at> protonmail.com>

Date: Sun, 16 Jun 2024 23:20:01 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71602 in the body.
You can then email your comments to 71602 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#71602; Package guix-patches. (Sun, 16 Jun 2024 23:20:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to spencerpeters <spencerpeters <at> protonmail.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 16 Jun 2024 23:20:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: spencerpeters <spencerpeters <at> protonmail.com>
To: "guix-patches <at> gnu.org" <guix-patches <at> gnu.org>
Cc: "rekado <at> elephly.net" <rekado <at> elephly.net>,
 "andreas <at> enge.fr" <andreas <at> enge.fr>
Subject: [PATCH] gnu: texlive-scripts: add mktexfmt
Date: Sun, 16 Jun 2024 19:08:37 +0000
[Message part 1 (text/plain, inline)]
* gnu/packages/tex.scm (texlive-scripts): add mktexfmt

Hello. I have noticed while using a modular TeX Live installation that the texlive-scripts package
lacks mktexfmt, which is necessary for creating TeX fmts. TeX Live places mktexfmt in a
separate folder from the remainder of the scripts in this package, but mktexfmt is simply
a symlink to fmtutil, which is included in this Guix package. As such, this patch adds a phase to
the build system to create this symlink after fmtutil has been installed. An alternative solution would
be to add the mktexfmt file in the upstream TeX Live repository as a source location, but since that
file is still only a symlink to fmtutil, I believe it is easier to create the symlink ourselves as the package
is built. I apologize if there are any errors as this is my first patch.

Best,
Spencer
---
gnu/packages/tex.scm | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 828bcde0e2..5df60193d8 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -383,7 +383,12 @@ (define-public texlive-scripts
(apply (assoc-ref tex:%standard-phases 'link-scripts)
(list #:outputs outputs
#:link-scripts
- (find-files "scripts")))))))))
+ (find-files "scripts"))))))
+ (add-after 'link-scripts 'link-mktexfmt
+ (lambda _
+ (let ((fmtutil (string-append #$output "/bin/fmtutil")))
+ (symlink fmtutil
+ (string-append #$output "/bin/mktexfmt" ))))))))
(inputs (list perl))
(home-page "https://www.tug.org/texlive/")
(synopsis "TeX Live infrastructure programs")
--
2.45.1
[Message part 2 (text/html, inline)]

Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Mon, 17 Jun 2024 07:20:01 GMT) Full text and rfc822 format available.

Notification sent to spencerpeters <spencerpeters <at> protonmail.com>:
bug acknowledged by developer. (Mon, 17 Jun 2024 07:20:01 GMT) Full text and rfc822 format available.

Message #10 received at 71602-done <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: spencerpeters via Guix-patches via <guix-patches <at> gnu.org>
Cc: "rekado <at> elephly.net" <rekado <at> elephly.net>, 71602-done <at> debbugs.gnu.org,
 "andreas <at> enge.fr" <andreas <at> enge.fr>,
 spencerpeters <spencerpeters <at> protonmail.com>
Subject: Re: [bug#71602] [PATCH] gnu: texlive-scripts: add mktexfmt
Date: Mon, 17 Jun 2024 09:18:59 +0200
Hello,

spencerpeters via Guix-patches via <guix-patches <at> gnu.org> writes:

> * gnu/packages/tex.scm (texlive-scripts): add mktexfmt

Good catch.

> Hello. I have noticed while using a modular TeX Live installation that the texlive-scripts package
> lacks mktexfmt, which is necessary for creating TeX fmts.

Actually, it is not strictly necessary. Guix uses "fmtutil-sys" to
generate such fmts.  But you're right, the script should be installed anyway.

> #:link-scripts
> - (find-files "scripts")))))))))
> + (find-files "scripts"))))))
> + (add-after 'link-scripts 'link-mktexfmt
> + (lambda _
> + (let ((fmtutil (string-append #$output "/bin/fmtutil")))
> + (symlink fmtutil
> + (string-append #$output "/bin/mktexfmt" ))))))))

I integrated this in the `link-scripts' phase, and pushed to "tex-team"
branch. "mktexfmt" should be available once this branch is merged.

Regards,
-- 
Nicolas Goaziou






Information forwarded to guix-patches <at> gnu.org:
bug#71602; Package guix-patches. (Sun, 30 Jun 2024 11:27:02 GMT) Full text and rfc822 format available.

Message #13 received at 71602 <at> debbugs.gnu.org (full text, mbox):

From: Jorge Acereda <jacereda <at> gmail.com>
To: 71602 <at> debbugs.gnu.org
Subject: [PATCH] gnu: texlive-scripts: add mktexfmt
Date: Sun, 30 Jun 2024 13:34:50 +0200
Hi,

Any ETA for the merge? This breaks emacs org-mode export to latex.

Thanks,
  Jorge




Information forwarded to guix-patches <at> gnu.org:
bug#71602; Package guix-patches. (Sun, 30 Jun 2024 14:33:02 GMT) Full text and rfc822 format available.

Message #16 received at 71602 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Jorge Acereda <jacereda <at> gmail.com>
Cc: 71602 <at> debbugs.gnu.org
Subject: Re: [bug#71602] [PATCH] gnu: texlive-scripts: add mktexfmt
Date: Sun, 30 Jun 2024 16:32:08 +0200
Hello,

Jorge Acereda <jacereda <at> gmail.com> writes:

> Any ETA for the merge?

This should happen soon. Currently, the branch is being built on QA[¹].

> This breaks emacs org-mode export to latex.

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 ?


Regards,

[¹]  https://qa.guix.gnu.org/branch/core-updates

-- 
Nicolas Goaziou






Information forwarded to guix-patches <at> gnu.org:
bug#71602; Package guix-patches. (Sun, 30 Jun 2024 16:39:02 GMT) Full text and rfc822 format available.

Message #19 received at 71602 <at> debbugs.gnu.org (full text, mbox):

From: Jorge Acereda <jacereda <at> gmail.com>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: 71602 <at> debbugs.gnu.org
Subject: Re: [bug#71602] [PATCH] gnu: texlive-scripts: add mktexfmt
Date: Sun, 30 Jun 2024 18:47:20 +0200
On Sun, Jun 30, 2024 at 4:32 PM Nicolas Goaziou <mail <at> nicolasgoaziou.fr> 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'!
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'!
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'!


Thanks,
  Jorge




Information forwarded to guix-patches <at> gnu.org:
bug#71602; Package guix-patches. (Sun, 30 Jun 2024 17:12:01 GMT) Full text and rfc822 format available.

Message #22 received at 71602 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Jorge Acereda <jacereda <at> gmail.com>
Cc: 71602 <at> debbugs.gnu.org
Subject: Re: [bug#71602] [PATCH] gnu: texlive-scripts: add mktexfmt
Date: Sun, 30 Jun 2024 19:10:42 +0200
Jorge Acereda <jacereda <at> gmail.com> writes:

> On Sun, Jun 30, 2024 at 4:32 PM Nicolas Goaziou <mail <at> nicolasgoaziou.fr> 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






Information forwarded to guix-patches <at> gnu.org:
bug#71602; Package guix-patches. (Sun, 30 Jun 2024 17:42:01 GMT) Full text and rfc822 format available.

Message #25 received at 71602 <at> debbugs.gnu.org (full text, mbox):

From: Jorge Acereda <jacereda <at> gmail.com>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: 71602 <at> debbugs.gnu.org
Subject: Re: [bug#71602] [PATCH] gnu: texlive-scripts: add mktexfmt
Date: Sun, 30 Jun 2024 19:49:39 +0200
Hi Nicolas,

Thanks a lot for the detailed explanation, clearly a PEBKAC on my side.

On Sun, Jun 30, 2024 at 7:10 PM Nicolas Goaziou <mail <at> nicolasgoaziou.fr> wrote:
>
> - texlive-capt-of
> - texlive-soul
> - texlive-ulem
> - texlilve-wrapfig

You remember correctly, those plus texlive-collection-latexrecommended
did the trick.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 29 Jul 2024 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 224 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.