diff options
author | Hans Hagen <pragma@wxs.nl> | 2023-05-27 12:37:50 +0200 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2023-05-27 12:37:50 +0200 |
commit | 32381f97e98465953bfde24b4436093e70fbe70f (patch) | |
tree | 1f585cf7af509e76c64aca108cecd23acd6fb437 /doc | |
parent | bb8ae12f4f94189fd1540b201e2aea78f485de97 (diff) | |
download | context-32381f97e98465953bfde24b4436093e70fbe70f.tar.gz |
2023-05-27 12:16:00
Diffstat (limited to 'doc')
20 files changed, 363 insertions, 15 deletions
diff --git a/doc/context/documents/general/manuals/lowlevel-accuracy.pdf b/doc/context/documents/general/manuals/lowlevel-accuracy.pdf Binary files differnew file mode 100644 index 000000000..cdeb62fd0 --- /dev/null +++ b/doc/context/documents/general/manuals/lowlevel-accuracy.pdf diff --git a/doc/context/documents/general/manuals/lowlevel-paragraphs.pdf b/doc/context/documents/general/manuals/lowlevel-paragraphs.pdf Binary files differindex 11c70780f..ddd7a3281 100644 --- a/doc/context/documents/general/manuals/lowlevel-paragraphs.pdf +++ b/doc/context/documents/general/manuals/lowlevel-paragraphs.pdf diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf Binary files differindex 0da977ac5..376c18b26 100644 --- a/doc/context/documents/general/qrcs/setup-de.pdf +++ b/doc/context/documents/general/qrcs/setup-de.pdf diff --git a/doc/context/documents/general/qrcs/setup-en.pdf b/doc/context/documents/general/qrcs/setup-en.pdf Binary files differindex ee5d4853c..0a88e801a 100644 --- a/doc/context/documents/general/qrcs/setup-en.pdf +++ b/doc/context/documents/general/qrcs/setup-en.pdf diff --git a/doc/context/documents/general/qrcs/setup-fr.pdf b/doc/context/documents/general/qrcs/setup-fr.pdf Binary files differindex 3a591a593..2789cbecb 100644 --- a/doc/context/documents/general/qrcs/setup-fr.pdf +++ b/doc/context/documents/general/qrcs/setup-fr.pdf diff --git a/doc/context/documents/general/qrcs/setup-it.pdf b/doc/context/documents/general/qrcs/setup-it.pdf Binary files differindex 2c0b57b92..3d249de41 100644 --- a/doc/context/documents/general/qrcs/setup-it.pdf +++ b/doc/context/documents/general/qrcs/setup-it.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-de.pdf b/doc/context/documents/general/qrcs/setup-mapping-de.pdf Binary files differindex 0cdae12ff..8f41b3565 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-de.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-de.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-en.pdf b/doc/context/documents/general/qrcs/setup-mapping-en.pdf Binary files differindex 9a9f8ae71..ad70efa10 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-en.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-en.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf Binary files differindex 272ec4b15..bc5c4b275 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-fr.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-fr.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-it.pdf b/doc/context/documents/general/qrcs/setup-mapping-it.pdf Binary files differindex c81c8a05b..9807d106c 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-it.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-it.pdf diff --git a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf Binary files differindex d5728f047..5bb2d68af 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-nl.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-nl.pdf diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf Binary files differindex af3e99f3f..2962780a1 100644 --- a/doc/context/documents/general/qrcs/setup-nl.pdf +++ b/doc/context/documents/general/qrcs/setup-nl.pdf diff --git a/doc/context/scripts/mkiv/mtx-install-modules.html b/doc/context/scripts/mkiv/mtx-install-modules.html index b75ed4b42..c8430e57b 100644 --- a/doc/context/scripts/mkiv/mtx-install-modules.html +++ b/doc/context/scripts/mkiv/mtx-install-modules.html @@ -40,7 +40,9 @@ <tr><th style="width: 10em">flag</th><th style="width: 8em">value</th><th>description</th></tr> <tr><th/><td/><td/></tr> <tr><th>--list</th><td></td><td>list modules</td></tr> + <tr><th>--installed</th><td></td><td>list installed modules</td></tr> <tr><th>--install</th><td></td><td>install modules</td></tr> + <tr><th>--uninstall</th><td></td><td>uninstall modules</td></tr> <tr><th>--module</th><td></td><td>install (zip) file(s)</td></tr> </table> <br/> @@ -49,7 +51,9 @@ <br/><br/><tt>mtxrun --script install-modules --install filter letter</tt> <br/><tt>mtxrun --script install-modules --install tikz</tt> <br/><tt>mtxrun --script install-modules --install --all</tt> -<br/><br/><tt>mtxrun --script install-modules --install --module t-letter.zip</tt> +<br/><br/><tt>mtxrun --script install-modules --install --module t-letter.zip</tt> +<br/><tt>mtxrun --script install-modules --uninstall --module t-letter.zip</tt> +<br/><br/><tt>mtxrun --script install-modules --installed</tt> <br/><br/> </div> </div> </body> diff --git a/doc/context/scripts/mkiv/mtx-install-modules.man b/doc/context/scripts/mkiv/mtx-install-modules.man index cd83aea54..b6bd07f1b 100644 --- a/doc/context/scripts/mkiv/mtx-install-modules.man +++ b/doc/context/scripts/mkiv/mtx-install-modules.man @@ -14,9 +14,15 @@ .B --list list modules .TP +.B --installed +list installed modules +.TP .B --install install modules .TP +.B --uninstall +uninstall modules +.TP .B --module install (zip) file(s) .SH AUTHOR diff --git a/doc/context/scripts/mkiv/mtx-install-modules.xml b/doc/context/scripts/mkiv/mtx-install-modules.xml index 872c1d64e..cee53e912 100644 --- a/doc/context/scripts/mkiv/mtx-install-modules.xml +++ b/doc/context/scripts/mkiv/mtx-install-modules.xml @@ -9,7 +9,9 @@ <category name="basic"> <subcategory> <flag name="list"><short>list modules</short></flag> + <flag name="installed"><short>list installed modules</short></flag> <flag name="install"><short>install modules</short></flag> + <flag name="uninstall"><short>uninstall modules</short></flag> <flag name="module"><short>install (zip) file(s)</short></flag> </subcategory> </category> @@ -26,7 +28,11 @@ <example><command>mtxrun --script install-modules --install --all</command></example> </subcategory> <subcategory> - <example><command>mtxrun --script install-modules --install --module t-letter.zip</command></example> + <example><command>mtxrun --script install-modules --install --module t-letter.zip</command></example> + <example><command>mtxrun --script install-modules --uninstall --module t-letter.zip</command></example> + </subcategory> + <subcategory> + <example><command>mtxrun --script install-modules --installed</command></example> </subcategory> </category> </examples> diff --git a/doc/context/sources/general/manuals/lowlevel/lowlevel-accuracy.tex b/doc/context/sources/general/manuals/lowlevel/lowlevel-accuracy.tex new file mode 100644 index 000000000..0048bb075 --- /dev/null +++ b/doc/context/sources/general/manuals/lowlevel/lowlevel-accuracy.tex @@ -0,0 +1,304 @@ +% language=us runpath=texruns:manuals/lowlevel + +\environment lowlevel-style + +\startdocument + [title=accuracy, + color=darkgray] + +\startsectionlevel[title=Introduction] + +When you look at \TEX\ and \METAPOST\ output the accuracy of the rendering stands +out, unless of course you do a sloppy job on design and interfere badly with the +system. Much has to do with the fact that calculations are very precise, +especially given the time when \TEX\ was written. Because \TEX\ doesn't rely on +(at that time non|-|portable) floating point calculations, it does all with 32 +bit integers, except in the backend where glue calculations are used for +finalizing the glue values. It all changed a bit when we added \LUA\ because +there we mix integers and doubles but in practice it works out okay. + +When looking at floating point (and posits) one can end up in discussions about +which one is better, what the flaws fo each are, etc. Here we're only interested +in the fact that posits are more accurate in the ranges where \TEX\ and +\METAPOST\ operate, as well as the fact that we only have 32 bits for floats in +\TEX, unless we patch more heavily. So, it is also very much about storage. + +When you work with dimensions like points, they get converted to an integer +number (the \type {sp} unit) and from that it's just integer calculations. The +maximum dimension is \the\maxdimen, which already shows a rounding issue. Of +course when one goes precise for sure there is some loss, but on the average +we're okay. So, in the next example the two last rows are equivalent: + +\starttabulate[|Tr|r|r|] +\NC .1pt \NC \the\dimexpr.1pt \relax \NC \number\dimexpr.1pt \relax sp \NC \NR +\NC .2pt \NC \the\dimexpr.2pt \relax \NC \number\dimexpr.2pt \relax sp \NC \NR +\NC .3pt \NC \the\dimexpr.3pt \relax \NC \number\dimexpr.3pt \relax sp \NC \NR +\NC .1pt + .2pt \NC \the\dimexpr.1pt+.2pt\relax \NC \number\dimexpr.1pt+.2pt\relax sp \NC \NR +\stoptabulate + +When we're at the \LUA\ end things are different, there numbers are mapped onto +64 bit floating point variables (doubles) and not all numbers map well. This is +what we get when we work with doubles in \LUA: + +\starttabulate[|Tr|r|] +\NC .1 \NC \luaexpr{.1 } \NC \NR +\NC .2 \NC \luaexpr{.2 } \NC \NR +\NC .3 \NC \luaexpr{.3 } \NC \NR +\NC .1 + .2 \NC \luaexpr{.1+.2} \NC \NR +\stoptabulate + +The serialization looks as if all is okay but when we test for equality there +is a problem: + +\starttabulate[|Tr|l|] +\NC .3 == .3 \NC \luaexpr{tostring( .3 == .3)} \NC \NR +\NC .1 + .2 == .3 \NC \luaexpr{tostring(.1 + .2 == .3)} \NC \NR +\stoptabulate + +This means that a test like this can give false positives or negatives unless one +tests the difference against the accuracy (in \METAPOST\ we have the {eps} +variable for that). In \TEX\ clipping of the decimal fraction influences equality. + +\starttabulate[|Tr|l|] +\NC \type{\iflua { .3 == .3 } Y\else N\fi} \NC \iflua{ .3 == .3} equal\else different\fi \NC \NR +\NC \type{\iflua { .1 + .2 == .3 } Y\else N\fi} \NC \iflua{.1 + .2 == .3} equal\else different\fi \NC \NR +\stoptabulate + +The serialization above misguides us because the number of digits displayed is +limited. Actually, when we would compare serialized strings the equality holds, +definitely within the accuracy of \TEX. But here is reality: + +\startluacode + local a = 0.1 + local b = 0.2 + local c = 0.3 + local d = a + b + local NC, NR = context.NC, context.NR + local function show(f) + context.NC() context(context.escaped(f)) + context.NC() context(f,c) + context.NC() context(f,d) + context.NC() context.NR() + end + context.starttabulate { "|T|l|l|" } + context.NC() + context.NC() context(".3") + context.NC() context(".1 + .2") + context.NC() context.NR() + -- show("%0.05g",c) + show("%0.10g",c) + show("%0.17g",c) + show("%0.20g",c) + show("%0.25g",c) + context.stoptabulate() +\stopluacode + +The above examples use $0.1$, $0.2$ and $0.3$ and on a 32 bit float that actually +works out okay, but \LUAMETATEX\ is 64 bit. Is this really important in practice? +There are indeed cases where we are bitten by this. At the \LUA\ end we seldom +test for equality on calculated values but it might impact check for less or +greater then. At the \TEX\ end there are a few cases where we have issues but +these also relate to the limited precision. It is not uncommon to loose a few +scaled points so that has to be taken into account then. So how can we deal with +this? In the next section(s) an alternative approach is discussed. It is not so +much the solution for all problems but who knows. + +\stopsectionlevel + +\startsectionlevel[title=Posits] + +% TODO: don't check for sign (1+2) + +The next table shows the same as what we started with but with a different +serialization. + +\starttabulate[|Tr|r|] +\NC .1 \NC \positunum{.1 } \NC \NR +\NC .2 \NC \positunum{.2 } \NC \NR +\NC .3 \NC \positunum{.3 } \NC \NR +\NC .1 + .2 \NC \positunum{.1 + .2} \NC \NR +\stoptabulate + +And here we get equality in both cases: + +\starttabulate[|Tr|l|] +\NC .3 == .3 \NC \positunum{ .3 == .3} \NC \NR +\NC .1 + .2 == .3 \NC \positunum{.1 + .2 == .3} \NC \NR +\stoptabulate + +The next table shows what we actually are dealing with. The \type {\if}|-|test is +not a primitive but provided by \CONTEXT. + +\starttabulate[|Tr|l|] +\NC \type{\ifpositunum { .3 == .3 } Y\else N\fi} \NC \ifpositunum{ .3 == .3} equal\else different\fi \NC \NR +\NC \type{\ifpositunum { .1 + .2 == .3 } Y\else N\fi} \NC \ifpositunum{.1 + .2 == .3} equal\else different\fi \NC \NR +\stoptabulate + +And what happens when we do more complex calculations: + +\starttabulate[|Tr|l|] +\NC \type {math .sin(0.1 + 0.2) == math .sin(0.3)} \NC \luaexpr{tostring(math.sin(0.1 + 0.2) == math.sin(0.3))} \NC \NR +\NC \type {posit.sin(0.1 + 0.2) == posit.sin(0.3)} \NC \positunum{sin(0.1 + 0.2) == sin(0.3)} \NC \NR +\stoptabulate + +Of course other numbers might work out differently! I just took the simple tests +that came to mind. + +So what are these posits? Here it's enough to know that they are a different way +to store numbers with fractions. They still can loose precision but a bit less on +smaller values and often we have relative small values in \TEX. Here are some links: + +\starttyping +https://www.johngustafson.net/pdfs/BeatingFloatingPoint.pdf +https://posithub.org/conga/2019/docs/14/1130-FlorentDeDinechin.pdf +\stoptyping + +There are better explanations out there than I can provide (if at all). When I +first read about these unums (a review of the 2015 book \quotation {The End of +Error Unum Computing}) I was intrigued and when in 2023 I read something about it +in relation to RISCV I decided to just add this playground for the users. After +all we also have decimal support. And interval based solutions might actually be +good for \METAPOST, so that is why we have it as extra number model. There we +need to keep in mind that \METAPOST\ in non scaled models also apply some of the +range checking and clipping that happens in scaled (these magick 4096 tricks). + +For now it is enough to know that it's an alternative for floats that {\em could} +work better in some cases but not all. The presentation mentioned above gives +some examples of physics constants where 32 posits are not good enough for +encoding the extremely large or small constants, but for $\pi$ it's all fine. +\footnote {Are 64 bit posits actually being worked on in softposit? There are +some commented sections. We also need to patch some unions to make it compile as +C.} In double mode we actually have quite good precision compared to 32 bit +posits but with 32 bit floats we gain some. Very small numbers and very large +numbers are less precise, but around 1 we gain: the next value after 1 is +1.0000001 for a float and 1.000000008 for a posit (both 32 bit). So, currently +for \METAPOST\ there is no real gain but if we'd add posits to \TEX\ we could +gain some because there a halfword (used for storing data) is 32 bit. + +But how about \TEX ? Per April 2023 the \LUAMETATEX\ engine has native support +for floats (this in addition to \LUA\ based floats that we already had in +\CONTEXT). How that works can be demonstrated with some examples. The float +related commands are similar to those for numbers and dimensions: \typ +{\floatdef}, \typ {\float}, \typ {\floatexpr}, \typ {\iffloat}, \typ +{\ifzerofloat} and \typ {\ifintervalfloat}. That means that we also have them as +registers. The \typ {\positdef} primitive is similar to \typ {\dimensiondef}. +When a float (posit) is seen in a dimension context it will be interpreted as +points, and in an integer context it will be a rounded number. As with other +registers we have a \typ {\newfloat} macro. The \typ {\advance}, \typ +{\multiply} and \typ {\divide} primitives accept floats. + +\startbuffer[reset] +\scratchdimen=1.23456pt +\scratchfloat=1.23456 +\stopbuffer + +\typebuffer[reset] \getbuffer[reset] + +We now use these two variables in an example: + +\startbuffer[dimensions] +\setbox0\hbox to \scratchdimen {x}\the\wd0 +\scratchdimen \dimexpr \scratchdimen * 2\relax +\setbox0\hbox to \scratchdimen {x}\the\wd0 +\advance \scratchdimen \scratchdimen +\setbox0\hbox to \scratchdimen {x}\the\wd0 +\multiply\scratchdimen by 2 +\setbox0\hbox to \scratchdimen {x}\the\wd0 +\stopbuffer + +\typebuffer[dimensions] \startlines\darkblue\tttf\getbuffer[reset,dimensions]\stoplines + +When we use floats we get this: + +\startbuffer[floats] +\setbox0\hbox to \scratchfloat {x}\the\wd0 +\scratchfloat \floatexpr \scratchfloat * 2\relax +\setbox0\hbox to \scratchfloat {x}\the\wd0 +\advance \scratchfloat \scratchfloat +\setbox0\hbox to \scratchfloat {x}\the\wd0 +\multiply\scratchfloat by 2 +\setbox0\hbox to \scratchfloat {x}\the\wd0 +\stopbuffer + +\typebuffer[floats] \startlines\darkblue\tttf\getbuffer[reset,floats]\stoplines + +So which approach is more accurate? At first sight you might think that the +dimensions are better because in the last two lines they indeed duplicate. +However, the next example shows that with dimensions we lost some between steps. + +\startbuffer[noboxes] + \the\scratchfloat +\scratchfloat \floatexpr \scratchfloat * 2\relax \the\scratchfloat +\advance \scratchfloat \scratchfloat \the\scratchfloat +\multiply\scratchfloat by 2 \the\scratchfloat +\stopbuffer + +\typebuffer[noboxes] \startlines\darkblue\tttf\getbuffer[reset,noboxes]\stoplines + +One problem with accuracy is that it can build up. So when one eventually does +some comparison the expectations can be wrong. + +\startbuffer +\dimen0=1.2345pt +\dimen2=1.2345pt + +\ifdim \dimen0=\dimen2 S\else D\fi \space +0sp: [dim] +\ifintervaldim0sp\dimen0 \dimen2 O\else D\fi \space +0sp: [0sp] + +\advance\dimen2 1sp + +\ifdim \dimen0=\dimen2 S\else D\fi \space +1sp: [dim] +\ifintervaldim 1sp \dimen0 \dimen2 O\else D\fi \space +1sp: [1sp] +\ifintervaldim 1sp \dimen2 \dimen0 O\else D\fi \space +1sp: [1sp] +\ifintervaldim 2sp \dimen0 \dimen2 O\else D\fi \space +1sp: [2sp] +\ifintervaldim 2sp \dimen2 \dimen0 O\else D\fi \space +1sp: [2sp] + +\advance\dimen2 1sp + +\ifintervaldim 1sp \dimen0\dimen2 O\else D\fi \space +2sp: [1sp] +\ifintervaldim 1sp \dimen2\dimen0 O\else D\fi \space +2sp: [1sp] +\ifintervaldim 5sp \dimen0\dimen2 O\else D\fi \space +2sp: [5sp] +\ifintervaldim 5sp \dimen2\dimen0 O\else D\fi \space +2sp: [5sp] +\stopbuffer + +\typebuffer + +Here we show a test for overlap in values, the same can be done with integer +numbers (counts) and floats. This interval checking is an experiment and we'll +see it if gets used. + +\startpacked\darkblue \tttf \getbuffer \stoppacked + +There are also \typ {\ifintervalfloat} and \typ{\ifintervalnum}. Because I have +worked around these few scaled point rounding issues for decades, it might +actually take some time before we see the interval tests being used in \CONTEXT. +After all, there is no reason to touch somewhat tricky mechanism without reason +(read: users complaining). + +To come back to posits, just to be clear, we use 32 bit posits and not 32 bit +floats, which we could have but that way we gain some accuracy because less bits +are used by default for the exponential. + +In \CONTEXT\ we also provide a bunch of pseudo primitives. These take one float: +\type {\pfsin}, \type {\pfcos}, \type {\pftan}, \type {\pfasin}, \type {\pfacos}, +\type {\pfatan}, \type {\pfsinh}, \type {\pfcosh}, \type {\pftanh}, \type +{\pfasinh}, \type {\pfacosh}, \type {\pfatanh}, \type {\pfsqrt}, \type {\pflog}, +\type {\pfexp}, \type {\pfceil}, \type {\pffloor}, \type {\pfround}, \type +{\pfabs}, \type {\pfrad} and \type {\pfdeg}, whiel these expect two floats: \type +{\pfatantwo}, \type {\pfpow}, \type {\pfmod} and \type {\pfrem}. + +% \pageextragoal = 5sp + +\stopsectionlevel + +\startsectionlevel[title=\METAPOST] + +In addition to the instances \typ {metafun} (double in \LMTX), \typ {scaledfun}, +\typ {doublefun}, \typ {decimalfun} we now also have \typ {positfun}. Because we +currently use 32 bit posits in the new number system there is no real gain over +the already present 64 bit doubles. When 64 bit posits show up we might move on +to that. + +\stopsectionlevel + +\stopdocument diff --git a/doc/context/sources/general/manuals/lowlevel/lowlevel-paragraphs.tex b/doc/context/sources/general/manuals/lowlevel/lowlevel-paragraphs.tex index 6543c0795..3412a740f 100644 --- a/doc/context/sources/general/manuals/lowlevel/lowlevel-paragraphs.tex +++ b/doc/context/sources/general/manuals/lowlevel/lowlevel-paragraphs.tex @@ -1247,7 +1247,7 @@ that a negative depth of more than 1000 point made no sense at all. The last depth on a vertical list is registered in the \type {\prevdepth} variable. This is basically a reference into the current list. In order to illustrate some interesting side effects of setting this \type {\prevdepth} and especially when -we set it to -1000pt. In order to illustrate this this special value can be set +we set it to $\tf -1000pt$. In order to illustrate this this special value can be set to a different value in \LUAMETATEX. However, as dealing with the property is somewhat special in the engine you should not set it unless you know that the macro package is ware of it. @@ -1307,21 +1307,23 @@ coded dimension. We now give a more extensive example: \egroup \stopbuffer -In this example we set \type {\ignoredepthcriterium} to $\tf-50.0pt$ instead of the +\typebuffer[example][option=TEX] + +In this example we set \type {\ignoredepthcriterium} to $\tf -50.0pt$ instead of the normal $\tf -1000pt$. The helper is defined as: -\typebuffer[option=TEX][definitions-1] +\typebuffer[definition-1][option=TEX] or -\typebuffer[option=TEX][definitions-2] +\typebuffer[definition-2][option=TEX] -The result of the following example is shown in \in {figures} [fig:prevdepth-1] -\in {and} [fig:prevdepth-2]. The first case is what we normally have in text and -we haven't set \type {prevdepth} explicitly between lines so \TEX\ will just look -at the depth of the lines. In the second case the depth is ignored when less than -the criterium which is why, when we set the depth of the box to a negative value -we get somewhat interesting skips. +The result is shown in \in {figures} [fig:prevdepth-1] \in {and} +[fig:prevdepth-2]. The first case is what we normally have in text and we haven't +set \type {prevdepth} explicitly between lines so \TEX\ will just look at the +depth of the lines. In the second case the depth is ignored when less than the +criterium which is why, when we set the depth of the box to a negative value we +get somewhat interesting skips. \startplacefigure[reference=fig:prevdepth-1] \showmakeup[line] @@ -1355,6 +1357,8 @@ we get with positive values: \egroup \stopbuffer +\typebuffer[example][option=TEX] + \startplacefigure[reference=fig:prevdepth-3] \showmakeup[line] \ignoredepthcriterium50pt diff --git a/doc/context/sources/general/manuals/luametatex/luametatex-building.tex b/doc/context/sources/general/manuals/luametatex/luametatex-building.tex index 277d39251..9068bbc0c 100644 --- a/doc/context/sources/general/manuals/luametatex/luametatex-building.tex +++ b/doc/context/sources/general/manuals/luametatex/luametatex-building.tex @@ -457,10 +457,10 @@ up such that it can adapt itself: \hbox to 3cm {x\leaders\hrule\hfil x} \hbox{x \vrule width 4cm \relax x} \hbox{x \srule width 4cm \relax x} -\hbox{x \vrule font \font char `( width 4cm \relax x} \hbox{x \srule font \font char `( width 4cm \relax x} \hbox{$x \srule fam \fam char `( width 4cm \relax x$} -\hbox{$x \vrule fam \fam char `( width 4cm \relax x$} +% \hbox{x \vrule font \font char `( width 4cm \relax x} +% \hbox{$x \vrule fam \fam char `( width 4cm \relax x$} \stopbuffer \typebuffer diff --git a/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex b/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex index 46d986bfb..ba320440b 100644 --- a/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex +++ b/doc/context/sources/general/manuals/luametatex/luametatex-enhancements.tex @@ -1767,6 +1767,30 @@ else \quote {last} has been seen. \stopsection +\startsection[title=Kerns and penalties] + +\startsubsection[title=\prm {hkern} and \prm {vkern}] + +\topicindex {kerns} + +These two primitives complement \prm {hskip} and \prm {vskip} and force the right +mode when issued. Contrary to the skips, internally we still have a common kern +command code but that is not something the user has to worry about. + +\stopsubsection + +\startsubsection[title=\prm {hpenalty} and \prm {vpenalty}] + +\topicindex {penalties} + +As the kern and skip related primitives mentioned in the in the previous section +these two primitives are there fort consistency: they force the right (related) +mode. (Sometimes being a bit more explicit is cleaner.) + +\stopsubsection + +\stopsection + \startsection[title=Scanning] \startsubsection[title=Keywords] diff --git a/doc/context/sources/general/manuals/luametatex/luametatex.tex b/doc/context/sources/general/manuals/luametatex/luametatex.tex index e75053972..a86846628 100644 --- a/doc/context/sources/general/manuals/luametatex/luametatex.tex +++ b/doc/context/sources/general/manuals/luametatex/luametatex.tex @@ -108,7 +108,7 @@ % End Feburari 2023 I observed 8.2 seconds for 360 pages and making a format needed % 1.9 seconds instead if the usual 2.1 but that can be a side effect of the terminal % because the amount of output which is sensitive for refresh delays set. The new -% target is nwo 50 pages per second for this manual but on this laptop that is +% target is now 50 pages per second for this manual but on this laptop that is % unlikely to happen any time soon. With tabulateusesize and tabulatesparseskips % experiments enabled we needed 8.1 second and 44.3 pps. |