all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#71602] [PATCH] gnu: texlive-scripts: add mktexfmt
@ 2024-06-16 19:08 spencerpeters via Guix-patches via
  2024-06-17  7:18 ` bug#71602: " Nicolas Goaziou via Guix-patches via
  2024-06-30 11:34 ` [bug#71602] " Jorge Acereda
  0 siblings, 2 replies; 7+ messages in thread
From: spencerpeters via Guix-patches via @ 2024-06-16 19:08 UTC (permalink / raw
  To: 71602; +Cc: rekado@elephly.net, andreas@enge.fr

[-- Attachment #1: Type: text/plain, Size: 1577 bytes --]

* 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

[-- Attachment #2: Type: text/html, Size: 4686 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#71602: [PATCH] gnu: texlive-scripts: add mktexfmt
  2024-06-16 19:08 [bug#71602] [PATCH] gnu: texlive-scripts: add mktexfmt spencerpeters via Guix-patches via
@ 2024-06-17  7:18 ` Nicolas Goaziou via Guix-patches via
  2024-06-30 11:34 ` [bug#71602] " Jorge Acereda
  1 sibling, 0 replies; 7+ messages in thread
From: Nicolas Goaziou via Guix-patches via @ 2024-06-17  7:18 UTC (permalink / raw
  To: spencerpeters via Guix-patches via
  Cc: rekado@elephly.net, 71602-done, andreas@enge.fr, spencerpeters

Hello,

spencerpeters via Guix-patches via <guix-patches@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






^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#71602] [PATCH] gnu: texlive-scripts: add mktexfmt
  2024-06-16 19:08 [bug#71602] [PATCH] gnu: texlive-scripts: add mktexfmt spencerpeters via Guix-patches via
  2024-06-17  7:18 ` bug#71602: " Nicolas Goaziou via Guix-patches via
@ 2024-06-30 11:34 ` Jorge Acereda
  2024-06-30 14:32   ` Nicolas Goaziou via Guix-patches via
  1 sibling, 1 reply; 7+ messages in thread
From: Jorge Acereda @ 2024-06-30 11:34 UTC (permalink / raw
  To: 71602

Hi,

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

Thanks,
  Jorge




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#71602] [PATCH] gnu: texlive-scripts: add mktexfmt
  2024-06-30 11:34 ` [bug#71602] " Jorge Acereda
@ 2024-06-30 14:32   ` Nicolas Goaziou via Guix-patches via
  2024-06-30 16:47     ` Jorge Acereda
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou via Guix-patches via @ 2024-06-30 14:32 UTC (permalink / raw
  To: Jorge Acereda; +Cc: 71602

Hello,

Jorge Acereda <jacereda@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






^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#71602] [PATCH] gnu: texlive-scripts: add mktexfmt
  2024-06-30 14:32   ` Nicolas Goaziou via Guix-patches via
@ 2024-06-30 16:47     ` Jorge Acereda
  2024-06-30 17:10       ` Nicolas Goaziou via Guix-patches via
  0 siblings, 1 reply; 7+ messages in thread
From: Jorge Acereda @ 2024-06-30 16:47 UTC (permalink / raw
  To: Nicolas Goaziou; +Cc: 71602

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




^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#71602] [PATCH] gnu: texlive-scripts: add mktexfmt
  2024-06-30 16:47     ` Jorge Acereda
@ 2024-06-30 17:10       ` Nicolas Goaziou via Guix-patches via
  2024-06-30 17:49         ` Jorge Acereda
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou via Guix-patches via @ 2024-06-30 17:10 UTC (permalink / raw
  To: Jorge Acereda; +Cc: 71602

Jorge Acereda <jacereda@gmail.com> writes:

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






^ permalink raw reply	[flat|nested] 7+ messages in thread

* [bug#71602] [PATCH] gnu: texlive-scripts: add mktexfmt
  2024-06-30 17:10       ` Nicolas Goaziou via Guix-patches via
@ 2024-06-30 17:49         ` Jorge Acereda
  0 siblings, 0 replies; 7+ messages in thread
From: Jorge Acereda @ 2024-06-30 17:49 UTC (permalink / raw
  To: Nicolas Goaziou; +Cc: 71602

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@nicolasgoaziou.fr> wrote:
>
> - texlive-capt-of
> - texlive-soul
> - texlive-ulem
> - texlilve-wrapfig

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




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-06-30 17:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-16 19:08 [bug#71602] [PATCH] gnu: texlive-scripts: add mktexfmt spencerpeters via Guix-patches via
2024-06-17  7:18 ` bug#71602: " Nicolas Goaziou via Guix-patches via
2024-06-30 11:34 ` [bug#71602] " Jorge Acereda
2024-06-30 14:32   ` Nicolas Goaziou via Guix-patches via
2024-06-30 16:47     ` Jorge Acereda
2024-06-30 17:10       ` Nicolas Goaziou via Guix-patches via
2024-06-30 17:49         ` Jorge Acereda

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.