ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* section headnumber at texexec
@ 2006-08-10 21:18 David Arnold
  2006-08-10 21:54 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: David Arnold @ 2006-08-10 21:18 UTC (permalink / raw)


All,

If I compile a section with:

texmfstart texexec section1

is there a texexec switch that I can use to pass the section number  
at the command line?

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

* Re: section headnumber at texexec
  2006-08-10 21:18 section headnumber at texexec David Arnold
@ 2006-08-10 21:54 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2006-08-10 21:54 UTC (permalink / raw)


David Arnold wrote:
> All,
>
> If I compile a section with:
>
> texmfstart texexec section1
>
> is there a texexec switch that I can use to pass the section number  
> at the command line?
>   
well, i guess that you bet there is a way to do it -) 

==== d.tex ==== 

\doifenvelse{sectionnumber}
  {\setupheadnumber[section][\numexpr\env{sectionnumber}-1\relax]}
  {}

\starttext

\section{test}

\stoptext

=== end of d === 

texexec --arg=sectionnumber=4 d

if needed you can do in an environment file 

\startsetups check-section

  \doifenvelse{sectionnumber}
    {\setupheadnumber[section][\numexpr\env{sectionnumber}-1\relax]}
    {}

\stopsetups 

and then 

==== d.tex ==== 

\environment ... 

\setups{check-section}

\starttext

\section{test}

\stoptext

=== end of d === 


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

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

end of thread, other threads:[~2006-08-10 21:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-10 21:18 section headnumber at texexec David Arnold
2006-08-10 21:54 ` 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).