![](https://secure.gravatar.com/avatar/565476157eb3895a9c928ffce26d988d.jpg?s=120&d=mm&r=g)
Mojca Miklavec wrote:
It only gets the size right, not the boldnes. But it can be argued that that is the correct behaviour anyways.
Not so long ago you argued that \alpha-sheet, \beta-helix, \gamma-rays, ... should be part of text flow (a reason why the el companion encoding should have it), not a "mathematical thing". I have a lot of simple formulas such as \molecule{SF_6} and they look a-kind-of-ugly with a tiny script.
So you noticed I was trying to weasly out of something, did you? ;-) Taco % The next macro only works as long as you code the subscripts % before the superscripts! \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~{\finishchem \rawcharacter{\recurselevel}}}}% \catcode`\-=\active \uccode`\~=`\- \uppercase{\def~{--}}% \loggingall \domolecule }% \def\domolecule#1{#1\finishchem\egroup} \starttext \molecule{HSO_4^{-}} {\bfa A story about \molecule{SF_6}} {\scx A story about \molecule{SF_6}} {\bsb A story about \molecule{SF_6}} \stoptext
You could compare it to {\bf How to loose a guy in $10$ days}.
I have a strange feeling that handling fonts in math is rather limited, but no knowledge how to fix anything (just remembering that I still don't know how to properly switch to bold math with some other fancy font except with dirty tricks).
I guess that it should be possible to remember the font before switching to math and then switch to that font again, but that's all black magic for me. A site on ConTeXt garden solves that for titles in such a way that there's an additional command provided which also appends bold to all the mathematics in titles, but that's useful for titles only.
Mojca _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context