On 21-10-2012 04:35, Aditya Mahajan wrote:
On Sat, 20 Oct 2012, Aditya Mahajan wrote:
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.
Actually, the bug is with \setcurrentfontbody
\starttext
ABC \hbox{\setcurrentfontbody{\scriptscriptface} Testing} DEF
\stoptext
The above works correctly in mkii but not in mkiv. I really don't
understand what \setcurrentfontbody is supposed to do. In Mkii it scales
the bodyfont if \scriptface or \scriptscriptface is used as an argument;
but does not work for any other value (e.g. \setcurrentfontbody{20pt}).
In MkIV it does not do anything.
How about:
\unprotect
\ifdefined\font_basics_switchtobodyfont\else
\def\font_basics_switchtobodyfont#1{\switchtobodyfont[#1]}%
\fi
\def\mathstyleface#1% #1 is number (\normalmathstyle)
{\ifcase#1\relax
\textface \or
\textface \or
\textface \or
\textface \or
\scriptface \or
\scriptface \or
\scriptscriptface \or
\scriptscriptface \else
\textface
\fi}
% For some reason mathfaces are not normalized .. why not?
% \let\m_math_text_choice_style\relax
%
% \def\math_text_choice#1%
% {\edef\m_math_text_choice_style{\normalmathstyle}%
% \hbox\bgroup
% % \everymath{\triggermathstyle\m_math_text_choice_style}%
%
\normalizebodyfontsize\m_math_text_choice_style{\mathstylefont\m_math_text_choice_style}%
% \font_basics_switchtobodyfont\m_math_text_choice_style
% #1%
% \egroup}
\let\m_math_text_choice_face \relax
\def\math_text_choice#1%
{\normalizebodyfontsize\m_math_text_choice_face{\mathstyleface\normalmathstyle}%
\hbox{\font_basics_switchtobodyfont\m_math_text_choice_face#1}}
\protect
\setupbodyfont[dejavu]
\starttext
\testfeatureonce{1000}{$f_{\text{text $a+b$}_{\text{text
$a+b$}_{\text{text $a+b$}}}}$\par} % 2.7
\stoptext
There is also a bug in the definition of \text in mkii. In
strc-mat.mkii, we should have
ok, fixed,
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________