ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Print engine name/version
@ 2009-03-20 10:33 Wolfgang Schuster
  2009-03-20 12:07 ` Peter Rolf
  0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2009-03-20 10:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Print engine name/version
  2009-03-20 10:33 Print engine name/version Wolfgang Schuster
@ 2009-03-20 12:07 ` Peter Rolf
  2009-03-20 12:13   ` Taco Hoekwater
  0 siblings, 1 reply; 11+ messages in thread
From: Peter Rolf @ 2009-03-20 12:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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" -



___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Print engine name/version
  2009-03-20 12:07 ` Peter Rolf
@ 2009-03-20 12:13   ` Taco Hoekwater
  2009-03-20 12:22     ` Wolfgang Schuster
  0 siblings, 1 reply; 11+ messages in thread
From: Taco Hoekwater @ 2009-03-20 12:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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.

Best wishes,
Taco





___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Print engine name/version
  2009-03-20 12:13   ` Taco Hoekwater
@ 2009-03-20 12:22     ` Wolfgang Schuster
  2009-03-20 12:30       ` Hans Hagen
  0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2009-03-20 12:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Mar 20, 2009 at 1:13 PM, Taco Hoekwater <taco@elvenkind.com> 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.

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Print engine name/version
  2009-03-20 12:22     ` Wolfgang Schuster
@ 2009-03-20 12:30       ` Hans Hagen
  2009-03-20 12:50         ` Wolfgang Schuster
  0 siblings, 1 reply; 11+ messages in thread
From: Hans Hagen @ 2009-03-20 12:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang Schuster wrote:
> On Fri, Mar 20, 2009 at 1:13 PM, Taco Hoekwater <taco@elvenkind.com> 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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Print engine name/version
  2009-03-20 12:30       ` Hans Hagen
@ 2009-03-20 12:50         ` Wolfgang Schuster
  2009-03-20 13:10           ` Hans Hagen
  0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2009-03-20 12:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Mar 20, 2009 at 1:30 PM, Hans Hagen <pragma@wxs.nl> wrote:
> ok, i added
>
> \def\currenttexenginename
>  {\ifcase\texengine\or pdf\or Xe\or Lua\else no\fi\TeX}

Can you also add \currenttexengineversion?

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Print engine name/version
  2009-03-20 12:50         ` Wolfgang Schuster
@ 2009-03-20 13:10           ` Hans Hagen
  2009-03-20 16:21             ` Wolfgang Schuster
  0 siblings, 1 reply; 11+ messages in thread
From: Hans Hagen @ 2009-03-20 13:10 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang Schuster wrote:
> On Fri, Mar 20, 2009 at 1:30 PM, Hans Hagen <pragma@wxs.nl> 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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Print engine name/version
  2009-03-20 13:10           ` Hans Hagen
@ 2009-03-20 16:21             ` Wolfgang Schuster
  2009-03-20 17:57               ` Hans Hagen
  0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2009-03-20 16:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Mar 20, 2009 at 2:10 PM, Hans Hagen <pragma@wxs.nl> 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}

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Print engine name/version
  2009-03-20 16:21             ` Wolfgang Schuster
@ 2009-03-20 17:57               ` Hans Hagen
  2009-03-20 18:08                 ` Wolfgang Schuster
  0 siblings, 1 reply; 11+ messages in thread
From: Hans Hagen @ 2009-03-20 17:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang Schuster wrote:
> On Fri, Mar 20, 2009 at 2:10 PM, Hans Hagen <pragma@wxs.nl> 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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Print engine name/version
  2009-03-20 17:57               ` Hans Hagen
@ 2009-03-20 18:08                 ` Wolfgang Schuster
  2009-03-20 18:12                   ` Hans Hagen
  0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2009-03-20 18:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Mar 20, 2009 at 6:57 PM, Hans Hagen <pragma@wxs.nl> 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

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Print engine name/version
  2009-03-20 18:08                 ` Wolfgang Schuster
@ 2009-03-20 18:12                   ` Hans Hagen
  0 siblings, 0 replies; 11+ messages in thread
From: Hans Hagen @ 2009-03-20 18:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang Schuster wrote:
> On Fri, Mar 20, 2009 at 6:57 PM, Hans Hagen <pragma@wxs.nl> 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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-03-20 18:12 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-20 10:33 Print engine name/version Wolfgang Schuster
2009-03-20 12:07 ` Peter Rolf
2009-03-20 12:13   ` Taco Hoekwater
2009-03-20 12:22     ` Wolfgang Schuster
2009-03-20 12:30       ` Hans Hagen
2009-03-20 12:50         ` Wolfgang Schuster
2009-03-20 13:10           ` Hans Hagen
2009-03-20 16:21             ` Wolfgang Schuster
2009-03-20 17:57               ` Hans Hagen
2009-03-20 18:08                 ` Wolfgang Schuster
2009-03-20 18:12                   ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).