From 661fb34ced40815e1e5e9073de9c8475127da094 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 23 Feb 2018 23:32:32 +0100 Subject: 2018-02-23 22:19:00 --- doc/context/documents/general/manuals/luatex.pdf | Bin 1172111 -> 1172101 bytes doc/context/documents/general/qrcs/setup-cs.pdf | Bin 844063 -> 844335 bytes doc/context/documents/general/qrcs/setup-de.pdf | Bin 843927 -> 844081 bytes doc/context/documents/general/qrcs/setup-en.pdf | Bin 848470 -> 848652 bytes doc/context/documents/general/qrcs/setup-fr.pdf | Bin 839892 -> 840065 bytes doc/context/documents/general/qrcs/setup-it.pdf | Bin 845690 -> 845852 bytes .../documents/general/qrcs/setup-mapping-cs.pdf | Bin 359016 -> 359152 bytes .../documents/general/qrcs/setup-mapping-de.pdf | Bin 438314 -> 438449 bytes .../documents/general/qrcs/setup-mapping-en.pdf | Bin 356523 -> 356655 bytes .../documents/general/qrcs/setup-mapping-fr.pdf | Bin 359269 -> 359403 bytes .../documents/general/qrcs/setup-mapping-it.pdf | Bin 358059 -> 358192 bytes .../documents/general/qrcs/setup-mapping-nl.pdf | Bin 357721 -> 357853 bytes .../documents/general/qrcs/setup-mapping-ro.pdf | Bin 624504 -> 624635 bytes doc/context/documents/general/qrcs/setup-nl.pdf | Bin 837024 -> 837182 bytes doc/context/documents/general/qrcs/setup-ro.pdf | Bin 839966 -> 840149 bytes .../sources/general/fonts/fonts/fonts-appendix.tex | 3 +- .../general/fonts/fonts/fonts-extensions.tex | 20 ++---- .../sources/general/fonts/fonts/fonts-features.tex | 74 +++++++++------------ .../sources/general/fonts/fonts/fonts-formats.tex | 2 +- .../sources/general/fonts/fonts/fonts-mkiv.tex | 2 +- .../general/manuals/cld/cld-specialcommands.tex | 55 ++++++++++++++- .../sources/general/manuals/luatex/luatex.tex | 2 + .../sources/general/manuals/math/math-spacing.tex | 51 ++++++++++++++ .../manuals/spacing/spacing-linecorrection.tex | 4 ++ .../general/manuals/spacing/spacing-style.tex | 2 +- 25 files changed, 152 insertions(+), 63 deletions(-) (limited to 'doc') diff --git a/doc/context/documents/general/manuals/luatex.pdf b/doc/context/documents/general/manuals/luatex.pdf index 26af7ac71..b9925775e 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 3926cfac5..0d929224b 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 20efbd5d7..3e27696a7 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 f1f8d70ea..320425cce 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 fa5312138..7e223100f 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 abe88638f..dbf1c98e1 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-mapping-cs.pdf b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf index 0b9ba505e..7a4e48567 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf and b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-de.pdf b/doc/context/documents/general/qrcs/setup-mapping-de.pdf index a398bf4f4..48ba62868 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-de.pdf and b/doc/context/documents/general/qrcs/setup-mapping-de.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-en.pdf b/doc/context/documents/general/qrcs/setup-mapping-en.pdf index d5e6aa920..f022b0450 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-en.pdf and b/doc/context/documents/general/qrcs/setup-mapping-en.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf index 6bba49f4c..71704b5fc 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf and b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-it.pdf b/doc/context/documents/general/qrcs/setup-mapping-it.pdf index 935e90f49..5024c50ef 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-it.pdf and b/doc/context/documents/general/qrcs/setup-mapping-it.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf index fa8981a63..5898f674d 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf and b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf index 2fe88f804..c3a148d00 100644 Binary files a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf and b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf index 477fa54ac..ccff57ad6 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 b741ce78d..8fdb83307 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/fonts/fonts/fonts-appendix.tex b/doc/context/sources/general/fonts/fonts/fonts-appendix.tex index ae42b10fa..2eab26a93 100644 --- a/doc/context/sources/general/fonts/fonts/fonts-appendix.tex +++ b/doc/context/sources/general/fonts/fonts/fonts-appendix.tex @@ -456,7 +456,7 @@ to render this version. Because fonts might have changed in the meantime, some e might come out other than intended. \startluacode -local list = table.load("fonts-mkiv-usedfonts.lua") +local list = table.load("fonts-mkiv-usedfonts.lua") or { } local NC, NR = context.NC, context.NR @@ -473,7 +473,6 @@ for i=1,#list do NC() context("version") NC() context.type(version) NC() NR() context.stoptabulate() end - \stopluacode \stopsection diff --git a/doc/context/sources/general/fonts/fonts/fonts-extensions.tex b/doc/context/sources/general/fonts/fonts/fonts-extensions.tex index 5800f2c57..8de29fcaf 100644 --- a/doc/context/sources/general/fonts/fonts/fonts-extensions.tex +++ b/doc/context/sources/general/fonts/fonts/fonts-extensions.tex @@ -931,19 +931,16 @@ effect of expanded kerns is invisible. The used definitions are: \startplacefigure[reference=hz:natural,title={The two expansion methods compared.}] \showfontkerns \dontcomplain - \enabledirectives[fonts.injections.fontkern] \startcombination[1*3] {\ExtremeHzFont\ruledhpack{\startoverlay {\NoHzSample} {\HzSample } \stopoverlay}} {no hz \& hz} {\ExtremeHzFont\ruledhpack{\startoverlay {\NoHzSample} {\FullHzSample} \stopoverlay}} {no hz \& full hz} {\ExtremeHzFont\ruledhpack{\startoverlay {\HzSample } {\FullHzSample} \stopoverlay}} {hz \& full hz} \stopcombination - \disabledirectives[fonts.injections.fontkern] \stopplacefigure \startplacefigure[reference=hz:zoomed,title={The two expansion methods compared (zoomed in).}] \showfontkerns \dontcomplain - \enabledirectives[fonts.injections.fontkern] \startcombination[3*3] {\ExtremeHzFont @@ -968,20 +965,13 @@ effect of expanded kerns is invisible. The used definitions are: \clip[nx=6,ny=5,x=2,y=2,sx=2]{\startoverlay {\HzSample } {\FullHzSample} \stopoverlay}} {minimal: hz \& full hz} \stopcombination - \disabledirectives[fonts.injections.fontkern] \stopplacefigure -In \CONTEXT\ the \type {hz} alignment option only enables expansion of glyphs, while \type -{fullhz} also applies it to kerns. However, in the examples here we had to explicitly enable -font kerns in node mode: - -\starttyping -\enabledirectives[fonts.injections.fontkern] -\stoptyping - -It will be clear that you can just stick to using the \type {hz} directive (if -you want expansion at all) because this directive is normally disabled and -because most fonts are processed in node mode. +In \CONTEXT\ the \type {hz} alignment option only enables expansion of glyphs, +while \type {fullhz} also applies it to kerns. It will be clear that you can just +stick to using the \type {hz} directive (if you want expansion at all) because +this directive is normally disabled and because most fonts are processed in node +mode. \stopsubsubject diff --git a/doc/context/sources/general/fonts/fonts/fonts-features.tex b/doc/context/sources/general/fonts/fonts/fonts-features.tex index 0ecd3c9d9..73d1cd96d 100644 --- a/doc/context/sources/general/fonts/fonts/fonts-features.tex +++ b/doc/context/sources/general/fonts/fonts/fonts-features.tex @@ -2543,48 +2543,40 @@ unlikely to show up in future versions of the Latin Modern fonts. \stopsection -\startsection[title=Discretionaries] - -% speed test: +% \startsection[title=Discretionaries] % -% \edef\tufte{\cldloadfile{tufte}} -% \enabledirectives[otf.alwaysdisc] -% \testfeatureonce{100}{\setbox0\hbox{\tufte \smallcaps \tufte}}\elapsedtime\par -% \disabledirectives[otf.alwaysdisc] -% \testfeatureonce{100}{\setbox0\hbox{\tufte \smallcaps \tufte}}\elapsedtime\par - -\startbuffer -\definedfont[cambria*default] -12\discretionary - {3} {4} {5}% -67\par -12{\oldstyle\discretionary - {3} {4} {5}}% -67\par -12\discretionary - {3{\oldstyle3}} {{\oldstyle4}4} {5{\oldstyle5}5}% -67\par -\stopbuffer - -The font handler has to do some magick to get features working with and across -discretionaries. To some extend you can use font switches inside discretionaries -but for sure border cases are not dealt with. This works: - -\startlinecorrection[blank] -\startcombination[nx=4,ny=1,location=top] - {\framed[align=normal]{\enabledirectives [otf.alwaysdisc]\setupwhitespace[line]\getbuffer}} {1} - {\framed[align=normal]{\enabledirectives [otf.alwaysdisc]\hsize1mm\getbuffer}} {2} - {\framed[align=normal]{\disabledirectives[otf.alwaysdisc]\setupwhitespace[line]\getbuffer}} {3} - {\framed[align=normal]{\disabledirectives[otf.alwaysdisc]\hsize1mm\getbuffer}} {4} -\stopcombination -\stoplinecorrection - -The first two examples have \type {otf.alwaysdisk} enabled, the last two have it -disabled. - -\typebuffer - -\stopsection +% \startbuffer +% \definedfont[cambria*default] +% 12\discretionary +% {3} {4} {5}% +% 67\par +% 12{\oldstyle\discretionary +% {3} {4} {5}}% +% 67\par +% 12\discretionary +% {3{\oldstyle3}} {{\oldstyle4}4} {5{\oldstyle5}5}% +% 67\par +% \stopbuffer +% +% The font handler has to do some magick to get features working with and across +% discretionaries. To some extend you can use font switches inside discretionaries +% but for sure border cases are not dealt with. This works: +% +% \startlinecorrection[blank] +% \startcombination[nx=4,ny=1,location=top] +% {\framed[align=normal]{\enabledirectives [otf.alwaysdisc]\setupwhitespace[line]\getbuffer}} {1} +% {\framed[align=normal]{\enabledirectives [otf.alwaysdisc]\hsize1mm\getbuffer}} {2} +% {\framed[align=normal]{\disabledirectives[otf.alwaysdisc]\setupwhitespace[line]\getbuffer}} {3} +% {\framed[align=normal]{\disabledirectives[otf.alwaysdisc]\hsize1mm\getbuffer}} {4} +% \stopcombination +% \stoplinecorrection +% +% The first two examples have \type {otf.alwaysdisk} enabled, the last two have it +% disabled. +% +% \typebuffer +% +% \stopsection \startsection[title=Some remarks] diff --git a/doc/context/sources/general/fonts/fonts/fonts-formats.tex b/doc/context/sources/general/fonts/fonts/fonts-formats.tex index 68a28fadc..9ad6bc9bd 100644 --- a/doc/context/sources/general/fonts/fonts/fonts-formats.tex +++ b/doc/context/sources/general/fonts/fonts/fonts-formats.tex @@ -81,7 +81,7 @@ descender. The width of the bounding box is not by definition the width of the glyph. In \TYPEONE\ and \OPENTYPE\ fonts each shape has a so called advance width and that is the one that will be used. -\usemodule[fnt-40] +\usemodule[fonts-kerns] \startplacefigure [location=here,reference=fig:glyph-kerns,title={Kerning in Latin Roman, Cambria, Pagella and Dejavu.}] \scale[width=\textwidth]{\startcombination[1*4] diff --git a/doc/context/sources/general/fonts/fonts/fonts-mkiv.tex b/doc/context/sources/general/fonts/fonts/fonts-mkiv.tex index 6b05bb0c2..fa53492f0 100644 --- a/doc/context/sources/general/fonts/fonts/fonts-mkiv.tex +++ b/doc/context/sources/general/fonts/fonts/fonts-mkiv.tex @@ -21,7 +21,7 @@ % % \usemodule[speedtest] -\enabletrackers[fonts.files] +\enabletrackers[fonts.usage] \enablemode[simple] % ,oversized diff --git a/doc/context/sources/general/manuals/cld/cld-specialcommands.tex b/doc/context/sources/general/manuals/cld/cld-specialcommands.tex index 151952c53..37ecf45c6 100644 --- a/doc/context/sources/general/manuals/cld/cld-specialcommands.tex +++ b/doc/context/sources/general/manuals/cld/cld-specialcommands.tex @@ -63,7 +63,11 @@ Other examples of macros that have optimized functions are \type {\par}, \startsection[title=Steps] -When you run the following code: +% added and extended in sync with an article about a generic 'execute' +% feature + +We already mentioned the stepper as a very special trick so let's give +some more explanation here. When you run the following code: \setbox0\emptybox @@ -197,7 +201,54 @@ which gives: A step returns control to \TEX\ immediately and after the \TEX\ code that it feeds back is expanded, returns to \LUA. There are some limitations due to the -input stack but normally that us no real issue. +input stack but normally that is no real issue. + +You can run the following code: + +\starttyping +\definenumber[LineCounter][way=bypage] +\starttext +\startluacode +for i=1,2000 do + context.incrementnumber { "LineCounter" } + context.getnumber { "LineCounter" } + context.par() +end +\stopluacode +\stoptext +\stoptyping + +You will notice however that the number is not right on each page. This is +because \TEX\ doesn't know yet that there is no room on the page. The next will +work better: + +\starttyping +\definenumber[LineCounter][way=bypage] +\starttext +\startluacode +context.stepwise(function() + for i=1,2000 do + context.testpage { 0 } + context.incrementnumber { "LineCounter" } + context.getnumber { "LineCounter" } + context.par() + context.step() + end +end) +\stopluacode +\stoptext +\starttyping + +Instead of the \type {testpage} function you can also play directly with +registers, like: + +\starttyping +if tex.pagegtotal + tex.count.lineheight > tex.pagetotal then +\starttyping + +but often an already defined helper does a better job. Of course you will +probably never need this kind of hacks anyway, if only because much more is going +on and there are better ways then. \stopsection diff --git a/doc/context/sources/general/manuals/luatex/luatex.tex b/doc/context/sources/general/manuals/luatex/luatex.tex index 43f81ab5e..1d6f16f6a 100644 --- a/doc/context/sources/general/manuals/luatex/luatex.tex +++ b/doc/context/sources/general/manuals/luatex/luatex.tex @@ -1,5 +1,7 @@ % macros=mkvi +% \disabledirectives[vspacing.synchronizepage] + % author : Hans Hagen with Taco Hoekwater, Luigi Scarso & Hartmut Henkel % copyright : PRAGMA ADE & ConTeXt Development Team % license : Creative Commons Attribution ShareAlike 4.0 International diff --git a/doc/context/sources/general/manuals/math/math-spacing.tex b/doc/context/sources/general/manuals/math/math-spacing.tex index 3a665a7d8..913a90d9e 100644 --- a/doc/context/sources/general/manuals/math/math-spacing.tex +++ b/doc/context/sources/general/manuals/math/math-spacing.tex @@ -1,3 +1,5 @@ +% language=uk + \environment math-layout \startcomponent math-spacing @@ -689,6 +691,55 @@ We have \stopsection +\startsection[title=Choices] + +The next examples are generated using this macro: + +\startbuffer +\starttexdefinition unexpanded Test#1#2 + + \begingroup + + \showmakeup[depth] + + \def\TestA{\dontleavehmode\ruledhbox{\dorecurse{8}{before }}} + \def\TestB{\dontleavehmode\ruledhbox{\dorecurse{8}{after }}} + \def\TestC{\dorecurse{18}{x+}x} + + \setdisplaymathspacemodel[3] + \setupalign[flushleft] 1\space:\space\TestA \par + \startformula #2 \TestC \stopformula \par + \setupalign[flushleft] 2\space:\space\TestB \par + + \setdisplaymathspacemodel[4] + + \vskip#1\lineheight + + \setupalign[flushright] \TestA\space:\space2 \par + \startformula #2 \TestC \stopformula \par + \setupalign[flushright] \TestB\space:\space2 \par + + \endgroup + +\stoptexdefinition +\stopbuffer + +\typebuffer \getbuffer + +It demonstrates the often hard decisions that we have to make with regards to +spacing. On the one hand we want to be adaptive, on the other hand we want to be +consistent, for instance in the depth of lines. These examples overlay the two +variants (which is of course font and style dependent). + +\Test{-4.70}{} \blank[2*line] +\Test{-6.00}{\frac{1}{2}} \blank[2*line] +\Test{-6.55}{\frac{1}{\frac{1}{2}}} + +One side effect of these options is that at some point we need to choose a +default and then easily forget about the other variants. + +\stopsection + \stopchapter \stopcomponent diff --git a/doc/context/sources/general/manuals/spacing/spacing-linecorrection.tex b/doc/context/sources/general/manuals/spacing/spacing-linecorrection.tex index c16afbf0a..525dd7490 100644 --- a/doc/context/sources/general/manuals/spacing/spacing-linecorrection.tex +++ b/doc/context/sources/general/manuals/spacing/spacing-linecorrection.tex @@ -6,6 +6,8 @@ \startchapter[title=Line correction] +\startsection[title=Wrapping content] + \startbuffer[linecorrection] \typebuffer \blank @@ -103,6 +105,8 @@ Because in this document we have set the whitespace this also gets added around the box. So, in case your spacing around some special content looks bad, consider using these commands. +\stopsection + \stopchapter \stopcomponent diff --git a/doc/context/sources/general/manuals/spacing/spacing-style.tex b/doc/context/sources/general/manuals/spacing/spacing-style.tex index c9d168f1c..5514df729 100644 --- a/doc/context/sources/general/manuals/spacing/spacing-style.tex +++ b/doc/context/sources/general/manuals/spacing/spacing-style.tex @@ -1,6 +1,6 @@ \startenvironment spacing-style -\usemodule[abr-03] +\usemodule[abbreviations-words,typesetting] \setupbodyfont [pagella] -- cgit v1.2.3