From 6f2d249bfb4ead58ed709e59c403df9457f51982 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Fri, 4 Oct 2019 18:59:44 +0200 Subject: 2019-10-04 17:52:00 --- .../documents/general/manuals/luametafun.pdf | Bin 1668894 -> 1697401 bytes doc/context/documents/general/qrcs/setup-cs.pdf | Bin 887618 -> 887638 bytes doc/context/documents/general/qrcs/setup-de.pdf | Bin 889147 -> 889570 bytes doc/context/documents/general/qrcs/setup-en.pdf | Bin 893298 -> 893187 bytes doc/context/documents/general/qrcs/setup-fr.pdf | Bin 885344 -> 885655 bytes doc/context/documents/general/qrcs/setup-it.pdf | Bin 891141 -> 891118 bytes .../documents/general/qrcs/setup-mapping-cs.pdf | Bin 383721 -> 383962 bytes .../documents/general/qrcs/setup-mapping-de.pdf | Bin 471542 -> 471698 bytes .../documents/general/qrcs/setup-mapping-en.pdf | Bin 380233 -> 380055 bytes .../documents/general/qrcs/setup-mapping-fr.pdf | Bin 383840 -> 383753 bytes .../documents/general/qrcs/setup-mapping-it.pdf | Bin 383132 -> 383179 bytes .../documents/general/qrcs/setup-mapping-nl.pdf | Bin 382077 -> 382085 bytes .../documents/general/qrcs/setup-mapping-ro.pdf | Bin 620285 -> 620612 bytes doc/context/documents/general/qrcs/setup-nl.pdf | Bin 880641 -> 880835 bytes doc/context/documents/general/qrcs/setup-ro.pdf | Bin 885453 -> 885539 bytes doc/context/scripts/mkiv/mtx-update.html | 66 ----- doc/context/scripts/mkiv/mtx-update.man | 81 ----- doc/context/scripts/mkiv/mtx-update.xml | 33 --- .../manuals/luametafun/luametafun-fonts.tex | 328 +++++++++++++++++++++ .../manuals/luametafun/luametafun-style.tex | 9 + .../general/manuals/luametafun/luametafun.tex | 1 + 21 files changed, 338 insertions(+), 180 deletions(-) delete mode 100644 doc/context/scripts/mkiv/mtx-update.html delete mode 100644 doc/context/scripts/mkiv/mtx-update.man delete mode 100644 doc/context/scripts/mkiv/mtx-update.xml create mode 100644 doc/context/sources/general/manuals/luametafun/luametafun-fonts.tex (limited to 'doc') diff --git a/doc/context/documents/general/manuals/luametafun.pdf b/doc/context/documents/general/manuals/luametafun.pdf index d0a19a3b5..188f1f21d 100644 Binary files a/doc/context/documents/general/manuals/luametafun.pdf and b/doc/context/documents/general/manuals/luametafun.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf index 33234564e..506dfc96a 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 6b3768529..3265015ea 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 8471d15b4..51102b6e7 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 20aa6e88e..436f9f41d 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 f54ac45f8..09ba7f8cc 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 be096cfa0..c4f84e8e4 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 6af69e8e5..4a8cec63f 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 0ca8447f9..439349327 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 ece38b598..2ba16062a 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 3d1e3f394..ecd479c4b 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 a6b35b0df..0ddd7011d 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 3a9c33053..15edacd00 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 8b47f596c..d389a21cb 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 fd120f187..3ec2dc1db 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-update.html b/doc/context/scripts/mkiv/mtx-update.html deleted file mode 100644 index ed7363ca0..000000000 --- a/doc/context/scripts/mkiv/mtx-update.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - ConTeXt Minimals Updater 1.03 - - - - - -
-
ConTeXt Minimals Updater 1.03
-
-
-
-
wiki: http://contextgarden.net | mail: ntg-context@ntg.nl | website: http://www.pragma-ade.nl
-
-
-
- -
-
-

Command line options

