diff options
author | Hans Hagen <pragma@wxs.nl> | 2004-09-17 00:00:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2004-09-17 00:00:00 +0200 |
commit | 1319dbd05208684a4d33711cb2cfdda29f7b5b8c (patch) | |
tree | a6da218b5469e0d2457e72e90556e8dc0e96b948 /tex | |
parent | 9023e950440c08502abf42d7707273ee0d0de0ea (diff) | |
download | context-1319dbd05208684a4d33711cb2cfdda29f7b5b8c.tar.gz |
stable 2004.09.17
Diffstat (limited to 'tex')
60 files changed, 599 insertions, 481 deletions
diff --git a/tex/context/base/cont-fil.tex b/tex/context/base/cont-fil.tex index 501cbf8eb..153e09ca0 100644 --- a/tex/context/base/cont-fil.tex +++ b/tex/context/base/cont-fil.tex @@ -30,6 +30,7 @@ \definefilesynonym [xml-format] [xml-01] \definefilesynonym [xml-pretty] [xml-02] +\definefilesynonym [xml-analyze] [xml-11] \definefilesynonym [fig-base] [fig-00] \definefilesynonym [fig-make] [fig-01] diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index 79eb7cf70..502c3cfe0 100644 --- a/tex/context/base/cont-new.tex +++ b/tex/context/base/cont-new.tex @@ -21,6 +21,83 @@ \writestatus{\m!systems}{beware: some patches loaded from cont-new.tex!} +\ifx\normalcompound\undefined \let\normalcompound=| \fi + +\def\checksoundtrack#1% + {\iflocation + \doifdefined{\??sd:#1}{\doifvaluesomething{\??sd:#1} + {\doinsertsoundtrack{\getvalue{\??sd:#1}}{#1}\@@sdoption + % brr, \..empty not really needed and maybe even wrong; + % also, not here but in driver + % well, no: sounds need to be reinitialize each time (i.e., be on page), so no + }}% \letgvalueempty{\??sd:#1}}}% + \fi} + +\def\placemargincontent + {\ifcase\margintextcollected\else % was level check + \bgroup + \redoconvertfont % !! + \chardef\graphicvadjustmode\zerocount + \doflushmargincontents + \egroup + \fi} + +\def\noconvertfont#1% #2% + {\doifdefinedelse{\@noletter@#1} + {\doifelsenothing{#1}\gobbleoneargument\@@donoconvertfont}\gobbleoneargument + {#1}} % {#2}} + +\appendtoks + \spacing\!!plusone % new per 10/08/2004, else problems in otr / !! needed +\to \everyforgetall + +% \dorecurse{50} +% {[before normal] \input thuan +% \placefigure{normal}{\framed[height=1cm,width=8cm]{}} +% \placefigure{normal}{\framed[height=2cm,width=8cm]{}} +% [before force] \input thuan +% \placefigure[force]{force}{\framed[height=8cm,width=8cm]{}}} + +\chardef\fixedfloatmethod=3 + +\def\OTRONEsomefixdfloat % [#1] + {\docheckiffloatfits + \ifroomforfloat\else + \ifzeropt\pagetotal + % let's assume that there is room + \else + \ifcase\fixedfloatmethod + % disabled + \or % 1 (old method) + \goodbreak + \or % 2 (safe method) + \page + \or % 3 (keeps in stream) + \vskip-.5\floatheight % play safe + \vskip\textheight + \fi + \fi + \fi + \showmessage\m!floatblocks9\empty + \someherefloat} % [#1] + +%D Ok, I got tired of making dediccated clean up macros using the +%D same mechanism again and again, so now we have: +%D +%D \starttyping +%D \def\xxxx{abc.d} \replacecharacters\xxxx{a.}{-} \xxxx +%D \stoptyping + +\def\replacecharacters#1#2#3% macro characters replacement + {\bgroup + \edef\ascii{#1}% + \obeylccodes % watch how this is optimized! + \def\docommand##1{\lccode\expandafter`\csname##1\endcsname=\expandafter`\csname#3\endcsname}% + \handletokens#2\with\docommand + \lowercase\@EA{\@EA\xdef\@EA\globalascii\@EA{\ascii}}% + \egroup + \dodoglobal\let#1\globalascii} + \def\resetsetups[#1]% {\ifundefined{\??su\ifgridsnapping\v!grid\fi:#1}% \letbeundefined{\??su:#1}% @@ -349,7 +426,7 @@ \long\def\startexpanded#1\stopexpanded % beware, this time no \noexpand before #1 {\long\xdef\@@expanded{#1}\@@expanded} -\tracefonthandlingtrue +% \tracefonthandlingtrue \def\parseTR[#1][#2]% [#2] is dummy that kills spaces / no #3 argument {\def\currentcol{0}\increment\maximumrow @@ -399,6 +476,30 @@ \@EA\settbltxt\@EA\maximumrow\@EA\currentcol\@EA {\@EA\handleTBLcell\celltag[#1]{#3}}} +% new, still to be improved +% +% \dorecurse{10} +% {\input thuan +% \placefigure{}{\framed[height=1.5cm]{test}} +% \placefloatplaceholder} + +\def\placefloatplaceholder + {\ifroomforfloat \else + \scratchdimen\pagegoal + \advance\scratchdimen-\pagetotal + \advance\scratchdimen-3\lineheight + \ifdim\scratchdimen>\zeropoint + \startlinecorrection[blank] + \mhbox{\inframed{\labeltexts{placeholder}{\lastcaptiontag}}}% + \stoplinecorrection + \else + \allowbreak + \fi + \fi} + +\setuplabeltext + [placeholder={, moved}] + \newif\ifpercentdimendone \bgroup % usage: \setpercentdimen\somedimen{% or dimen} todo: pct diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex index 49051aeca..f87d35d3a 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -31,7 +31,7 @@ %D 2004.8.30 the low level interface is english. Watch out and adapt %D your styles an modules. -\def\contextversion{2004.9.6} +\def\contextversion{2004.9.17} %D Welcome to the main module. When this module is ran through %D \type{initex} or \type {tex -i} or \type {whatevertex} using diff --git a/tex/context/base/core-fig.tex b/tex/context/base/core-fig.tex index 1b5958785..d008e472d 100644 --- a/tex/context/base/core-fig.tex +++ b/tex/context/base/core-fig.tex @@ -642,21 +642,12 @@ \global\figwid\@@efmaxwidth \fi}}} -% \def\dosetdimensionfiguresize#1#2#3% -% {#1\relax -% \doifsomething\@@efmaxbreedte -% {\ifdim\figwid>\@@efmaxbreedte\global\figwid\@@efmaxbreedte#2\relax\fi}% -% \doifsomething\@@efmaxhoogte -% {\ifdim\fighei>\@@efmaxhoogte \global\fighei\@@efmaxhoogte #3\relax\fi}} - \let\@@efgrid\empty \def\dosetdimensionfiguresize#1#2#3% {#1\relax - \doifsomething\@@efmaxwidth - {\ifdim\figwid>\@@efmaxwidth\global\figwid\@@efmaxwidth#2\relax\fi}% - \doifsomething\@@efmaxheight - {\ifdim\fighei>\@@efmaxheight \global\fighei\@@efmaxheight #3\relax\fi}} + \doifsomething\@@efmaxwidth {\ifdim\figwid>\@@efmaxwidth \global\figwid\@@efmaxwidth #2\relax\fi}% + \doifsomething\@@efmaxheight{\ifdim\fighei>\@@efmaxheight\global\fighei\@@efmaxheight#3\relax\fi}} \def\setdimensionfiguresize {\ifdim\figwid>\zeropoint\relax @@ -746,11 +737,11 @@ \def\resetexternalfigures {\let\@@efoption \empty - \let\@@efmaxwidth \empty - \let\@@efmaxheight \empty - \let\@@efframe \v!off + \let\@@efmaxwidth \empty + \let\@@efmaxheight \empty + \let\@@efframe \v!off \let\@@efforegroundcolor\empty - \let\@@efbackground \empty} + \let\@@efbackground \empty} % The following code will move: @@ -763,8 +754,8 @@ {\processaction [#2] [ \v!max=>\global#1=#4\relax, - \v!fit=>\global#1=#5\relax, - \v!broad=>\global#1=#5\relax + \v!fit=>\global#1=#5\relax, + \v!broad=>\global#1=#5\relax \global\advance #1 -4\@@exbodyfont\relax, \s!default=>\doifsomething{#3}{\global#1=#3\relax}, \s!unknown=>\global#1=\@@exbodyfont\relax @@ -996,6 +987,9 @@ \doif\@@efextension\c!mov\presetfiguremov \doif\@@efextension\c!avi\presetfigureavi #1[#4][#5][#6]% + % new, somehow needed when \textwidth is used: + \doifsomething\@@efmaxwidth {\freezedimenmacro\@@efmaxwidth }% + \doifsomething\@@efmaxheight{\freezedimenmacro\@@efmaxheight}% % lines -> height \checkfiguresettings % new @@ -1573,8 +1567,8 @@ {\bgroup \dontcomplain \def\presetfigure[##1][##2]% - {\getvalue{\e!start\v!figure\e!text}[\v!left][] - {\v!none} + {\getvalue{\e!start\v!figure\e!text}[\v!left,\v!none][] + {} {\hbox {\externalfigure[##1][\c!frame=\v!on,\c!width=6cm][##2]% \tfskip @@ -1586,7 +1580,7 @@ {\beforesplitstring####1\at=\to\asciia \aftersplitstring ####1\at=\to\asciib \convertcommand\asciib\to\asciib - \doifsomething{\asciib} + \doifsomething\asciib {\hsmash{\hbox to .75em{\asciia\hss}: \asciib}\endgraf}}% \processcommalist[##2]\docommando \strut @@ -1650,7 +1644,7 @@ \def\presetfigure[##1][##2]% {\getfiguredimensionsonly[##1]% \pagefigure[##1]% \immediate\write\scratchwrite - {registerfigure("##1",\figurewidth,\figureheight)}} + {registerfigure("##1",\figurewidth,\figureheight);}} \pushendofline \readjobfile\@@exfile\donothing\donothing \popendofline @@ -2049,7 +2043,8 @@ {\doinsertsoundtrack{\getvalue{\??sd:#1}}{#1}\@@sdoption % brr, \..empty not really needed and maybe even wrong; % also, not here but in driver - \letgvalueempty{\??sd:#1}}}% + % well, no: sounds need to be reinitialize each time (i.e., be on page), so no + }}% \letgvalueempty{\??sd:#1}}}% \fi} \setexecutecommandcheck {startsound} \checksoundtrack diff --git a/tex/context/base/core-itm.tex b/tex/context/base/core-itm.tex index 3afc8cd68..417e5411a 100644 --- a/tex/context/base/core-itm.tex +++ b/tex/context/base/core-itm.tex @@ -1059,7 +1059,7 @@ \def\currentitemgroup{#1}% \setvalue{\e!start#1}{\startitemgroup[#1]}% \setvalue{\e!stop#1}{\stopitemgroup}% - \setvalue{\e!setup#1\e!in}{\setupitemgroup[#1]}% + \setvalue{\e!setup#1\e!endsetup}{\setupitemgroup[#1]}% \getparameters[\??ig#1][\c!levels=3,#2]% \ifnum\getvalue{\??ig#1\c!levels}<\maxitemlevel\relax \letvalue{\??ig#1\c!levels}\maxitemlevel diff --git a/tex/context/base/core-lst.tex b/tex/context/base/core-lst.tex index be05283c8..854fb2052 100644 --- a/tex/context/base/core-lst.tex +++ b/tex/context/base/core-lst.tex @@ -1001,7 +1001,7 @@ \getparameters [\??ih#1] [\c!criterium=\v!local,#3]% - \setvalue{\e!setup#1\e!in}% + \setvalue{\e!setup#1\e!endsetup}% {\dodoubleempty\dosetupcombinedlist[#1]}% \setvalue{\e!place#1}% {\dodoubleempty\doplacecombinedlist[#1]}% diff --git a/tex/context/base/core-mis.tex b/tex/context/base/core-mis.tex index 86f50ab1c..7712f8606 100644 --- a/tex/context/base/core-mis.tex +++ b/tex/context/base/core-mis.tex @@ -84,8 +84,8 @@ \appendtoks \def\TeX{TeX}\to\simplifiedcommands \appendtoks \def\ConTeXt{ConTeXt}\to\simplifiedcommands \appendtoks \def\MetaPost{MetaPost}\to\simplifiedcommands -\appendtoks \def\MetaPost{MetaFont}\to\simplifiedcommands -\appendtoks \def\MetaPost{MetaFun}\to\simplifiedcommands +\appendtoks \def\MetaFont{MetaFont}\to\simplifiedcommands +\appendtoks \def\MetaFun{MetaFun}\to\simplifiedcommands \appendtoks \def||{-}\to\simplifiedcommands % THIS WAS MAIN-002.TEX @@ -263,7 +263,7 @@ \c!top=\vss, \c!bottom=\vfill, #2]% - \setvalue{\e!setup#1\e!in}% + \setvalue{\e!setup#1\e!endsetup}% {\setupparagraphs[#1]}% \dorecurse {\getvalue{\??al#1\c!n}} @@ -1598,7 +1598,7 @@ \c!align=, \c!location=\v!bottom, #2]% - \setvalue{\e!setup#1\e!in}{\setuppairedbox[#1]}% + \setvalue{\e!setup#1\e!endsetup}{\setuppairedbox[#1]}% \setvalue{\e!place#1}{\placepairedbox[#1]}} \def\setuppairedbox diff --git a/tex/context/base/core-nav.tex b/tex/context/base/core-nav.tex index f9d80b744..3c47f885f 100644 --- a/tex/context/base/core-nav.tex +++ b/tex/context/base/core-nav.tex @@ -157,6 +157,14 @@ %D In the macros that deal with making areas into hyperlinks, %D we use: +\newbox\driverresources + +\def\collectdriverresource#1% + {\global\setbox\driverresources\hbox{\box\driverresources#1}} + +\def\flushdriverresources + {\ifvoid\driverresources\else\box\driverresources\fi} + \def\dostartgoto\data#1\start#2\stop#3\dostopgoto {\ifsecondaryreference \bgroup\setbox0\hbox{#2#3}\egroup @@ -190,7 +198,8 @@ \dimen0\wd0\box0\kern-\dimen0\smashbox2\box2\kern\dimen0 \else \smashbox2\box2\box0 - \fi}% + \fi + \flushdriverresources}% \resetgoto}% \fi} diff --git a/tex/context/base/core-ref.tex b/tex/context/base/core-ref.tex index d778d5f43..b102d7378 100644 --- a/tex/context/base/core-ref.tex +++ b/tex/context/base/core-ref.tex @@ -3412,7 +3412,7 @@ \douseexternaldocument[#1][#2][#4]% \doglobal\addtocommalist{#1}\crossdocumentreferences \def\docommando##1% - {\globalletvalue{\??rf##1\c!state}\v!start % for fast checking + {\letgvalue{\??rf##1\c!state}\v!start % for fast checking \doglobal\addtocommalist{##1}\crossdocumentelements}% \processcommalist[#3]\docommando \ifutilitydone diff --git a/tex/context/base/core-reg.tex b/tex/context/base/core-reg.tex index 88a099184..4830dcb32 100644 --- a/tex/context/base/core-reg.tex +++ b/tex/context/base/core-reg.tex @@ -963,23 +963,15 @@ \c!unknownreference=\v!empty, \c!expansion=]% \presetheadtext[#1=\Word{#1}]% - \setvalue{#1}% - {\doregister{#1}}% - \setvalue{\e!coupled#1}% - {\dolinkedregister{#1}}% - \setvalue{\s!set#1}% - {\dosetregister{#1}}% - \setvalue{\s!reset#1}% - {\doresetregister{#1}}% \addutilityreset{#1}% - \setvalue{\e!see#1}% - {\dozieregister{#1}}% - \setvalue{\e!place#1}% - {\placeregister[#1]}% - \setvalue{\e!complete#1}% - {\completeregister[#1]}% - \setvalue{\e!setup#1\e!in}[##1]% - {\getparameters[\??id#1][##1]}} + \setvalue{#1}{\doregister{#1}}% + \setvalue{\e!coupled#1}{\dolinkedregister{#1}}% + \setvalue{\s!set#1}{\dosetregister{#1}}% + \setvalue{\s!reset#1}{\doresetregister{#1}}% + \setvalue{\e!see#1}{\dozieregister{#1}}% + \setvalue{\e!place#1}{\placeregister[#1]}% + \setvalue{\e!complete#1}{\completeregister[#1]}% + \setvalue{\e!setup#1\e!endsetup}[##1]{\getparameters[\??id#1][##1]}} \def\defineregister% {\dodoubleargument\dodefineregister} diff --git a/tex/context/base/core-rul.tex b/tex/context/base/core-rul.tex index 2ce7e3977..9574f0f9c 100644 --- a/tex/context/base/core-rul.tex +++ b/tex/context/base/core-rul.tex @@ -2150,41 +2150,6 @@ %D %D which looks like: \thinrules[n=2] -% \def\thinrule% -% {\strut -% \leaders -% \hrule\!!height.5\linewidth\!!depth.5\linewidth -% \hfill -% \strut} - -% \def\thinrule% -% {\strut -% \bgroup -% \startcolor[\@@dlkleur]% -% \doif{\@@dlhoogte}{\v!max}{\def\@@dlhoogte{1}}% -% \doif{\@@dldiepte}{\v!max}{\def\@@dldiepte{1}}% -% \freezedimensionwithunit\@@dlhoogte{\strutht}% -% \freezedimensionwithunit\@@dldiepte{\strutdp}% -% \leaders -% \hrule\!!height\@@dlhoogte\!!depth\@@dldiepte -% \hfill -% \stopcolor -% \donefalse -% \processaction -% [\@@dlvariant] -% [\v!a=>, -% \v!b=>\dimen0=.5\linewidth\dimen2=\dimen0\donetrue, -% \v!c=>\dimen2=\@@dldiepte\dimen0=-\dimen2\donetrue -% \advance\dimen0\linewidth]% -% \ifdone -% \hfillneg -% \leaders -% \hrule\!!height\dimen0\!!depth\dimen2 -% \hfill -% \fi -% \egroup -% \strut} - \def\thinrule {\strut \bgroup @@ -2259,37 +2224,6 @@ \def\setupthinrules {\dosingleargument\dosetupthinrules} -% \def\dothinrules[#1]% -% {\bgroup -% \dosetupthinrules[#1]% -% \@@dlvoor -% \assignvalue{\@@dlinterlinie}{\@@dlinterlinie}{1.0}{1.5}{2.0}% -% \spacing\@@dlinterlinie -% \dorecurse -% {\@@dln} -% {\ifnum\recurselevel=\@@dln \dothinrulesnobreak \else -% \ifnum\recurselevel=2 \dothinrulesnobreak \fi\fi -% \thinrule -% \ifnum\recurselevel<\@@dln \endgraf \fi}% -% \@@dlna -% \egroup} - -% \def\dothinrules[#1]% -% {\bgroup -% \dosetupthinrules[#1]% -% \@@dlvoor -% \assignvalue{\@@dlinterlinie}{\@@dlinterlinie}{1.0}{1.5}{2.0}% -% \spacing\@@dlinterlinie -% \dorecurse -% {\@@dln} -% {\ifnum\recurselevel=\@@dln \dothinrulesnobreak \else -% \ifnum\recurselevel=2 \dothinrulesnobreak \fi\fi -% \thinrule -% %\ifnum\recurselevel<\@@dln \endgraf \fi}% -% \ifnum\recurselevel<\@@dln \endgraf \geenwitruimte \@@dltussen \fi}% -% \@@dlna -% \egroup} - \def\dothinrules[#1]% {\bgroup \dosetupthinrules[#1]% @@ -2314,13 +2248,13 @@ {\carryoverpar\egroup} {\@@dlafter\egroup}} -\def\thinrules% +\def\thinrules {\dosingleempty\dothinrules} %D A couple of examples are given below. %D %D \startbuffer -%D \setupthinrules[n=3,inbetween=,color=gray ] +%D \setupthinrules[n=3,inbetween=,color=gray] %D %D test test \thinrules\ test test \par %D test test \thinrules [color=green] test test \par diff --git a/tex/context/base/core-sec.tex b/tex/context/base/core-sec.tex index e78ec766b..d3c743106 100644 --- a/tex/context/base/core-sec.tex +++ b/tex/context/base/core-sec.tex @@ -1662,7 +1662,7 @@ \def\placeheadmargintexts#1% {\the\everyheadstart - \doifvalue{\??ko#1\c!margintext}\v!yes\placemargintexts} + \doifvalue{\??ko#1\c!margintext}\v!yes\placemargincontent} \def\doplaceheadtext#1#2#3#4% {\beginheadplacement{#1}% @@ -2133,14 +2133,10 @@ \definemarking[#1\v!number][#2\v!number]% \doifundefined{\??li#1}{\definelist[#1][#2]}}}% \addtocommalist{#1}\@@kolist - \setevalue{\??sk#1}% - {\getvalue{\??ko#1\c!coupling}}% - \setevalue{\??by#1}% - {\getvalue{\??ko#1\c!section}}% - \setevalue{\??by\v!by#1}% - {\getvalue{\??ko#1\c!section}}% - \setvalue{#1}% - {\dodoubleempty\dosomekop[#1]}} + \setevalue{\??sk#1}{\getvalue{\??ko#1\c!coupling}}% + \setevalue{\??by#1}{\getvalue{\??ko#1\c!section}}% + \setevalue{\??by\v!by#1}{\getvalue{\??ko#1\c!section}}% + \setvalue{#1}{\dodoubleempty\dosomekop[#1]}} \def\definehead {\dodoubleemptywithset\dodefinehead} diff --git a/tex/context/base/core-spa.tex b/tex/context/base/core-spa.tex index 13b89f1e1..e8b745008 100644 --- a/tex/context/base/core-spa.tex +++ b/tex/context/base/core-spa.tex @@ -13,18 +13,21 @@ \writestatus{loading}{Context Spacing Macros} +% to be sorted out: dependencies, orderof initialization + \unprotect \newevery \everybodyfont \Everybodyfont % just to be sure \newevery \everyfontswitch \EveryFontSwitch % just to be sure \newevery \everydefinedfont \relax % just to be sure +\appendtoks \spacing 1\to \everybodyfont \appendtoks \presetnormallineheight \to \everybodyfont -\appendtoks \setnormalbaselines \to \everybodyfont -\appendtoks \setstrut \to \everybodyfont +\appendtoks \setnormalbaselines \to \everybodyfont % check if redundant +\appendtoks \setstrut \to \everybodyfont % check if redundant \appendtoks \settopskip \to \everybodyfont \appendtoks \setmaxdepth \to \everybodyfont -\appendtoks \spacing 1\to \everybodyfont +%appendtoks \spacing 1\to \everybodyfont \appendtoks \simplesetupindenting \to \everybodyfont \appendtoks \simplesetupblank \to \everybodyfont \appendtoks \simplesetupwhitespace \to \everybodyfont @@ -32,11 +35,11 @@ \appendtoks \simplesetupspacing \to \everybodyfont % nieuw \appendtoks \setdisplayskips \to \everybodyfont % nieuw -\appendtoks \updateraggedskips \to \everyfontswitch % under test +\appendtoks \updateraggedskips \to \everyfontswitch % under test -\prependtoks \let\par\endgraf \to \everypagebody % see \fillinline +\prependtoks \let\par\endgraf \to \everypagebody % see \fillinline -\appendtoks \simplesetupspacing \to \everydefinedfont +\appendtoks \simplesetupspacing \to \everydefinedfont \def\stelfactorenin {\simplesetupwhitespace @@ -135,6 +138,7 @@ \def\presetnormallineheight {\edef\normallineheight{\@@itline}% +% done elsewhere : \spacing\!!plusone % new per 10/08/2004, else problems in otr / !! needed \iflocalinterlinespace \else \doifdefined\bodyfontinterlinespecs {\doifsomething\bodyfontinterlinespace @@ -153,20 +157,20 @@ \let\strutheightfactor\@@itheight \let\strutdepthfactor \@@itdepth \fi - \let\minimumstrutheight\@@itminheight - \let\minimumstrutdepth \@@itmindepth + \let\minimumstrutheight \@@itminheight + \let\minimumstrutdepth \@@itmindepth \let\minimallinedistance\@@itdistance - \let\normallineheight\@@itline % let ! ! ! ! ! ivm ex - \let\topskipfactor\@@ittop - \let\maxdepthfactor\@@itbottom - \let\baselinegluefactor\@@itstretch + \let\normallineheight \@@itline % let ! ! ! ! ! ivm ex + \let\topskipfactor \@@ittop + \let\maxdepthfactor \@@itbottom + \let\baselinegluefactor \@@itstretch \setfontparameters % redundant, can be \setstrut, test first \updateraggedskips} % yes indeed \def\setuprelativeinterlinespace[#1]% {\processallactionsinset % \regelwit = dummy ! [#1] - [ \v!on=>\oninterlineskip, + [ \v!on=>\oninterlineskip, \v!off=>\offinterlineskip, \v!reset=>\setfontparameters,% just \setstrut, test first \s!unknown=>\assignvalue{#1}\regelwit{1.00}{1.25}{1.50}% @@ -1771,22 +1775,26 @@ \lineheight\normallineheight \fi \openlineheight\spacingfactor\lineheight -\ifdim\minimumstrutheight>\zeropoint - \openstrutheight\minimumstrutheight % new -\else - \openstrutheight\strutheightfactor\openlineheight -\fi -\ifdim\minimumstrutdepth>\zeropoint - \openstrutdepth \minimumstrutdepth % new -\else - \openstrutdepth \strutdepthfactor \openlineheight -\fi -\scratchdimen\minimumstrutdepth -\advance\scratchdimen\minimumstrutheight -\ifdim\scratchdimen>\zeropoint - \openlineheight\openstrutheight % new - \advance\openlineheight\openstrutdepth % new -\fi + \openstrutheight \ifdim\minimumstrutheight>\zeropoint + \minimumstrutheight % new + \else + \strutheightfactor\openlineheight + \fi + \openstrutdepth \ifdim\minimumstrutdepth>\zeropoint + \minimumstrutdepth % new + \else + \strutdepthfactor \openlineheight + \fi + \begingroup % avoid interference + \scratchdimen\minimumstrutdepth + \advance\scratchdimen\minimumstrutheight + \ifdim\scratchdimen>\zeropoint + \endgroup + \openlineheight\openstrutheight % new + \advance\openlineheight\openstrutdepth % new + \else + \endgroup + \fi \normalbaselineskip\openlineheight \!!plus\baselinegluefactor\openlineheight \!!minus\baselinegluefactor\openlineheight @@ -1794,7 +1802,6 @@ \normallineskiplimit\zeropoint\relax \normalbaselines} - \def\setspacingfactor#1\to#2\by#3\\% {\strutdimen#2\points \strutdimen#3\strutdimen @@ -1808,8 +1815,8 @@ \else \edef\spacingfactor{#1}% \fi - \setspacingfactor\systemtopskipfactor \to\topskipfactor \by#1\\% - \setspacingfactor\systemmaxdepthfactor\to\maxdepthfactor\by#1\\% + \setspacingfactor\systemtopskipfactor \to\topskipfactor \by#1\\% why no \spacingfactor ? + \setspacingfactor\systemmaxdepthfactor\to\maxdepthfactor\by#1\\% why no \spacingfactor ? \setnormalbaselines \setstrut} @@ -2250,18 +2257,18 @@ \def\dosinglenarrower#1% {\processaction [#1] - [ \v!left=>\global\advance\ctxleftskip \@@slleft, + [ \v!left=>\global\advance\ctxleftskip \@@slleft, \v!middle=>\global\advance\ctxmidskip \@@slmiddle, - \v!right=>\global\advance\ctxrightskip \@@slright, + \v!right=>\global\advance\ctxrightskip \@@slright, \v!none=>, \s!unknown=>\global\advance\ctxmidskip \commalistelement]} \def\donarrower[#1]% {\processaction [#1] - [ \v!left=>\global\advance\ctxleftskip \@@slleft, + [ \v!left=>\global\advance\ctxleftskip \@@slleft, \v!middle=>\global\advance\ctxmidskip \@@slmiddle, - \v!right=>\global\advance\ctxrightskip \@@slright, + \v!right=>\global\advance\ctxrightskip \@@slright, \v!none=>,% handy for delimitedtexts \s!unknown=>{\dorepeatwithcommand[#1]\dosinglenarrower}]} @@ -2737,7 +2744,6 @@ \@EA\doconvertfont\csname#1#2\@EA\endcsname \fi} - \unexpanded\def\@@dostopattributes {\doglobalstopcolor \endgroup} diff --git a/tex/context/base/core-syn.tex b/tex/context/base/core-syn.tex index 1b0c07172..9d085ae66 100644 --- a/tex/context/base/core-syn.tex +++ b/tex/context/base/core-syn.tex @@ -172,24 +172,17 @@ \fi} \def\dodefinesynonyms[#1][#2][#3][#4]% - {\setvalue{\e!setup#2\e!in}% - {\dodoubleargument\getparameters[\??sm#1]}% - \iffourthargument - \unexpanded\def#4##1% - {\getsynonymmeaning{#1}{\??sm:#1:}{##1}}% + {\iffourthargument + \unexpanded\def#4##1{\getsynonymmeaning{#1}{\??sm:#1:}{##1}}% \ifthirdargument - \unexpanded\def#3##1% - {\getvalue{\??sm:#1:##1}}% + \unexpanded\def#3##1{\getvalue{\??sm:#1:##1}}% \fi - \setvalue{#1}% - {\dotripleempty\docomplexsynonym[\??sm:#1:][#1]}% + \setvalue{#1}{\dotripleempty\docomplexsynonym[\??sm:#1:][#1]}% \else \ifthirdargument - \unexpanded\def#3##1% - {\getsynonymmeaning{#1}{}{##1}}% + \unexpanded\def#3##1{\getsynonymmeaning{#1}{}{##1}}% \fi - \setvalue{#1}% - {\dotripleempty\docomplexsynonym[][#1]}% + \setvalue{#1}{\dotripleempty\docomplexsynonym[][#1]}% \fi \dosetupsynonyms [#1]% @@ -208,21 +201,15 @@ \c!after=, \c!indentnext=\v!no, \c!expansion=]% - \presetheadtext % changes the \if...argument - [#2=\Word{#2}]% - \setvalue{\s!set#1}% - {\dosetsynonym{#1}}% - \setvalue{\s!reset#1}% - {\doresetsynonym{#1}}% - \setvalue{\s!check#1}##1% - {\checkdefined{synoniemen}{#1}{##1}}% + \presetheadtext[#2=\Word{#2}]% changes the \if...argument \addutilityreset{#1}% - \setvalue{\e!load#2}% - {\dolaadsynoniemen{#1}{#2}}% - \setvalue{\e!place\e!listof#2}% - {\doplaatslijstmetsynoniemen{#1}{#2}}% - \setvalue{\e!complete\e!listof#2}% - {\dovolledigelijstmetsynoniemen{#1}{#2}}} + \setvalue{\e!setup#2\e!endsetup}{\dodoubleargument\getparameters[\??sm#1]}% to be obsolete + \setvalue{\s!set#1}{\dosetsynonym{#1}}% + \setvalue{\s!reset#1}{\doresetsynonym{#1}}% + \setvalue{\s!check#1}##1{\checkdefined{synoniemen}{#1}{##1}}% + \setvalue{\e!load#2}{\dolaadsynoniemen{#1}{#2}}% + \setvalue{\e!place\e!listof#2}{\doplaatslijstmetsynoniemen{#1}{#2}}% + \setvalue{\e!complete\e!listof#2}{\dovolledigelijstmetsynoniemen{#1}{#2}}} \def\definesynonyms {\doquadrupleempty\dodefinesynonyms} @@ -344,35 +331,26 @@ \c!before=, \c!after=\endgraf, \c!expansion=]% - \presetheadtext[#2=\Word{#2}]% - \setvalue{\e!setup#2\e!in}[##1]% vervalt tzt, soort oo-mode - {\getparameters[\??so#1][##1]}% \ifthirdargument \ConvertConstantAfter\doifnot{#3}\v!none {\ifx#3\relax \else \def#3##1{\getvalue{\??so:#1:##1}} \fi}% - \setvalue{#1}% - {\dotripleempty\docomplexsort[\??so:#1:][#1]}% + \setvalue{#1}{\dotripleempty\docomplexsort[\??so:#1:][#1]}% \else - \setvalue{#1}% - {\dotripleempty\docomplexsort[][#1]}% + \setvalue{#1}{\dotripleempty\docomplexsort[][#1]}% \fi - \setvalue{\s!set#1}% - {\dosetsorteren{#1}}% - \setvalue{\s!reset#1}% - {\doresetsorteren{#1}}% \addutilityreset{#1}% - \setvalue{\e!load#2}% - {\dolaadsorteren{#1}{#2}}% - \setvalue{\s!check#1}##1% - {\checkdefined{sorteren}{#1}{##1}}% - \setvalue{\e!place\e!listof#2}% - {\doplaatslijstmetsorteren{#1}}% - \setvalue{\e!complete\e!listof#2}% - {\dovolledigelijstmetsorteren{#1}{#2}}} - -\def\definesorting% + \presetheadtext[#2=\Word{#2}]% after \ifthirdargument -) + \setvalue{\e!setup#2\e!endsetup}[##1]{\getparameters[\??so#1][##1]}% to be obsolete + \setvalue{\s!set#1}{\dosetsorteren{#1}}% + \setvalue{\s!reset#1}{\doresetsorteren{#1}}% + \setvalue{\e!load#2}{\dolaadsorteren{#1}{#2}}% + \setvalue{\s!check#1}##1{\checkdefined{sorteren}{#1}{##1}}% + \setvalue{\e!place\e!listof#2}{\doplaatslijstmetsorteren{#1}}% + \setvalue{\e!complete\e!listof#2}{\dovolledigelijstmetsorteren{#1}{#2}}} + +\def\definesorting {\dotripleempty\dodefinesorting} \definesynonyms @@ -393,6 +371,7 @@ \definesorting [\v!logo] [\v!logos] +% no [\logogram] \definesynonyms [\v!unit] diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex index a516de391..98bbd6b6e 100644 --- a/tex/context/base/font-ini.tex +++ b/tex/context/base/font-ini.tex @@ -3602,8 +3602,7 @@ \def\noconvertfont#1% #2% {\doifdefinedelse{\@noletter@#1} - {\doifelsenothing{#1}\gobbleoneargument\@@donoconvertfont} - {\firstofoneargument}% + {\doifelsenothing{#1}\gobbleoneargument\@@donoconvertfont}\gobbleoneargument {#1}} % {#2}} %D Extras: diff --git a/tex/context/base/math-ams.tex b/tex/context/base/math-ams.tex index f2841b7e6..866228324 100644 --- a/tex/context/base/math-ams.tex +++ b/tex/context/base/math-ams.tex @@ -126,6 +126,7 @@ \definemathsymbol [blacktriangleright] [rel] [ma] ["49] \definemathsymbol [blacktriangleleft] [rel] [ma] ["4A] \definemathsymbol [vartriangle] [rel] [ma] ["4D] +\definemathsymbol [triangleup] [ord] [ma] ["4D] % vartriangle \definemathsymbol [blacktriangle] [ord] [ma] ["4E] \definemathsymbol [triangledown] [ord] [ma] ["4F] \definemathsymbol [eqcirc] [rel] [ma] ["50] diff --git a/tex/context/base/mult-con.tex b/tex/context/base/mult-con.tex index f444c82a3..5054a5bb0 100644 --- a/tex/context/base/mult-con.tex +++ b/tex/context/base/mult-con.tex @@ -2519,7 +2519,7 @@ process: proces process currentlocal: huidigelokale currentlocal aktuelllokal aktualnelokalni correntelocale localcurent - in: in - + endsetup: in - ein - - - load: laad load diff --git a/tex/context/base/page-bck.tex b/tex/context/base/page-bck.tex index c959126fd..4a7149658 100644 --- a/tex/context/base/page-bck.tex +++ b/tex/context/base/page-bck.tex @@ -149,9 +149,10 @@ \def\addsomebackground#1#2#3#4% area box width height / zero test added {\ifsomebackgroundfound#1\ifdim#3>\zeropoint\ifdim#4>\zeropoint + \doifvaluesomething{\??ma#1\c!setups}{\setups[\getvalue{\??ma#1\c!setups}]}% should not produce funny spaces ! \setbox#2\vbox\fastlocalframed [\??ma#1] - [\c!component=#1,\c!strut=\v!no,\c!offset=\v!overlay,% + [\c!component=#1,\c!strut=\v!no,\c!offset=\v!overlay,\c!setups=,% \c!width=#3,\c!height=#4] {\dp#2\zeropoint\box#2}% \fi\fi\fi} @@ -345,41 +346,21 @@ \vfilll}% \smashbox#1} -% \def\dodopagebodybackground#1#2% -% {\ifdim#2>\zeropoint % added, faster -% \setbox\scratchbox\vbox to #2 -% \bgroup\hbox\bgroup -% \swapmargins -% \goleftonpage -% \dododopagebodybackground\linkerrandbreedte #2#1\v!linkerrand -% \hskip\linkerrandafstand -% \dododopagebodybackground\linkermargebreedte #2#1\v!linkermarge -% \hskip\linkermargeafstand -% \dododopagebodybackground\zetbreedte #2#1\v!tekst -% \hskip\rechtermargeafstand -% \dododopagebodybackground\rechtermargebreedte#2#1\v!rechtermarge -% \hskip\rechterrandafstand -% \dododopagebodybackground\rechterrandbreedte #2#1\v!rechterrand -% \egroup\egroup -% \wd\scratchbox\zeropoint -% \box\scratchbox\relax -% \fi} - \def\dodopagebodybackground#1#2% {\ifdim#2>\zeropoint % added, faster \setbox\scratchbox\vbox to #2 \bgroup\hbox\bgroup % \swapmargins \goleftonpage - \dododopagebodybackground\leftedgewidth #2#1\v!leftedge + \dododopagebodybackground\leftedgewidth #2#1\v!leftedge \hskip\leftedgedistance \dododopagebodybackground\leftmarginwidth #2#1\v!leftmargin \hskip\leftmargindistance - \dododopagebodybackground\makeupwidth #2#1\v!text + \dododopagebodybackground\makeupwidth #2#1\v!text \hskip\rightmargindistance \dododopagebodybackground\rightmarginwidth#2#1\v!rightmargin \hskip\rightedgedistance - \dododopagebodybackground\rightedgewidth #2#1\v!rightedge + \dododopagebodybackground\rightedgewidth #2#1\v!rightedge \egroup\egroup \wd\scratchbox\zeropoint \box\scratchbox\relax @@ -389,9 +370,10 @@ {\ifsomebackgroundfound{#3#4}% \ifdim#2>\zeropoint\relax \ifdim#1>\zeropoint\relax + \doifvaluesomething{\??ma#3#4\c!setups}{\setups[\getvalue{\??ma#3#4\c!setups}]}% should not produce funny spaces ! \fastlocalframed [\??ma#3#4] - [\c!component=#3-#4,\c!width=#1,\c!height=#2,\c!offset=\v!overlay] + [\c!component=#3-#4,\c!width=#1,\c!height=#2,\c!offset=\v!overlay,\c!setups=] {\getvalue{\??ma#3#4\c!command}}% {\hsize=#1\vsize=#2....} \else \hskip#1% @@ -620,40 +602,6 @@ \resetglobal \expandafter\gobbleoneargument \fi} -% \def\doaddlocalbackground#1% -% {\scratchdimen\dp#1% -% \edef\next -% {\noexpand\redoglobal\wd#1\the\wd#1% -% \noexpand\redoglobal\ht#1\the\ht#1% -% \noexpand\dodoglobal\dp#1\the\dp#1}% -% \dp#1\zeropoint -% \redoglobal\setbox#1\hbox -% {\fastlocalframed -% [\??ma\v!lokaal] -% [\c!kader=\v!uit, -% \c!offset=\v!overlay, -% \c!achtergrond=\localbackground]% -% {\registerMPlocaltextarea{\box#1}}}% -% \ifdim\naturalfloatdepth>\zeropoint % maybe take difference -% \redoglobal\setbox#1\hbox{\lower\scratchdimen\box#1}% -% \fi -% \doglobal\increment\localpositionnumber % afterwards ! -% \next} - -% \def\doaddlocalbackground#1% -% {\edef\next -% {\noexpand\redoglobal\wd#1\the\wd#1% -% \noexpand\redoglobal\ht#1\the\ht#1% -% \noexpand\dodoglobal\dp#1\the\dp#1}% -% \dodoglobal\setbox#1\hbox -% {\fastlocalframed -% [\??ma\v!lokaal] -% [\c!component=local,\c!kader=\v!uit,\c!offset=\v!overlay,% -% \c!achtergrond=\localbackground]% -% {\registerMPlocaltextarea{\box#1}}}% -% \next -% \doglobal\increment\localpositionnumber\relax} % afterwards ! - \def\doaddlocalbackground#1% {\edef\next {\noexpand\redoglobal\wd#1\the\wd#1% @@ -662,7 +610,7 @@ \dodoglobal\setbox#1\hbox {\fastlocalframed [\??ma\v!local] - [\c!component=local,\c!frame=\v!off,\c!offset=\v!overlay,% + [\c!component=local,\c!frame=\v!off,\c!offset=\v!overlay,\c!setups=,% \c!width=\wd#1,hoogte=\ht#1,% no diepte=\dp#1 in cont-exp.tex, to be checked ! \c!background=\localbackground]% {\registerMPlocaltextarea{\box#1}}}% diff --git a/tex/context/base/page-flt.tex b/tex/context/base/page-flt.tex index d4007cf3b..6e59c495e 100644 --- a/tex/context/base/page-flt.tex +++ b/tex/context/base/page-flt.tex @@ -1160,6 +1160,7 @@ \def\putcompletecaption#1#2#3#4% {\noindent + \xdef\lastcaptiontag{\strut#2\floatcaptionsuffix}% \xdef\floatcaptionnumber{#1}% \dostartattributes{\??kj#1}\c!style\c!color\empty \ifnofloatnumber @@ -1293,7 +1294,7 @@ % \def\dopreparestackcaptionaut#1#2#3#4% % {\doifsomething\@@kjkjuitlijnen -% {\ExpandBothAfter\doifnotinset\v!midden\@@kjkjuitlijnen +% {\ExpandBothAfter\doifnotinset\v!middle\@@kjkjuitlijnen % {\let\captionovershoot\!!zeropoint}}% % \ifdim\wd\tempfloatbox>\hsize % % float is wider than \hsize @@ -1338,11 +1339,12 @@ % \putcompletecaption{#4}{#2}{#3}{0}}% % \else % % just over a line, don't use an overshoot -% \doifinsetelse\@@kjkjuitlijnen{\v!links,\v!rechts} +% % \doifinsetelse\@@kjkjuitlijnen{\v!left,\v!right} +% \expanded{\doifcommonelse{\@@kjkjuitlijnen}}{\v!left,\v!right,\v!flushleft,\v!flushright} % {\dosetraggedvbox\@@kjkjuitlijnen % \setbox\tempcaptionbox\raggedbox % {\hsize\scratchdimen -% \raggedcenter +% % strange : \raggedcenter % \putcompletecaption{#4}{#2}{#3}{0}}} % {% nicer % \setbox\tempcaptionbox\cbox @@ -1355,36 +1357,37 @@ {\doifsomething\@@kjkjuitlijnen {\ExpandBothAfter\doifnotinset\v!middle\@@kjkjuitlijnen {\let\captionovershoot\!!zeropoint}}% - \ifdim\wd\tempfloatbox>\hsize + \edef\captionhsize{\the\wd\tempfloatbox}% + \ifdim\captionhsize>\hsize % float is wider than \hsize \dosetraggedvbox\@@kjkjuitlijnen \setbox\scratchbox\raggedbox % trial run - {\hsize\wd\tempfloatbox + {\hsize\captionhsize \notesenabledfalse \putcompletecaption{#4}{#2}{#3}{0}}% \ifdim\ht\scratchbox>\lineheight % more lines \dosetraggedvbox\@@kjkjuitlijnen \setbox\tempcaptionbox\raggedbox - {\hsize\wd\tempfloatbox + {\hsize\captionhsize \advance\hsize -\captionovershoot\relax \ifdim\hsize<\captionminwidth\relax - \hsize\wd\tempfloatbox + \hsize\captionhsize \fi \putcompletecaption{#4}{#2}{#3}{0}}% \else \setbox\tempcaptionbox\raggedbox - {\hsize\wd\tempfloatbox + {\hsize\captionhsize \putcompletecaption{#4}{#2}{#3}{0}}% \fi \else % float is smaller of equal to \hsize - \ifdim\wd\tempfloatbox<\captionminwidth\relax + \ifdim\captionhsize<\captionminwidth\relax \scratchdimen\captionminwidth % float smaller than min width - \else - \scratchdimen\wd\tempfloatbox % float width + \edef\captionhsize{\the\scratchdimen}% \fi \setbox\scratchbox\vbox % test with overshoot - {\advance\scratchdimen \captionovershoot + {\scratchdimen\captionhsize + \advance\scratchdimen \captionovershoot \advance\scratchdimen 3em % an average word length \ifdim\scratchdimen<\hsize \hsize\scratchdimen \fi \notesenabledfalse @@ -1393,20 +1396,21 @@ % at least an average word longer than a line \dosetraggedvbox\@@kjkjuitlijnen \setbox\tempcaptionbox\raggedbox - {\advance\scratchdimen \captionovershoot + {\scratchdimen\captionhsize + \advance\scratchdimen \captionovershoot \ifdim\scratchdimen<\hsize \hsize\scratchdimen \fi \putcompletecaption{#4}{#2}{#3}{0}}% \else % just over a line, don't use an overshoot - \doifinsetelse\@@kjkjuitlijnen{\v!left,\v!right} + \expanded{\doifcommonelse{\@@kjkjuitlijnen}}{\v!left,\v!right,\v!flushleft,\v!flushright} {\dosetraggedvbox\@@kjkjuitlijnen \setbox\tempcaptionbox\raggedbox - {\hsize\scratchdimen -% strange : \raggedcenter + {\hsize\captionhsize + % strange : \raggedcenter \putcompletecaption{#4}{#2}{#3}{0}}} {% nicer \setbox\tempcaptionbox\cbox - {\hsize\scratchdimen + {\hsize\captionhsize \putcompletecaption{#4}{#2}{#3}{0}}}% \fi \fi} @@ -2138,26 +2142,26 @@ \def\installfloathandler#1#2% #1=keyword #2=handler {\setvalue{\string\floatmethod#1}{#2}} -\installfloathandler \v!here \someherefloat -\installfloathandler \v!force \somefixdfloat +\installfloathandler \v!here \someherefloat +\installfloathandler \v!force \somefixdfloat \installfloathandler \v!left \someleftsidefloat \installfloathandler \v!right \somerightsidefloat \installfloathandler \v!text \sometextfloat -\installfloathandler \v!top \sometopfloat -\installfloathandler \v!bottom \somebottomfloat -\installfloathandler \v!margin \somemarginfloat -\installfloathandler \v!opposite \somefacefloat -\installfloathandler \v!page \somepagefloat -\installfloathandler \v!inmargin \someinmarginfloat -\installfloathandler \v!inleft \someinleftmarginfloat -\installfloathandler \v!inright \someinrightmarginfloat +\installfloathandler \v!top \sometopfloat +\installfloathandler \v!bottom \somebottomfloat +\installfloathandler \v!margin \somemarginfloat +\installfloathandler \v!opposite \somefacefloat +\installfloathandler \v!page \somepagefloat +\installfloathandler \v!inmargin \someinmarginfloat +\installfloathandler \v!inleft \someinleftmarginfloat +\installfloathandler \v!inright \someinrightmarginfloat \installfloathandler \v!leftmargin \someinleftmarginfloat \installfloathandler \v!rightmargin \someinrightmarginfloat -\installfloathandler \v!leftedge \someinleftedgefloat -\installfloathandler \v!rightedge \someinrightedgefloat +\installfloathandler \v!leftedge \someinleftedgefloat +\installfloathandler \v!rightedge \someinrightedgefloat -\installfloathandler \v!backspace \somebackspacefloat -\installfloathandler \v!cutspace \somecutspacefloat +\installfloathandler \v!backspace \somebackspacefloat +\installfloathandler \v!cutspace \somecutspacefloat \installfloathandler {tblr} \someslotfloat \installfloathandler {lrtb} \someslotfloat diff --git a/tex/context/base/page-lay.tex b/tex/context/base/page-lay.tex index c2e0fc323..d24708e23 100644 --- a/tex/context/base/page-lay.tex +++ b/tex/context/base/page-lay.tex @@ -763,7 +763,7 @@ \processcommalist[#1]\docommando \adaptpagedimensions}} -\def\adaptlayout% +\def\adaptlayout {\dodoubleempty\doadaptlayout} % describe interface @@ -1173,53 +1173,53 @@ \setuplayout [ \c!topspace=.08417508418\paperheight, % 2.5cm - \c!top=\!!zeropoint, - \c!topdistance=\!!zeropoint, - \c!header=.06734006734\paperheight, % 2.0cm + \c!top=\!!zeropoint, + \c!topdistance=\!!zeropoint, + \c!header=.06734006734\paperheight, % 2.0cm \c!headerdistance=\!!zeropoint, - \c!height=.84175084175\paperheight, % 25.0cm - \c!footerdistance=\layoutparameter\c!headerdistance, + \c!height=.84175084175\paperheight, % 25.0cm + \c!footerdistance=\layoutparameter\c!headerdistance, \c!footer=.06734006734\paperheight, % 2.0cm \c!bottomdistance=\layoutparameter\c!topdistance, - \c!bottom=\!!zeropoint, - \c!backspace=.11904761905\paperwidth, % 2.5cm - \c!edge=\!!zeropoint, - \c!edgedistance=\layoutparameter\c!margindistance, - \c!margin=.12649983170\paperwidth, % snijwit-2*afstand + \c!bottom=\!!zeropoint, + \c!backspace=.11904761905\paperwidth, % 2.5cm + \c!edge=\!!zeropoint, + \c!edgedistance=\layoutparameter\c!margindistance, + \c!margin=.12649983170\paperwidth, % snijwit-2*afstand \c!margindistance=.02008341748\paperwidth, % 12.0pt - \c!leftedge=\layoutparameter\c!edge, - \c!leftedgedistance=\layoutparameter\c!edgedistance, - \c!leftmargin=\layoutparameter\c!margin, - \c!leftmargindistance=\layoutparameter\c!margindistance, - \c!width=.71428571429\paperwidth, % 15.0cm - \c!rightmargindistance=\layoutparameter\c!margindistance, - \c!rightmargin=\layoutparameter\c!margin, - \c!rightedgedistance=\layoutparameter\c!edgedistance, - \c!rightedge=\layoutparameter\c!edge, - \c!veroffset=\!!zeropoint, - \c!bottomspace=\!!zeropoint, - \c!horoffset=\!!zeropoint, - \c!cutspace=\!!zeropoint, - \c!textwidth=, % dangerous option -> centered / local - \c!textmargin=, % dangerous option -> both sides - \c!textdistance=\!!zeropoint, % shift down on grid - \c!style=, - \c!color=, - \c!marking=\v!off, + \c!leftedge=\layoutparameter\c!edge, + \c!leftedgedistance=\layoutparameter\c!edgedistance, + \c!leftmargin=\layoutparameter\c!margin, + \c!leftmargindistance=\layoutparameter\c!margindistance, + \c!width=.71428571429\paperwidth, % 15.0cm + \c!rightmargindistance=\layoutparameter\c!margindistance, + \c!rightmargin=\layoutparameter\c!margin, + \c!rightedgedistance=\layoutparameter\c!edgedistance, + \c!rightedge=\layoutparameter\c!edge, + \c!veroffset=\!!zeropoint, + \c!bottomspace=\!!zeropoint, + \c!horoffset=\!!zeropoint, + \c!cutspace=\!!zeropoint, + \c!textwidth=, % dangerous option -> centered / local + \c!textmargin=, % dangerous option -> both sides + \c!textdistance=\!!zeropoint, % shift down on grid + \c!style=, + \c!color=, + \c!marking=\v!off, \c!location=, % \v!singlesided, but empty is signal - \c!scale=1, - \c!nx=1, - \c!ny=1, - \c!dx=\!!zeropoint, - \c!dy=\!!zeropoint, - \c!grid=\v!no, - \c!preset=, - \c!setups=\systemsetupsprefix\s!default, - \c!clipoffset=\!!zeropoint, - \c!lines=0, - \c!paper=, % for foxet - \c!page=, % for foxet - \c!columns=1, + \c!scale=1, + \c!nx=1, + \c!ny=1, + \c!dx=\!!zeropoint, + \c!dy=\!!zeropoint, + \c!grid=\v!no, + \c!preset=, + \c!setups=\systemsetupsprefix\s!default, + \c!clipoffset=\!!zeropoint, + \c!lines=0, + \c!paper=, % for foxet + \c!page=, % for foxet + \c!columns=1, \c!columndistance=\!!zeropoint] %D First we define a whole range of (DIN) papersizes, diff --git a/tex/context/base/page-mar.tex b/tex/context/base/page-mar.tex index 899299fc0..4cf684bc3 100644 --- a/tex/context/base/page-mar.tex +++ b/tex/context/base/page-mar.tex @@ -710,7 +710,7 @@ \global\collectedmargintexts\emptytoks} \def\placemargincontent - {\ifcase\margincontentlevel\else + {\ifcase\margintextcollected\else \bgroup \chardef\graphicvadjustmode\zerocount \doflushmargincontents diff --git a/tex/context/base/page-txt.tex b/tex/context/base/page-txt.tex index b6b0fbffe..2c2e65363 100644 --- a/tex/context/base/page-txt.tex +++ b/tex/context/base/page-txt.tex @@ -64,7 +64,7 @@ %D \showsetup{\y!setupfooter} %D \showsetup{\y!setupbottom} -\def\setuplayouttext% +\def\setuplayouttext {\dotripleempty\dosetuplayouttext} \def\dosetuplayouttext[#1][#2][#3]% @@ -187,24 +187,6 @@ \def\placetextlinestrut#1% {\doifvalue{#1\c!strut}\v!yes{\setstrut\strut}} -% \def\dosingletexts#1#2#3#4#5#6% -% {\bgroup -% \convertargument#6\to\ascii -% \doifsomething\ascii -% {\doattributes{#1#2}#3#4% -% {\placetextlinestrut{#1}% here ! -% %\doifdefinedelse{\??mk\ascii\c!koppeling} % brrr -% \doifelsemarking\ascii -% {\dolimitatetexts{#1#2#5}{\getmarking[\ascii][\v!eerste]}} -% {\ConvertConstantAfter\doifelse{\v!paginanummer}{#6} -% {\@@plaatspaginanummer} -% {\ConvertConstantAfter\doifelse{\v!datum}{#6} -% {\currentdate} -% {% #6{}{}{} -> {} needed for macros that look -% % ahead, like \uniqueMPgraphic -% \opeenregel\dolimitatetexts{#1#2#5}{#6{}{}{}}}}}}}% -% \egroup} - \def\dosingletexts#1#2#3#4#5#6% {\bgroup \convertargument#6\to\ascii diff --git a/tex/context/base/ppchtex.tex b/tex/context/base/ppchtex.tex index 1fda1e7f0..b25702aff 100644 --- a/tex/context/base/ppchtex.tex +++ b/tex/context/base/ppchtex.tex @@ -426,13 +426,13 @@ [\getvalue{#1\c!textsize}] [ \v!small=>\def\@@localchemicalstyle{\scriptscriptstyle}, \v!medium=>\def\@@localchemicalstyle{\ifsmallchemicaltext\scriptscriptstyle\else\scriptstyle\fi}, - \v!big=>\def\@@localchemicalstyle{\ifsmallchemicaltext\scriptstyle\else\textstyle\fi}, + \v!big=>\def\@@localchemicalstyle{\ifsmallchemicaltext\scriptstyle\else\textstyle\fi}, \s!unknown=>\def\@@localchemicalstyle{\getvalue{#1\c!textsize}}]% \processaction [\getvalue{#1\c!scale}] [ \v!small=>\def\@@localchemicalscale{500}, \v!medium=>\def\@@localchemicalscale{625}, - \v!big=>\def\@@localchemicalscale{750}, + \v!big=>\def\@@localchemicalscale{750}, \s!unknown=>\def\@@localchemicalscale{\getvalue{#1\c!scale}}]} \def\@@currentchemicalformat diff --git a/tex/context/base/s-abr-01.tex b/tex/context/base/s-abr-01.tex index 4bffd875b..1eb1baf69 100644 --- a/tex/context/base/s-abr-01.tex +++ b/tex/context/base/s-abr-01.tex @@ -88,6 +88,7 @@ \logo [GUST] {Gust} \logo [GWTEX] {gw\TeX} \logo [HTTP] {http} +\logo [HSB] {hsb} \logo [HTML] {html} \logo [IBM] {ibm} \logo [IMAGEMAGICK]{ImageMagick} @@ -176,6 +177,8 @@ \logo [TEXTOOLS] {textools} \logo [XMLTOOLS] {xmltools} \logo [PDFTOOLS] {pdftools} +\logo [TEXMFSTART] {texmfstart} +\logo [TEXSYNC] {texsync} \logo [TEX] {\TeX} \logo [TFM] {tfm} \logo [TIFFINFO] {tiffinfo} @@ -213,6 +216,8 @@ \def\METAFUN {\MetaFun} +\logo [METAFUN] {\MetaFun} + \def\SystemSpecialA#1{$\langle\it#1\rangle$} \def\SystemSpecialB#1{{\tttf<#1>}} diff --git a/tex/context/base/spec-def.tex b/tex/context/base/spec-def.tex index e49201bc2..863f355ee 100644 --- a/tex/context/base/spec-def.tex +++ b/tex/context/base/spec-def.tex @@ -166,6 +166,8 @@ \installspecial [\doregistercmykindexcolor] [or] [8] \installspecial [\doregistergrayindexcolor] [or] [5] +\installspecial [\doregisterspotcolorname] [or] [2] + \installspecial [\dostartnonecolormode] [or] [0] \installspecial [\doregisternonecolor] [or] [0] diff --git a/tex/context/base/spec-fdf.tex b/tex/context/base/spec-fdf.tex index 787efbfa0..5654a5f50 100644 --- a/tex/context/base/spec-fdf.tex +++ b/tex/context/base/spec-fdf.tex @@ -974,6 +974,8 @@ %D %D In \PDF\ sounds can be embedded like movies. +\ifx\everygoto\undefined \newtoks\everygoto \fi + \let\currentsound\s!unknown \def\doPDFinsertsoundtrack#1#2#3% @@ -983,7 +985,8 @@ \@EA\processallactionsinset\@EA [#3] [\v!repeat=>\edef\pdf@@actions{\pdf@@actions /Mode /Repeat }]% - \flushatshipout % since it can be buried in a chained box +\collectdriverresource +% \flushatshipout % since it can be buried in a chained box {\doPDFannotation width 0pt height 0pt data {/Subtype /Movie /Border [0 0 0] @@ -2785,6 +2788,11 @@ {\doPDFregistergrayspotcolor{None}{1}% \globallet\doPDFregisternonecolor\relax} +\def\doPDFregisterspotcolorname#1#2% implemented in the driver + {} + +\definespecial\doregisterspotcolorname{\doPDFregisterspotcolorname} + % \def\doPDFregisterrgbspotcolor#1#2#3#4% % {\doPDFregistersomespotcolor % {#1}{RGB}{[0.0 1.0 0.0 1.0 0.0 1.0]}% @@ -2800,6 +2808,7 @@ % {#1}{Gray}{[0.0 1.0]}% % {{pop}}} + \def\doPDFregisterrgbspotcolor#1#2#3#4#5#6#7% name noffractions names p's r g b {\doPDFregistersomespotcolor{#1}{#2}{#3}{#4}{RGB}{0.0 1.0 0.0 1.0 0.0 1.0}% {\ifcase#2\or dup #5 mul exch dup #6 mul exch #7 mul\else#5 #6 #7\fi}} diff --git a/tex/context/base/spec-tpd.tex b/tex/context/base/spec-tpd.tex index ec57134ec..3238ddc80 100644 --- a/tex/context/base/spec-tpd.tex +++ b/tex/context/base/spec-tpd.tex @@ -532,18 +532,36 @@ % \appendtoPDFdocumentcolorspaces % {/#1 \the\pdflastobj\space0 R}} +\def\doPDFregisterspotcolorname#1#2% + {\bgroup + \let\ascii\empty + \def\docommand##1% + {\edef\ascii{\ascii + \ifx\nexthandledtoken\space + \letterhash20% + \else\ifx\nexthandledtoken\blankspace + \letterhash20% + \else + ##1% + \fi\fi}}% + \expanded{\handletokens#2}\with\docommand + \letgvalue{@@pdf@@scn@@#1}\ascii + \egroup} + \def\doPDFregistersomespotcolor#1#2#3#4#5#6#7% name fractions names p's space domain function {\bgroup \let\spotpops\empty \ifcase#2\or - \def\PDFspotcolornames{/Separation /#1}% + %def\PDFspotcolornames{/Separation /#1}% + \edef\PDFspotcolornames{/Separation /\executeifdefined{@@pdf@@scn@@#1}{#1}}% \def\PDFspotcolordomain{0.0 1.0}% \else \dorecurse{#2}{\edef\spotpops{\spotpops pop }}% \let\PDFspotcolornames \empty \let\PDFspotcolordomain\empty \def\dospotcolorcommand##1% - {\edef\PDFspotcolornames {\PDFspotcolornames/##1\space}% + {%\edef\PDFspotcolornames {\PDFspotcolornames/##1\space}% + \edef\PDFspotcolornames {\PDFspotcolornames/\executeifdefined{@@pdf@@scn@@##1}{##1}\space}% \edef\PDFspotcolordomain{\PDFspotcolordomain 0.0 1.0\space}}% \processcommacommand[#3]\dospotcolorcommand \edef\PDFspotcolornames{/DeviceN [\PDFspotcolornames]}% @@ -565,7 +583,8 @@ \let\PDFspotcolornames \empty \let\PDFspotcolordomain\empty \def\docommand##1% - {\edef\PDFspotcolornames {\PDFspotcolornames/##1\space}% + {%\edef\PDFspotcolornames {\PDFspotcolornames/##1\space}% + \edef\PDFspotcolornames{\PDFspotcolornames/\executeifdefined{@@pdf@@scn@@##1}{##1}\space}% \edef\PDFspotcolordomain{\PDFspotcolordomain 0.0 1.0\space}}% \processcommacommand[#3,None]\docommand \let\PDFcolorindexvector\empty diff --git a/tex/context/base/x-xml-11.tex b/tex/context/base/x-xml-11.tex new file mode 100644 index 000000000..bdacd97c2 --- /dev/null +++ b/tex/context/base/x-xml-11.tex @@ -0,0 +1,103 @@ +%D \module +%D [ file=x-xml-11, +%D version=2004.09.16, +%D title=\CONTEXT\ XML Style File, +%D subtitle=Formatting X?? files, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% xmltools --analyze yourfile.xml +% texexec --use=xml-analyze yourfile.* + +\doifnothing {\inputfilename} {\end} +\doiffileelse {\inputfilename} {} {\end} + +\useXMLfilter[ent] +\useXMLfilter[utf] + +\chardef\XMLtokensreduction\plustwo + +\definehead + [SomeElement] + [subsection] + +\setuphead + [SomeElement] + [ownnumber=yes, + style=\tfb, + alternative=margin] + +\setuplayout + [width=middle, + height=middle, + backspace=2cm, + cutspace=1cm, + topspace=1cm, + header=0pt] + +\setupfootertexts + [\inputfilename] + +\usetypescript[modern][texnansi] \setupbodyfont[modern,tt,10pt] + +\defineXMLenvironment + [document] + {} + {} + +\defineXMLpickup + [entities] + {\page + \starttabulate[|l|p|]} + {\stoptabulate} + +\defineXMLcommand + [entity][name=,n=0] + {\startexpanded + \noexpand \NC \XMLop{name} + \noexpand \NC \XMLop{n} + \noexpand \NC + \noexpand \NR + \stopexpanded} + +\defineXMLenvironment + [elements] + {\page} + {} + +\newtoks \TabulateToks + +\defineXMLpickup + [element][name=,n=0] + {\expanded{\SomeElement{\XMLop{n}}{\XMLop{name}}} + \TabulateToks\emptytoks} + {\starttabulate[|l|r|p|] + \the\TabulateToks + \stoptabulate} + +\defineXMLenvironment + [attribute][name=] + {\xdef\AttributeName{\XMLop{name}}} + {} + +\defineXMLenvironment + [instance][value=,n=0] + {\appendetoks + \noexpand \NC \AttributeName + \noexpand \NC \XMLop{n} + \noexpand \NC \XMLop{value} + \noexpand \NC + \noexpand \NR + \to \TabulateToks} + {\xdef\AttributeName{}} + +\starttext + +\processXMLfilegrouped{\inputfilename} + +\stoptext diff --git a/tex/context/base/xtag-map.tex b/tex/context/base/xtag-map.tex index eeaeb27f0..077bca13e 100644 --- a/tex/context/base/xtag-map.tex +++ b/tex/context/base/xtag-map.tex @@ -617,6 +617,22 @@ #2\empty \popmacro\xmlr} +\def\doifelseXMLRneighbors#1#2% + {\XMLRtoks\emptytoks + \pushmacro\xmlr + \donefalse + \let\prevXMLRchild\empty + \def\xmlr##1##2##3##4% + {\doif{##1}{#1}{\doif{##1}\prevXMLRchild{\donetrue}}% + \def\prevXMLRchild{##1}}% + #2\empty + \popmacro\xmlr + \ifdone + \expandafter\firstoftwoarguments + \else + \expandafter\secondoftwoarguments + \fi} + \def\collectbetweenXMLRchild#1#2#3% {\XMLRtoks\emptytoks \pushmacro\xmlr @@ -667,7 +683,7 @@ \def\countXMLRchildren#1% {\pushmacro\xmlr \nofXMLRchildren=0 - \def\xmlr##1##2##3##4{\advance\nofXMLRchildren 1 } + \def\xmlr##1##2##3##4{\advance\nofXMLRchildren\plusone} #1\empty \popmacro\xmlr} @@ -675,7 +691,7 @@ {\pushmacro\xmlr \nofXMLRchildren=0 \def\xmlr##1##2##3##4% - {\rawdoifinsetelse{##1}{#1}{\advance\nofXMLRchildren 1 }{}} + {\rawdoifinsetelse{##1}{#1}{\advance\nofXMLRchildren\plusone}{}} #2\empty \popmacro\xmlr} diff --git a/tex/context/base/xtag-mmc.tex b/tex/context/base/xtag-mmc.tex index 7e6c1f778..2e6d3d988 100644 --- a/tex/context/base/xtag-mmc.tex +++ b/tex/context/base/xtag-mmc.tex @@ -87,10 +87,8 @@ \def\MMLcenotation#1% {\doifelse\@@MMLenotationsymbol\v!no - {\def\MMLcsep% - {\unskip{\rm e}\ignorespaces}} - {\def\MMLcsep##1\empty - {\doifelse\@@MMLenotationsymbol{dot}\cdot\times10^{##1}}}% + {\def\MMLcsep {\unskip{\rm e}\ignorespaces}} + {\def\MMLcsep##1\empty{\doifelse\@@MMLenotationsymbol{dot}\cdot\times10^{##1}}}% #1\empty} \def\MMLcCI#1% #2% can be sped up with \doifundefined ... @@ -126,10 +124,7 @@ complex-cartesian=>\let\next\MMLccartesian, {{\bi#1}} \def\MMLcCIfunction#1% - {\doifMMLoperatorelse{#1} - {\let\next\MMLcCIdefault} - {\let\next\MMLcFNdefault}% - \next{}{#1}} + {\doifMMLoperatorelse{#1}\MMLcCIdefault\MMLcFNdefault{}{#1}} \def\MMLcCIdefault#1#2% #1=dummy {#2%\!% \getXMLentity{NegThinSpace}% looks bad in A(x) @@ -167,8 +162,8 @@ complex-cartesian=>\let\next\MMLccartesian, \processaction [\@@MMLbasesymbol] [\v!characters=>\MMLcCNbasestring BODH, - \v!text=>\MMLcCNbasestring{BIN}{OCT}{DEC}{HEX}, - \s!unknown=>\MMLcCNbase]$}}}} + \v!text=>\MMLcCNbasestring{BIN}{OCT}{DEC}{HEX}, + \s!unknown=>\MMLcCNbase]$}}}} {#1}} \def\MMLcCNbasedata#1% @@ -266,10 +261,9 @@ complex-cartesian=>\let\next\MMLccartesian, {\doifXMLRchildelse{ci}{#2} {\collectXMLRchild{ci}{#2}% \@EA\doifMMLoperatorelse\@EA{\the\XMLRtoks} - {\let\next\MMLcFNoperator} - {\let\next\MMLcFNdefault}} - {\let\next\MMLcFNdefault}% - \next{#1}{#2}} + \MMLcFNoperator\MMLcFNdefault} + {\MMLcFNdefault}% + {#1}{#2}} \def\MMLcFNdefault#1#2% neg space needed because of \left {#2\!% \getXMLentity{NegThinSpace}% @@ -541,13 +535,19 @@ complex-cartesian=>\let\next\MMLccartesian, \remapXMLsingular [times] [CPA] \MMLcTIMES -\setupMMLappearance[times][\c!symbol=\v!no] +\setupMMLappearance[times][\c!symbol=\v!no] % +\setupMMLappearance[times][\c!auto=\v!yes] % new, auto catches cn cn cn \def\MMLcTIMES#1#2#3\empty {\setMMLcreset{\MMLcfunctionlist,\MMLcconstructlist}% - \doifelse\@@MMLtimessymbol\v!yes + \doifelse\@@MMLtimesauto\v!no + {\let\@@MMLtimes@@symbol\@@MMLtimessymbol} + {\doifelseXMLRneighbors{cn}{#3} + {\let\@@MMLtimes@@symbol\@@MMLtimesauto} + {\let\@@MMLtimes@@symbol\v!no}}% + \doifelse\@@MMLtimes@@symbol\v!yes {\encapsulateXMLR{}{\times}{}{#3\empty}} - {\doifelse\@@MMLtimessymbol{dot} + {\doifelse\@@MMLtimes@@symbol{dot} {\encapsulateXMLR{}{\cdot}{}{#3\empty}} {#3\empty}}} diff --git a/tex/context/base/xtag-mml.tex b/tex/context/base/xtag-mml.tex index d615585be..b77063986 100644 --- a/tex/context/base/xtag-mml.tex +++ b/tex/context/base/xtag-mml.tex @@ -13,6 +13,9 @@ \writestatus{loading}{Context XML Macros (math ml)} +% I will reimplement this one without mapping since we now have more +% tricks available + %\enablemathpunctuation % First some general formula element definitions. @@ -60,6 +63,7 @@ \defineXMLargument [math] \doXMLmath \defineXMLargument [imath] \doXMLimath \defineXMLargument [dmath] \doXMLdmath +\defineXMLargument [m] \doXMLimath \unexpanded\def\doXMLmath {\ifhmode\@EA\doXMLimath\else\@EA\doXMLdmath\fi} \unexpanded\def\doXMLimath{\XMLremapdata[mml]{$}{$}} diff --git a/tex/context/foxet/fo-0101.fo b/tex/context/foxet/fo-0101.fo index d8f9386fb..aae8178af 100644 --- a/tex/context/foxet/fo-0101.fo +++ b/tex/context/foxet/fo-0101.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0103.fo b/tex/context/foxet/fo-0103.fo index 5a28b4c52..14805a87b 100644 --- a/tex/context/foxet/fo-0103.fo +++ b/tex/context/foxet/fo-0103.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0201.fo b/tex/context/foxet/fo-0201.fo index 7c261ae59..f524cfd09 100644 --- a/tex/context/foxet/fo-0201.fo +++ b/tex/context/foxet/fo-0201.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0301.fo b/tex/context/foxet/fo-0301.fo index 057017d30..9b5e0cc8b 100644 --- a/tex/context/foxet/fo-0301.fo +++ b/tex/context/foxet/fo-0301.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0601.fo b/tex/context/foxet/fo-0601.fo index 5413752ec..ba3e58780 100644 --- a/tex/context/foxet/fo-0601.fo +++ b/tex/context/foxet/fo-0601.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0602.fo b/tex/context/foxet/fo-0602.fo index d7c0f2647..143dfce88 100644 --- a/tex/context/foxet/fo-0602.fo +++ b/tex/context/foxet/fo-0602.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0603.fo b/tex/context/foxet/fo-0603.fo index e128ab307..80e178c45 100644 --- a/tex/context/foxet/fo-0603.fo +++ b/tex/context/foxet/fo-0603.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0604.fo b/tex/context/foxet/fo-0604.fo index da0e5a8f8..92499d89d 100644 --- a/tex/context/foxet/fo-0604.fo +++ b/tex/context/foxet/fo-0604.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0611.fo b/tex/context/foxet/fo-0611.fo index f349a1cbf..70f495fb6 100644 --- a/tex/context/foxet/fo-0611.fo +++ b/tex/context/foxet/fo-0611.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0612.fo b/tex/context/foxet/fo-0612.fo index 5592cfa9d..c062ec4ee 100644 --- a/tex/context/foxet/fo-0612.fo +++ b/tex/context/foxet/fo-0612.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0613.fo b/tex/context/foxet/fo-0613.fo index 4c9947458..f478a571d 100644 --- a/tex/context/foxet/fo-0613.fo +++ b/tex/context/foxet/fo-0613.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0621.fo b/tex/context/foxet/fo-0621.fo index 94c6cf757..fa14aefc6 100644 --- a/tex/context/foxet/fo-0621.fo +++ b/tex/context/foxet/fo-0621.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0641.fo b/tex/context/foxet/fo-0641.fo index b6a611970..1ec9772a8 100644 --- a/tex/context/foxet/fo-0641.fo +++ b/tex/context/foxet/fo-0641.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0642.fo b/tex/context/foxet/fo-0642.fo index eb68de813..0c1a345b9 100644 --- a/tex/context/foxet/fo-0642.fo +++ b/tex/context/foxet/fo-0642.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0643.fo b/tex/context/foxet/fo-0643.fo index 2ba9fa454..7accf8ab8 100644 --- a/tex/context/foxet/fo-0643.fo +++ b/tex/context/foxet/fo-0643.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0644.fo b/tex/context/foxet/fo-0644.fo index c781aeb20..c23647159 100644 --- a/tex/context/foxet/fo-0644.fo +++ b/tex/context/foxet/fo-0644.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0650.fo b/tex/context/foxet/fo-0650.fo index 126429377..7ae67a1e5 100644 --- a/tex/context/foxet/fo-0650.fo +++ b/tex/context/foxet/fo-0650.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0651.fo b/tex/context/foxet/fo-0651.fo index d3a9bb116..a10163f5d 100644 --- a/tex/context/foxet/fo-0651.fo +++ b/tex/context/foxet/fo-0651.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0701.fo b/tex/context/foxet/fo-0701.fo index 20613594e..4d5391daa 100644 --- a/tex/context/foxet/fo-0701.fo +++ b/tex/context/foxet/fo-0701.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0801.fo b/tex/context/foxet/fo-0801.fo index 2279abc62..11747d360 100644 --- a/tex/context/foxet/fo-0801.fo +++ b/tex/context/foxet/fo-0801.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-0901.fo b/tex/context/foxet/fo-0901.fo index c8b5cacc4..e071bd919 100644 --- a/tex/context/foxet/fo-0901.fo +++ b/tex/context/foxet/fo-0901.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-1001.fo b/tex/context/foxet/fo-1001.fo index 4832d227c..3733265fd 100644 --- a/tex/context/foxet/fo-1001.fo +++ b/tex/context/foxet/fo-1001.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-1002.fo b/tex/context/foxet/fo-1002.fo index a77a06be8..cc0ea8100 100644 --- a/tex/context/foxet/fo-1002.fo +++ b/tex/context/foxet/fo-1002.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-1003.fo b/tex/context/foxet/fo-1003.fo index 83a8da67e..4c416e02d 100644 --- a/tex/context/foxet/fo-1003.fo +++ b/tex/context/foxet/fo-1003.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-1004.fo b/tex/context/foxet/fo-1004.fo index 84f37f0c8..1c057edd7 100644 --- a/tex/context/foxet/fo-1004.fo +++ b/tex/context/foxet/fo-1004.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/foxet/fo-1101.fo b/tex/context/foxet/fo-1101.fo index e4912ee08..134e656b7 100644 --- a/tex/context/foxet/fo-1101.fo +++ b/tex/context/foxet/fo-1101.fo @@ -1,4 +1,4 @@ -<?xml version '1.0'?> +<?xml version='1.0'?> <!-- foxet test file - Hans Hagen - PRAGMA ADE - www.pragma-ade.com --> diff --git a/tex/context/sample/hawking.tex b/tex/context/sample/hawking.tex new file mode 100644 index 000000000..e0e0cccd2 --- /dev/null +++ b/tex/context/sample/hawking.tex @@ -0,0 +1,7 @@ +If [in 2600] you stacked all the new books being published next to +each other, you would have to move at ninety miles an hour just to +keep up with the end of the line. Of course, by 2600 new artistic +and scientific work will come in electronic forms, rather than as +physical books and paper. Nevertheless, if the exponential growth +continued, there would be ten papers a second in my kind of +theoretical physics, and no time to read them. diff --git a/tex/context/sample/sample.tex b/tex/context/sample/sample.tex index 9eeae96b2..44ef8ec5d 100644 --- a/tex/context/sample/sample.tex +++ b/tex/context/sample/sample.tex @@ -1,8 +1,12 @@ \starttext The sample directory contains a few files with quotes that can be used -while testing styles. I'll complete this file when I've reorganized my -books and audio cd's. +while testing styles. + +I'll complete this file when I've reorganized my books and audio cd's. + +If someone makes a nice bibtex file of these, the quotes can also be +used in testing bibliographic references and citations. \starttabulate[|l|l|p|] \NC \bf file \NC \bf author \NC \bf source \NC \NR @@ -27,6 +31,8 @@ books and audio cd's. \NC thuan.tex \NC Trinh Xuan Thuan \NC Chaos and Harmony, Perspectives on Scientific Revolutions of the Twentieth Century, \endgraf Oxford University Press, 2001 \NC \NR +\NC hawking.tex \NC Steve W. Hawking \NC The Universe in a Nutshell, Bantam Books + (Random House), 2001 \NC \NR \stoptabulate % Tufte: This quote will always produce hyphenated text, apart from the content, @@ -40,4 +46,7 @@ books and audio cd's. % Chaos and Harmony: very nice and well written book, but the typography is rather bad: % quite visible inter-character spacing in a text that can be typeset quite well by \TeX. -\stoptext
\ No newline at end of file +% The Universe in a Nutshell: a beautiful designed book, (companion of A Short History +% of Time) + +\stoptext diff --git a/tex/generic/context/ppchtex.noc b/tex/generic/context/ppchtex.noc index 12cc676af..4ae710279 100644 --- a/tex/generic/context/ppchtex.noc +++ b/tex/generic/context/ppchtex.noc @@ -9,38 +9,37 @@ %D suggestions={Tobias Burnus, Dirk Kuypers \& Ton Otten}] %C %C This module is part of the \CONTEXT\ macro||package and is -%C therefore copyrighted by \PRAGMA. See licen-en.pdf for -%C details. - -%D This module facilitates the use of \PPCHTEX\ in macro -%D packages other than \CONTEXT. One of the features of -%D \CONTEXT\ is that the user interface can be in any -%D language. This language is defined at loading time. -%D -%D This module is indeed a surrogate one and is only a poor -%D man's alternative to the more extensive \type{mult-***} -%D modules of \CONTEXT. The extra overhead in terms of macros -%D and functionality that these modules offer is only useful -%D in \CONTEXT. -%D -%D Two interfaces are supported here, but others can easily be +%C therefore copyrighted by \PRAGMA. See licen-en.pdf for +%C details. + +%D This module facilitates the use of \PPCHTEX\ in macro +%D packages other than \CONTEXT. One of the features of +%D \CONTEXT\ is that the user interface can be in any +%D language. This language is defined at loading time. +%D +%D This module is indeed a surrogate one and is only a poor +%D man's alternative to the more extensive \type{mult-***} +%D modules of \CONTEXT. The extra overhead in terms of macros +%D and functionality that these modules offer is only useful +%D in \CONTEXT. +%D +%D Two interfaces are supported here, but others can easily be %D defined. This module expects the general system macros to be -%D loaded as wel as a interface switch \type{\ifalternativeinterface} -%D to be set. +%D loaded as wel as a interface switch \type{\ifalternativeinterface} +%D to be set. %D First we load some auxiliary macro's: \input supp-mis.tex \let\writestatus\undefined -\input syst-gen.tex +\input syst-gen.tex -%D after which we can go on with: +%D after which we can go on with: \unprotect -%D 0 = english -%D 1 = dutch -%D 2 = german -%D 3 = czech (not yet implemented here) +%D 0 = english +%D 1 = dutch +%D 2 = german \ifx\interfacenumber\undefined \chardef\interfacenumber=0 @@ -52,40 +51,40 @@ \def\definesystemconstant #1 % {\setvalue{s!#1}{#1}} -\def\definevariable #1 #2 #3 % +\def\definevariable #1 #2 #3 % en nl de {\ifcase\interfacenumber - \setvalue{v!#2}{#1} + \setvalue{v!#1}{#1} \or - \setvalue{v!#2}{#2} + \setvalue{v!#1}{#2} \or - \setvalue{v!#2}{#3} + \setvalue{v!#1}{#3} \fi} -\def\defineconstant #1 #2 #3 % +\def\defineconstant #1 #2 #3 % en nl de {\ifcase\interfacenumber - \setvalue{c!#2}{#2} \setvalue{c!#1}{#2} - \or \setvalue{c!#2}{#2} \or - \setvalue{c!#2}{#2} + \setvalue{c!#1}{#2} + \or + \setvalue{c!#1}{#2} \setvalue{c!#3}{#2} \fi} \def\definecommand #1 #2 #3 % {\ifcase\interfacenumber - % core commands are english + % core commands are english \or \doifnot{#1}{#2}{\setvalue{#2}{\getvalue{#1}}} \or \doifnot{#1}{#3}{\setvalue{#3}{\getvalue{#1}}} \fi} -\long\def\startcommands#1\stopcommands% +\long\def\startcommands#1\stopcommands {} \def\dosetvalue#1#2#3% - {\p!doifundefined{\c!prefix!#2}% + {\p!doifundefined{\c!prefix!#2}% \let\donottest=\doprocesstest \@EA\def\csname#1#2\endcsname{#3}% \else @@ -124,7 +123,7 @@ \defineconstant width breedte breite \defineconstant size formaat groesse \defineconstant number getal nummer -\defineconstant height hoogte hoehe +\defineconstant height hoogte hoehe \defineconstant frame kader rahmen %defineconstant framecolor kaderkleur rahmenfarbe \defineconstant color kleur farbe @@ -132,24 +131,24 @@ \defineconstant style letter schriftstil \defineconstant rulethickness lijndikte liniendicke \defineconstant rulecolor lijnkleur linienfarbe -\defineconstant left links links +\defineconstant left links links \defineconstant offset offset offset \defineconstant bottom onder unten \defineconstant option optie option \defineconstant location plaats platz \defineconstant right rechts rechts \defineconstant resolution resolutie aufloesung -\defineconstant scale schaal format +\defineconstant scale schaal format \defineconstant status status status \defineconstant text tekst text \defineconstant textcolor tekstkleur tekstfarbe -\defineconstant textsize tekstformaat textgroesse +\defineconstant textsize tekstformaat textgroesse \defineconstant alternative variant alternative \defineconstant x x x \defineconstant y y y \definevariable on aan an -\definevariable big groot gross +\definevariable big groot gross \definevariable intext intekst imtext \definevariable small klein klein \definevariable medium middel mittel @@ -159,53 +158,51 @@ \definevariable test test test \definevariable off uit aus -\definecommand definechemical definieerchemie definierechemie -\definecommand setupchemical stelchemiein stellechemieein -\definecommand chemical chemie chemie -\definecommand tochemical naarchemie zurchemie -\definecommand startchemical startchemie startchemie -\definecommand stopchemical stopchemie stopchemie -\definecommand toptext boventekst textueber +\definecommand definechemical definieerchemie definierechemie +\definecommand setupchemical stelchemiein stellechemieein +\definecommand chemical chemie chemie +\definecommand tochemical naarchemie zurchemie +\definecommand startchemical startchemie startchemie +\definecommand stopchemical stopchemie stopchemie +\definecommand toptext boventekst textueber \definecommand bottext ondertekst textunter \definecommand midtext middentekst textmitte \protect -%D After those definitions we actually load \PPCHTEX: +%D After those definitions we actually load \PPCHTEX: \input ppchtex.tex -%D We also change some setup values. Let's hope that the next -%D setups forever suits \LATEX. +%D We also change some setup values. Let's hope that the next +%D setups forever suits \LATEX. \unprotect \ifx\bodyfontsize\undefined \ifx\f@size\undefined \ifx\@ptsize\undefined - \setupchemical[\c!korps=11pt] + \setupchemical[\c!bodyfont=11pt] \else - \setupchemical[\c!korps=1\@ptsize pt] + \setupchemical[\c!bodyfont=1\@ptsize pt] \fi \else - \setupchemical[\c!korps=\f@size pt] + \setupchemical[\c!bodyfont=\f@size pt] \fi \else - \setupchemical[\c!korps=\bodyfontsize] + \setupchemical[\c!bodyfont=\bodyfontsize] \fi \ifx\mathrm\undefined - \setupchemical[\c!letter=\rm] + \setupchemical[\c!style=\rm] \else - \setupchemical[\c!letter=\mathrm] + \setupchemical[\c!style=\mathrm] \fi \ifx\outputresolution\undefined - \setupchemical[\c!resolutie=300] + \setupchemical[\c!resolution=300] \else - \setupchemical[\c!resolutie=\outputresolution] + \setupchemical[\c!resolution=\outputresolution] \fi -\protect - -\endinput +\protect \endinput |