From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/47649 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Taco's \molecule fails in mkiv Date: Mon, 23 Feb 2009 17:52:08 +0100 Message-ID: <6D3CC355-796C-4E13-9CE5-0DF668E0439E@gmail.com> References: <6faad9f00902230821t6811fff4t4bc868c3e3f2999c@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1235408102 1273 80.91.229.12 (23 Feb 2009 16:55:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 Feb 2009 16:55:02 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Feb 23 17:56:17 2009 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 1Lbe65-0004md-Kp for gctc-ntg-context-518@m.gmane.org; Mon, 23 Feb 2009 17:56:01 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 7E23E1FBCB; Mon, 23 Feb 2009 17:54:38 +0100 (CET) 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 01227-06-4; Mon, 23 Feb 2009 17:53:31 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 79F4B1FBD4; Mon, 23 Feb 2009 17:53:31 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4E3281FBD4 for ; Mon, 23 Feb 2009 17:53:30 +0100 (CET) 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 01227-06-3 for ; Mon, 23 Feb 2009 17:52:52 +0100 (CET) Original-Received: from filter3-ams.mf.surf.net (filter3-ams.mf.surf.net [192.87.102.71]) by ronja.ntg.nl (Postfix) with ESMTP id A14B11FBCB for ; Mon, 23 Feb 2009 17:52:52 +0100 (CET) Original-Received: from mail-fx0-f167.google.com (mail-fx0-f167.google.com [209.85.220.167]) by filter3-ams.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n1NGqpJF021714 for ; Mon, 23 Feb 2009 17:52:52 +0100 Original-Received: by fxm11 with SMTP id 11so2099896fxm.2 for ; Mon, 23 Feb 2009 08:52:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=Vo+nXO621mfqRdbOJIGHgmFCR8kKdT8pHOtHEC1L8GM=; b=FcgCCpfkURe/BqlyenPkKoaYH1RodA41qUphYBBUZQliS3ofVOU25M7PqfgstWAyWP O3ENw+F5sgzTodZkwCVPBiaQTA/3egUOKUU0WgoVTxcunDMzTxnyjEFpTtyHRV8Wa7KL zEw0D2zTO/6fqmDeLsSJLSlu9smxP7Q8ndnSk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=eWd29ejZg/qVcoqAzb/L1+GT3y0j+8+n5+sryda5HlYFbuIihcX5E75t9MhI0myQvs hmHyJ/8MzijyltqPakkf0TuFqRIpiviqS3ZZy3r27/rUTe3BvaUYIcRQ7XAAL9T2I8jv 6Yr0tMNvS1lC6FADJI3j7cMmxVIziJMx6/tHY= Original-Received: by 10.86.70.3 with SMTP id s3mr3012093fga.78.1235407970930; Mon, 23 Feb 2009 08:52:50 -0800 (PST) Original-Received: from ?10.70.170.125? (8.106.113.82.net.de.o2.com [82.113.106.8]) by mx.google.com with ESMTPS id 3sm321970fge.52.2009.02.23.08.52.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 23 Feb 2009 08:52:49 -0800 (PST) In-Reply-To: <6faad9f00902230821t6811fff4t4bc868c3e3f2999c@mail.gmail.com> X-Mailer: Apple Mail (2.930.3) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.220.167; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 184056249 - 352385cd2d41 X-Scanned-By: CanIt (www . roaringpenguin . com) on 192.87.102.71 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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:47649 Archived-At: Am 23.02.2009 um 17:21 schrieb Mojca Miklavec: > Hello, > > I did not try to analyze how the following macros work (they are too > complex), but they somehow fail in mkiv. (I don't need the "F" > kerning, so that portion of code may go away, but the macro itself is > very very handy.) > > All I want is to have a macro that "converts" _{...} into \low{...} > and ^{...} into \high{...} (or possibly enable using both at the same > time). \startluacode thirddata = thirddata or { } function thirddata.molecule(text) text = string.gsub(text,"_","\\low") text = string.gsub(text,"%^","\\high") tex.sprint(text) end \stopluacode \def\molecule#1{\ctxlua{thirddata.molecule('#1')}} \starttext \molecule{H_2SO_4} \molecule{H_2^+} \stoptext Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________