From 7fc4b935d045c84e89459e726ff54ae331e4c574 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Sun, 29 Oct 2017 16:50:11 +0100 Subject: 2017-10-29 15:50:00 --- doc/context/documents/general/manuals/luatex.pdf | Bin 1133886 -> 1168001 bytes doc/context/documents/general/qrcs/setup-cs.pdf | Bin 798383 -> 834159 bytes doc/context/documents/general/qrcs/setup-de.pdf | Bin 798862 -> 836044 bytes doc/context/documents/general/qrcs/setup-en.pdf | Bin 803328 -> 839263 bytes doc/context/documents/general/qrcs/setup-fr.pdf | Bin 797084 -> 831463 bytes doc/context/documents/general/qrcs/setup-it.pdf | Bin 798990 -> 836552 bytes doc/context/documents/general/qrcs/setup-nl.pdf | Bin 793616 -> 829557 bytes doc/context/documents/general/qrcs/setup-ro.pdf | Bin 793892 -> 830810 bytes .../sources/general/manuals/luatex/luatex-lua.tex | 32 ++++++++++--- .../sources/general/manuals/luatex/luatex-math.tex | 53 ++++++++++++++++++++- .../general/manuals/luatex/luatex-style.tex | 6 ++- 11 files changed, 82 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/context/documents/general/manuals/luatex.pdf b/doc/context/documents/general/manuals/luatex.pdf index 3e1da4004..40c2d4254 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/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf index a42008e9a..4b4aee23c 100644 Binary files a/doc/context/documents/general/qrcs/setup-cs.pdf and b/doc/context/documents/general/qrcs/setup-cs.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf index 6d3db3829..9c14fc46e 100644 Binary files a/doc/context/documents/general/qrcs/setup-de.pdf and b/doc/context/documents/general/qrcs/setup-de.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf index 10eb9ef10..7ff109649 100644 Binary files a/doc/context/documents/general/qrcs/setup-en.pdf and b/doc/context/documents/general/qrcs/setup-en.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf index 65133e823..d4c002678 100644 Binary files a/doc/context/documents/general/qrcs/setup-fr.pdf and b/doc/context/documents/general/qrcs/setup-fr.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf index 1dbc54a8a..25136fcfe 100644 Binary files a/doc/context/documents/general/qrcs/setup-it.pdf and b/doc/context/documents/general/qrcs/setup-it.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf index 6f5d34071..a5cc17168 100644 Binary files a/doc/context/documents/general/qrcs/setup-nl.pdf and b/doc/context/documents/general/qrcs/setup-nl.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf index 36b2f50d2..f34712008 100644 Binary files a/doc/context/documents/general/qrcs/setup-ro.pdf and b/doc/context/documents/general/qrcs/setup-ro.pdf differ diff --git a/doc/context/sources/general/manuals/luatex/luatex-lua.tex b/doc/context/sources/general/manuals/luatex/luatex-lua.tex index 3d7e14700..d95415b05 100644 --- a/doc/context/sources/general/manuals/luatex/luatex-lua.tex +++ b/doc/context/sources/general/manuals/luatex/luatex-lua.tex @@ -303,17 +303,17 @@ piecemeal: \type {string.utfcharacters(s)}: a string with a single \UTF-8 token in it \stopitem \startitem - \type {string.characters(s)} \NC a string containing one byte + \type {string.characters(s)}: a string containing one byte \stopitem \startitem - \type {string.characterpairs(s)} two strings each containing one byte or an + \type {string.characterpairs(s)}: two strings each containing one byte or an empty second string if the string length was odd \stopitem \startitem - \type {string.bytes(s)} a single byte value + \type {string.bytes(s)}: a single byte value \stopitem \startitem - \type {string.bytepairs(s)} two byte values or nil instead of a number as + \type {string.bytepairs(s)}: two byte values or nil instead of a number as its second return value if the string length was odd \stopitem \stopitemize @@ -335,8 +335,28 @@ always returns byte positions in a string, and \type {unicode.utf8.match} and are} \UNICODE|-|aware, they fall|-|back to non|-|\UNICODE|-|aware behavior when using the empty capture \type {()} but other captures work as expected. For the interpretation of character classes in \type {unicode.utf8} functions refer to -the library sources at \hyphenatedurl {http://luaforge.net/projects/sln}. Version -5.3 of \LUA\ will provide some native \UTF8 support. +the library sources at \hyphenatedurl {http://luaforge.net/projects/sln}. + +Version 5.3 of \LUA\ provides some native \UTF8 support but we have added a few +similar helpers too: + +\startitemize +\startitem + \type {string.utfvalue(s)}: returns the codepoints of the characters in the + given string +\stopitem +\startitem + \type {string.utfcharacter(c,...)}: returns a string with the characters of + the given code points +\stopitem +\startitem + \type {string.utflength(s)}: returns the length oif the given string +\stopitem +\stopitemize + +These three functions are relative fast and don't do much checking. They can be used +as building blocks for other helpers. + \blank diff --git a/doc/context/sources/general/manuals/luatex/luatex-math.tex b/doc/context/sources/general/manuals/luatex/luatex-math.tex index 9fb0c02ab..cf5489641 100644 --- a/doc/context/sources/general/manuals/luatex/luatex-math.tex +++ b/doc/context/sources/general/manuals/luatex/luatex-math.tex @@ -631,7 +631,7 @@ example. \stoptexdefinition \start - \setupbodyfont[cambria] + \switchtobodyfont[cambria] \starttabulate[|c|c|c|c|c|c|] \Whatever{0}% \Whatever{1}% @@ -641,6 +641,55 @@ example. This kind of parameters relate to the fact that italic correction in \OPENTYPE\ math is bound to fuzzy rules. So, control is the solution. +\section{Script boxes} + +If you want typeset text in math macro packages often provide something \type +{\text} which obeys the script sizes. As the definition can be anything there is +a good change that the kerning doesn't come out well when used in a script. Given +that the first glyph ends up in an \type {\hbox} we have some control over this. +And, as a bonus we also added control over the normal sublist kerning. The \type +{\mathscriptboxmode} parameter defaults to~1. + +\starttabulate[|l|l|] +\NC \type {0} \NC forget about kerning \NC \NR +\NC \type {1} \NC kern math sub lists with a valid glyph \NC \NR +\NC \type {2} \NC also kern math sub boxes that have a valid glyph \NC \NR +\NC \type {2} \NC only kern math sub boxes with a boundary node present\NC \NR +\stoptabulate + +Here we show some examples. Of course this doesn't solve all our problems, if +only because some fonts have characters with bounding boxes that compensate for +italics, while other fonts can lack kerns. + +\startbuffer[1] + $T_{\tf fluff}$ +\stopbuffer + +\startbuffer[2] + $T_{\text{fluff}}$ +\stopbuffer + +\startbuffer[3] + $T_{\text{\boundary1 fluff}}$ +\stopbuffer + +\unexpanded\def\Show#1#2#3% + {\doifelsenothing{#3} + {\small\typeinlinebuffer[#1]} + {\doifelse{#3}{-} + {\small\type{mode #2}} + {\switchtobodyfont[#3]\showfontkerns\showglyphs\mathscriptboxmode#2\relax\inlinebuffer[#1]}}} + +\starttabulate[|lT|c|c|c|c|c|] + \NC \NC \Show{1}{0}{} \NC\Show{1}{1}{} \NC \Show{2}{1}{} \NC \Show{2}{2}{} \NC \Show{3}{3}{} \NC \NR + \NC \NC \Show{1}{0}{-} \NC\Show{1}{1}{-} \NC \Show{2}{1}{-} \NC \Show{2}{2}{-} \NC \Show{3}{3}{-} \NC \NR + \NC modern \NC \Show{1}{0}{modern} \NC\Show{1}{1}{modern} \NC \Show{2}{1}{modern} \NC \Show{2}{2}{modern} \NC \Show{3}{3}{modern} \NC \NR + \NC lucidaot \NC \Show{1}{0}{lucidaot} \NC\Show{1}{1}{lucidaot} \NC \Show{2}{1}{lucidaot} \NC \Show{2}{2}{lucidaot} \NC \Show{3}{3}{lucidaot} \NC \NR + \NC pagella \NC \Show{1}{0}{pagella} \NC\Show{1}{1}{pagella} \NC \Show{2}{1}{pagella} \NC \Show{2}{2}{pagella} \NC \Show{3}{3}{pagella} \NC \NR + \NC cambria \NC \Show{1}{0}{cambria} \NC\Show{1}{1}{cambria} \NC \Show{2}{1}{cambria} \NC \Show{2}{2}{cambria} \NC \Show{3}{3}{cambria} \NC \NR + \NC dejavu \NC \Show{1}{0}{dejavu} \NC\Show{1}{1}{dejavu} \NC \Show{2}{1}{dejavu} \NC \Show{2}{2}{dejavu} \NC \Show{3}{3}{dejavu} \NC \NR +\stoptabulate + \section{Unscaled fences} The \type {\mathdelimitersmode} primitive is experimental and deals with the @@ -659,7 +708,7 @@ so that the same spacing applies as with unfenced variants. Here we show Cambria \stoptexdefinition \start - \setupbodyfont[cambria] + \switchtobodyfont[cambria] \starttabulate[|l|l|l|] \Whatever{0}\Whatever{1}\Whatever{2}\Whatever{3}% \Whatever{4}\Whatever{5}\Whatever{6}\Whatever{7}% diff --git a/doc/context/sources/general/manuals/luatex/luatex-style.tex b/doc/context/sources/general/manuals/luatex/luatex-style.tex index 547fd204a..a277a1178 100644 --- a/doc/context/sources/general/manuals/luatex/luatex-style.tex +++ b/doc/context/sources/general/manuals/luatex/luatex-style.tex @@ -89,7 +89,11 @@ \definecolor[keptcolor] [b=.5] \definecolor[othercolor][r=.5,g=.5] -\setupbodyfont[modern] % we need this in examples so we predefine +\usebodyfont[lucidaot] +\usebodyfont[pagella] +\usebodyfont[cambria] +%usebodyfont[dejavu] +\usebodyfont[modern] % we need this in examples so we predefine % \doifmodeelse {atpragma} { % -- cgit v1.2.3