guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Manual PDF and translation (modular texlive?)


From: Ricardo Wurmus
Subject: Re: Manual PDF and translation (modular texlive?)
Date: Thu, 22 Oct 2020 21:52:45 +0200
User-agent: mu4e 1.4.13; emacs 27.1

Ricardo Wurmus <rekado@elephly.net> writes:

> 2) we aren’t using XeTeX or LuaTeX with the monolithic “texlive”
> package, so why does pdfTeX behave differently here?  I see in the logs
> that the date of the format file differs — does this indicate that our
> pdfTeX format file is wrong?  I will compare the two files.

The comparison with diffoscope wasn’t very helpful because the file
embeds countless store directory names and differs everywhere.

So I just copied the known-good pdftex.fmt from the monolithic package
and added it to the union: the TOC looks fine!  (The build with “make
doc/guix.de.pdf” still fails for unknown reasons, but it produces a fine
PDF file.)

So: what’s wrong with our pdftex.fmt?  It’s not clear how the file is
generated in the TeX Live repository.  People are probably expected to
just copy it, but we’re generating it from source with the following
code in “texlive-latex-base”:

--8<---------------cut here---------------start------------->8---
…

                 ;; XXX: We can't build all formats at this point, nor are they
                 ;; part of the LaTeX base, so we disable them.  Actually, we
                 ;; should be running this all in a profile hook, so that only
                 ;; selected formats and hyphenation patterns are included, but 
it
                 ;; takes long and TeX Live isn't designed to be modular like
                 ;; that.  Everything operates on a shared directory, which we
                 ;; would only have at profile generation time.
                 (let ((disabled-formats
                        '("aleph aleph" "lamed aleph" "uptex uptex" "euptex 
euptex"
                          "eptex eptex" "ptex ptex" "pdfxmltex pdftex" "platex 
eptex"
                          "csplain pdftex" "mf mf-nowin" "mex pdftex" "pdfmex 
pdftex"
                          "luacsplain luatex"
                          "cont-en xetex" "cont-en pdftex" "pdfcsplain xetex"
                          "pdfcsplain pdftex" "pdfcsplain luatex" "cslatex 
pdftex"
                          "mptopdf pdftex" "uplatex euptex" "jadetex pdftex"
                          "amstex pdftex" "pdfcslatex pdftex" "lollipop tex"
                          "xmltex pdftex" "pdfjadetex pdftex" "eplain pdftex"
                          "texsis pdftex" "mltex pdftex" "utf8mex pdftex")))
                   (mkdir "web2c")
                   (install-file (string-append
                                  (assoc-ref inputs "texlive-kpathsea")
                                  "/share/texmf-dist/web2c/fmtutil.cnf")
                                 "web2c")
                   (make-file-writable "web2c/fmtutil.cnf")
                   (substitute* "web2c/fmtutil.cnf"
                     (((string-append "^(" (string-join disabled-formats "|") 
")") m)
                      (string-append "#! " m))))
                 (invoke "fmtutil-sys" "--all"
                         "--fmtdir=web2c"
                         (string-append "--cnffile=web2c/fmtutil.cnf"))
                 ;; We don't actually want to install it.
                 (delete-file "web2c/fmtutil.cnf")
                 #t))
--8<---------------cut here---------------end--------------->8---

I suspect that the build environment doesn’t have locales set up so the
format dumping tool assumes that we want to us Latin-1 encoding for
everything.  (Roughly speaking, the fmt files are like dumped Lisp
images as I understand it.)

I’ll try to tweak the texlive-latex-base package and see if I can get it
to generate the pdftex.fmt correctly.

-- 
Ricardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]