[NTG-pdftex] Version numbering

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


On Wed, Jun 08, 2005 at 09:26:12AM +0200, Hans Hagen wrote:

> Heiko Oberdiek wrote:
> 
> i dislike the formal version number to be calculated, so i'd opt for:
> 
> new primitives
> 
> \pdftexmainversion:   readonly integer for A
> \pdftexsubversion:    readonly integer for B
> \pdftexbugfixversion: readonly integer for C
> 
> backward compatibility primitives, not advertised
> 
> \pdftexversion  := \pdftexmainversion * 100 + \pdftexsubversion
> \pdftexrevision := to_lowerletter(\pdftexbugfixversion)

%%% test.tex %%%
% simulate \pdftexmainversion, ... that are not yet defined
\newcount\pdftexmainversion
\pdftexmainversion=1
\newcount\pdftexsubversion
\pdftexsubversion=21
\newcount\pdftexbugfixversion
\pdftexbugfixversion=1

% now the code for \pdftexversion and \pdftexrevision follows.
% It should probably go into pdftexconfig.tex
\begingroup
  % * definition of \pdftexversion
  \count0=\pdftexmainversion
  \multiply\count0 by 100\relax
  \advance\count0 by \pdftexsubversion
  % using \chardef to avoid count register
  % and \the\pdftexversion must work
  \global\chardef\pdftexversion=\count0\relax
  %
  % definition of \pdftexrevision
  \count0=\pdftexbugfixversion
  \advance\count0 by `a\relax
  % the revision letter must have catcode 12
  \lccode`0=\count0\relax
  \lowercase{\xdef\pdftexrevision{0}}%
\endgroup

% test
\message{* \the\pdftexversion\pdftexrevision}
\end
%%% test.tex %%%

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

PS:

> actually, \ifeof18 is implemented now (at least it was the intention)

Yes, it is present.

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


More information about the ntg-pdftex mailing list