From: Hans Hagen <pragma@wxs.nl>
Subject: Re: small caps italic and font switching inside math
Date: Thu, 29 Jun 2006 11:11:29 +0200 [thread overview]
Message-ID: <44A39941.7030504@wxs.nl> (raw)
In-Reply-To: <44A3817F.4040804@elvenkind.com>
Taco Hoekwater wrote:
> 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}}
>
>
i didt follow this thread, so i may be wrong, but doesn't the ppchtex
(see manuals) module does that kind of stuff?
Hans
--
-----------------------------------------------------------------
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
-----------------------------------------------------------------
next prev parent reply other threads:[~2006-06-29 9:11 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-28 17:44 Mojca Miklavec
2006-06-28 18:33 ` Aditya Mahajan
2006-06-28 18:56 ` Taco Hoekwater
2006-06-29 2:11 ` Mojca Miklavec
2006-06-29 5:13 ` Aditya Mahajan
2006-06-29 7:27 ` Taco Hoekwater
2006-06-29 7:24 ` Taco Hoekwater
2006-06-29 7:30 ` Taco Hoekwater
2006-06-29 9:11 ` Hans Hagen [this message]
2006-06-29 9:15 ` Taco Hoekwater
2006-07-01 3:50 ` Mojca Miklavec
2006-07-01 6:52 ` Taco Hoekwater
2006-07-01 19:24 ` Mojca Miklavec
2006-07-02 8:44 ` Taco Hoekwater
2006-07-02 11:59 ` Mojca Miklavec
2006-07-02 14:16 ` Taco Hoekwater
2006-07-03 11:25 ` Vit Zyka
2006-06-28 18:54 ` Thomas A. Schmitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44A39941.7030504@wxs.nl \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).