4

I'm currently writting a library that requires a recent xparse (to have the +b option for environments). Unfortunately, my computer does not have such recent xparse, so I downloaded the package here, ran

latex xparse.ins

and I copied the file into my project, together with my library. I put this file in the repository, so now one can simply do:

git clone https://github.com/leo-colisson/proof-at-the-end.git
pdflatex demo.tex && pdflatex demo.tex

to install and test the library, with a recent xparse. Great.

But there is an issue. My distro is pretty recent compared to overleaf (latex 2017 I think?) and unfortunately expl3 (used by xparse) is too old as well on overleaf (it does not provide \c_novalue_tl used by xparse). So my co-author cannot use the library on overleaf. Damn.

So I tried to download the library expl3, ran

latex l3.ins

And I copied the produced expl3.sty in my main project (so now I have expl3.sty, xparse.sty, proof-at-the-end.sty, and demo.tex). Boom! Now everything is broken:

  • On my main computer I have an error:
(/usr/share/texlive/texmf-dist/tex/latex/tools/array.sty) (./xparse.sty
(./expl3.sty (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3-code.tex

! Package expl3 Error: Mismatched expl3 files detected.

See the expl3 package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.106 \next
  • On overleaf I now have an error
 Package expl3 Error: No expl3 loader detected.

See the expl3 package documentation for explanation.
Type  H <return>  for immediate help.
 ... l.126 \next

You have attempted to use the expl3 code directly rather than using the correct loader. Loading of expl3 will abort.

I am really new to Latex 3, so I have no idea how to fix this issue, on both overleaf and on my local install. What is the proper way to "install" locally a recent expl3/xparse on a desktop and on overleaf, so that everybody can use my library by simply downloading a few files?

Thanks!

2 Answers 2

6

You need to upload the entire l3kernel. The log says it used the local expl3.sty but used expl3-code.tex (the actual expl3 code) from /usr/share/texlive/texmf-dist/tex/latex/l3kernel/:

(./expl3.sty (/usr/share/texlive/texmf-dist/tex/latex/l3kernel/expl3-code.tex

! Package expl3 Error: Mismatched expl3 files detected.

You need to upload this file too to get it working. Better yet, upload the entire kernel (including driver files and other stuff that you might need):

-rw-rw-r--  1 phelype phelype 991026 Mai  7 13:25 expl3-code.tex
-rw-rw-r--  1 phelype phelype   2882 Mai  7 13:25 expl3-generic.tex
-rw-rw-r--  1 phelype phelype   3868 Mai  7 13:25 expl3.lua
-rw-rw-r--  1 phelype phelype   9894 Mai  7 13:25 expl3.sty
-rw-rw-r--  1 phelype phelype  20583 Mai  7 13:25 l3dvipdfmx.def
-rw-rw-r--  1 phelype phelype  37442 Mai  7 13:25 l3dvips.def
-rw-rw-r--  1 phelype phelype  15331 Mai  7 13:25 l3dvisvgm.def
-rw-rw-r--  1 phelype phelype  63076 Mai  7 13:25 l3names.def
-rw-rw-r--  1 phelype phelype  21611 Mai  7 13:25 l3pdfmode.def
-rw-rw-r--  1 phelype phelype  22242 Mai  7 13:25 l3xdvipdfmx.def
  • expl3-code.tex is the actual expl3 code. Without that nothing works;
  • expl3-generic.tex is the generic loader, in case you are using other format other than LaTeX;
  • expl3.lua are the Lua routines in case you are using expl3 with LuaTeX;
  • expl3.sty is the loader for LaTeX (counterpart of expl3-generic.tex);
  • The remaining .def files are driver-specific definitions which are loaded depending on which engine you use.
5

Phelype Oleinik has given an excellent answer , but I'd like to point to a couple of another method.

We provide a TDS-style zip file which available from CTAN. This is 'pre-extracted' and explicitly contains a tex/latex directory with all of the run-time files in it. A copy of the content of that directory will always have a full set of matching files.

10
  • Nice :) I always go for the hard way :P May 7, 2019 at 16:43
  • @PhelypeOleinik Well I actually make those zip files ...
    – Joseph Wright
    May 7, 2019 at 16:44
  • I always thought those were automagically generated by the system .-. May 7, 2019 at 16:50
  • 1
    @PhelypeOleinik In the sense l3build, which I wrote, makes them on my PC ...
    – Joseph Wright
    May 7, 2019 at 18:07
  • 1
    @tobiasBora In a local machine I'd change TEXINPUTS directly. In Overleaf you can do this. May 7, 2019 at 18:14

You must log in to answer this question.

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