1

I have been having a series of complications converting a *.tex file to PDF using either Jupyter notebook or $ xelatex filename.tex. These issues consistently come up with the tcolorbox package, which requires the most recent l3kernel (2024-01-22) and LaTeX2e. You can find previous troubleshooting attempts at GitHub Issue #268 and StackExchange Inquiry.

After various attempts to fix the issue, it seems that the problem is xelatex is using an older TeX distribution to render the PDF instead of the newly installed or updated TeX Live 2023. Specifically, the tcolorbox developer kindly pointed out that the latex error file lists the 2023 l3kernel and 2022 LaTeX2e are being used:

This is XeTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023) (preloaded format=xelatex 2024.1.28)  29 JAN 2024 20:28
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**"Module 01/Enviroment Test/Jupiter Notebook Enviroment Test Document.tex"
(./Module 01/Enviroment Test/Jupiter Notebook Enviroment Test Document.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-02-22>
(/usr/local/texlive/2023/texmf-dist/tex/latex/base/article.cls

So far I have:

  • Uninstalled the TinyTex R package, which was blocking use of the TeX Live 2023 distribution and causing a tlmgr package repository verification block on account of an expired key (this issue is now resolved).
  • Checked TeX Live Utility, /Library/, and /user/local/texlive to confirm that TeX Live 2023 is fully updated and even removed older distributions.
  • Used $ tlmgr update --self --all as well as $ tlmgr update --self latex l3kernel l3backend and reinstalling MacTeX 2023 to ensure everything used through xelatex would be updated.

At this point, I have no clue where xelatex is pulling these old distributions from or even why it is doing that when I render even the simplest tex files with tcolorbox. Is there a way to force a clean uninstall for all TeX distributions on a Mac computer? Is there a way to set the path for xelatex? What do you recommend I try to fix this issue?

Any guidance with this issue is greatly appreciated, and thank you in advance for your help.

15
  • 1
    Welcome to tex.sx. Your log file should say where the files are being read from, so if any are being found in unexpected places, you should check your path setting. Jan 30 at 3:31
  • Hi Barbara, thank you for your reply. It looks like all TeX paths are through TeX Live 2023. I'm not sure if this is right, but it looks like LaTeX2e and L3 programming layer are coming from article.cls and size11.clo in the /usr/local/texlive/2023/texmf-dist/tex/latex/base/ location. Is there a way to update or change these to the current versions for both? Or is this a limitation of MacTeX?
    – albeit2
    Jan 30 at 4:15
  • 1
    What do you get from kpsewhich --all latex.ltx? And what do you get from kpsewhich ‐engine≈xetex ‐‐all xelatex.fmt? What do get from tlmgr update --list? Jan 30 at 7:40
  • 1
    @UlrikeFischer engine almost equal to xetex interesting option. Jan 30 at 9:39
  • @barbarabeeton tex does not log the path to the format file (which is almost certainly what is wrong here) see Ulrike's comment (but with = not ) Jan 30 at 9:43

1 Answer 1

1

Thank you for all of your comments and attempts to help me find whatever shadowing format or conflicting TeX distributions might be blocking the updated l3 programming layer from being used. I just found an answer to whatever that problem was. First, I explored the error associated with the expl3.sty file. Specifically, the error was

(/usr/local/texlive/2023/texmf-dist/tex/latex/l3kernel/expl3.sty
Package: expl3 2024-01-22 L3 programming layer (loader) 
! LaTeX Error: Mismatched LaTeX support files detected.
(LaTeX)        Loading 'expl3.sty' aborted!
(LaTeX)        
(LaTeX)        The L3 programming layer in the LaTeX format
(LaTeX)        is dated 2023-02-22, but in your TeX tree the files require
(LaTeX)        at least 2024-01-22.

This was following the error preamble

This is XeTeX, Version 3.141592653-2.6-0.999995 (TeX Live 2023) (preloaded format=xelatex 2024.1.28)  29 JAN 2024 21:32
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**"Module 01/Enviroment Test/tcolorbox Removed.tex"
(./Module 01/Enviroment Test/tcolorbox Removed.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-02-22>
(/usr/local/texlive/2023/texmf-dist/tex/latex/base/article.cls

As I described above, the standard methods of updating the l3 layer through tlmgr or TeX Live Utility were not successful. Then I found this post called Outdated L3 programming layer for expl3.sty, where I tried

tlmgr remove --force l3kernel
tlmgr install l3kernel

This also did not work for me, and I got the same ! LaTeX Error: File 'expl3.sty' not found. error if I did not reinstall l3kernel. This also isolated that my issue was related to the l3kernel package. Following a comment to that post by Keks Dose lead me to Mismatched LaTeX support files detected.

At this point I tried the fmtutil-user --all suggestion. The tug.org page for the fmtutil command says that it will "[r]ebuild and manage TeX fmts and Metafont bases, collectively called 'formats' here". After it ran for a few minutes I tried to render the same file using xelatex filename.tex and it worked without issue! Trying to export the same file as a PDF from Jupyter notebook was also successful!

I'm not sure exactly what fmtutil-user --all did. I hope by adding all the background to finding the solution someone who is more knowledgeable will be able to piece that together. Thank you all again for your help.

If you try this and still experience an issue, try the modification that the developer Yukai Chou provided for a text file GitHub Issue #267. If you're trying to use Jupyter notebook too, you might find my conversation with him helpful. I basically jumped off of the #267 issue and asked where else he suggested to add the control sequence (GitHub Issue #267).

1
  • Good work. I believe it is possible for you to accept your own answer.
    – rallg
    Mar 5 at 17:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .