On 2011-02-03, Jürgen Spitzmüller wrote: > Guenter Milde wrote: >> I see. So, maybe use or copy the date check from latex.ltx:
>> \def\@ifpackagelater{\@ifl@ter\@pkgextension} >> \def\@ifclasslater{\@ifl@ter\@clsextension} >> \@onlypreamble\@ifpackagelater >> \@onlypreamble\@ifclasslater >> \def\@ifl@ter#1#2{% >> \expandafter\@ifl@t@r >> \csname ver@#2.#1\endcsname} >> \@onlypreamble\@ifl@ter >> \def\@ifl@t@r#1#2{% >> \ifnum\expandafter\@parse@version#1//00\@nil<% >> \expandafter\@parse@version#2//00\@nil >> \expandafter\@secondoftwo >> \else >> \expandafter\@firstoftwo >> \fi} >> \@onlypreamble\@ifl@t@r > This I tried. The problem is that all these commands are > \@onlypreamble. This does not work in our file. Two possibilities that come to my mind: a) Copy the definitions to our file but leave out the \@onlypreamble, of course. b) Do the tests in the preamble, store the result in macros and write the document later. Günter