latex3 / latex3

The expl3 (LaTeX3) Development Repository
https://latex-project.org/latex3.html
LaTeX Project Public License v1.3c
1.87k stars 179 forks source link

\IfInstanceExistTF undefined with -dev formats #1514

Closed muzimuzhi closed 3 months ago

muzimuzhi commented 3 months ago

Originally reported by @akiyks in https://github.com/CTeX-org/ctex-kit/issues/707.

Commands \IfInstanceExist(TF) are always undefined with -dev formats which have templates integrated, both with and without xtemplate package.

\documentclass{article}
\usepackage{xtemplate}

\show\IfInstanceExistTF

\begin{document}
\end{document}

gives

pdflatex:
> \IfInstanceExistTF=\long macro:
#1#2->\__xtemplate_if_instance_exist:nnnTF {#1}{}{#2}.

pdflatex-dev:
> \IfInstanceExistTF=undefined.

Though the LaTeX2e kernel doesn't need \IfInstanceExist(TF), I think they should be available if xtemplate package is explicitly loaded.

The docs of \IfInstanceExist(TF) in xtemplate.dtx were first dropped then restored in 0599924d (Revert "Drop \IfInstanceExist(TF) docs", 2024-02-15), but not their implementation.

Related PRs

muzimuzhi commented 3 months ago

Ah, \IfInstanceExist(TF) were reintroduced to the kernel in commit latex3/latex2e@41f33bc4 (Re-introduce \IfInstanceExist(TF), 2024-02-15). It's just not included in any public nor dev releases.

muzimuzhi commented 3 months ago

I filed a new issue in latex3/latex2e: https://github.com/latex3/latex2e/issues/1306 to suggest a new pre-release.