Subsection 4.1 of LaTeX2e for class and package writers contains the following passage:

\NeedsTeXFormat {⟨format-name⟩} [⟨release-date⟩]

This command tells TeX that this file should be processed using a format with name ⟨format-name⟩. You can use the optional argument ⟨release-date⟩ to further specify the earliest release date of the format that is needed. When the release date of the format is older than the one specified a warning will be generated. The standard ⟨format-name⟩ is LaTeX2e. The date, if present, must be in the form yyyy/mm/dd.

I have two closely related questions about the ⟨release-date⟩ argument of \NeedsTeXFormat:

  1. How do I, at the command line or in TeX Live Utility, get the release date of the LaTeX kernel currently used by my TeX distro?
  2. Is it good practice to always specify the date of the latest release? Doing so, if I understand \NeedsTeXFormat correctly, will prompt users who don't have the latest release to update their distribution. Is it fair to expect users to be up to date? Am I likely to "lose" potentials users who may be unable to get an up-to-date distribution?
  • 1
    What about grep fmtversion $(kpsewhich latex.ltx) (or grep 'edef\\fmtversion' ...)? Or look in source2e.pdf. However, 'requiring' the latest version seems pretty strict to me...
    – jon
    Feb 16, 2014 at 23:26
  • 1
    I'm not aware of any backwards-incompatible changes in the LaTeX kernel API (which you are specifying there) since 1998 (latest), so this date should not matter in reality (unless you intend to exchange your documents with users who run an ancient TeX installation). Feb 16, 2014 at 23:41

1 Answer 1

  1. An easy way is to look for the definition of \fmtversion in latex.ltx, e.g. (bash):

    $ grep edef.fmtversion $(kpsewhich latex.ltx)

    Alternatively (see egreg's comment), you can use:

    $ texdef -t latex fmtversion

    Or latex can directly be asked:

    $ latex '\typeout{\fmtversion}\stop' | grep LaTeX2e
    LaTeX2e <2011/06/27>
  2. A "perfect" date would be the minimal release date so that the document works with this or newer releases.

    • There is IMHO no need to always specify the latest release date. Especially the LaTeX kernel is frozen since many years. Thus it is not very likely, that a document requires the latest LaTeX release. There are many more or less outdated TeX distributions around (slow update cycles of TeX distributions inside Linux distributions, ...). Using the latest date would indeed cause some trouble for the users unnecessarily.
    • On the other hand, testing a document/package with older releases is not too easy either. It costs time and I doubt that many authors want to become archaeologists.

    • Useful is the requested release date feature for packages, especially if features of a newer version are used, e.g.:

      % or \RequirePackage inside packages/classes

      Then an outdated error message is clearer for the user than a cryptic undefined command error or other failures. The documentation/ChangeLog/version history of the package (sometimes ) helps in finding appropriate release dates.

  • 8
    Also texdef -t latex fmtversion shows the definition.
    – egreg
    Feb 17, 2014 at 0:28
  • 2
    @egreg: Nice, didn't know it. Feb 17, 2014 at 0:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .