The knots library for TikZ seems to be incompatible with the current l3 packages as provided, for example, by TeX Live 2015.

The following example, taken from the library's documentation compiles fine with pdflatex from TeX Live 2014 but not from TeX Live 2015.

The error is as follows:

! Undefined control sequence.
<argument> ...l:N \l__spath_tmpa_tl }\tl_case:Nnn 
                                                  \l__spath_tmpc_tl {\g__spa...
l.14   \end{knot}

What can I do to continue drawing knots with the current l3 packages?

Please do not spend time on this question unless either (1) you find it an intrinsic source of edification and delight or (2) you work on the l3 stuff.

I answered this question in trying to respond to another and thought the answer useful, even though I now think it unlikely to help the poster of the original question. Hence this one. I will post an answer here shortly.

I'm hoping that somebody who works on the l3 stuff will have a better answer....

  • 1
    Fixed version available at github.com/loopspace/spath3 – Loop Space Sep 12 '15 at 23:13
  • @LoopSpace Excellent! I guess it will be migrating to CTAN at some point? Thanks very much. – cfr Sep 12 '15 at 23:42
  • To be honest, it may be a little while before that happens. The whole submit-to-CTAN process fills me with dread. I never get it right first time. I'm sorely tempted to withdraw my packages from CTAN and make them available via github only. I probably won't, but it's tempting ... – Loop Space Sep 13 '15 at 7:48
  • @LoopSpace I've had that experience, too. And the rules seem to (a) change and (b) not be stated anywhere! But it would be a shame to be stuck with a broken version of this in standard TeX distributions. – cfr Sep 13 '15 at 12:43
  • 1
    Finally found the time to do this and managed to get it uploaded without a hitch. Should be available in a day or so. – Loop Space Feb 20 '16 at 15:05


\cs_if_exist:NF \tl_case:Nnn
  \cs_new_eq:NN \tl_case:Nnn \tl_case:NnF

until the package gets updated.

All _case functions underwent a change in the naming scheme: \<module>_case:Nnn became


with the addition of \<module>_case:NnTF and \<module>_case:Nn (when non true or false text is needed). The T argument is used in addition to the case code when a match is found.

Note: why the \cs_if_exist:NF wrapper? Because, if the code is run on an system still with an older l3 kernel, it would cease to work if just \cs_new_eq:NN is used.

It can happen that the LaTeX team decides to deprecate a function or a set of them for several reasons. For instance, a function can become obsolete because of new functions with better features and consistent interface. In the case of the \<module>_case:Nnn functions, the new ones mainly have a better naming scheme that enhances consistency with booleans (also in them there are tests that evaluate to true or false).

When a function gets deprecated, the team doesn't remove it at once, but decides for a grace period, in order to give time to package developers for updating their software. New releases of the l3 suite after the grace period has expired for a deprecated function will not have it any longer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.