For a number of days I've been confused with some problems I had when using the \pdftex_if_engine:TF
switch in a LaTeX3/expl3
class of my own. I thought it would be equivalent to the \ifpdf
switch, but I've found quite a different behavior from one to the other with regard to the minted
package and to polar coordinates-based nodes in PSTricks
. To be more precise, in the second case I had PostScript errors precluding the generation of graphics including nodes defined in terms of polar coordinates when using the LaTeX3
switch. The strangest thing to me was that changing to the LaTeX2e
switch got everything right without needing to use the \ExplSyntax(Off|On)
switch at all.
My reason for this post is that I thought it might be useful to have somebody explaining why this different behavior -- or pointing to relevant documentation --, and that knowing about this effect might help other package/class developers who are eager of using LaTeX3/expl3
. I'm aware of Frank Mittelbach's sound advice in a comment to this linked post with regard to switching off the expl3
syntax when loading LaTeX2e
packages, but in this case it was just about the engine switch.
\pdftex_if_engine:TF
just checks the engine used, which is pdfTeX for bothpdflatex
andlatex
. It will evaluate false if XeLaTeX or LuaLaTeX are used. In order to check for PDF output you still need to use\ifpdf
.PSTricks
graphics right if they did not have nodes defined in terms of polar coordinates. I guess there must be something else going on. Or, does your comment explain this "partial sensitivity"?