Changes

Jump to navigation Jump to search
587 bytes added ,  23:35, 22 July 2006
\doifmode{*\v!first}
If you want to enable some mode(s) without changing the command line (e.g. because you use some TeX GUI), you can use
<cmd>enablemode</cmd><tt>[mymode]</tt> in your source. Put this before you load your environment! You can even enable several modes at once like <tt>[a4,print]</tt>.
 
== First-run-mode: Doing things only once ==
 
When you need to call external programs to process some of your data and return you some results, you probaly want to do that only once (instead of three times, if ConTeXt needs three runs). Here's how you can do it:
 
<texcode>
\doifmode{*\v!first}{%
% external program which creates a file figure1.ps
\executesystemcommand{some_external_program ...}
% convert PS into PDF
\executesystemcommand{texmfstart pstopdf figure1.ps}
}
 
% include the resulting PDF
\externalfigure[figure1]
</texcode>
 
 
[[Category:ConTeXt programming]]

Navigation menu