Aditya Mahajan wrote:
On Wed, 11 Nov 2009, John Devereux wrote:
Hi,
Is it possible to define a tex macro on the context command line (MkII)?
For example:
texexec manual.tex --define Title "X99 Operators Manual"
so that
\Title
would expand to the appropriate text?
You can do that with pdftex command,
pdftex -progname=context -fmt=cont-en -translate-file=natural.tcx --output-format=pdf --8bit --jobname=filename "\\def\\Title{whatever} \\input filename"
but you loose all the goodies of texexec (multiple runs, running bibtex, sorting index, etc.)
Alternatively, it is possible to read from console during a tex run
\starttext \immediate\write16{What is the title?} \read16 to \Title Title is \Title \stoptext
\starttext test: \env{whatever} \stoptext context --arguments="whatever=Test" ... ----------------------------------------------------------------- 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 -----------------------------------------------------------------