From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/35171 Path: news.gmane.org!not-for-mail From: Aditya Mahajan Newsgroups: gmane.comp.tex.context Subject: Re: question about macro's Date: Thu, 28 Jun 2007 09:29:11 -0400 (EDT) Message-ID: References: <4683AE93.9070204@jhnet.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1183037375 4085 80.91.229.12 (28 Jun 2007 13:29:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 28 Jun 2007 13:29:35 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Thu Jun 28 15:29:33 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1I3u3v-0007V1-2U for gctc-ntg-context-518@m.gmane.org; Thu, 28 Jun 2007 15:29:31 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3CB951FF89; Thu, 28 Jun 2007 15:29:30 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 13631-03-22; Thu, 28 Jun 2007 15:29:21 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id BF2C01FF77; Thu, 28 Jun 2007 15:29:20 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 1AD921FF77 for ; Thu, 28 Jun 2007 15:29:20 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 13631-03-21 for ; Thu, 28 Jun 2007 15:29:17 +0200 (CEST) Original-Received: from skycaptain.mr.itd.umich.edu (smtp.mail.umich.edu [141.211.93.160]) by ronja.ntg.nl (Postfix) with ESMTP id D2C141FF6C for ; Thu, 28 Jun 2007 15:29:14 +0200 (CEST) Original-Received: FROM aditya.hsd1.il.comcast.net. (c-24-13-179-215.hsd1.il.comcast.net [24.13.179.215]) BY skycaptain.mr.itd.umich.edu ID 4683B7A8.85054.30461 ; 28 Jun 2007 09:29:12 -0400 In-Reply-To: <4683AE93.9070204@jhnet.nl> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:35171 Archived-At: On Thu, 28 Jun 2007, Jelle Huisman wrote: > Hello, > > I try to create a macro for processing a document tagged with some > non-standard tags, like: > > \TAGc The title of this chapter > \TAGs Here starts a new section with a lot of bla bla bla text. More bla > bla. And yet another piece of bla bla. Do you have a blank line between the two lines? If so, see below. > To process the tags I have defined some macro's, like this one: > > \def\TAGc#1 > {\dosomething{#1} % the \dosomething has to do with fonts etc. > \dosomethingelse} > > However, when I typeset the document this macro only works with the > first word of the line tagged with \TAGc. Is it possible to tell the > macro to process the whole line? (changing my source document is no option.) Have a look at \dowithpargument. Here is a snippet from one of my documents. \def\TAGc{\dowithpargument\doTAGc} \def\doTAGc#1% {Whatever you want with #1} After this \TAGc ABC \par and \TAGc{ABC} both work. You can replace \par with an explicit empty line. So, if you have an empty line after each TAGc, the above will work. 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________