diff options
author | Hans Hagen <pragma@wxs.nl> | 2019-12-05 19:41:53 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg@phi-gamma.net> | 2019-12-05 19:41:53 +0100 |
commit | 58b7dfe85b124eaccc2d2f1018d9e4bc881acbbd (patch) | |
tree | e19992f1d506b43ddb3894d404f8082629015d7b /doc | |
parent | 4af09333cc14015426fc193878c1a35157207518 (diff) | |
download | context-58b7dfe85b124eaccc2d2f1018d9e4bc881acbbd.tar.gz |
2019-12-05 18:54:00
Diffstat (limited to 'doc')
31 files changed, 602 insertions, 228 deletions
diff --git a/doc/context/documents/general/manuals/evenmore.pdf b/doc/context/documents/general/manuals/evenmore.pdf Binary files differnew file mode 100644 index 000000000..e8f7e737c --- /dev/null +++ b/doc/context/documents/general/manuals/evenmore.pdf diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf Binary files differindex f43b60427..31bb06864 100644 --- a/doc/context/documents/general/qrcs/setup-cs.pdf +++ b/doc/context/documents/general/qrcs/setup-cs.pdf diff --git a/doc/context/documents/general/qrcs/setup-de.pdf b/doc/context/documents/general/qrcs/setup-de.pdf Binary files differindex ff28cf5a0..e3ace250f 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 078c2dd7a..12d7ad595 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 2f3f96b7d..b9d18b6e1 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 1d9054018..c78a1f578 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-cs.pdf b/doc/context/documents/general/qrcs/setup-mapping-cs.pdf Binary files differindex 7a04cccd3..9708078cd 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-cs.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-cs.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 35ff02d7f..546aa5f31 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 52cd92931..bfc546f37 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 9f4321f5d..506d92d93 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 96373f848..f9d44c4ae 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 5a7d5f114..94cf16b02 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-mapping-ro.pdf b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf Binary files differindex 33d2719cc..6f19eb84c 100644 --- a/doc/context/documents/general/qrcs/setup-mapping-ro.pdf +++ b/doc/context/documents/general/qrcs/setup-mapping-ro.pdf diff --git a/doc/context/documents/general/qrcs/setup-nl.pdf b/doc/context/documents/general/qrcs/setup-nl.pdf Binary files differindex d254b787b..b0b530e51 100644 --- a/doc/context/documents/general/qrcs/setup-nl.pdf +++ b/doc/context/documents/general/qrcs/setup-nl.pdf diff --git a/doc/context/documents/general/qrcs/setup-ro.pdf b/doc/context/documents/general/qrcs/setup-ro.pdf Binary files differindex 91bfdc213..b9a54628e 100644 --- a/doc/context/documents/general/qrcs/setup-ro.pdf +++ b/doc/context/documents/general/qrcs/setup-ro.pdf 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 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - -<!-- compare with lmx framework variant --> - -<!-- - filename : context-base.xml - comment : companion to mtx-server-ctx-startup.tex - author : Hans Hagen, PRAGMA-ADE, Hasselt NL - copyright: PRAGMA ADE / ConTeXt Development Team - license : see context related readme files ---> - -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> - <head> - <title>ConTeXt Font Database Management 0.21</title> - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> - <style type="text/css"> - body { color: #FFFFFF; background-color: #808080; font-family: optima, verdana, futura, "lucida sans", arial, geneva, helvetica, sans; font-size: 12px; line-height: 18px; } a:link, a:active, a:visited { color: #FFFFFF; } a.dir-view:link, a.dir-view:active, a.dir-view:visited { color: #FFFFFF; text-decoration: underline; } .valid { color: #00FF00; } .invalid { color: #FF0000; } .invisible { visibility: hidden; } button, .commonlink, .smallbutton { font-weight: bold; font-size: 12px; text-decoration: none; color: #000000; border-color: #7F7F7F; border-style: solid; border-width: .125ex; background-color: #FFFFFF; padding: .5ex; } .smallbutton { width: 1em; } a.commonlink:link, a.commonlink:active, a.commonlink:visited, a.smalllink:link, a.smalllink:active, a.smalllink:visited { font-weight: bold; font-size: 12px; text-decoration: none; color: #000000; } h1, .title { font-style: normal; font-weight: normal; font-size: 18px; line-height: 18px; margin-bottom: 20px; } h2, .subtitle { font-style: normal; font-weight: normal; font-size: 12px; margin-top: 18px; margin-bottom: 18px; } table { line-height: 18px; font-size: 12px; margin: 0; } th { font-weight: bold; text-align: left; padding-bottom: 6px; } .tc { font-weight: bold; text-align: left; } p, li { max-width: 60em; } .empty-line { margin-top: 4px; } .more-room { margin-right: 1.5em; } .much-more-room { margin-right: 3em; } #main { position: absolute; left: 10%; top: 10%; right: 10%; bottom: 10%; z-index: 2; width: 80%; height: 80%; padding: 0%; margin: 0%; overflow: auto; border-style: none; border-width: 0; background-color: #3F3F3F; } #main-settings { margin: 12px; x_max-width: 60em; line-height: 18px; font-size: 12px; } #left { position: absolute; top : 10%; left: 0%; bottom: 0%; right: 90%; z-index: 1; width: 10%; height: 90%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #4F6F6F; } #right { position: absolute; top : 0%; left: 90%; bottom: 10%; right: 0%; z-index: 1; width: 10%; height: 90%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #4F6F6F; _margin-left: -15px; } #bottom { position: absolute; left: 10%; right: 0%; top: 90%; bottom: 0%; z-index: 1; width: 90%; height: 10%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #6F6F8F; } #top { position: absolute; left: 0%; right: 10%; top: 0%; bottom: 90%; z-index: 1; width: 90%; height: 10%; padding: 0%; margin: 0%; font-size: 16px; border-style: none; border-width: 0; background-color: #6F6F8F; } #top-one { position: absolute; bottom: 50%; width: 100%; buggedheight: 100%; } #top-two { position: relative; margin-bottom: -9px; margin-left: 12px; margin-right: 12px; line-height: 18px; text-align: right; vertical-align: middle; } #bottom-one { position: absolute; bottom: 50%; width: 100%; buggedheight: 100%; } #bottom-two { position: relative; margin-bottom: -9px; margin-left: 12px; margin-right: 12px; line-height: 18px; text-align: left; vertical-align: middle; } #left-one { position: absolute; width: 100%; buggedheight: 100%; } #left-two { position: relative; margin-top: 12px; line-height: 18px; text-align: center; vertical-align: top; } #right-one { display: table; height: 100%; width: 100%; } #right-two { display: table-row; height: 100%; width: 100%; } #right-three { display: table-cell; width: 100%; vertical-align: bottom; _position: absolute; _top: 100%; } #right-four { text-align: center; margin-bottom: 2ex; _position: relative; _top: -100%; } #more-top { position: absolute; top: 0%; left: 90%; bottom: 90%; right: 0%; z-index: 3; width: 10%; height: 10%; padding: 0%; margin: 0%; border-style: none; border-width: 0; } #more-top-settings { text-align: center; } #more-right-settings { margin-right: 12px; margin-left: 12px; line-height: 18px; font-size: 10px; text-align: center; } #right-safari { _display: table; width: 100%; height: 100%; } - </style> - <style type="text/css"> - </style> - </head> - <body> - <div id="top"> <div id="top-one"> - <div id="top-two">ConTeXt Font Database Management 0.21 </div> - </div> - </div> - <div id="bottom"> <div id="bottom-one"> - <div id="bottom-two">wiki: http://contextgarden.net | mail: ntg-context@ntg.nl | website: http://www.pragma-ade.nl</div> - </div> - </div> - <div id="left"></div> - <div id="right"></div> - <div id="main"> - <div id='main-settings'> - <h1>Command line options</h1> -<table> - <tr><th style="width: 10em">flag</th><th style="width: 8em">value</th><th>description</th></tr> - <tr><th/><td/><td/></tr> - <tr><th>--convert</th><td></td><td>save open type font in raw table</td></tr> - <tr><th>--unpack</th><td></td><td>save a tma file in a more readable format</td></tr> - <tr><th/><td/><td/></tr> - <tr><th>--reload</th><td></td><td>generate new font database (use --force when in doubt)</td></tr> - <tr><th>--reload</th><td></td><td>--simple:generate luatex-fonts-names.lua (not for context!)</td></tr> - <tr><th/><td/><td/></tr> - <tr><th>--list</th><td></td><td>--name: list installed fonts, filter by name [--pattern]</td></tr> - <tr><th>--list</th><td></td><td>--spec: list installed fonts, filter by spec [--filter]</td></tr> - <tr><th>--list</th><td></td><td>--file: list installed fonts, filter by file [--pattern]</td></tr> - <tr><th/><td/><td/></tr> - <tr><th>--pattern</th><td>str</td><td>filter files using pattern</td></tr> - <tr><th>--filter</th><td>list</td><td>key-value pairs</td></tr> - <tr><th>--all</th><td></td><td>show all found instances (combined with other flags)</td></tr> - <tr><th>--info</th><td></td><td>give more details</td></tr> - <tr><th>--trackers</th><td>list</td><td>enable trackers</td></tr> - <tr><th>--statistics</th><td></td><td>some info about the database</td></tr> - <tr><th>--names</th><td></td><td>use name instead of unicodes</td></tr> - <tr><th>--cache</th><td>str</td><td>use specific cache (otl or otf)</td></tr> - </table> -<br/> -<h1>Examples</h1> -<tt>mtxrun --script font --list somename (== --pattern=*somename*)</tt> -<br/><br/><tt>mtxrun --script font --list --name somename</tt> -<br/><tt>mtxrun --script font --list --name --pattern=*somename*</tt> -<br/><br/><tt>mtxrun --script font --list --spec somename</tt> -<br/><tt>mtxrun --script font --list --spec somename-bold-italic</tt> -<br/><tt>mtxrun --script font --list --spec --pattern=*somename*</tt> -<br/><tt>mtxrun --script font --list --spec --filter="fontname=somename"</tt> -<br/><tt>mtxrun --script font --list --spec --filter="familyname=somename,weight=bold,style=italic,width=condensed"</tt> -<br/><tt>mtxrun --script font --list --spec --filter="familyname=crap*,weight=bold,style=italic"</tt> -<br/><br/><tt>mtxrun --script font --list --all</tt> -<br/><tt>mtxrun --script font --list --file somename</tt> -<br/><tt>mtxrun --script font --list --file --all somename</tt> -<br/><tt>mtxrun --script font --list --file --pattern=*somename*</tt> -<br/><br/><tt>mtxrun --script font --convert texgyrepagella-regular.otf</tt> -<br/><tt>mtxrun --script font --convert --names texgyrepagella-regular.otf</tt> -<br/><br/> </div> - </div> - </body> -</html> 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 @@ -<?xml version="1.0"?> -<application> - <metadata> - <entry name="name">mtx-fonts</entry> - <entry name="detail">ConTeXt Font Database Management</entry> - <entry name="version">1.00</entry> - </metadata> - <flags> - <category name="basic"> - <subcategory> - <flag name="convert"><short>save open type font in raw table</short></flag> - <flag name="unpack"><short>save a tma file in a more readable format</short></flag> - </subcategory> - <subcategory> - <flag name="reload"><short>generate new font database (use <ref name="force"/> when in doubt)</short></flag> - <flag name="reload"><short><ref name="simple"/>:generate luatex-fonts-names.lua (not for context!)</short></flag> - </subcategory> - <subcategory> - <flag name="list"><short><ref name="name"/>: list installed fonts, filter by name [<ref name="pattern"/>]</short></flag> - <flag name="list"><short><ref name="spec"/>: list installed fonts, filter by spec [<ref name="filter"/>]</short></flag> - <flag name="list"><short><ref name="file"/>: list installed fonts, filter by file [<ref name="pattern"/>]</short></flag> - </subcategory> - <subcategory> - <flag name="pattern" value="str"><short>filter files using pattern</short></flag> - <flag name="filter" value="list"><short>key-value pairs</short></flag> - <flag name="all"><short>show all found instances (combined with other flags)</short></flag> - <flag name="info"><short>give more details</short></flag> - <flag name="trackers" value="list"><short>enable trackers</short></flag> - <flag name="statistics"><short>some info about the database</short></flag> - <flag name="names"><short>use name instead of unicodes</short></flag> - <flag name="cache" value="str"><short>use specific cache (otl or otf)</short></flag> - </subcategory> - </category> - </flags> - <examples> - <category> - <title>Examples</title> - <subcategory> - <example><command>mtxrun --script font --list somename (== --pattern=*somename*)</command></example> - </subcategory> - <subcategory> - <example><command>mtxrun --script font --list --name somename</command></example> - <example><command>mtxrun --script font --list --name --pattern=*somename*</command></example> - </subcategory> - <subcategory> - <example><command>mtxrun --script font --list --spec somename</command></example> - <example><command>mtxrun --script font --list --spec somename-bold-italic</command></example> - <example><command>mtxrun --script font --list --spec --pattern=*somename*</command></example> - <example><command>mtxrun --script font --list --spec --filter="fontname=somename"</command></example> - <example><command>mtxrun --script font --list --spec --filter="familyname=somename,weight=bold,style=italic,width=condensed"</command></example> - <example><command>mtxrun --script font --list --spec --filter="familyname=crap*,weight=bold,style=italic"</command></example> - </subcategory> - <subcategory> - <example><command>mtxrun --script font --list --all</command></example> - <example><command>mtxrun --script font --list --file somename</command></example> - <example><command>mtxrun --script font --list --file --all somename</command></example> - <example><command>mtxrun --script font --list --file --pattern=*somename*</command></example> - </subcategory> - <subcategory> - <example><command>mtxrun --script font --convert texgyrepagella-regular.otf</command></example> - <example><command>mtxrun --script font --convert --names texgyrepagella-regular.otf</command></example> - </subcategory> - </category> - </examples> -</application> 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 @@ <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 files in archive</td></tr> - <tr><th>--junk</th><td></td><td>flatten unzipped directory structure</td></tr> - <tr><th>--extract</th><td></td><td>extract files</td></tr> + <tr><th>--extract</th><td></td><td>extract files [--silent --steps]</td></tr> </table> <br/> </div> 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 @@ <category name="basic"> <subcategory> <flag name="list"><short>list files in archive</short></flag> - <flag name="junk"><short>flatten unzipped directory structure</short></flag> - <flag name="extract"><short>extract files</short></flag> + <flag name="extract"><short>extract files [--silent --steps]</short></flag> </subcategory> </category> </flags> 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 |