[NTG-context] small caps italic and font switching inside math
Taco Hoekwater
taco at elvenkind.com
Sun Jul 2 10:44:23 CEST 2006
Mojca Miklavec wrote:
>
>>>It works perfect except in a single case: \title{\molecule{SF_6}}
>>
>>I had seen that, but not yet bothered to fix it. Still, it is
>>fairly easy to change the macro, try the version below.
Sorry, I thought you were talking about the spacing between F and 6.
> Didn't work in titles either (or I did something strange) :(
> But If I write a couple of explicit \lohi-s, it will still be OK.
Good, but it can be fixed, by changing the definition of
\domolecule to:
\def\domolecule#1%
{\expandafter\scantokens\expandafter
{\detokenize{#1\finishchem}}\egroup}
This re-tokenizes the argument (needed because it was grabbed
by \title already before \molecule had a chance to change the
catcodes.)
> I didn't really understand the \iffluor-part of the code ... but don't
> bother too much.
It is there to trigger a negative italic superscript correction
(TeX doesn't have a primitive for that :-))
> Thanks a lot for the trickery again (I'm still impressed by the
> \uppercase part),
That is actually a fairly standard trick, not something I invented
Greetings, Taco
More information about the ntg-context
mailing list