From 58b7dfe85b124eaccc2d2f1018d9e4bc881acbbd Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Thu, 5 Dec 2019 19:41:53 +0100 Subject: 2019-12-05 18:54:00 --- doc/context/documents/general/manuals/evenmore.pdf | Bin 0 -> 222820 bytes doc/context/documents/general/qrcs/setup-cs.pdf | Bin 888111 -> 888089 bytes doc/context/documents/general/qrcs/setup-de.pdf | Bin 889597 -> 889424 bytes doc/context/documents/general/qrcs/setup-en.pdf | Bin 894230 -> 893995 bytes doc/context/documents/general/qrcs/setup-fr.pdf | Bin 886059 -> 885882 bytes doc/context/documents/general/qrcs/setup-it.pdf | Bin 891796 -> 891894 bytes .../documents/general/qrcs/setup-mapping-cs.pdf | Bin 383544 -> 383649 bytes .../documents/general/qrcs/setup-mapping-de.pdf | Bin 383899 -> 383776 bytes .../documents/general/qrcs/setup-mapping-en.pdf | Bin 380640 -> 380305 bytes .../documents/general/qrcs/setup-mapping-fr.pdf | Bin 384021 -> 383852 bytes .../documents/general/qrcs/setup-mapping-it.pdf | Bin 383363 -> 383523 bytes .../documents/general/qrcs/setup-mapping-nl.pdf | Bin 382101 -> 381891 bytes .../documents/general/qrcs/setup-mapping-ro.pdf | Bin 620204 -> 620337 bytes doc/context/documents/general/qrcs/setup-nl.pdf | Bin 881326 -> 881163 bytes doc/context/documents/general/qrcs/setup-ro.pdf | Bin 886170 -> 886075 bytes doc/context/scripts/mkiv/mtx-fonts.html | 81 ------- doc/context/scripts/mkiv/mtx-fonts.man | 69 ------ doc/context/scripts/mkiv/mtx-fonts.xml | 65 ------ doc/context/scripts/mkiv/mtx-unzip.html | 3 +- doc/context/scripts/mkiv/mtx-unzip.man | 5 +- doc/context/scripts/mkiv/mtx-unzip.xml | 3 +- .../general/manuals/evenmore/evenmore-contents.tex | 11 + .../manuals/evenmore/evenmore-expansion.tex | 148 +++++++++++++ .../manuals/evenmore/evenmore-introduction.tex | 38 ++++ .../manuals/evenmore/evenmore-normalization.tex | 239 +++++++++++++++++++++ .../general/manuals/evenmore/evenmore-style.tex | 67 ++++++ .../manuals/evenmore/evenmore-titlepage.tex | 45 ++++ .../sources/general/manuals/evenmore/evenmore.tex | 37 ++++ .../manuals/luametatex/luametatex-introduction.tex | 12 +- .../general/manuals/luametatex/luametatex.tex | 2 +- .../manuals/luatex/luatex-modifications.tex | 5 +- 31 files changed, 602 insertions(+), 228 deletions(-) create mode 100644 doc/context/documents/general/manuals/evenmore.pdf delete mode 100644 doc/context/scripts/mkiv/mtx-fonts.html delete mode 100644 doc/context/scripts/mkiv/mtx-fonts.man delete mode 100644 doc/context/scripts/mkiv/mtx-fonts.xml create mode 100644 doc/context/sources/general/manuals/evenmore/evenmore-contents.tex create mode 100644 doc/context/sources/general/manuals/evenmore/evenmore-expansion.tex create mode 100644 doc/context/sources/general/manuals/evenmore/evenmore-introduction.tex create mode 100644 doc/context/sources/general/manuals/evenmore/evenmore-normalization.tex create mode 100644 doc/context/sources/general/manuals/evenmore/evenmore-style.tex create mode 100644 doc/context/sources/general/manuals/evenmore/evenmore-titlepage.tex create mode 100644 doc/context/sources/general/manuals/evenmore/evenmore.tex (limited to 'doc') diff --git a/doc/context/documents/general/manuals/evenmore.pdf b/doc/context/documents/general/manuals/evenmore.pdf new file mode 100644 index 000000000..e8f7e737c Binary files /dev/null and b/doc/context/documents/general/manuals/evenmore.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf index f43b60427..31bb06864 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 ff28cf5a0..e3ace250f 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 078c2dd7a..12d7ad595 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 2f3f96b7d..b9d18b6e1 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 1d9054018..c78a1f578 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 7a04cccd3..9708078cd 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 35ff02d7f..546aa5f31 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 52cd92931..bfc546f37 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 9f4321f5d..506d92d93 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 96373f848..f9d44c4ae 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 5a7d5f114..94cf16b02 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 33d2719cc..6f19eb84c 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 d254b787b..b0b530e51 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 91bfdc213..b9a54628e 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/scripts/mkiv/mtx-fonts.html b/doc/context/scripts/mkiv/mtx-fonts.html deleted file mode 100644 index b175139c8..000000000 --- a/doc/context/scripts/mkiv/mtx-fonts.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - - - - - - - ConTeXt Font Database Management 0.21 - - - - - -
-
ConTeXt Font Database Management 0.21
-
-
-
-
wiki: http://contextgarden.net | mail: ntg-context@ntg.nl | website: http://www.pragma-ade.nl
-
-
-
- -
-
-

