xelatex won't render fonts correctly without full texlive

  • Done
  • quality assurance status badge
Details
2 participants
  • John Kehayias
  • Ricardo Wurmus
Owner
unassigned
Submitted by
John Kehayias
Severity
normal
J
J
John Kehayias wrote on 28 Mar 2023 06:14
(name . Guix Bugs)(address . bug-guix@gnu.org)
87mt3xh5rn.fsf@protonmail.com
Hi TeX Guixers,

Ran into a curious problem today of xelatex not properly rendering what I think is a mapping/ligature issue: the usual TeX ``something'' quote syntax should become proper double quotes (for English at least) but don't.

Here is a simple test tex file:

Toggle snippet (6 lines)
\documentclass{article}
\begin{document}
``test quote''
\end{document}

If you compile it with

Toggle snippet (3 lines)
guix shell texlive-base texlive-fontspec -- xelatex test.tex

you'll see the same quotes as in the tex file. Full log (test-bad.log) attached but the relevant line looks to me like

Toggle snippet (7 lines)
Document Class: article 2020/04/10 v1.4m Standard LaTeX document class
(/gnu/store/npkjqvkgzj3pfhqwbcc504kgp1z6fj8s-profile/share/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2020/04/10 v1.4m Standard LaTeX file (size option)
Font mapping `tex-text.tec' for font `[lmroman10-regular]:mapping=tex-text;' not found.
)

I did try adding various packages, changing fonts and font settings, but to no avail.

Meanwhile, using

Toggle snippet (3 lines)
guix shell texlive -- xelatex test.tex

gives a nicely rendered double quote mark. The log (also attached as test.log) shows no such similar message.

Some searching the most succinct and relevant summary I think is here https://tex.stackexchange.com/questions/193412/what-is-happening-to-the-quotes

Anyway, seems like something is missing when we use the minimal packages, but I can't seem to find what to add to guix shell to change the output of the pdf. Probably it is not captured in a package or is otherwise lost?

Any ideas?

Thanks!
John

PS: I don't think it is related, but xelatex will complain about not finding a fontspec.cfg either. I made one locally from what it used to be, but didn't change the output for me. I think it went missing here:

Attachment: test.log
Attachment: test-bad.log
R
R
Ricardo Wurmus wrote on 28 Mar 2023 12:12
(address . 62493@debbugs.gnu.org)
87bkkdfa5q.fsf@elephly.net
FWIW, it does work with lualatex:

guix shell --container texlive-base texlive-fontspec -- lualatex test.tex

--
Ricardo
R
R
Ricardo Wurmus wrote on 28 Mar 2023 13:51
(address . 62493@debbugs.gnu.org)
87y1nhdreo.fsf@elephly.net
We seem to be missing the xetex package that provides files for font mapping:

Toggle snippet (12 lines)
$ info tex-text.tec
tlmgr.pl: cannot find package tex-text.tec, searching for other matches:

Packages containing `tex-text.tec' in their title/description:

Packages containing files matching `tex-text.tec':
xepersian:
texmf-dist/fonts/misc/xetex/fontmapping/xepersian/persian-tex-text.tec
xetex:
texmf-dist/fonts/misc/xetex/fontmapping/base/tex-text.tec

I was under the impression that we did have a xetex package, but I can’t
find it now.

--
Ricardo
J
J
John Kehayias wrote on 29 Mar 2023 17:21
Re: bug#62493: xelatex won't render fonts correctly without full texlive
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 62493@debbugs.gnu.org)
87h6u3h9bv.fsf@protonmail.com
Hi Ricardo,

Note that I didn't get your replies as it was sent just to the debbugs
email (I always find it strange that the bug email alias doesn't send to
the submitter by default). This message from Simon was helpful for me,
at least via Emacs: https://issues.guix.gnu.org/59855#2(perhaps you
already know or have some other method, but thought I'd mention it and
I'm open to more such tricks!)

Ricardo Wurmus <rekado@elephly.net> writes:

Toggle quote (14 lines)
> We seem to be missing the xetex package that provides files for font mapping:
>
> $ info tex-text.tec
> tlmgr.pl: cannot find package tex-text.tec, searching for other matches:
>
> Packages containing `tex-text.tec' in their title/description:
>
> Packages containing files matching `tex-text.tec':
> xepersian:
> texmf-dist/fonts/misc/xetex/fontmapping/xepersian/persian-tex-text.tec
> xetex:
> texmf-dist/fonts/misc/xetex/fontmapping/base/tex-text.tec
>

Ah, that's good to know, thanks for figuring that out.

Toggle quote (3 lines)
> I was under the impression that we did have a xetex package, but I can’t
> find it now.

I also don't see any record of such a package. Trying

