When using the syntax of LaTeX2e, we can share information such as date, version number and description in the following way, so that the document and package use the same version number and date, and there is no need to fill in it repeatedly.

% \iffalse
  [2008/02/18 v1.0 My sample package]

However, if develope the package of LaTeX3, we use \GetIdInfo to add this information for LaTeX3 package, but owing to the different syntax, we can't share this information directly with \ProvidesFile.

  • You can do various things: some people like to use a macro, some people like to hard-code but using a script to edit multiple files (as the team do, for example). You could also define a wrapper, use DocStrip, etc.
    – Joseph Wright
    Feb 28, 2022 at 14:18
  • For a expl3-based package you want \ProvidesExplPackage, by the way.
    – Joseph Wright
    Feb 28, 2022 at 14:18
  • @JosephWright Because the syntax of \ProvidesExplPackage and \ProvidesFile is different, I can't share the code line of date, version number and description information.
    – Clara
    Feb 28, 2022 at 14:26
  • The basic syntax is the same, it's just a question of splitting over multiple lines with a bit of DocStrip
    – Joseph Wright
    Feb 28, 2022 at 14:27

1 Answer 1


Perhaps the easiest way is to have all of the headers in DocStrip guards, for example

%<package>\ProvidesExplPackage {siunitx}
%<package>\ProvidesExplPackage {siunitx-binary.cfg}
%<package>  {A comprehensive (SI) units package}
%<package>  {siunitx: Binary units}

which would work in a similar way with LaTeX2e processing too - that is just that the material is in one argument not several.

You must log in to answer this question.

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