- - - - - - - - - - - - - - - - - - - - - - -
flagvaluedescription
--platformstringplatform (windows, linux, linux-64, osx-intel, osx-ppc, linux-ppc)
--serverstringrepository url (rsync://contextgarden.net)
--modulestringrepository url (minimals)
--repositorystringspecify version (current, experimental)
--contextstringspecify version (current, latest, beta, yyyy.mm.dd)
--rsyncstringrsync binary (rsync)
--texrootstringinstallation directory (not guessed for the moment)
--enginestringtex engine (luatex, pdftex, xetex)
--modulesstringextra modules (can be list or 'all')
--fontsstringadditional fonts (can be list or 'all')
--goodiesstringextra binaries (like scite and texworks)
--forceinstead of a dryrun, do the real thing
--updateupdate minimal tree
--makealso make formats and generate file databases
--keepdon't delete unused or obsolete files
--stateupdate tree using saved state
--cygwinadapt drive specs to cygwin
--mingwassume mingw binaries being used
--silentless (or no) logging
-
-
-
- - diff --git a/doc/context/scripts/mkiv/mtx-update.man b/doc/context/scripts/mkiv/mtx-update.man deleted file mode 100644 index a4ecef639..000000000 --- a/doc/context/scripts/mkiv/mtx-update.man +++ /dev/null @@ -1,81 +0,0 @@ -.TH "mtx-update" "1" "01-01-2019" "version 1.03" "ConTeXt Minimals Updater" -.SH NAME - mtx-update - ConTeXt Minimals Updater -.SH SYNOPSIS -.B mtxrun --script update [ -.I OPTIONS ... -.B ] [ -.I FILENAMES -.B ] -.SH DESCRIPTION -.B ConTeXt Minimals Updater -.SH OPTIONS -.TP -.B --platform=string -platform (windows, linux, linux-64, osx-intel, osx-ppc, linux-ppc) -.TP -.B --server=string -repository url (rsync://contextgarden.net) -.TP -.B --module=string -repository url (minimals) -.TP -.B --repository=string -specify version (current, experimental) -.TP -.B --context=string -specify version (current, latest, beta, yyyy.mm.dd) -.TP -.B --rsync=string -rsync binary (rsync) -.TP -.B --texroot=string -installation directory (not guessed for the moment) -.TP -.B --engine=string -tex engine (luatex, pdftex, xetex) -.TP -.B --modules=string -extra modules (can be list or 'all') -.TP -.B --fonts=string -additional fonts (can be list or 'all') -.TP -.B --goodies=string -extra binaries (like scite and texworks) -.TP -.B --force -instead of a dryrun, do the real thing -.TP -.B --update -update minimal tree -.TP -.B --make -also make formats and generate file databases -.TP -.B --keep -don't delete unused or obsolete files -.TP -.B --state -update tree using saved state -.TP -.B --cygwin -adapt drive specs to cygwin -.TP -.B --mingw -assume mingw binaries being used -.TP -.B --silent -less (or no) logging -.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-update.xml b/doc/context/scripts/mkiv/mtx-update.xml deleted file mode 100644 index 818b994fd..000000000 --- a/doc/context/scripts/mkiv/mtx-update.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - mtx-update - ConTeXt Minimals Updater - 1.03 - - - - - platform (windows, linux, linux-64, osx-intel, osx-ppc, linux-ppc) - repository url (rsync://contextgarden.net) - repository url (minimals) - specify version (current, experimental) - specify version (current, latest, beta, yyyy.mm.dd) - rsync binary (rsync) - installation directory (not guessed for the moment) - tex engine (luatex, pdftex, xetex) - extra modules (can be list or 'all') - additional fonts (can be list or 'all') - extra binaries (like scite and texworks) - instead of a dryrun, do the real thing - update minimal tree - also make formats and generate file databases - don't delete unused or obsolete files - update tree using saved state - adapt drive specs to cygwin - assume mingw binaries being used - less (or no) logging - - - - diff --git a/doc/context/sources/general/manuals/luametafun/luametafun-fonts.tex b/doc/context/sources/general/manuals/luametafun/luametafun-fonts.tex new file mode 100644 index 000000000..27ea2fd00 --- /dev/null +++ b/doc/context/sources/general/manuals/luametafun/luametafun-fonts.tex @@ -0,0 +1,328 @@ +% language=us + +\environment luametafun-style + +\startcomponent luametafun-fonts + +\startchapter[title={Fonts}] + +Fonts are interesting phenomena but can also be quite hairy. Shapes can be +missing or not to your liking. There can be bugs too. Control over fonts has +always been on the agenda of \TEX\ macro packages, and \CONTEXT\ provides a lot +of control, especially in \MKIV. In \LMTX\ we add some more to that: we bring +back \METAFONT's but now in the \METAPOST\ way. A simple example shows how this +is (maybe I should say: will be) done. + +We define three simple shapes and do that (for now) in the \type {simplefun} +instance because that's what is used when generating the glyphs. + +\startbuffer +\startMPcalculation{simplefun} + vardef TestGlyphLB = + image ( + fill (unitsquare xscaled 10 yscaled 16 shifted (0,-3)) + withcolor "darkred" withtransparency (1,.5) + ; + ) + enddef ; + + vardef TestGlyphRB = + image ( + fill (unitcircle xscaled 15 yscaled 12 shifted (0,-2)) + withcolor "darkblue" withtransparency (1,.5) + ; + ) + enddef ; + + vardef TestGlyphFS = + image ( + fill (unittriangle xscaled 15 yscaled 12 shifted (0,-2)) + withcolor "darkgreen" withtransparency (1,.5) + ; + ) + enddef ; +\stopMPcalculation +\stopbuffer + +\typebuffer[option=TEX] \getbuffer + +This is not that spectacular, not is the following: + +\startbuffer +\startMPcalculation{simplefun} + lmt_registerglyphs [ + name = "test", + units = 10, % 1000 + ] ; + + lmt_registerglyph [ + category = "test", + unicode = 123, + code = "draw TestGlyphLB ;", + width = 10, % 1000 + height = 13, % 1300 + depth = 3 % 300 + ] ; + + lmt_registerglyph [ + category = "test", + unicode = 125, + code = "draw TestGlyphRB ;", + width = 15, + height = 10, + depth = 2 + ] ; + + lmt_registerglyph [ + category = "test", + unicode = "/", + code = "draw TestGlyphFS ;", + width = 15, + height = 10, + depth = 2 + ] ; + +\stopMPcalculation +\stopbuffer + +\typebuffer[option=TEX] \getbuffer + +We now define a font. We always use a font as starting point which has the +advantage that we always get something reasonable when we test. Of course you can +use this \type {mps} font feature with other fonts too. + +\startbuffer +\definefontfeature[metapost][metapost=test] % or: mps={category=test} + +\definefont[MyFontA][Serif*metapost @ 10bp] +\definefont[MyFontB][Serif*metapost @ 12bp] +\stopbuffer + +\typebuffer[option=TEX] \getbuffer + +These fonts can now be used: + +\startbuffer +\MyFontA \dorecurse{20}{\{ /#1/ \} }\par +\MyFontB \dorecurse{20}{\{ /#1/ \} }\par +\stopbuffer + +\typebuffer[option=TEX] + +We get some useless text but it demonstrates the idea: + +{\getbuffer} + +If you know a bit more about \CONTEXT\ you could think: so what, wasn't this +already possible? Sure, there are various ways to achieve similar effects, but +the method described here has a few advantages: it's relatively easy and we're +talking about real fonts here. This means that using the shapes for characters is +pretty efficient. + +A more realistic example is given next. It is a subset of what is available in +the \CONTEXT\ core. + +\startbuffer +\startMPcalculation{simplefun} + + pen SymbolPen ; SymbolPen := pencircle scaled 1/4 ; + + vardef SymbolBullet = + fill unitcircle scaled 3 shifted (1.5,1.5) withpen SymbolPen + enddef ; + vardef SymbolSquare = + draw unitsquare scaled (3-1/16) shifted (1.5,1.5) withpen SymbolPen + enddef ; + vardef SymbolBlackDiamond = + fillup unitdiamond scaled (3-1/16) shifted (1.5,1.5) withpen SymbolPen + enddef ; + vardef SymbolNotDef = + draw center unitcircle + scaled 3 + shifted (1.5,1.5) + withpen SymbolPen scaled 4 + enddef ; + + lmt_registerglyphs [ + name = "symbols", + units = 10, + usecolor = true, + width = 6, + height = 6, + depth = 0, + code = "SymbolNotDef ;", + ] ; + + lmt_registerglyph [ category = "symbols", unicode = "0x2022", + code = "SymbolBullet ;" + ] ; + lmt_registerglyph [ category = "symbols", unicode = "0x25A1", + code = "SymbolSquare ;" + ] ; + lmt_registerglyph [ category = "symbols", unicode = "0x25C6", + code = "SymbolBlackDiamond ;" + ] ; +\stopMPcalculation +\stopbuffer + +\typebuffer[option=TEX] \getbuffer + +We could use these symbols in for instance itemize symbols. You might notice the +potential difference in bullets: + +\startbuffer +\definefontfeature[metapost][metapost=symbols] + +\definefont[MyFont] [Serif*metapost sa 1] + +\startitemize[packed] + \startitem {\MyFont • □ ◆}\quad Regular rendering. \stopitem + \startitem {\MyFont\red • □ ◆}\quad Rendering with color. \stopitem + \startitem {\MyFont\blue\showglyphs • □ ◆}\quad Idem but with boundingboxes shown. \stopitem +\stopitemize +\stopbuffer + +\typebuffer[option=TEX] \getbuffer + +When blown up, these symbols look as follows: + +\startlinecorrection +\scale[width=\textwidth]{% + {\MyFont •□◆}% + {\MyFont\red •□◆}% + {\MyFont\blue\showglyphs •□◆}% +} +\stoplinecorrection + +You can use these tricks with basically any font, so also with math fonts. +However, at least for now, you need to define these before the font gets loaded. + +\startbuffer +\startMPcalculation{simplefun} + + pen KindergartenPen ; KindergartenPen := pencircle scaled 1 ; + + % 10 x 10 grid + + vardef KindergartenEqual = + draw image + ( + draw (2,6) -- (9,5) ; + draw (2,4) -- (8,3) ; + ) + shifted (0,-2) + withpen KindergartenPen + withcolor "KindergartenEqual" + enddef ; + vardef KindergartenPlus = + draw image + ( + draw (1,4) -- (9,5) ; + draw (4,1) -- (5,8) ; + ) + shifted (0,-2) + withpen KindergartenPen + withcolor "KindergartenPlus" + enddef ; + vardef KindergartenMinus = + draw image + ( + draw (1,5) -- (9,4) ; + ) + shifted (0,-2) + withpen KindergartenPen + withcolor "KindergartenMinus" + enddef ; + vardef KindergartenTimes = + draw image + ( + draw (2,1) -- (9,8) ; + draw (8,1) -- (2,8) ; + ) + shifted (0,-2) + withpen KindergartenPen + withcolor "KindergartenTimes" + enddef ; + vardef KindergartenDivided = + draw image + ( + draw (2,1) -- (8,9) ; + ) + shifted (0,-2) + withpen KindergartenPen + withcolor "KindergartenDivided" + enddef ; + + lmt_registerglyphs [ + name = "kindergarten", + units = 10, + % usecolor = true, + width = 10, + height = 8, + depth = 2, + ] ; + + lmt_registerglyph [ category = "kindergarten", unicode = "0x003D", + code = "KindergartenEqual" + ] ; + lmt_registerglyph [ category = "kindergarten", unicode = "0x002B", + code = "KindergartenPlus" + ] ; + lmt_registerglyph [ category = "kindergarten", unicode = "0x2212", + code = "KindergartenMinus" + ] ; + lmt_registerglyph [ category = "kindergarten", unicode = "0x00D7", + code = "KindergartenTimes" + ] ; + lmt_registerglyph [ category = "kindergarten", unicode = "0x002F", + code = "KindergartenDivided" + ] ; + +\stopMPcalculation +\stopbuffer + +\typebuffer[option=TEX] \getbuffer + +We also define the colors. If we leave \type {usecolor} to true, the text colors +will be taken. + +\startbuffer[definitions] +\definecolor[KindergartenEqual] [darkgreen] +\definecolor[KindergartenPlus] [darkred] +\definecolor[KindergartenMinus] [darkred] +\definecolor[KindergartenTimes] [darkblue] +\definecolor[KindergartenDivided][darkblue] + +\definefontfeature[mathextra][metapost=kindergarten] +\stopbuffer + +\typebuffer[definitions][option=TEX] \getbuffer[definitions] + +Here is an example: + +\starttyping +\switchtobodyfont[cambria] + +$ y = 2 \times x + a - b / 3 $ +\stoptyping + +Scaled up: + +\startlinecorrection + \switchtobodyfont[cambria] + \scale[width=\textwidth]{$ y = 2 \times x + a - b / 3 $} +\stoplinecorrection + +Of course this won't work out well (yet) with extensible yet, due to related +definitions for which we don't have an interface yet. There is one thing that you +need to keep in mind: the fonts are flushed when the document gets finalized so +you have to make sure that colors are defined at the level that they are still +valid at that time. So best put color definitions like the above in the document +style. + +This is an experimental interface anyway so we don't explain the parameters yet +as there might be more of them. + +\stopchapter + +\stopcomponent diff --git a/doc/context/sources/general/manuals/luametafun/luametafun-style.tex b/doc/context/sources/general/manuals/luametafun/luametafun-style.tex index df469d0c0..63eb7e375 100644 --- a/doc/context/sources/general/manuals/luametafun/luametafun-style.tex +++ b/doc/context/sources/general/manuals/luametafun/luametafun-style.tex @@ -52,4 +52,13 @@ [before=, after=] +% sectionblocks keep things local and we need these colors very late, +% when we flush fonts + +\definecolor[KindergartenEqual] [darkgreen] +\definecolor[KindergartenPlus] [darkred] +\definecolor[KindergartenMinus] [darkred] +\definecolor[KindergartenTimes] [darkblue] +\definecolor[KindergartenDivided][darkblue] + \stopenvironment diff --git a/doc/context/sources/general/manuals/luametafun/luametafun.tex b/doc/context/sources/general/manuals/luametafun/luametafun.tex index 6f5aff173..52b7a6800 100644 --- a/doc/context/sources/general/manuals/luametafun/luametafun.tex +++ b/doc/context/sources/general/manuals/luametafun/luametafun.tex @@ -26,6 +26,7 @@ \component luametafun-function \component luametafun-chart \component luametafun-svg + \component luametafun-fonts \component luametafun-interface \stopbodymatter -- cgit v1.2.3