Toggle snippet (20 lines)
guix shell subversion -- guix import texlive xetex
[...]
Exported revision 59745.
A /tmp/guix-directory.cKaqWd/doc/xetex/base
A /tmp/guix-directory.cKaqWd/doc/xetex/base/NEWS
A /tmp/guix-directory.cKaqWd/doc/xetex/base/README
A /tmp/guix-directory.cKaqWd/doc/xetex/base/XeTeX-notes.pdf
A /tmp/guix-directory.cKaqWd/doc/xetex/base/XeTeX-notes.tex
Exported revision 59745.
A /tmp/guix-directory.cKaqWd/fonts/misc/xetex/fontmapping/base
A /tmp/guix-directory.cKaqWd/fonts/misc/xetex/fontmapping/base/qx-unicode.map
A /tmp/guix-directory.cKaqWd/fonts/misc/xetex/fontmapping/base/qx-unicode.tec
A /tmp/guix-directory.cKaqWd/fonts/misc/xetex/fontmapping/base/tex-text.map
A /tmp/guix-directory.cKaqWd/fonts/misc/xetex/fontmapping/base/tex-text.tec
Exported revision 59745.
svn: E160013: File not found: revision 66702, path '/tags/texlive-2021.3/Master/texmf-dist/tcode'
command "svn" "export" "--non-interactive" "--trust-server-cert" "-r" "59745" "svn://www.tug.org/texlive/tags/texlive-2021.3/Master/texmf-dist/tcode/" "/tmp/guix-directory.cKaqWd/tcode/" failed with status 1
guix import: error: failed to download description for package 'xetex'

or with a -r as well:

