From: Aditya Mahajan <adityam@umich.edu>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: math: \text does not scale properly
Date: Sat, 20 Oct 2012 22:20:00 -0400 (EDT) [thread overview]
Message-ID: <alpine.LNX.2.02.1210202214030.21543@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <5B1C1F4E-3365-47D0-91D8-153560EFD188@imt.uni-luebeck.de>
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
___________________________________________________________________________________
next prev parent reply other threads:[~2012-10-21 2:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-04 7:10 Andreas Mang
2012-10-04 7:27 ` Alan BRASLAU
2012-10-04 7:49 ` Andreas Mang
2012-10-21 2:20 ` Aditya Mahajan [this message]
2012-10-21 2:35 ` Aditya Mahajan
2012-10-21 13:42 ` Hans Hagen
2012-10-24 4:06 ` Aditya Mahajan
2012-10-24 8:07 ` Hans Hagen
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=alpine.LNX.2.02.1210202214030.21543@ybpnyubfg.ybpnyqbznva \
--to=adityam@umich.edu \
--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).