and there is
\@ifpackagelater - but is there any "if TeX later" or some other way to (automatically) get the used TeX version (besides looking into the log file etc., of course)?
After the comment of Joseph Wright I now know that I wanted to know the LaTeX format (not the TeX) version. (And he already gave the answer to this question).
Cool: At tex.stackexchanges answers are provided to people who do not even know their question!
(Second answer, as it seems the question was not really about TeX version.)
The LaTeX format version is stored in the macro
This is used
Recent versions of pdfTeX, and I think all versions of XeTeX and LuaTeX, provide 'version' data for the engine. Something like
will show it in a 'nice' way. What this warns you about is that telling what engine version is in use also means worrying about which engine is in use. Without more context, it's hard to be sure quite what effect is required. One possible approach is something like
which tests the major pdfTeX version, and is TRUE for any major version greater or equal to the given argument, and FALSE for older versions or for the wrong engine begin used. (This needs the
If you actually want the TeX version, then the banner or similar is the only way to go. Knuth did not provide a
If you use
It uses the primitive