ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* arguments on context call
@ 2011-10-16 15:35 Meer, H. van der
  2011-10-16 16:02 ` Thomas A. Schmitz
  0 siblings, 1 reply; 5+ messages in thread
From: Meer, H. van der @ 2011-10-16 15:35 UTC (permalink / raw)
  To: ConTeXt NTG

The "context --help" shows the following option:
--arguments=list      set variables that can be consulted during a run (key/value pairs)

It looks like something I need at the moment. There seems to be no further information on it, at least not be searching the wiki with "context arguments".
I have the two questions:

(1) how is the list given?
    context arguments=key1=value1,key2=value2
    or
    context arguments="key1=value1,key2=value2"
    or otherwise

(2) how are these values picked up inside the TeX-run for use in typesetting?

Hans van der Meer


___________________________________________________________________________________
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] 5+ messages in thread

* Re: arguments on context call
  2011-10-16 15:35 arguments on context call Meer, H. van der
@ 2011-10-16 16:02 ` Thomas A. Schmitz
  2011-10-16 17:14   ` Meer, H. van der
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas A. Schmitz @ 2011-10-16 16:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 10/16/11 5:35 PM, Meer, H. van der wrote:
> The "context --help" shows the following option:
> --arguments=list      set variables that can be consulted during a run (key/value pairs)
>
> It looks like something I need at the moment. There seems to be no further information on it, at least not be searching the wiki with "context arguments".
> I have the two questions:
>
> (1) how is the list given?
>      context arguments=key1=value1,key2=value2
>      or
>      context arguments="key1=value1,key2=value2"
>      or otherwise
>
> (2) how are these values picked up inside the TeX-run for use in typesetting?
>
> Hans van der Meer

I recently looked that up on the list archive, so here's a link:
http://archive.contextgarden.net/message/20110107.215824.8d1287ab.en.html

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] 5+ messages in thread

* Re: arguments on context call
  2011-10-16 16:02 ` Thomas A. Schmitz
@ 2011-10-16 17:14   ` Meer, H. van der
  2011-10-16 17:32     ` Wolfgang Schuster
  0 siblings, 1 reply; 5+ messages in thread
From: Meer, H. van der @ 2011-10-16 17:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Thanks, but I am afraid I do not understand the mechanism well enough.
I did the follwoing call in the shell:
context --fontchoice="my font choice" test

And in the test.tex file:
variable mykey = <\getvariable{documents.arguments}{fontchoice}>\crlf

But that clearly didn't work.

Hans van der Meer

On 16 okt. 2011, at 18:02, Thomas A. Schmitz wrote:

> On 10/16/11 5:35 PM, Meer, H. van der wrote:
>> The "context --help" shows the following option:
>> --arguments=list      set variables that can be consulted during a run (key/value pairs)
>> 
>> It looks like something I need at the moment. There seems to be no further information on it, at least not be searching the wiki with "context arguments".
>> I have the two questions:
>> 
>> (1) how is the list given?
>>     context arguments=key1=value1,key2=value2
>>     or
>>     context arguments="key1=value1,key2=value2"
>>     or otherwise
>> 
>> (2) how are these values picked up inside the TeX-run for use in typesetting?
>> 
>> Hans van der Meer
> 
> I recently looked that up on the list archive, so here's a link:
> http://archive.contextgarden.net/message/20110107.215824.8d1287ab.en.html
> 
> 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
> ___________________________________________________________________________________

___________________________________________________________________________________
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] 5+ messages in thread

* Re: arguments on context call
  2011-10-16 17:14   ` Meer, H. van der
@ 2011-10-16 17:32     ` Wolfgang Schuster
  2011-10-16 18:37       ` Meer, H. van der
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2011-10-16 17:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 16.10.2011 um 19:14 schrieb Meer, H. van der:

> Thanks, but I am afraid I do not understand the mechanism well enough.
> I did the follwoing call in the shell:
> context --fontchoice="my font choice" test
> 
> And in the test.tex file:
> variable mykey = <\getvariable{documents.arguments}{fontchoice}>\crlf
> 
> But that clearly didn't work.

<file name="test.tex">
\doifdocumentargument {bodyfont} {\setupbodyfont[\getdocumentargument{bodyfont}]}

\starttext
This document uses “\doifdocumentargumentelse{bodyfont}{\getdocumentargument{bodyfont}}{Latin Modern}” as bodyfont.
\stoptext
</file>

$ context --bodyfont=pagella test.tex

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


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

* Re: arguments on context call
  2011-10-16 17:32     ` Wolfgang Schuster
@ 2011-10-16 18:37       ` Meer, H. van der
  0 siblings, 0 replies; 5+ messages in thread
From: Meer, H. van der @ 2011-10-16 18:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Thanks,
I was already trying to jump through the hoops of \ctxlua, but this is really simple and exactly what I needed. The offline calls to context/metapost figure production now can get all the information needed to synchronize with the main document.
Hans van der Meer

On 16 okt. 2011, at 19:32, Wolfgang Schuster wrote:

> 
> Am 16.10.2011 um 19:14 schrieb Meer, H. van der:
> 
>> Thanks, but I am afraid I do not understand the mechanism well enough.
>> I did the follwoing call in the shell:
>> context --fontchoice="my font choice" test
>> 
>> And in the test.tex file:
>> variable mykey = <\getvariable{documents.arguments}{fontchoice}>\crlf
>> 
>> But that clearly didn't work.
> 
> <file name="test.tex">
> \doifdocumentargument {bodyfont} {\setupbodyfont[\getdocumentargument{bodyfont}]}
> 
> \starttext
> This document uses “\doifdocumentargumentelse{bodyfont}{\getdocumentargument{bodyfont}}{Latin Modern}” as bodyfont.
> \stoptext
> </file>
> 
> $ context --bodyfont=pagella test.tex
> 
> 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2011-10-16 18:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-16 15:35 arguments on context call Meer, H. van der
2011-10-16 16:02 ` Thomas A. Schmitz
2011-10-16 17:14   ` Meer, H. van der
2011-10-16 17:32     ` Wolfgang Schuster
2011-10-16 18:37       ` Meer, H. van der

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