From 84591a31c39887dbf582df5d535f1de1a115fd62 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Wed, 17 Jan 2018 13:51:05 +0100 Subject: 2018-01-17 13:16:00 --- .../documents/general/manuals/math-mkiv.pdf | Bin 1030218 -> 1066640 bytes doc/context/documents/general/manuals/xml-mkiv.pdf | Bin 1347020 -> 1353423 bytes doc/context/documents/general/qrcs/setup-cs.pdf | Bin 842570 -> 843006 bytes doc/context/documents/general/qrcs/setup-de.pdf | Bin 842333 -> 841490 bytes doc/context/documents/general/qrcs/setup-en.pdf | Bin 846466 -> 847129 bytes doc/context/documents/general/qrcs/setup-fr.pdf | Bin 839308 -> 838488 bytes doc/context/documents/general/qrcs/setup-it.pdf | Bin 842708 -> 842766 bytes .../documents/general/qrcs/setup-mapping-cs.pdf | Bin 358669 -> 358739 bytes .../documents/general/qrcs/setup-mapping-de.pdf | Bin 437942 -> 438445 bytes .../documents/general/qrcs/setup-mapping-en.pdf | Bin 356378 -> 356176 bytes .../documents/general/qrcs/setup-mapping-fr.pdf | Bin 358874 -> 358557 bytes .../documents/general/qrcs/setup-mapping-it.pdf | Bin 357864 -> 357798 bytes .../documents/general/qrcs/setup-mapping-nl.pdf | Bin 357617 -> 357595 bytes .../documents/general/qrcs/setup-mapping-ro.pdf | Bin 623889 -> 624442 bytes doc/context/documents/general/qrcs/setup-nl.pdf | Bin 835647 -> 836339 bytes doc/context/documents/general/qrcs/setup-ro.pdf | Bin 838383 -> 837324 bytes doc/context/scripts/mkiv/mtx-interface.html | 3 + doc/context/scripts/mkiv/mtx-interface.man | 6 ++ doc/context/scripts/mkiv/mtx-interface.xml | 4 + .../sources/general/fonts/fonts/fonts-features.tex | 26 +++++ .../sources/general/fonts/fonts/fonts-tricks.tex | 119 +++++++++++++++++++++ .../general/manuals/math/math-alignments.tex | 44 ++++++++ .../sources/general/manuals/xml/xml-mkiv.tex | 83 ++++++++++++++ 23 files changed, 285 insertions(+) (limited to 'doc') diff --git a/doc/context/documents/general/manuals/math-mkiv.pdf b/doc/context/documents/general/manuals/math-mkiv.pdf index 19fcecf13..a494cc5e1 100644 Binary files a/doc/context/documents/general/manuals/math-mkiv.pdf and b/doc/context/documents/general/manuals/math-mkiv.pdf differ diff --git a/doc/context/documents/general/manuals/xml-mkiv.pdf b/doc/context/documents/general/manuals/xml-mkiv.pdf index c5c3a5f95..78f6ffa1c 100644 Binary files a/doc/context/documents/general/manuals/xml-mkiv.pdf and b/doc/context/documents/general/manuals/xml-mkiv.pdf differ diff --git a/doc/context/documents/general/qrcs/setup-cs.pdf b/doc/context/documents/general/qrcs/setup-cs.pdf index cd9954bb7..54cc322f5 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 85d4d24da..5294f7a00 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 a5ba5a662..7e2e1b944 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 de6dcbbd2..da3ad295b 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 8d4a71209..4abc650cf 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 0a3ef98ec..d6d89b13d 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 6447d100a..599fa5d4d 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 97c6edb1f..fb22c21d5 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 ee2912cc9..35238467e 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 447ac5c12..7b11665db 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 548415194..50e566d8a 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 84ede4333..fe7de7dc7 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 31b39c1ac..b39ba452e 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 95f3d1223..3311cab3e 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-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 @@ --textcreate text files for commands and environments --rawreport commands to the console --checkgenerate check file + --meaningreport the mening of commands --toutfreplace named characters by utf --preprocesspreprocess mkvi files to tex files [force,suffix] --suffixuse given suffix for output files --forceforce action even when in doubt + + --patterna pattern for meaning lookups
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 @@ create text files for commands and environments report commands to the console generate check file + report the mening of commands replace named characters by utf @@ -30,6 +31,9 @@ use given suffix for output files force action even when in doubt + + a pattern for meaning lookups + 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] + + + beta + + +\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}] -- cgit v1.2.3