Hi Hans, can you add command which will print the name (e.g. LuaTeX, pdfTeX ...) and version (e.g. 0.36.0) of the current used TeX engine. Wolfgang
Wolfgang Schuster schrieb:
Hi Hans,
can you add command which will print the name (e.g. LuaTeX, pdfTeX ...) and version (e.g. 0.36.0) of the current used TeX engine.
Hi Wolfgang, I think this should better be done by a command in pdftex/luatex. The 'Procucer' key is already set by pdftex/luatex, but sadly there is no access to this value for the user (although the same info is needed for the correspondent XMP entry in most of the PDF/X versions). Anyhow, this is what I currently use % extract /Producer info out of \pdftexbanner \def\pdftexproducer {\ifnum\contextmarkmode=4 LuaTeX\else pdfTeX\fi % starting with luatex version 0.35.0 it's 'LuaTeX' with uppercase 'L' (prior versions: 'luaTeX') \expandafter\dopdftexproducer\pdftexbanner @@@} \long\def\dopdftexproducer#1-#2-#3@@@% {-#2} Not nice, but working (with newer luatex versions). See comment... Best wishes, Peter
Wolfgang ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- "Es ist doch ein Trost, das Geldgier manchmal blöd macht." - Kottan in "Kottan ermittelt", Folge 9: "Die Einteilung" -
On Fri, Mar 20, 2009 at 1:13 PM, Taco Hoekwater
Peter Rolf wrote:
Hi Wolfgang,
I think this should better be done by a command in pdftex/luatex.
No. All engines have multiple version commands already, I see absolutely no need for yet another version-related primitive.
I mean a command in ConTeXt, no primitive, something like this. \def\currentenginename {\ifcase\texengine \or pdfTex% \or XeTeX% \or LuaTeX% \fi} This document was produced with \currentenginename. Wolfgang
Wolfgang Schuster wrote:
On Fri, Mar 20, 2009 at 1:13 PM, Taco Hoekwater
wrote: Peter Rolf wrote:
Hi Wolfgang,
I think this should better be done by a command in pdftex/luatex. No. All engines have multiple version commands already, I see absolutely no need for yet another version-related primitive.
I mean a command in ConTeXt, no primitive, something like this.
\def\currentenginename {\ifcase\texengine \or pdfTex% \or XeTeX% \or LuaTeX% \fi}
This document was produced with \currentenginename.
ok, i added \def\currenttexenginename {\ifcase\texengine\or pdf\or Xe\or Lua\else no\fi\TeX} ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Wolfgang Schuster wrote:
On Fri, Mar 20, 2009 at 1:30 PM, Hans Hagen
wrote: ok, i added
\def\currenttexenginename {\ifcase\texengine\or pdf\or Xe\or Lua\else no\fi\TeX}
Can you also add \currenttexengineversion?
hm, that would be a pretty inconsistent thing, so it needs some testing Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
On Fri, Mar 20, 2009 at 2:10 PM, Hans Hagen
Can you also add \currenttexengineversion?
hm, that would be a pretty inconsistent thing, so it needs some testing
How about: \def\currenttexengineversion {\ifcase\texengine \or\number\numexpr\pdftexversion/100.\modulonumber{100}\pdftexversion.\pdftexrevision \or\number\XeTeXversion\XeTeXrevision \or\number\numexpr\luatexversion/100.\modulonumber{100}\luatexversion.\luatexrevision \fi} Wolfgang
Wolfgang Schuster wrote:
On Fri, Mar 20, 2009 at 2:10 PM, Hans Hagen
wrote: Can you also add \currenttexengineversion? hm, that would be a pretty inconsistent thing, so it needs some testing
How about:
\def\currenttexengineversion {\ifcase\texengine \or\number\numexpr\pdftexversion/100.\modulonumber{100}\pdftexversion.\pdftexrevision \or\number\XeTeXversion\XeTeXrevision \or\number\numexpr\luatexversion/100.\modulonumber{100}\luatexversion.\luatexrevision \fi}
i'll add something to syst-ini.tex did you notice that your pdftex is a future version? i also normalize the xetex version number a bit ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
Wolfgang Schuster wrote:
On Fri, Mar 20, 2009 at 6:57 PM, Hans Hagen
wrote: did you notice that your pdftex is a future version?
Why?
terminal: This is pdfTeX, Version 3.1415926-1.40.9 (Web2C 7.5.7) document: 1.40.9
well, the version macro reported version 2 (i run version 1.50) because you need to subtract 50 before devision; keep in mind that \numexpr does rounding, contrary to \divide which truncates Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (4)
-
Hans Hagen
-
Peter Rolf
-
Taco Hoekwater
-
Wolfgang Schuster