classes add tag
2 years ago nsajko

While I was trying out the expl3 package debugging options, I got errors in some of the packages that come installed with TeXLive. (It’s tabularray, specifically.)

Naturally, the first thing to try should be checking whether there’s still an error in the latest development version from the package’s Git repository. I know that the relevant .sty file does have some changes in the Git repo.

Is it possible to clone the Git repo and then somehow point my pdftex, xetex and luatex programs to the cloned repo, so they would ignore the old version that’s installed as a part of TeXLive?

What do people usually do when they want to hack on a LaTeX package or class?

This is on Archlinux.

Top Answer
2 years ago Skillmon

Generally

you can place the .sty in your TEXMFHOME (that’s a location that has precedence over the distribution), on Linux this is usually ~/texmf (you can run kpsewhich -var-value TEXMFHOME to make sure), therein run mkdir -p tex/latex/<package-name> and place the files which should overwrite your TeXLive distribution in that folder.


But

in the case of tabularray you’ll have a much easier job, since it uses l3build (a very handy build tool for TeX-packages). Just use

The l3build check will test whether the cloned version has any regressions against the package’s own test files. You could as well omit that step.

l3build install will run everything necessary to do the stuff from the “Generally” section (as long as the configuration is correct).

You can recognize packages that use l3build by the configuration file build.lua. l3build is part of TeXLive (if it isn’t for you don’t use the TeXLive from the repositories but upstream vanilla – which is more the Arch way anyways).

If you want to remove the package again simply run l3build uninstall.

2 years
samcarter — Saturday, 26th Nov 2022 12:25

@nsajko, re: your question, While @Skillmons answer shows the proper way to handle this, personally I’m lazy an will just clone the git repositories in my ~/texmf tree. If the package comes directly with .sty files it will immediately work, if it uses dtx files, one can just unpack them where they are.

(remember to delete the cloned repository once you are finished playing with it, or you’ll wonder in a few months why some random document behaves strangely – of course this is not me speaking of experience 😛 )

16 hours
Skillmon — Friday, 25th Nov 2022 20:21

Before there was l3build I usually placed symlinks of my own packages into TEXMFHOME named something like <package>-devel.

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.