diff options
author | Hans Hagen <pragma@wxs.nl> | 2018-01-17 13:51:05 +0100 |
---|---|---|
committer | Context Git Mirror Bot <phg42.2a@gmail.com> | 2018-01-17 13:51:05 +0100 |
commit | 84591a31c39887dbf582df5d535f1de1a115fd62 (patch) | |
tree | 1c4613a1c79db3cdfb41b977c64e993492fbdd88 /doc | |
parent | a16cd078a5cc00d7c789093b5209b6f8d2dfdb1a (diff) | |
download | context-84591a31c39887dbf582df5d535f1de1a115fd62.tar.gz |
2018-01-17 13:16:00
Diffstat (limited to 'doc')
23 files changed, 285 insertions, 0 deletions
diff --git a/doc/context/documents/general/manuals/math-mkiv.pdf b/doc/context/documents/general/manuals/math-mkiv.pdf Binary files differindex 19fcecf13..a494cc5e1 100644 --- a/doc/context/documents/general/manuals/math-mkiv.pdf +++ b/doc/context/documents/general/manuals/math-mkiv.pdf diff --git a/doc/context/documents/general/manuals/xml-mkiv.pdf b/doc/context/documents/general/manuals/xml-mkiv.pdf Binary files differindex c5c3a5f95..78f6ffa1c 100644 --- a/doc/context/documents/general/manuals/xml-mkiv.pdf +++ b/doc/context/documents/general/manuals/xml-mkiv.pdf diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf Binary files differindex cd9954bb7..54cc322f5 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 85d4d24da..5294f7a00 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 a5ba5a662..7e2e1b944 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 de6dcbbd2..da3ad295b 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 8d4a71209..4abc650cf 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 0a3ef98ec..d6d89b13d 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 6447d100a..599fa5d4d 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 97c6edb1f..fb22c21d5 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 ee2912cc9..35238467e 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 447ac5c12..7b11665db 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 548415194..50e566d8a 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 84ede4333..fe7de7dc7 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 31b39c1ac..b39ba452e 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 95f3d1223..3311cab3e 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-interface.html b/doc/context/scripts/mkiv/mtx-interface.html index a4c86a5a7..4098ccaa2 100644 --- a/doc/context/scripts/mkiv/mtx-interface.html +++ b/doc/context/scripts/mkiv/mtx-interface.html @@ -50,12 +50,15 @@ <tr><th>--text</th><td></td><td>create text files for commands and environments</td></tr> <tr><th>--raw</th><td></td><td>report commands to the console</td></tr> <tr><th>--check</th><td></td><td>generate check file</td></tr> + <tr><th>--meaning</th><td></td><td>report the mening of commands</td></tr> <tr><th/><td/><td/></tr> <tr><th>--toutf</th><td></td><td>replace named characters by utf</td></tr> <tr><th>--preprocess</th><td></td><td>preprocess mkvi files to tex files [force,suffix]</td></tr> <tr><th/><td/><td/></tr> <tr><th>--suffix</th><td></td><td>use given suffix for output files</td></tr> <tr><th>--force</th><td></td><td>force action even when in doubt</td></tr> + <tr><th/><td/><td/></tr> + <tr><th>--pattern</th><td></td><td>a pattern for meaning lookups</td></tr> </table> <br/> </div> diff --git a/doc/context/scripts/mkiv/mtx-interface.man b/doc/context/scripts/mkiv/mtx-interface.man index 7dab0d528..2dbba85df 100644 --- a/doc/context/scripts/mkiv/mtx-interface.man +++ b/doc/context/scripts/mkiv/mtx-interface.man @@ -38,6 +38,9 @@ report commands to the console .B --check generate check file .TP +.B --meaning +report the mening of commands +.TP .B --toutf replace named characters by utf .TP @@ -49,6 +52,9 @@ use given suffix for output files .TP .B --force force action even when in doubt +.TP +.B --pattern +a pattern for meaning lookups .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-interface.xml b/doc/context/scripts/mkiv/mtx-interface.xml index 495154004..5faff8507 100644 --- a/doc/context/scripts/mkiv/mtx-interface.xml +++ b/doc/context/scripts/mkiv/mtx-interface.xml @@ -21,6 +21,7 @@ <flag name="text"><short>create text files for commands and environments</short></flag> <flag name="raw"><short>report commands to the console</short></flag> <flag name="check"><short>generate check file</short></flag> + <flag name="meaning"><short>report the mening of commands</short></flag> </subcategory> <subcategory> <flag name="toutf"><short>replace named characters by utf</short></flag> @@ -30,6 +31,9 @@ <flag name="suffix"><short>use given suffix for output files</short></flag> <flag name="force"><short>force action even when in doubt</short></flag> </subcategory> + <subcategory> + <flag name="pattern"><short>a pattern for meaning lookups</short></flag> + </subcategory> </category> </flags> </application> diff --git a/doc/context/sources/general/fonts/fonts/fonts-features.tex b/doc/context/sources/general/fonts/fonts/fonts-features.tex index 64cb164f6..48121b51f 100644 --- a/doc/context/sources/general/fonts/fonts/fonts-features.tex +++ b/doc/context/sources/general/fonts/fonts/fonts-features.tex @@ -2708,6 +2708,32 @@ do do: \startsection[title=Spacekerns] +Some fonts kern glyphs with spaces. Although \TEX\ doesn't really have spaces we do +support this. However, it's implemented as part of kerning so when you define such +kerns you need to hook it into for instance the \type {kern} feature: + +\starttyping +\startluacode + local kern = -50 + local pair = { [32] = kern } + + fonts.handlers.otf.addfeature { + name = "kern", -- spacekerns assume kern + type = "kern", + data = { + A = pair, V = pair, W = pair, + [32] = { + A = kern, + V = kern, + W = kern, + }, + } + } +\stopluacode +\stoptyping + +Of course this depends on font properties so one can wonder how useful this is. + \stopsection \stopchapter diff --git a/doc/context/sources/general/fonts/fonts/fonts-tricks.tex b/doc/context/sources/general/fonts/fonts/fonts-tricks.tex index 6596a43fb..86517bd57 100644 --- a/doc/context/sources/general/fonts/fonts/fonts-tricks.tex +++ b/doc/context/sources/general/fonts/fonts/fonts-tricks.tex @@ -180,4 +180,123 @@ controlled by a directive (beware: enabling them is global). \stopsection +\startsection[title=Symbols] + +You can access glyphs by name but you need to know that name, for example: + +\startbuffer +\definefontsynonym [bends] [file:manfnt.afm] + +\startsymbolset [Dangerous Bends] + \definesymbol [dbend] [\resolvedglyphdirect{bends}{n:char_7e}] + \definesymbol [lhdbend] [\resolvedglyphdirect{bends}{n:char_7f}] +\stopsymbolset + +\setupsymbolset [Dangerous Bends] + +Two dangerous bends: \symbol{dbend} and \symbol{lhdbend}. +\stopbuffer + +\typebuffer + +You can best save the fonts you use that way in a place that doesn't get +overwritten because names can change. + +\getbuffer + +\stopsection + +\startsection[title=Alternative styles] + +\startbuffer[demo] + \start + \getbuffer[setup] + \subject{[ {\myslanted myslanted} ] [ {\it it} ] [ {\slanted slanted} ] [ $x=1$ ]} + [ {\myslanted myslanted} ] [ {\it it} ] [ {\slanted slanted} ] [ $x=1$ ] + \typebuffer[setup] + \blackrule[width=\hsize,height=1pt,depth=0pt] + \stop +\stopbuffer + +In section heads we want a nested style (e.g.\ italic) to adapt to the main font. +The following definitions shows how you can influence that process. We use the +following \type {demo} buffer as sample: + +\typebuffer[demo] + +\startbuffer +\blackrule[width=\hsize,height=1pt,depth=0pt] + +\startbuffer[setup] +\setuphead[subject][style=\tfb,before=,after=] +\definealternativestyle [myslanted] [\it] [] +\stopbuffer + +\getbuffer[demo] + +\startbuffer[setup] +\setuphead[subject][style=\tfb,before=,after=] +\definealternativestyle [myslanted] [\it] [\bi] +\stopbuffer + +\getbuffer[demo] + +\startbuffer[setup] +\setuphead[subject][style=\tfb,before=,after=] +\definealternativestyle [myslanted] [\it] [\tf] +\stopbuffer + +\getbuffer[demo] + +\startbuffer[setup] +\definealternativestyle [myslanted] [\normalitalicface] +\setuphead[subject][style=bold,before=,after=] +\stopbuffer + +\getbuffer[demo] + +\startbuffer[setup] +\definealternativestyle [myslanted] [\normalitalicface] +\setuphead[subject][style=\bfd,before=,after=] +\stopbuffer + +\getbuffer[demo] + +\startbuffer[setup] +\definealternativestyle [myslanted] [\slantedface] +\setuphead[subject][style=boldface,before=,after=] +\stopbuffer + +\getbuffer[demo] +\stopbuffer + +You can influence the main method of operation with: + +\starttyping +\setupalternativestyles[method=normal] +\setupalternativestyles[method=auto] +\stoptyping + +\startplacefigure[title={Alternative style methods.},reference=fig:alternativestyle] + \startcombination + {\setupalternativestyles[method=normal]\scale[width=.45\textwidth]{\framed[width=.85\textwidth,align=normal,frame=off,offset=overlay]{\getbuffer}}} {\type{method=normal}} + {\setupalternativestyles [method=auto]\scale[width=.45\textwidth]{\framed[width=.85\textwidth,align=normal,frame=off,offset=overlay]{\getbuffer}}} {\type{method=auto}} + \stopcombination +\stopplacefigure + +The result is shown in \in {figure} [fig:alternativestyle]. Relevant commands are: + +\starttyping +\emphasistypeface +\emphasisboldface + +\normaltypeface \typeface +\normalboldface \boldface +\normalslantedface \slantedface +\normalitalicface \italicface +\swaptypeface \swapface +\stoptyping + +\stopsection + \stopchapter diff --git a/doc/context/sources/general/manuals/math/math-alignments.tex b/doc/context/sources/general/manuals/math/math-alignments.tex index 86fedb569..bb2801b8a 100644 --- a/doc/context/sources/general/manuals/math/math-alignments.tex +++ b/doc/context/sources/general/manuals/math/math-alignments.tex @@ -248,6 +248,50 @@ with examples if you want to get an idea what is possible. \stopsection +\startsection[title={Splitting over pages}] + +Because formula placement has positioning options a formula gets +wrapped in a box. As a consequence formulas will not break across +pages. This can be an issue with alignments. There is an experimental +option for this (the result is shown in \in {figure} [fig:splitalign]): + +\startbuffer[demo] +\usemodule[art-01] +\setupbodyfont[13pt] +\starttext + \input tufte + \startplaceformula + \startsplitformula + \startalign + \NC a \EQ b \NR[+] + \NC \EQ d \NR + \NC c \EQ f \NR[+] + \NC \EQ g \NR + \NC \EQ h \NR[+] + \dorecurse{100}{\NC \EQ i + #1 - #1\NR[+]}% + \NC \EQ x \NR + \stopalign + \stopsplitformula + \stopplaceformula + \input tufte +\stoptext +\stopbuffer + +\typebuffer[demo] + +\startplacefigure[title={Splitting an alignment.},reference=fig:splitalign] + \startcombination[nx=4,ny=1] + {\typesetbuffer[demo][page=1,width=\measure{combination}]} {} + {\typesetbuffer[demo][page=2,width=\measure{combination}]} {} + {\typesetbuffer[demo][page=3,width=\measure{combination}]} {} + {\typesetbuffer[demo][page=4,width=\measure{combination}]} {} + \stopcombination +\stopplacefigure + +\stoptext + +\stopsection + \stopchapter \stopcomponent diff --git a/doc/context/sources/general/manuals/xml/xml-mkiv.tex b/doc/context/sources/general/manuals/xml/xml-mkiv.tex index ec9be1c6e..0f9c74662 100644 --- a/doc/context/sources/general/manuals/xml/xml-mkiv.tex +++ b/doc/context/sources/general/manuals/xml/xml-mkiv.tex @@ -1274,6 +1274,15 @@ The following commands return strings. Normally these are used in tests. returns the last attribute found (this avoids a lookup) \stopxmlcmd +\startxmlcmd {\cmdbasicsetup{xmlsetatt}} + set the value of attribute \cmdinternal {cd:name} +\stopxmlcmd + +\startxmlcmd {\cmdbasicsetup{xmlsetattribute}} + set the value of attribute \cmdinternal {cd:name} for each match of \cmdinternal + {cd:lpath} +\stopxmlcmd + \stopsection \startsection[title={manipulation}] @@ -1609,6 +1618,80 @@ mechanism for other purposes as well. \stopsection +\startsection[title={Parameters}] + +\startbuffer[test] +<something whatever="alpha"> + <what> + beta + </what> +</something> +\stopbuffer + +\startbuffer +\startxmlsetups xml:mysetups + \xmlsetsetup{\xmldocument}{*}{xml:*} +\stopxmlsetups + +\xmlregistersetup{xml:mysetups} + +\startxmlsetups xml:something + parameter : \xmlpar {#1}{whatever}\par + attribute : \xmlatt {#1}{whatever}\par + text : \xmlfirst {#1}{what} \par + \xmlsetpar{#1}{whatever}{gamma} + parameter : \xmlpar {#1}{whatever}\par + \xmlflush{#1} +\stopxmlsetups + +\startxmlsetups xml:what + what: \xmlflush{#1}\par + parameter : \xmlparam{#1}{..}{whatever}\par +\stopxmlsetups + +\xmlprocessbuffer{main}{test}{} +\stopbuffer + +Say that we have this \XML\ blob: + +\typebuffer[test] + +With: + +\typebuffer + +we get: + +\getbuffer + +Parameters are stored with a node. + +\startxmlcmd {\cmdbasicsetup{xmlpar}} + returns the value of parameter \cmdinternal {cd:name} or empty if no such + parameter exists +\stopxmlcmd + +\startxmlcmd {\cmdbasicsetup{xmlparam}} + finds a first match for \cmdinternal {cd:lpath} at \cmdinternal {cd:node} and + returns the value of parameter \cmdinternal {cd:name} or empty if no such + parameter exists +\stopxmlcmd + +\startxmlcmd {\cmdbasicsetup{xmllastpar}} + returns the last parameter found (this avoids a lookup) +\stopxmlcmd + +\startxmlcmd {\cmdbasicsetup{xmlsetpar}} + set the value of parameter \cmdinternal {cd:name} +\stopxmlcmd + +\startxmlcmd {\cmdbasicsetup{xmlsetparam}} + set the value of parameter \cmdinternal {cd:name} for each match of \cmdinternal + {cd:lpath} +\stopxmlcmd + +\stopsection + \stopchapter \startchapter[title={Expressions and filters}] |