On Wed, Jun 7, 2017 at 7:31 PM, Hans Hagen <pra...@wxs.nl> wrote: > On 6/7/2017 4:50 PM, Mikael P. Sundqvist wrote: >> >> On Mon, Jun 5, 2017 at 10:24 AM, Mikael P. Sundqvist <mic...@gmail.com> >> wrote: >>> >>> Hi, >>> >>> this might be a matter of taste. >>> >>> look at the output of (attached). In my opinion the first square root >>> is to "high", while it looks better on the second line. From >>> setup-en.pdf it looks like the default of \setupmathradical is set to >>> normal (and not default). I don't understand what normal should mean, >>> but I think the alternative=default looks better. (The lucida fonts >>> are loaded in this example, since the effect is more clear for them). > > Ok, this is the story > > -- radicals (roots) are rather special and have some hard coded properties > (like always scriptscript in the degree) > > -- \over (and friends) that are used in \frac (which by the way can be > configured in many ways) has the danger of getting the wrong style as side > effect of parsing (math list construction) and processing > > -- in context we want to support color etc for noth in a consistent way as > well as style control (important in educational math) > > Normally it works out ok with the 'normal' setting but there is some catch > here. The size of the radical symbols is determine by > > -- RadicalVerticalGap = 50 > -- RadicalDisplayStyleVerticalGap = 175 > > (These are lucide values) and it happens that the second one if too large > which can give a bad threshold in our case. In cambria it's > > RadicalVerticalGap = 166 > RadicalDisplayStyleVerticalGap = 345 > > So a 1:2 ratio. If we use that for lucida it looks better, so > > lucida-opentype-math.lfg > > can become: > > local function FixRadicalDisplayStyleVerticalGap(value,target,original) > local o = original.mathparameters.RadicalVerticalGap -- 50 > return 2 * o * target.parameters.factor > end > > return { > name = "lucida-opentype-math", > version = "1.00", > comment = "Goodies that complement lucida opentype.", > author = "Hans Hagen", > copyright = "ConTeXt development team", > mathematics = { > parameters = { > RadicalDisplayStyleVerticalGap = > FixRadicalDisplayStyleVerticalGap, > }, > alternates = { > italic = { feature = 'ss01', value = 1, comment = > "Mathematical Alternative Lowercase Italic" }, > arrow = { feature = 'ss02', value = 1, comment = > "Mathematical Alternative Smaller Arrows" }, > operator = { feature = 'ss03', value = 1, comment = > "Mathematical Alternative Smaller Operators" }, > calligraphic = { feature = 'ss04', value = 1, comment = > "Mathematical Alternative Calligraphic Characters" }, > zero = { feature = 'ss05', value = 1, comment = > "Mathematical Alternative Zero" }, > partial = { feature = 'ss20', value = 1, comment = > "Mathematical Alternative Upright Partial Differential" }, > }, > }, > } > > It's sort of a font property: the more sizes the better and sometimes you're > simply hit by the threshold not suiting your case. > > > Hans > > ----------------------------------------------------------------- > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___________________________________________________________________________________
Hans, many thanks for your explanation, it is really appreciated when you take your time to do this! I updated my local lucida-opentype-math.lfg and indeed it works like charm. I think the uncramped version I get now looks better than what I forced with the temporary solution that I did not understand. /Mikael ___________________________________________________________________________________ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________