From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/54250 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: Define tex macro on the context command line Date: Thu, 12 Nov 2009 02:52:30 -0500 (EST) Message-ID: References: <87my2tdqma.fsf@devereux.me.uk> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1258012376 1681 80.91.229.12 (12 Nov 2009 07:52:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Nov 2009 07:52:56 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Nov 12 08:52:49 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.50) id 1N8UU5-0004W4-Fo for gctc-ntg-context-518@m.gmane.org; Thu, 12 Nov 2009 08:52:49 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 34761C9AC1; Thu, 12 Nov 2009 08:50:43 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id jkoOZghIAWIm; Thu, 12 Nov 2009 08:50:40 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 27563C9A8A; Thu, 12 Nov 2009 08:50:40 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6D377C9A7C for ; Thu, 12 Nov 2009 08:50:35 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id FsCSWWI7xPg1 for ; Thu, 12 Nov 2009 08:50:31 +0100 (CET) Original-Received: from tombraider.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.93.161]) by balder.ntg.nl (Postfix) with ESMTP id D60F6C9A8A for ; Thu, 12 Nov 2009 08:50:30 +0100 (CET) Original-Received: FROM [192.168.2.8] (c-76-28-91-31.hsd1.ct.comcast.net [76.28.91.31]) By tombraider.mr.itd.umich.edu ID 4AFBBEBF.D1091.12768 ; Authuser adityam; 12 Nov 2009 02:52:31 EST In-Reply-To: <87my2tdqma.fsf@devereux.me.uk> User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:54250 Archived-At: 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 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 ___________________________________________________________________________________