Command line options

- - - - - - - - - - - - - - - - - - - - - -
flagvaluedescription
--convertsave open type font in raw table
--unpacksave a tma file in a more readable format
--reloadgenerate new font database (use --force when in doubt)
--reload--simple:generate luatex-fonts-names.lua (not for context!)
--list--name: list installed fonts, filter by name [--pattern]
--list--spec: list installed fonts, filter by spec [--filter]
--list--file: list installed fonts, filter by file [--pattern]
--patternstrfilter files using pattern
--filterlistkey-value pairs
--allshow all found instances (combined with other flags)
--infogive more details
--trackerslistenable trackers
--statisticssome info about the database
--namesuse name instead of unicodes
--cachestruse specific cache (otl or otf)
-
-

Examples

-mtxrun --script font --list somename (== --pattern=*somename*) -

mtxrun --script font --list --name somename -
mtxrun --script font --list --name --pattern=*somename* -

mtxrun --script font --list --spec somename -
mtxrun --script font --list --spec somename-bold-italic -
mtxrun --script font --list --spec --pattern=*somename* -
mtxrun --script font --list --spec --filter="fontname=somename" -
mtxrun --script font --list --spec --filter="familyname=somename,weight=bold,style=italic,width=condensed" -
mtxrun --script font --list --spec --filter="familyname=crap*,weight=bold,style=italic" -

mtxrun --script font --list --all -
mtxrun --script font --list --file somename -
mtxrun --script font --list --file --all somename -
mtxrun --script font --list --file --pattern=*somename* -

mtxrun --script font --convert texgyrepagella-regular.otf -
mtxrun --script font --convert --names texgyrepagella-regular.otf -

