ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* print context version
@ 2012-11-26 18:35 Thomas A. Schmitz
  2012-11-26 18:39 ` Aditya Mahajan
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas A. Schmitz @ 2012-11-26 18:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi all,

this is a very easy one, but I couldn't find information: for a document 
under version control, I would like to typeset the git revision and the 
context version used in a footer. For git, I have come up with

\starttext

git revision \ctxlua{context(os.resultof("git --no-pager log 
--pretty='\%h of \%aD' -1"))}

\stoptext

But what is the easiest way to typeset the context version? There must 
be something easier than

\ctxlua{context(os.resultof("context --version | grep current"))}, right?

All best

Thomas
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: print context version
  2012-11-26 18:35 print context version Thomas A. Schmitz
@ 2012-11-26 18:39 ` Aditya Mahajan
  2012-11-26 18:42   ` Thomas A. Schmitz
  0 siblings, 1 reply; 3+ messages in thread
From: Aditya Mahajan @ 2012-11-26 18:39 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 26 Nov 2012, Thomas A. Schmitz wrote:

> Hi all,
>
> this is a very easy one, but I couldn't find information: for a document 
> under version control, I would like to typeset the git revision and the 
> context version used in a footer. For git, I have come up with
>
> \starttext
>
> git revision \ctxlua{context(os.resultof("git --no-pager log --pretty='\%h of 
> \%aD' -1"))}
>
> \stoptext
>
> But what is the easiest way to typeset the context version? There must be 
> something easier than
>
> \ctxlua{context(os.resultof("context --version | grep current"))}, right?

\contextversion

Aditya
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: print context version
  2012-11-26 18:39 ` Aditya Mahajan
@ 2012-11-26 18:42   ` Thomas A. Schmitz
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas A. Schmitz @ 2012-11-26 18:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 11/26/2012 07:39 PM, Aditya Mahajan wrote:

>
> \contextversion
>
> Aditya

Oh gosh, how embarrassing! Thank you Aditya, I should definitely have 
found that myself...Thomas



___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2012-11-26 18:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-26 18:35 print context version Thomas A. Schmitz
2012-11-26 18:39 ` Aditya Mahajan
2012-11-26 18:42   ` Thomas A. Schmitz

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).