Toggle snippet (36 lines)
Exported revision 59745.
A /tmp/guix-directory.XcAtR6/doc/xetex/base
A /tmp/guix-directory.XcAtR6/doc/xetex/base/NEWS
A /tmp/guix-directory.XcAtR6/doc/xetex/base/README
A /tmp/guix-directory.XcAtR6/doc/xetex/base/XeTeX-notes.pdf
A /tmp/guix-directory.XcAtR6/doc/xetex/base/XeTeX-notes.tex
Exported revision 59745.
A /tmp/guix-directory.XcAtR6/fonts/misc/xetex/fontmapping/base
A /tmp/guix-directory.XcAtR6/fonts/misc/xetex/fontmapping/base/qx-unicode.map
A /tmp/guix-directory.XcAtR6/fonts/misc/xetex/fontmapping/base/qx-unicode.tec
A /tmp/guix-directory.XcAtR6/fonts/misc/xetex/fontmapping/base/tex-text.map
A /tmp/guix-directory.XcAtR6/fonts/misc/xetex/fontmapping/base/tex-text.tec
Exported revision 59745.
svn: E160013: File not found: revision 66702, path '/tags/texlive-2021.3/Master/texmf-dist/tcode'
command "svn" "export" "--non-interactive" "--trust-server-cert" "-r" "59745" "svn://www.tug.org/texlive/tags/texlive-2021.3/Master/texmf-dist/tcode/" "/tmp/guix-directory.XcAtR6/tcode/" failed with status 1
Backtrace:
8 (primitive-load "/home/john/.config/guix/current/bin/gu…")
In guix/ui.scm:
2300:7 7 (run-guix . _)
2263:10 6 (run-guix-command _ . _)
In guix/scripts/import.scm:
89:11 5 (guix-import . _)
In ice-9/boot-9.scm:
1752:10 4 (with-exception-handler _ _ #:unwind? _ # _)
In guix/scripts/import/texlive.scm:
92:38 3 (_)
In guix/import/utils.scm:
638:27 2 (recursive-import _ #:repo->guix-package _ #:guix-name . #)
630:33 1 (lookup-node "xetex" #f)
In ice-9/boot-9.scm:
1685:16 0 (raise-exception _ #:continuable? _)

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
Wrong number of values returned to continuation (expected 2)

I'm not up to with texlive packaging, any tips? Or perhaps someone we
can ask for input here?

Thanks!
John
R
R
Ricardo Wurmus wrote on 29 Mar 2023 17:32
(name . John Kehayias)(address . john.kehayias@protonmail.com)(address . 62493@debbugs.gnu.org)
87sfdnd11t.fsf@elephly.net
John Kehayias <john.kehayias@protonmail.com> writes:

Toggle quote (4 lines)
> Exported revision 59745.
> svn: E160013: File not found: revision 66702, path '/tags/texlive-2021.3/Master/texmf-dist/tcode'
> command "svn" "export" "--non-interactive" "--trust-server-cert" "-r" "59745" "svn://www.tug.org/texlive/tags/texlive-2021.3/Master/texmf-dist/tcode/" "/tmp/guix-directory.XcAtR6/tcode/" failed with status 1

The importer is naive and assumes that any file in tlpdb starts with
“texmf-dist/”. For the xetex package there’s a file
“tlpkg/tlpostcode/xetex.pl” and if you drop the same number of
characters that you would for “texmf-dist/” you end up with
“tcode/xetex.pl”.

Oops!

--
Ricardo
J
J
John Kehayias wrote on 29 Mar 2023 18:35
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 62493@debbugs.gnu.org)
87cz4rh5xj.fsf@protonmail.com
"Ricardo Wurmus" <rekado@elephly.net> writes:

Toggle quote (18 lines)
> John Kehayias <john.kehayias@protonmail.com> writes:
>
>> Exported revision 59745.
>> svn: E160013: File not found: revision 66702, path
>> '/tags/texlive-2021.3/Master/texmf-dist/tcode'
>> command "svn" "export" "--non-interactive" "--trust-server-cert"
>> "-r" "59745"
>> "svn://www.tug.org/texlive/tags/texlive-2021.3/Master/texmf-dist/tcode/"
>> "/tmp/guix-directory.XcAtR6/tcode/" failed with status 1
>
> The importer is naive and assumes that any file in tlpdb starts with
> “texmf-dist/”. For the xetex package there’s a file
> “tlpkg/tlpostcode/xetex.pl” and if you drop the same number of
> characters that you would for “texmf-dist/” you end up with
> “tcode/xetex.pl”.
>
> Oops!

Unfortunately that leaves me at a bit of a loss for making a
texlive-xetex package as I'm not understanding the whole texlive package
structure at first glance. I've tried something similar to other
packages I see but haven't gotten anywhere.

Any pointers or similar package to look at?

Thanks!
J
J
John Kehayias wrote on 29 Mar 2023 21:35
(name . Ricardo Wurmus)(address . rekado@elephly.net)(address . 62493-done@debbugs.gnu.org)
87jzyzic52.fsf@protonmail.com
Hi Ricardo,

On Wed, Mar 29, 2023 at 05:32 PM, Ricardo Wurmus wrote:

Toggle quote (18 lines)
> John Kehayias <john.kehayias@protonmail.com> writes:
>
>> Exported revision 59745.
>> svn: E160013: File not found: revision 66702, path
>> '/tags/texlive-2021.3/Master/texmf-dist/tcode'
>> command "svn" "export" "--non-interactive" "--trust-server-cert"
>> "-r" "59745"
>> "svn://www.tug.org/texlive/tags/texlive-2021.3/Master/texmf-dist/tcode/"
>> "/tmp/guix-directory.XcAtR6/tcode/" failed with status 1
>
> The importer is naive and assumes that any file in tlpdb starts with
> “texmf-dist/”. For the xetex package there’s a file
> “tlpkg/tlpostcode/xetex.pl” and if you drop the same number of
> characters that you would for “texmf-dist/” you end up with
> “tcode/xetex.pl”.
>
> Oops!

I see you pushed some fixes for this (I didn't try with -r as that kept running for a while and might have tried to generate a whole lot of the dependency tree), thanks! I do get an import for xetex now.

And on that note I see cbf731ae481b434e657b05c80b4a32282e5d112b which adds texlive-xetex.

I can confirm with guix shell texlive-base texlive-fontspec texlive-xetex -- xelatex test.tex the output pdf has proper quotation marks and the log looks clean.

Many thanks!
John
Closed
R
R
Ricardo Wurmus wrote on 29 Mar 2023 22:18
(name . John Kehayias)(address . john.kehayias@protonmail.com)(address . 62493-done@debbugs.gnu.org)
87o7obcnt1.fsf@elephly.net
John Kehayias <john.kehayias@protonmail.com> writes:

Toggle quote (25 lines)
> "Ricardo Wurmus" <rekado@elephly.net> writes:
>
>> John Kehayias <john.kehayias@protonmail.com> writes:
>>
>>> Exported revision 59745.
>>> svn: E160013: File not found: revision 66702, path
>>> '/tags/texlive-2021.3/Master/texmf-dist/tcode'
>>> command "svn" "export" "--non-interactive" "--trust-server-cert"
>>> "-r" "59745"
>>> "svn://www.tug.org/texlive/tags/texlive-2021.3/Master/texmf-dist/tcode/"
>>> "/tmp/guix-directory.XcAtR6/tcode/" failed with status 1
>>
>> The importer is naive and assumes that any file in tlpdb starts with
>> “texmf-dist/”. For the xetex package there’s a file
>> “tlpkg/tlpostcode/xetex.pl” and if you drop the same number of
>> characters that you would for “texmf-dist/” you end up with
>> “tcode/xetex.pl”.
>>
>> Oops!
>
> Unfortunately that leaves me at a bit of a loss for making a
> texlive-xetex package as I'm not understanding the whole texlive package
> structure at first glance. I've tried something similar to other
> packages I see but haven't gotten anywhere.

Commit cbf731ae481b434e657b05c80b4a32282e5d112b adds texlive-xetex. Now
the quotes look fine.

I adjusted the importer in a few commits after that, but generally the
recursive texlive importer suffers from the fact that we have a lot of
inconsistent package names.

--
Ricardo
Closed
?