# bug in skeyval, possible solution with firstaid

Since today (or yesterday) one of my packages [paresse.sty] is giving an error.

I've tracked down the origin to skeyval which says

~/texlive/2020/texmf-dist/tex/latex/skeyval/skeyval-core.tex:8460:
Package skeyval Error: Patching '\end' failed! (skeyval)
'\skvAtEndEnvironment' will not work


I've got the impression that skeyval tries to do some almost legal moves there and that a recent change in the LaTeX2e kernel has put some hindrance in its expectations.

As far as I understand what I read, it seems to me that firstaid.sty could come at the rescue for a quick fix (until I rewrite my style file without skeyval), but I am at my wit's end there.

Any help for a quick fix will be highly appreciated.

• Welcome to TeX.SX! skeyval is tricky to fix, even in firstaid; you'd have to revert to the previous definition of \begin, \end, and \document (it seems) to satisfy skeyval, load the package, then apply the correct patches manually later... I'd say it's easier to just pick another keyval package... – Phelype Oleinik Oct 3 at 9:20
• Side remark: as you are a package author: please test your packages also regularly with latex-dev. tex.stackexchange.com/questions/506646/what-is-latex-dev. We are providing this format just for such cases so that packages do not get catched by surprised by the side-effects of a latex update. – Ulrike Fischer Oct 3 at 9:56
• You might also want to switch from ifluatex and ifxetex to the iftex package. For your toggles you could switch to etoolboxes toggles (so that you could replace the \iftogon with \iftoggle and \iftogoff with \nottoggle by search&replace), and setup your complementary keys with xkeyval directly (with \settoggle or \toggletrue and \togglefalse). The changes necessary should be minimal this way. – Skillmon Oct 3 at 10:15
• Is your file hosted anywhere on the internet (e.g., Github)? This way I could take a look at your sources and send you the necessary changes. – Skillmon Oct 3 at 14:03