My preamble begins with a line like the following, so as to help ensure that the version of LaTeX being used is sufficiently new:


How do I determine the date of the current LaTeX format? For example, what doc file in TeXLive do I consult, etc.?

I had for that line originally \NeedsTeXFormat{LaTeX2e}[2022-12-01] but when compiling my source, I see warning that the available format (with all files up-to-date via TeX Live Utility) is only 2022-11-01. Where does the latex command find that date?


I am actually using the development version pdflatex-dev of pdflatex, and the log of a run begins thus:

LaTeX2e <2023-06-01> pre-release-1 (develop 2023-2-2 branch)
L3 programming layer <2023-02-01>

In such a case, what date-like string should I use in the \NeedsTeXFormat{LaTeX2e}[202x-xx-xx] command?

  • 4
    It's not a date, it's an identifier that looks like a date ...
    – Joseph Wright
    Commented Feb 2, 2023 at 21:31
  • @JosephWright: But how.where does the 'pdflatex` command, e.g., find or determine that date, and how can I find it from the distributed TeXLive files? (I not that pdflatex --version does not show it.
    – murray
    Commented Feb 2, 2023 at 21:35

1 Answer 1


The version string (not actually a date: we pick something nominal and memorable) is printed as part of a LaTeX run in the .log and at the terminal

LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-01-24>

This string is part of the sources of LaTeX: the extracted version is latex.ltx, or in the sources in ltvers.dtx. (The printed line comes from the format file: a pre-compiled memory dump of the TeX engine when latex.ltx has been read.)

Note that the dev branch has a nominal date in the future. For example, the current pre-release says

LaTeX2e <2023-06-01> pre-release-1 (develop 2023-1-30 branch)

which would go down as 2023-06-01 as the target next release date. The branch information is primarily for the LaTeX team's reference.

  • Please see the Added comment re pdflatex-dev in my question.
    – murray
    Commented Feb 2, 2023 at 21:53
  • So which date-like string should I use in \NeedsTeXFormat{LaTeX2e} to request the dev branch in question: 2023-06-01 or 2023-02-01?
    – murray
    Commented Feb 2, 2023 at 22:00
  • @murray 2023-06-01 which would (today) give an error if used with pdflatex but no error with pdflatex-dev Commented Feb 2, 2023 at 22:55
  • 1
    @JosephWright: I'm using the dev version so as to be able to exploit inclusion of as much document metadata as possible. (Am I mistaken in using pdflatex-dev for that?)
    – murray
    Commented Feb 3, 2023 at 1:49
  • 1
    @murray for production use use pdflatex, if you want to test beta releases of the next latex release use pdflatex-dev, so it's a bit unusual to \NeedsTeXFormat so that only beta releases may be used. Commented Feb 3, 2023 at 12:12

You must log in to answer this question.

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