-
- - diff --git a/doc/context/scripts/mkiv/mtx-fonts.man b/doc/context/scripts/mkiv/mtx-fonts.man deleted file mode 100644 index e781b087c..000000000 --- a/doc/context/scripts/mkiv/mtx-fonts.man +++ /dev/null @@ -1,69 +0,0 @@ -.TH "mtx-fonts" "1" "01-01-2019" "version 1.00" "ConTeXt Font Database Management" -.SH NAME - mtx-fonts - ConTeXt Font Database Management -.SH SYNOPSIS -.B mtxrun --script fonts [ -.I OPTIONS ... -.B ] [ -.I FILENAMES -.B ] -.SH DESCRIPTION -.B ConTeXt Font Database Management -.SH OPTIONS -.TP -.B --convert -save open type font in raw table -.TP -.B --unpack -save a tma file in a more readable format -.TP -.B --reload -generate new font database (use --force when in doubt) -.TP -.B --reload ---simple:generate luatex-fonts-names.lua (not for context!) -.TP -.B --list ---name: list installed fonts, filter by name [--pattern] -.TP -.B --list ---spec: list installed fonts, filter by spec [--filter] -.TP -.B --list ---file: list installed fonts, filter by file [--pattern] -.TP -.B --pattern=str -filter files using pattern -.TP -.B --filter=list -key-value pairs -.TP -.B --all -show all found instances (combined with other flags) -.TP -.B --info -give more details -.TP -.B --trackers=list -enable trackers -.TP -.B --statistics -some info about the database -.TP -.B --names -use name instead of unicodes -.TP -.B --cache=str -use specific cache (otl or otf) -.SH AUTHOR -More information about ConTeXt and the tools that come with it can be found at: - - -.B "maillist:" -ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context - -.B "webpage:" -http://www.pragma-ade.nl / http://tex.aanhet.net - -.B "wiki:" -http://contextgarden.net diff --git a/doc/context/scripts/mkiv/mtx-fonts.xml b/doc/context/scripts/mkiv/mtx-fonts.xml deleted file mode 100644 index d001f4f9a..000000000 --- a/doc/context/scripts/mkiv/mtx-fonts.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - mtx-fonts - ConTeXt Font Database Management - 1.00 - - - - - save open type font in raw table - save a tma file in a more readable format - - - generate new font database (use when in doubt) - :generate luatex-fonts-names.lua (not for context!) - - - : list installed fonts, filter by name [] - : list installed fonts, filter by spec [] - : list installed fonts, filter by file [] - - - filter files using pattern - key-value pairs - show all found instances (combined with other flags) - give more details - enable trackers - some info about the database - use name instead of unicodes - use specific cache (otl or otf) - - - - - - Examples - - mtxrun --script font --list somename (== --pattern=*somename*) - - - mtxrun --script font --list --name somename - mtxrun --script font --list --name --pattern=*somename* - - - mtxrun --script font --list --spec somename - mtxrun --script font --list --spec somename-bold-italic - mtxrun --script font --list --spec --pattern=*somename* - mtxrun --script font --list --spec --filter="fontname=somename" - mtxrun --script font --list --spec --filter="familyname=somename,weight=bold,style=italic,width=condensed" - mtxrun --script font --list --spec --filter="familyname=crap*,weight=bold,style=italic" - - - mtxrun --script font --list --all - mtxrun --script font --list --file somename - mtxrun --script font --list --file --all somename - mtxrun --script font --list --file --pattern=*somename* - - - mtxrun --script font --convert texgyrepagella-regular.otf - mtxrun --script font --convert --names texgyrepagella-regular.otf - - - - diff --git a/doc/context/scripts/mkiv/mtx-unzip.html b/doc/context/scripts/mkiv/mtx-unzip.html index 655c1be8d..60172eaa8 100644 --- a/doc/context/scripts/mkiv/mtx-unzip.html +++ b/doc/context/scripts/mkiv/mtx-unzip.html @@ -40,8 +40,7 @@ flagvaluedescription --listlist files in archive - --junkflatten unzipped directory structure - --extractextract files + --extractextract files [--silent --steps]
diff --git a/doc/context/scripts/mkiv/mtx-unzip.man b/doc/context/scripts/mkiv/mtx-unzip.man index 39db05cd6..b2b954e71 100644 --- a/doc/context/scripts/mkiv/mtx-unzip.man +++ b/doc/context/scripts/mkiv/mtx-unzip.man @@ -14,11 +14,8 @@ .B --list list files in archive .TP -.B --junk -flatten unzipped directory structure -.TP .B --extract -extract files +extract files [--silent --steps] .SH AUTHOR More information about ConTeXt and the tools that come with it can be found at: diff --git a/doc/context/scripts/mkiv/mtx-unzip.xml b/doc/context/scripts/mkiv/mtx-unzip.xml index 9f56ca076..0346957f6 100644 --- a/doc/context/scripts/mkiv/mtx-unzip.xml +++ b/doc/context/scripts/mkiv/mtx-unzip.xml @@ -9,8 +9,7 @@ list files in archive - flatten unzipped directory structure - extract files + extract files [--silent --steps] diff --git a/doc/context/sources/general/manuals/evenmore/evenmore-contents.tex b/doc/context/sources/general/manuals/evenmore/evenmore-contents.tex new file mode 100644 index 000000000..d20b45eee --- /dev/null +++ b/doc/context/sources/general/manuals/evenmore/evenmore-contents.tex @@ -0,0 +1,11 @@ +\startcomponent evenmore-contents + +\environment evenmore-style + +\starttitle[title={Table of contents}] + + \placelist[chapter] + +\stoptitle + +\stopcomponent diff --git a/doc/context/sources/general/manuals/evenmore/evenmore-expansion.tex b/doc/context/sources/general/manuals/evenmore/evenmore-expansion.tex new file mode 100644 index 000000000..6c67f07d6 --- /dev/null +++ b/doc/context/sources/general/manuals/evenmore/evenmore-expansion.tex @@ -0,0 +1,148 @@ +% language=us + +\environment evenmore-style + +\startcomponent evenmore-expansion + +\startchapter[title=Expansion] + +Character expansion was introduced in \PDFTEX\ a couple of decades ago. It is a +mechanism that scales glyphs horizontally in order to reduce excessive whitespace +that is needed to properly justify a paragraph. I must admit that I never use it +myself but there are users who do. Although this mechanism evolved a bit, and in +\LUATEX\ is implemented a bit different, the basics remained the same. If you +have no clue what this is about, you can just quite reading here. + +A font can be set up to expand characters by a certain amount: they can shrink or +stretch. This is driven by three parameters: \type {step}, \type {stretch} and +\type {shrink}. The values are in thousands because \TEX\ has no float quantity. +Originally these values were percentages of the width of a glyph, later they +became related to the em width but in \LUATEX\ we went back to the former +definition. + +In \CONTEXT\ \MKIV\ we have an interface that works as follows: + +\startbuffer +\startluacode + local classes = fonts.expansions.classes + + classes.qualitya = { + vector = "default", + factor = 1, + stretch = 4, + shrink = 2, + step = .5, + } + + classes.qualityb = { + vector = "default", + factor = 1, + stretch = 8, + shrink = 4, + step = .5, + } + +\stopluacode +\stopbuffer + +\typebuffer[option=TEX] \getbuffer + +The default vector looks like this: + +\starttyping[option=LUA] +vectors['default'] = { + [0x0041] = 0.5, -- A + [0x0042] = 0.7, -- B + -- and some more +} +\stoptyping + +The values that we pass to the engine are stretch 40, shrink 20, and step 5 for +\type {qualitya} and stretch 80, shrink 40, and step 5 for \type {qualityb}, so +we multiply by 10. In the engine the step is limited to 100, the stretch to 1000 +and the shrink to 500. But these extremes produce quite bad results. + +The expansion class is set with the \type {expansion} feature, as in: + +\startbuffer +\definefontfeature [basea] [default] [expansion=qualitya] +\definefontfeature [baseb] [default] [expansion=qualityb] + +\definefont [FontA] [Serif*basea] +\definefont [FontB] [Serif*baseb] + +\stopbuffer + +\typebuffer[option=TEX] \getbuffer + +\startbuffer[sample] + \setupalign[verytolerant,stretch,hz] % hz triggers expansion + \dorecurse {30} {% + {\FontB \darkred test me #1,} \FontA \dorecurse{#1}{test ##1, }% + }\par +\stopbuffer + +In \in {figure} [hz:1] we see this in action, using the following code: + +\typebuffer[sample][option=TEX] + +\startplacefigure[reference=hz:1] + \getbuffer[sample] +\stopplacefigure + +There is one drawback with this method, although so far I never heard a user +complain, which can be an indication of how this mechanism is used: you cannot +mix fonts with different step, stretch and|/|or shrink. As we just did this in +the example, this statement is not really true in \LUAMETATEX: there we only need +to keep the step the same. This is compatible in the sense that otherwise we +would quit the run, so at least we carry on: the smallest stretch and shrink is +taken. But, we do issue a warning (once) because there can be side effects! This +is not that pretty a solution anyway because it depends on what font is used +first. + +It is for this reason that we have another option: in \CONTEXT\ \LMTX\ you can +define a specific expansion: + +\startbuffer +\defineexpansion + [myexpansion] + [step=1, % default + stretch=50, + shrink=20] +\stopbuffer + +\typebuffer[option=TEX] \getbuffer + +There is no need to have a different step than~1. In \PDFTEX\ instances are +created per step used, but in \LUATEX\ this is more fluid. There is no gain in +using different steps. We just keep it for compatibility reasons. This specific +expansion is enables with: + +\starttyping[option=TEX] +\setexpansion[myexpansion] +\stoptyping + +and the result is shown in \in {figure} [hz:2]. This time the set expansion wins +over the one set in the font. All fonts that have the expansion feature set are +treated the same. By using this method you can locally have different values. + +\startplacefigure[reference=hz:2] + \setexpansion[myexpansion] + \getbuffer[sample] +\stopplacefigure + +Deep down we use some new primitives: + +\starttyping[option=TEX] +\adjustspacingstep +\adjustspacingstretch +\adjustspacingshrink +\stoptyping + +The step is limited to 100 (10\percent) and the stretch and shrink to 500 +(50\percent) and the stretch to 1000 (100\percent) but these extremes are only +useful for examples. + +\stopchapter + +\stopcomponent diff --git a/doc/context/sources/general/manuals/evenmore/evenmore-introduction.tex b/doc/context/sources/general/manuals/evenmore/evenmore-introduction.tex new file mode 100644 index 000000000..d5bfbdad7 --- /dev/null +++ b/doc/context/sources/general/manuals/evenmore/evenmore-introduction.tex @@ -0,0 +1,38 @@ +% language=us + +\startcomponent evenmore-introduction + +\environment evenmore-style + +\startchapter[title={Introduction}] + +After five collections of \quote {articles} about the development of \LUATEX, +\CONTEXT\ \MKIV, \LUAMETATEX\ and \CONTEXT\ \LMTX, there is even more to tell so +here is number six. Wrapping up not only serves to inform the users but for me it is +also a way to get things right: if you cannot write it down it's no good. It forces +me to (re)consider interfaces and also test new code but of course it comes with +no guarantees. + +When writing this introduction I just finished the first chapter, about some new +font stuff, as follow up on the (again) nice \CONTEXT\ meeting in 2019. It's +always inspiring to meet and talk with my \TEX\ friends and see what they're +doing. It keeps me going. + +Some chapters end up in user group journals first so they will be added once they +have been published and are available. The advantage is that these are then +copy|-|edited. Many texts, also in previous development updates, got better +because Karl Berry checked them thoroughly for TUGboat, for which I'm grateful. + +Hopefully, this document serves a purpose. + +\blank[2*big] + +\startlines +Hans Hagen +PRAGMA ADE, Hasselt NL +Started in October 2019 +\stoplines + +\stopchapter + +\stopcomponent diff --git a/doc/context/sources/general/manuals/evenmore/evenmore-normalization.tex b/doc/context/sources/general/manuals/evenmore/evenmore-normalization.tex new file mode 100644 index 000000000..36d4390aa --- /dev/null +++ b/doc/context/sources/general/manuals/evenmore/evenmore-normalization.tex @@ -0,0 +1,239 @@ +% language=us + +% \enabletrackers[nodes.directions] + +\environment evenmore-style + +\startcomponent evenmore-normalization + +\startchapter[title=Normalization] + +What I describe here was long due. I delayed it because when enabled it had best +also be used and I need to (check and) adapt some code to it in order to profit +from it. So, if used at all, it will take some time to have an effect on the +\CONTEXT\ code base. But first some background information. + +When \TEX\ builds a paragraph it splits the current text stream (that makes up +the paragraph) into lines where each line becomes an horizontal box. In \LUATEX, +this process is split into distinctive steps, contrary to regular \TEX\ where the +splitting is combined with hyphenation, ligature construction and font kerning. +But what all engines have in common is that after the decision is made about what +a line is, the result gets packages into the horizontal box. + +The decision making is influenced by quite some factors, like: + +\startitemize[packed] +\startitem + The indentation of the first line, driven by the presence of a box of + with a certain width and no height and depth (its always there, also when + the indentation is zero). +\stopitem +\startitem + Hanging indentation, which can happen at each corner of the paragraph, or + alternatively a specific parshape. +\stopitem +\startitem + Left and|/|or right margins, aka left skip and right skip. A right skip is + always present, even when zero. +\stopitem +\startitem + The way the last line gets aligns, aka parfill skip. +\stopitem +\startitem + Directional changes that need to be carries over to the next line. +\stopitem +\startitem + Optional protrusion of characters to the left of right of the line, something + that is sensitive for directional changes. +\stopitem +\startitem + Expansion of characters in order to get better inter|-|word spacing and|/|or + to prevent lines being too bad. There can be stretch as well as shrink but + on a per line basis. Inter|-|character kerns can also get that treatment. +\stopitem +\startitem + The penalties associated to hyphenation: the pre|-|last line, the last two + lines, a list of penalties (\ETEX), specific penalties bound to hyphenation + pints (\LUATEX). +\stopitem +\startitem + The wish to have more or less lines than optimal, aka looseness. I have to + admit that I never use that feature. +\stopitem +\stopitemize + +In traditional \TEX\ it doesn't really matter how the resulting boxes look like, +as long as the following steps can handle them, and those steps don't look into +those boxes. In fact, unless you unpack a box, only the backend deals with the +content. But in \LUATEX\ we have callbacks that hook into several stages and {\em +can} look into the constructed boxes. In \LUATEX\ these boxes also have embedded +directional information (needed by the backend) and (although that is seldom +used) left or right boxed material, a features inherited from \ALEPH|/|\OMEGA. +And when messing around with the content of boxes one has to know what can be +seen there. In principle the code can be reorganized a it but adding additional +functionality is not that trivial because we want to stay close to the original +implementation, even if it has been messed up a bit by successive additions. +Eventually I might give it a try to integrate all these features a bit better, +but on the other hand: it works. + +\starttexdefinition Sample #1#2 + \startluacode + document.normalizestate = nodes.getnormalizeline() + nodes.setnormalizeline(#1) + \stopluacode + \startsubsubject[title={normalization #1, #2}] + \typebuffer[#2] + \startlinecorrection + \forgetall + \start + \setupalign[verytolerant,stretch] + \showmakeup[line,hbox,vbox,glue] + \vbox{\getbuffer[#2]\samplefile{sapolsky}} + \stop + \par + \stoplinecorrection + \stopsubject + \startluacode + nodes.setnormalizeline(document.normalizestate) + \stopluacode +\stoptexdefinition + +\startbuffer[sample-1] + \parindent = 20pt + \leftskip = 40pt + \rightskip = 50pt + \hangindent = 0pt + \hangafter = 0 +\stopbuffer + +\startbuffer[sample-2] + \parindent = 0pt + \leftskip = 0pt + \rightskip = 0pt + \hangindent =-20pt + \hangafter = -3 +\stopbuffer + +\startbuffer[sample-3] + \parindent = 0pt + \leftskip = 0pt + \rightskip = 0pt + \hangindent = 20pt + \hangafter = 3 +\stopbuffer + +\startbuffer[sample-4] + \parindent = 0pt + \leftskip = 10pt + \rightskip = 30pt + \hangindent = 20pt + \hangafter = 3 +\stopbuffer + +In the next examples we show how the result of typesetting a paragraph looks +like. We use the Sapolsky quote from the distribution. The cyan glue nodes are +the left and right skip nodes, and the gray one at the end of the last line +represents the parfill skip. The magenta ones at the edge are baseline skips. An +indentation is shown in gray too. As experiment we have four normalization levels +but in the end only the highest level makes sense, simply because normalization +makes no sense unless one consistently normalizes all. We just keep the +granularity because it makes it possible to explain what gets done. + +\texdefinition{Sample}{0}{sample-1} +\texdefinition{Sample}{0}{sample-2} +\texdefinition{Sample}{0}{sample-3} +\texdefinition{Sample}{0}{sample-4} + +You might have noticed that the right skip is always there but the left skip is +absent when it is zero. As said, as long as the result is okay, it does not +really matter. But \unknown\ in \LUATEX\ (and therefore \CONTEXT) it can have +consequences because there we can kick in a callback that does something with +lines. Such a callback often has to deal with these specific glues and them being +optional makes for more testing. The more predictable the order is, the better. +Although we can easily normalize lines (in a callback) to always have a left skip +too it is also an option in the engine. + +\texdefinition{Sample}{1}{sample-1} +\texdefinition{Sample}{1}{sample-2} +\texdefinition{Sample}{1}{sample-3} +\texdefinition{Sample}{1}{sample-4} + +In the previous examples there are always left skips as well as right skips. It +makes no sense to have an option to omit both zero left and right skips, because +that again is unpredictable. But we can go further. + +\texdefinition{Sample}{2}{sample-1} +\texdefinition{Sample}{2}{sample-2} +\texdefinition{Sample}{2}{sample-3} +\texdefinition{Sample}{2}{sample-4} + +In these examples the indentation has been turned into a glue as well (actually +it is more a kern but using a glue makes more sense). The hanging indentation +however is not seen here: it is not represented by glue but instead sort of +hidden in the width of the box and a shift of its content. + +\texdefinition{Sample}{3}{sample-1} +\texdefinition{Sample}{3}{sample-2} +\texdefinition{Sample}{3}{sample-3} +\texdefinition{Sample}{3}{sample-4} + +In the previous examples the hanging indentation is turned into left and right +hang skips. These cannot be set at the \TEX\ end, but are injected when we +instruct the normalizer to do so. + +\texdefinition{Sample}{4}{sample-1} +\texdefinition{Sample}{4}{sample-2} +\texdefinition{Sample}{4}{sample-3} +\texdefinition{Sample}{4}{sample-4} + +The previous examples differ from the previous set in that they push these hang +related glue nodes before the left and after the right skip. As I couldn't make +up my mind yet, I let \LUAMETATEX\ just provide both variants. + +The option to keep hang related information explicitly in the line has some +consequences. First of all, we now have glue and not some shift|/|width +combination. Second, we have introduced an incompatibility: the lines now always +have the proper width. You might have noticed that but we can show it more +explicitly. We use two parameter sets + +\startbuffer[sample-5] + \hangindent = 20pt + \hangafter = 0 +\stopbuffer + +\startbuffer[sample-6] + \hangindent =-20pt + \hangafter = 0 +\stopbuffer + +\Sample{0}{sample-5} +\Sample{4}{sample-5} + +\Sample{0}{sample-6} +\Sample{4}{sample-6} + +A not yet mention part of the normalization is that, because they are no longer +of relevance, the special local par nodes have been removed. The one that starts +a paragraph is turned into a normal directional node if needed, so that we get +properly balanced pairs of directional nodes. It must been said that the code +that does all this is a bit of a mess. We want to stay close to the original +code, but we also need to deal with all these extensions, like directions, +protrusion, extra boxes, etc. + +Not shown here is that there is a fifth mode of operation. When we enable that +level an overfull box will get a correction skip so that the right skip etc are +properly aligned. How useful this is: we'll see. + +Now, when I decide to keep this feature, which can be set at the \LUA\ end to do +the previously mentioned tasks, depending on a feature level ranging from zero to +four, I also need to check the impact on existing \CONTEXT\ code, which +(currently) is complicated by the fact that most is shared between \MKIV\ and +\LMTX, and only \LUAMETATEX\ has this normalization feature. I will probably +enable it for a while locally in order to see if there are side effects. Then, +when the code base gets adapted, we have to assume that normalization happens, so +there is no way back. + +\stopchapter + +\stopcomponent + diff --git a/doc/context/sources/general/manuals/evenmore/evenmore-style.tex b/doc/context/sources/general/manuals/evenmore/evenmore-style.tex new file mode 100644 index 000000000..07168e57c --- /dev/null +++ b/doc/context/sources/general/manuals/evenmore/evenmore-style.tex @@ -0,0 +1,67 @@ +% \enablelmtx +% \nopdfcompression + +\startenvironment evenmore-style + +\usemodule[abbreviations-smallcaps] +\usemodule[scite] + +\logo [LUAMETATEX] {LuaMeta\TeXsuffix} + +\setupbodyfont[plex,10pt] % not that ok for titling + +\setuplayout + [width=middle, + height=middle, + header=0pt, + footer=1cm, + footerdistance=5mm, + backspace=2cm, + cutspace=15mm, + topspace=2cm, + bottomspace=1cm, + style=bold, + color=maincolor] + +\setuppagenumbering + [alternative=doublesided] + +\setupwhitespace + [big] + +\setupfootertexts + [][{\getmarking[chapter]\quad\pagenumber}] + [{\pagenumber\quad\getmarking[chapter]}][] + +\definecolor + [maincolor] + [darkgray] + +\setuphead + [chapter] + [style=\bfc, + color=maincolor] + +\setuphead + [section] + [style=\bfa, + color=maincolor] + +\setuphead + [subsection] + [style=\bf, + color=maincolor] + +\setupalign + [tolerant,stretch] + +\setuptyping + [color=maincolor] + +\setuptype + [color=maincolor] + +\setupitemize + [color=maincolor] + +\stopenvironment diff --git a/doc/context/sources/general/manuals/evenmore/evenmore-titlepage.tex b/doc/context/sources/general/manuals/evenmore/evenmore-titlepage.tex new file mode 100644 index 000000000..57418800c --- /dev/null +++ b/doc/context/sources/general/manuals/evenmore/evenmore-titlepage.tex @@ -0,0 +1,45 @@ +\startcomponent evenmore-titlepage + +\environment evenmore-style + +% \usetypescriptfile[latinmodern] +% \usetypescript[mono][latin-modern] +% \definefont[MyFontA][LMTypewriter-Dark*none] +% \definefont[MyFontB][LMTypewriterVarWd-Regular*default] + +\definefont[MyFontA][MonoBold*none] +\definefont[MyFontB][Serif*default] + +\startMPpage[pagestate=stop] + +StartPage ; + + fill Page withcolor .1 ; + + numeric d ; d := PaperWidth/4 ; + + numeric w ; w := d ; + numeric h ; h := 2d ; + + draw textext.rt ("\MyFontA E") xsized d shifted (0w,PaperHeight- 36mm) withcolor "darkred" ; + draw textext.rt ("\MyFontA V") xsized d shifted (1w,PaperHeight- 36mm) withcolor "darkgreen" ; + draw textext.rt ("\MyFontA E") xsized d shifted (2w,PaperHeight- 36mm) withcolor "darkblue" ; + draw textext.rt ("\MyFontA N") xsized d shifted (3w,PaperHeight- 36mm) withcolor "darkorange" ; + draw textext.rt ("\MyFontA M") xsized d shifted (0w,PaperHeight-104mm) withcolor "darkcyan" ; + draw textext.rt ("\MyFontA O") xsized d shifted (1w,PaperHeight-104mm) withcolor "darkmagenta" ; + draw textext.rt ("\MyFontA R") xsized d shifted (2w,PaperHeight-104mm) withcolor "darkyellow" ; + draw textext.rt ("\MyFontA E") xsized d shifted (3w,PaperHeight-104mm) withcolor "darkgray" ; + +% draw textext.lft ("\MyFontB\setstrut\strut fun with") ysized 30mm shifted lrcorner Page shifted (-1cm,8cm) withcolor "white" ; +% draw textext.lft ("\MyFontB\setstrut\strut luametatex") ysized 30mm shifted lrcorner Page shifted (-1cm,5cm) withcolor "white" ; +% draw textext.lft ("\MyFontB\setstrut\strut and context") ysized 30mm shifted lrcorner Page shifted (-1cm,2cm) withcolor "white" ; + + draw textext.lft ("\MyFontB\setstrut\strut fun with") ysized 27mm shifted lrcorner Page shifted (-10mm,70mm) withcolor "white" ; + draw textext.lft ("\MyFontB\setstrut\strut luametatex") ysized 27mm shifted lrcorner Page shifted (-10mm,45mm) withcolor "white" ; + draw textext.lft ("\MyFontB\setstrut\strut and context") ysized 27mm shifted lrcorner Page shifted (-10mm,20mm) withcolor "white" ; + +StopPage ; + +\stopMPpage + +\stopcomponent diff --git a/doc/context/sources/general/manuals/evenmore/evenmore.tex b/doc/context/sources/general/manuals/evenmore/evenmore.tex new file mode 100644 index 000000000..9a5052e26 --- /dev/null +++ b/doc/context/sources/general/manuals/evenmore/evenmore.tex @@ -0,0 +1,37 @@ +\environment evenmore-style + +\dontcomplain + +\startdocument + + \component evenmore-titlepage + + \startfrontmatter + \component evenmore-contents + \stopfrontmatter + + \startbodymatter + + \component evenmore-introduction + + % \component evenmore-pi + \startchapter[title={\TEX\ and Pi}] + First in TUGboat. + \stopchapter + + % \component evenmore-fonts + \startchapter[title={Modern Type 3 fonts}] + First in TUGboat. + \stopchapter + + % \component evenmore-threesix + \startchapter[title={ThreeSix, Don Knuths first colorfont?}] + After the his new book comes out. + \stopchapter + + \component evenmore-normalization + \component evenmore-expansion + + \stopbodymatter + +\stopdocument diff --git a/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex b/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex index 6081be4f3..24dd5c65a 100644 --- a/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex +++ b/doc/context/sources/general/manuals/luametatex/luametatex-introduction.tex @@ -97,9 +97,15 @@ Hans Hagen \NC \LUATEX\ Team \EQ Hans Hagen, Hartmut Henkel, Taco Hoekwater, Luigi Scarso \NC \NR \stoptabulate -\LUAMETATEX\ development is mostly done by Hans Hagen and Alan Braslau, who love -playing with the three languages involved. Testing is done by \CONTEXT\ -developers and users. +\vfilll + +{\bf remark:} \LUAMETATEX\ development is mostly done by Hans Hagen and Alan +Braslau, who love playing with the three languages involved. Testing is done by +\CONTEXT\ developers and users. Many thanks for their patience! + +{\bf remark:} When there are non|-|intrusive features that also make sense in +\LUATEX, these will be applied in the experimental branch first, so that there is +no interference with the stable release. \stopchapter diff --git a/doc/context/sources/general/manuals/luametatex/luametatex.tex b/doc/context/sources/general/manuals/luametatex/luametatex.tex index 71a8bf48b..a0bc823bc 100644 --- a/doc/context/sources/general/manuals/luametatex/luametatex.tex +++ b/doc/context/sources/general/manuals/luametatex/luametatex.tex @@ -6,7 +6,7 @@ \startdocument [manual=LuaMeta\TeX, status=experimental, - version=2.00] + version=2.02] \component luametatex-titlepage \component luametatex-firstpage diff --git a/doc/context/sources/general/manuals/luatex/luatex-modifications.tex b/doc/context/sources/general/manuals/luatex/luatex-modifications.tex index b7ce6ca2b..747945f55 100644 --- a/doc/context/sources/general/manuals/luatex/luatex-modifications.tex +++ b/doc/context/sources/general/manuals/luatex/luatex-modifications.tex @@ -262,7 +262,10 @@ backend are decoupled as much as possible. \startitem When \lpr {adjustspacing} has value~2, hz optimization will be applied to glyphs and kerns. When the value is~3, only glyphs will be treated. A value - smaller than~2 disables this feature. + smaller than~2 disables this feature. With value of 1, font expansion is + applied after \TEX's normal paragraph breaking routines have broken the + paragraph into lines. In this case, line breaks are identical to standard + \TEX\ behavior (as with \PDFTEX). \stopitem \startitem -- cgit v1.2.3