From bfc2e20d0dfa0dfaf04b0c2c81aed20638f21c91 Mon Sep 17 00:00:00 2001 From: Context Git Mirror Bot Date: Fri, 9 Sep 2016 09:34:06 +0200 Subject: 2016-09-09 08:26:00 --- doc/context/documents/general/manuals/luatex.pdf | Bin 1040069 -> 1041845 bytes .../general/fonts/fonts/fonts-environment.tex | 2 + .../sources/general/fonts/fonts/fonts-math.tex | 44 ++++++++++++++++++ .../sources/general/manuals/luatex/luatex-math.tex | 50 +++++++++++++++++++++ 4 files changed, 96 insertions(+) (limited to 'doc') diff --git a/doc/context/documents/general/manuals/luatex.pdf b/doc/context/documents/general/manuals/luatex.pdf index d4ddd2996..43bd3905f 100644 Binary files a/doc/context/documents/general/manuals/luatex.pdf and b/doc/context/documents/general/manuals/luatex.pdf differ diff --git a/doc/context/sources/general/fonts/fonts/fonts-environment.tex b/doc/context/sources/general/fonts/fonts/fonts-environment.tex index 971da452d..d15a84fdc 100644 --- a/doc/context/sources/general/fonts/fonts/fonts-environment.tex +++ b/doc/context/sources/general/fonts/fonts/fonts-environment.tex @@ -3,6 +3,8 @@ \environment manuals-explaining-environment \environment manuals-explaining-cover + \enabledirectives[visualizers.fraction=2] + \usemodule [s] [fonts-tables] \usemodule [s] [fonts-missing] \usemodule [s] [fonts-vectors] diff --git a/doc/context/sources/general/fonts/fonts/fonts-math.tex b/doc/context/sources/general/fonts/fonts/fonts-math.tex index 7f226cb68..b9cadceeb 100644 --- a/doc/context/sources/general/fonts/fonts/fonts-math.tex +++ b/doc/context/sources/general/fonts/fonts/fonts-math.tex @@ -993,6 +993,50 @@ The results are collected here: \stopsection +\startsection[title=Italics and limits] + +An \OPENTYPE\ font treats italic correction differently from traditional fonts. +For that reason we provide a bit of control over the way the correction is +applied. There is a parameter \type {\mathnolimitsmode} that controls the +correction. + +\definebodyfontenvironment[20pt] + +\startlinecorrection +\startcombination[5*1] + {\ruledhbox to .15\hsize{\hss\showglyphs\switchtobodyfont[20pt]\mathnolimitsmode0$\displaystyle\int\nolimits^0_1$\hss}} {\tttf 0} + {\ruledhbox to .15\hsize{\hss\showglyphs\switchtobodyfont[20pt]\mathnolimitsmode1$\displaystyle\int\nolimits^0_1$\hss}} {\tttf 1} + {\ruledhbox to .15\hsize{\hss\showglyphs\switchtobodyfont[20pt]\mathnolimitsmode2$\displaystyle\int\nolimits^0_1$\hss}} {\tttf 2} + {\ruledhbox to .15\hsize{\hss\showglyphs\switchtobodyfont[20pt]\mathnolimitsmode3$\displaystyle\int\nolimits^0_1$\hss}} {\tttf 3} + {\ruledhbox to .15\hsize{\hss\showglyphs\switchtobodyfont[20pt]\mathnolimitsmode4$\displaystyle\int\nolimits^0_1$\hss}} {\tttf 4} +\stopcombination +\stoplinecorrection + +A value larger than 15 is interpreted as a factor (in the usual \TEX\ way 1000 +means 1.0). In \CONTEXT\ we set the value to 1 which means that the factors for +super- and subscript are set via math parameters (or constants in the font). We +use a default of \type {{0,750}} so we don't shift the superscript and the +subscript we shift less than the italic correction. This is driven by a feature +but you can change the values before loading a font, for instance with: + +\starttyping +\adaptfontfeature[*math*][mathnolimitsmode={100,800}] +\stoptyping + +The defaults come out as: + +\startlinecorrection +\startcombination[5*1] + {\ruledhbox to .15\hsize{\hss\showglyphs\switchtobodyfont[modern, 20pt]$\displaystyle\int\nolimits^0_1$\hss}} {\tttf modern} + {\ruledhbox to .15\hsize{\hss\showglyphs\switchtobodyfont[xits, 20pt]$\displaystyle\int\nolimits^0_1$\hss}} {\tttf xits} + {\ruledhbox to .15\hsize{\hss\showglyphs\switchtobodyfont[lucidaot,20pt]$\displaystyle\int\nolimits^0_1$\hss}} {\tttf lucidaot} + {\ruledhbox to .15\hsize{\hss\showglyphs\switchtobodyfont[pagella, 20pt]$\displaystyle\int\nolimits^0_1$\hss}} {\tttf pagella} + {\ruledhbox to .15\hsize{\hss\showglyphs\switchtobodyfont[cambria, 20pt]$\displaystyle\int\nolimits^0_1$\hss}} {\tttf cambria} +\stopcombination +\stoplinecorrection + +\stopsection + \stopchapter \stopcomponent diff --git a/doc/context/sources/general/manuals/luatex/luatex-math.tex b/doc/context/sources/general/manuals/luatex/luatex-math.tex index fe255de31..8e0c77119 100644 --- a/doc/context/sources/general/manuals/luatex/luatex-math.tex +++ b/doc/context/sources/general/manuals/luatex/luatex-math.tex @@ -464,6 +464,56 @@ Note 9: \type {FractionDelimiterDisplayStyleSize} and \type {FractionDelimiterSize} do not actually exist in the \quote {standard} \OPENTYPE\ math font Cambria, but were useful enough to be added. +\section{Nolimit correction} + +There are two extra math parameters \type {\Umathnolimitsupfactor} and \type +{\Umathnolimitsubfactor} that were added to provide some control over how limits +are spaced (for example the position of super and subscripts after integral +operators). They relate to an extra parameter \type {\mathnolimitsmode}. + +\starttabulate[|l|ck1|ck1|ck1|ck1|ck1|ck1|] + \NC + \NC \mathnolimitsmode0 $\displaystyle\int\nolimits^0_1$ + \NC \mathnolimitsmode1 $\displaystyle\int\nolimits^0_1$ + \NC \mathnolimitsmode2 $\displaystyle\int\nolimits^0_1$ + \NC \mathnolimitsmode3 $\displaystyle\int\nolimits^0_1$ + \NC \mathnolimitsmode4 $\displaystyle\int\nolimits^0_1$ + \NC \mathnolimitsmode8000 $\displaystyle\int\nolimits^0_1$ + \NC \NR + \TB + \NC \bf mode + \NC \tttf 0 + \NC \tttf 1 + \NC \tttf 2 + \NC \tttf 3 + \NC \tttf 4 + \NC \tttf 8000 + \NC \NR + \NC \bf superscript + \NC +ic/2 + \NC font + \NC 0 + \NC 0 + \NC 0 + \NC 0 + \NC \NR + \NC \bf subscript + \NC -ic/2 + \NC font + \NC 0 + \NC -ic/2 + \NC -ic + \NC 8000ic/1000 + \NC \NR +\stoptabulate + +When the mode is set to one, the math parameters are used. This way a macro +package writer can decide what looks best. Given the current state of fonts in +\CONTEXT\ we currently use 0 for the superscript and 750 for the subscripts. +Positive values are used for both parameters but the subscript shifts to the +left. A \type {\mathnolimitsmode} larger that 15 is considered to be a factor +for the subscript correction. This feature can be handy when experimenting. + \section{Math spacing setting} Besides the parameters mentioned in the previous sections, there are also 64 new -- cgit v1.2.3