From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/28997 Path: news.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: small caps italic and font switching inside math Date: Thu, 29 Jun 2006 09:30:07 +0200 Message-ID: <44A3817F.4040804@elvenkind.com> References: <6faad9f00606281044v65d247fayc9abef39f77d7029@mail.gmail.com> <44A2D0F9.4020407@elvenkind.com> <6faad9f00606281911x6ca20768x258f2121379b5557@mail.gmail.com> <44A38041.4040907@elvenkind.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1151566431 378 80.91.229.2 (29 Jun 2006 07:33:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 29 Jun 2006 07:33:51 +0000 (UTC) Original-X-From: ntg-context-bounces@ntg.nl Thu Jun 29 09:33:49 2006 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 ciao.gmane.org with esmtp (Exim 4.43) id 1Fvr1w-000487-VL for gctc-ntg-context-518@m.gmane.org; Thu, 29 Jun 2006 09:33:41 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0EC3E128A8; Thu, 29 Jun 2006 09:33:41 +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 11418-07; Thu, 29 Jun 2006 09:33:40 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id B97CB128AE; Thu, 29 Jun 2006 09:30:10 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 54905128AE for ; Thu, 29 Jun 2006 09:30:09 +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 11337-02-3 for ; Thu, 29 Jun 2006 09:30:08 +0200 (CEST) Original-Received: from post-25.mail.nl.demon.net (post-25.mail.nl.demon.net [194.159.73.195]) by ronja.ntg.nl (Postfix) with SMTP id 63225128AD for ; Thu, 29 Jun 2006 09:30:08 +0200 (CEST) Original-Received: from boo.demon.nl ([82.161.175.147]:57590 helo=[192.168.1.3]) by post-25.mail.nl.demon.net with esmtp (Exim 4.51) id 1FvqyV-0005FW-NH for ntg-context@ntg.nl; Thu, 29 Jun 2006 07:30:07 +0000 User-Agent: Mozilla Thunderbird 1.0.6-7.6.20060mdk (X11/20050322) X-Accept-Language: en-us, en Original-To: mailing list for ConTeXt users In-Reply-To: <44A38041.4040907@elvenkind.com> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.7 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:28997 Archived-At: Sorry, messed up something. New version followws: \newbox\chemlowbox \def\chemlow#1% {\setbox\chemlowbox\hbox{{\switchtobodyfont[small]#1}}} \def\chemhigh#1% {\ifvoid\chemlowbox \high{{\switchtobodyfont[small]#1}}% \else \lohi[left]{\box\chemlowbox}{{\switchtobodyfont[small]#1}}\fi } \def\finishchem{\ifvoid\chemlowbox \else \low{\box\chemlowbox}\fi} \unexpanded\def\molecule% {\bgroup \catcode`\_=\active \uccode`\~=`\_ \uppercase{\let~\chemlow}% \catcode`\^=\active \uccode`\~=`\^ \uppercase{\let~\chemhigh}% \dostepwiserecurse {65}{90}{1} {\catcode \recurselevel = \active \uccode`\~=\recurselevel \uppercase{\edef~{\noexpand\finishchem \rawcharacter{\recurselevel}}}}% \catcode`\-=\active \uccode`\~=`\- \uppercase{\def~{--}}% \domolecule }% \def\domolecule#1{#1\finishchem\egroup} \starttext {\bf A test \variant[Caps] in small caps} \molecule{HSO_4^{-}} \molecule{H_2SO_4} {\bfa A story about \molecule{SF_6}} {\scx A story about \molecule{sf_6}} {\bsb A story about \molecule{SF_6}} \stoptext