[NTG-pdftex] Version numbering

Heiko Oberdiek oberdiek at uni-freiburg.de
Wed Jun 8 09:05:41 CEST 2005


On Tue, Jun 07, 2005 at 11:02:01PM +0200, Martin Schröder wrote:

> One point discussed at EuroTeX2005 was that the current
> versioning scheme is too confusing (when do we increase which
> part) and also that a real _number_ is be preferred.
> 
> In the future I want to switch to a scheme much like
> OpenBSD/OpenSSH:
> - version numbers are like 1.30.0
>                            A BB C

It isn't a "real number".

> - C is only > 0 for bug fixing releases
> - A.BB is increased with every new release by 0.1
> - with 2.00 we switch to A.B.C, i.e. 2.0.0 (we can't do this now
>   as it would confuse some people because 1.3.0 is "smaller" than
>   1.21a)
> 
> Comments?

Version numbers are needed for
a) informational purposes (/Producer, ...)
b) feature tests

* In the past there was some funny formatting of the /Producer entry,
  thus it is done in hpdftex.def. Also the code shows that there are
  three numberings schemes at macro level:
  1. none (before \pdftexversion)
  2. \pdftexversion<100 (it contains B only)
  3. \pdftexversion>100 (it contains A and B)

  I would dislike the idea to have a complicate algorithm only
  to order pdfTeX versions.

* \pdftexversion and \pdftexrevision are accessed differently:
    \the\pdftexversion, but \pdftexrevision (expandable)
  And \pdfversion encodes two numbers.

  Thus having three numbers instead of the current mixup
  improves the usage interface.

* Compatibility:
  * \pdftexversion is used in (TL2004):
    * ConTeXt
    * hyperref
    * graphicx/pdftex.def
    * pdfcprot
    * texinfo
    * fontinst
    * attachfile
    * pdfpages
    * thumbpdf
    * ...
  * \pdftexrevision is used:
    * hyperref
    * fontinst
    * pdfcprot
    * graphicx/pdftex.def
    * thumbpdf
    * ...

  Thus I think, it is quite too late to change this interface.

* Suggestion for interface that respects compatibility
  and adds an interface for three numbers:

  A.B.C
  A \in [1..\infty]
  B \in [0..99]
  C \in [0..25]

  The whole version number is printed as: printf("%d.%d.%d", A, B, C)

  \pdftexmainversion:   readonly integer for A
  \pdftexsubversion:    readonly integer for B
  \pdftexbugfixversion: readonly integer for C

  \pdftexversion := \pdftexmainversion * 100 + \pdftexsubversion
  \pdftexrevision := to_lowerletter(\pdftexbugfixversion)
    to_lowerletter defines the following mapping:
       0 -> a
       1 -> b
      ...
      25 -> z

  The following conditions, expressed in TeX, hold:

    \the\pdftexversion =
      \the\numexpr \pdftexmainversion * 100 + \pdftexsubversion\relax

    \the\pdftexbugfixversion =
      \the\numexpr\expandafter`\pdftexrevision - `a\relax

* \pdftexmainversion, ... could be defined as macros,
  example with e-TeX, pdfTeX versions >= 1.0:
  
\edef\pdftexmainversion{% avoid division with rounding
  \number\dimexpr 0.01\dimexpr\the\pdftexversion sp\relax\relax
}
\edef\pdftexsubversion{%
  \number\numexpr \the\pdftexversion - 100*\pdftexmainversion\relax
}
\edef\pdftexbugfixversion{%
  \number\numexpr \expandafter`\pdftexrevision - `a\relax
}

Thus we have already A, B, and C. What we really need is rather
a specification:
* data type: A, B, C are numbers (/strings), range
* how does the version look like, formatting issues

and the definition of semantics:
* meaning of A, B, C
* when to increase A, B, or C

Next open issue of EuroTeX are feature tests. Some features cannot
be tested by presence of pdfTeX primitives, eg. \ifeof18
Thus currently only the version number can be used to test
these features.
Conclusion:
* The documentation must contain a section that contains
  a mapping between a feature and the first version, where
  the feature is available.
* Or new interface for feature checks independent of version
  numbers (and independent of a special TeX engine).

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>
-- 


More information about the ntg-pdftex mailing list