diff options
Diffstat (limited to 'doc')
21 files changed, 338 insertions, 180 deletions
diff --git a/doc/context/documents/general/manuals/luametafun.pdf b/doc/context/documents/general/manuals/luametafun.pdf Binary files differindex d0a19a3b5..188f1f21d 100644 --- a/doc/context/documents/general/manuals/luametafun.pdf +++ b/doc/context/documents/general/manuals/luametafun.pdf diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf Binary files differindex 33234564e..506dfc96a 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 6b3768529..3265015ea 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 8471d15b4..51102b6e7 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 20aa6e88e..436f9f41d 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 f54ac45f8..09ba7f8cc 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 be096cfa0..c4f84e8e4 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 6af69e8e5..4a8cec63f 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 0ca8447f9..439349327 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 ece38b598..2ba16062a 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 3d1e3f394..ecd479c4b 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 a6b35b0df..0ddd7011d 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 3a9c33053..15edacd00 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 8b47f596c..d389a21cb 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 fd120f187..3ec2dc1db 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-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 @@ -<?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 Minimals Updater 1.03</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 Minimals Updater 1.03 </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>--platform</th><td>string</td><td>platform (windows, linux, linux-64, osx-intel, osx-ppc, linux-ppc)</td></tr> - <tr><th>--server</th><td>string</td><td>repository url (rsync://contextgarden.net)</td></tr> - <tr><th>--module</th><td>string</td><td>repository url (minimals)</td></tr> - <tr><th>--repository</th><td>string</td><td>specify version (current, experimental)</td></tr> - <tr><th>--context</th><td>string</td><td>specify version (current, latest, beta, yyyy.mm.dd)</td></tr> - <tr><th>--rsync</th><td>string</td><td>rsync binary (rsync)</td></tr> - <tr><th>--texroot</th><td>string</td><td>installation directory (not guessed for the moment)</td></tr> - <tr><th>--engine</th><td>string</td><td>tex engine (luatex, pdftex, xetex)</td></tr> - <tr><th>--modules</th><td>string</td><td>extra modules (can be list or 'all')</td></tr> - <tr><th>--fonts</th><td>string</td><td>additional fonts (can be list or 'all')</td></tr> - <tr><th>--goodies</th><td>string</td><td>extra binaries (like scite and texworks)</td></tr> - <tr><th>--force</th><td></td><td>instead of a dryrun, do the real thing</td></tr> - <tr><th>--update</th><td></td><td>update minimal tree</td></tr> - <tr><th>--make</th><td></td><td>also make formats and generate file databases</td></tr> - <tr><th>--keep</th><td></td><td>don't delete unused or obsolete files</td></tr> - <tr><th>--state</th><td></td><td>update tree using saved state</td></tr> - <tr><th>--cygwin</th><td></td><td>adapt drive specs to cygwin</td></tr> - <tr><th>--mingw</th><td></td><td>assume mingw binaries being used</td></tr> - <tr><th>--silent</th><td></td><td>less (or no) logging</td></tr> - </table> -<br/> - </div> - </div> - </body> -</html> 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 @@ -<?xml version="1.0"?> -<application> - <metadata> - <entry name="name">mtx-update</entry> - <entry name="detail">ConTeXt Minimals Updater</entry> - <entry name="version">1.03</entry> - </metadata> - <flags> - <category name="basic"> - <subcategory> - <flag name="platform" value="string"><short>platform (windows, linux, linux-64, osx-intel, osx-ppc, linux-ppc)</short></flag> - <flag name="server" value="string"><short>repository url (rsync://contextgarden.net)</short></flag> - <flag name="module" value="string"><short>repository url (minimals)</short></flag> - <flag name="repository" value="string"><short>specify version (current, experimental)</short></flag> - <flag name="context" value="string"><short>specify version (current, latest, beta, yyyy.mm.dd)</short></flag> - <flag name="rsync" value="string"><short>rsync binary (rsync)</short></flag> - <flag name="texroot" value="string"><short>installation directory (not guessed for the moment)</short></flag> - <flag name="engine" value="string"><short>tex engine (luatex, pdftex, xetex)</short></flag> - <flag name="modules" value="string"><short>extra modules (can be list or 'all')</short></flag> - <flag name="fonts" value="string"><short>additional fonts (can be list or 'all')</short></flag> - <flag name="goodies" value="string"><short>extra binaries (like scite and texworks)</short></flag> - <flag name="force"><short>instead of a dryrun, do the real thing</short></flag> - <flag name="update"><short>update minimal tree</short></flag> - <flag name="make"><short>also make formats and generate file databases</short></flag> - <flag name="keep"><short>don't delete unused or obsolete files</short></flag> - <flag name="state"><short>update tree using saved state</short></flag> - <flag name="cygwin"><short>adapt drive specs to cygwin</short></flag> - <flag name="mingw"><short>assume mingw binaries being used</short></flag> - <flag name="silent"><short>less (or no) logging</short></flag> - </subcategory> - </category> - </flags> -</application> 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 |