On Thu, 4 Oct 2012, Andreas Mang wrote:

Hi there,

As Aditya mentioned in a former posting (*) that "\text{ ... }" should scale properly when used as super- or subscript, I have prepared a minimal example to demonstrate that it doesn't. In my document I have switched from "\text{ }" to "\normal", which works.

There is another bug with \text.

{\switchtobodyfont[sans] $\text{sans}$}

does not switch to sans font. Both the incorrect scaling and wrong font switch can be corrected by restoring the old definition of \text in math-ini.mkiv. Based on the comments in that file, this will come at a high penalty on speed. (Slow but correct is better than fast but wrong!)

\unprotect
\def\math_text_choice_indeed#1#2#3% no \everymath !
  {\hbox{\everymath{#1}\switchtobodyfont  [#2]#3}} % 15 sec
 %{\hbox{\everymath{#1}\setcurrentfontbody{#2}#3}} %  3 sec (no math)

\protect

%% Example

\starttext
$f_{\text{text $a+b$}_{\text{text $a+b$}_{\text{text $a+b$}}}}$

{\switchtobodyfont[sans] $f_{\text{text $a+b$}_{\text{text $a+b$}_{\text{text $a+b$}}}}$}

$f_{{\normal text}_{{\normal text}_{\normal text}}}$


\stoptext

Aditya
___________________________________________________________________________________
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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to