summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/context/base/cont-new.tex
diff options
context:
space:
mode:
authorTaco Hoekwater <taco@elvenkind.com>2009-08-23 11:11:32 +0000
committerTaco Hoekwater <taco@elvenkind.com>2009-08-23 11:11:32 +0000
commit8fc3039c82d48605b5ca8b2eda3f4fdd755681e1 (patch)
tree3cd9bbdd599bc4d1ac0409e167fee2136e4c0ec9 /Master/texmf-dist/tex/context/base/cont-new.tex
parent850fc99b7cd3ae7a20065531fe866ff7bae642ec (diff)
this is context 2009.08.19 17:10
git-svn-id: svn://tug.org/texlive/trunk@14827 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/cont-new.tex')
-rw-r--r--Master/texmf-dist/tex/context/base/cont-new.tex863
1 files changed, 56 insertions, 807 deletions
diff --git a/Master/texmf-dist/tex/context/base/cont-new.tex b/Master/texmf-dist/tex/context/base/cont-new.tex
index eda6471d25c..161d4c9182e 100644
--- a/Master/texmf-dist/tex/context/base/cont-new.tex
+++ b/Master/texmf-dist/tex/context/base/cont-new.tex
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2008.05.21 15:21}
+\newcontextversion{2009.08.19 17:10}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
@@ -21,23 +21,24 @@
% it's about time to clean up this file ...
-\writestatus{\m!systems}{beware: some patches loaded from cont-new.tex}
+\writestatus\m!systems{beware: some patches loaded from cont-new.tex}
% \ifx\pdfmapfile \undefined \else \pdfmapfile{ } \fi
% \font\f=dummyfont \rpcode\f0=500 \hbox{..}\char0
% todo: mp-new
% caption: grid=top|bottom in xml defs
-
-\let\then\relax % \ifnum1>2\then -)
-\def\TransparencyHack
- {\appendtoks
- \doPDFpageattribute{/Group << /S /Transparency /I true /K true>>}%
- \to \everyPDFxform
- \appendtoks
- \doPDFpageattribute{/Group << /S /Transparency /I true /K true>>}%
- \to \everyshipout}
+\def\fastscale#1%
+ {\begingroup
+ \ifnum#1=1000\relax
+ \setfalse\scaleboxdone
+ \else
+ \settrue\scaleboxdone
+ \edef\finalscaleboxxscale{\withoutpt\the\dimexpr#1pt/1000\relax}%
+ \let\finalscaleboxyscale\finalscaleboxxscale
+ \fi
+ \dowithnextbox{\doscaleboxindeed\flushnextbox\endgroup}\hbox}
% \setupcaption [figure] [align=flushleft]
% \setupcaption [figure-1] [align=flushleft,leftmargin=10mm]
@@ -56,7 +57,7 @@
\def\placefloatwithsetups
{\dotripleempty\doplacefloatwithsetups}
-\def\doplacefloatwithsetups[#1][#2][#3]#4%
+\long\def\doplacefloatwithsetups[#1][#2][#3]#4%
{\def\floatsetupcaption {#4}%
\def\floatsetupcontent {\copy\nextbox}%
\def\floatsetupwidth {\wd\nextbox}%
@@ -71,35 +72,6 @@
\fi
\relax}
-% maybe to be integrated (option=...)
-
-\def\directexternalfigure
- {\dodoubleempty\dodirectexternalfigure}
-
-\def\dodirectexternalfigure[#1][#2]%
- {\bgroup
- \getparameters[\??ef][\c!type=\splitofftype,\c!page=1,#2]%
- \sanitizefilename#1\to\expandedfigurename
- \splitfilename\expandedfigurename
- \let\@@DriverImageWidth \!!zeropoint
- \let\@@DriverImageHeight \!!zeropoint
- \let\@@DriverImageFile \splitofffull
- \let\@@DriverImageType \@@eftype
- \let\@@DriverImageMethod \@@eftype
- \let\@@DriverImageLabel \empty
- \let\@@DriverImagePage \@@efpage
- \doinsertfile
- \egroup}
-
-% \directexternalfigure[cow.pdf]
-
-% normally one does not want this to happen nested, maybe there
-% is more; non public vars btw, will become conditionals
-
-\appendtoks \writetoregisterfalse \to \everybeforeutilityread
-\appendtoks \writetolistfalse \to \everybeforeutilityread
-\appendtoks \notesenabledfalse \to \everybeforeutilityread
-
% \setuplabeltext[\s!itemcount1={{I(},{)}}]
% \def\labeledcountervalue#1{\labeltexts{#1}{\countervalue{#1}}}
@@ -197,15 +169,6 @@
% \expandafter\shapesynonym\csname shsy:#1\endcsname\else#1%
% \fi}
%
-% \beginTEX
-%
-% \def\shapesynonym#1%
-% {\expandafter\ifx\csname shsy:#1\endcsname\relax
-% #1\else\expandafter\shapesynonym\csname shsy:#1\endcsname
-% \fi}
-%
-% \endTEX
-%
%\defineshapesynonym[eacute] [e]
%\defineshapesynonym[egrave] [e]
%\defineshapesynonym[eumlaut [e]
@@ -219,132 +182,6 @@
%
% \shapesynonym{eacute}
-% \page[left]
-% \definecolumntextarea[intro][left][x=1,y=1,nx=4,ny=20,state=start,background=introlayer]
-% \setupcolumntextareatext[intro][left][\setups{intro}]
-% \flushcolumntextareas
-
-\def\flushcolumntextareas
- {\initializecolumntextareas
- \setvsize}
-
-%D (Inspired by a discussion on the \CONTEXT\ mailing list)
-%D
-%D In \TEX\ each character can have one of 16 catcodes. This way the
-%D backslash, dollar, ampersand, hash and some more characters get
-%D their special meaning. If you want to process tokens under a
-%D certain catcode regime, passing arguments can interfere badly.
-%D
-%D \startbuffer[a]
-%D \def\whatever#1{[#1]}
-%D \whatever{whatever \type {\whatever{you want}} $or$ not!}
-%D \stopbuffer
-%D
-%D \typebuffer[a]
-%D
-%D Here we pass an argument to \type {\whatever} but part of that
-%D argument is to be processed under a different catcode regime, i.e.\
-%D all characters that need to be typeset verbatim need to get
-%D the catcode that makes it a letter. This is what we get when we typeset
-%D the text verbatim:
-%D
-%D \starttyping
-%D whatever \type {\whatever{you want}} $or$ not!
-%D \stoptyping
-%D
-%D However, when passed to \type {\whatever} we get:
-%D
-%D \getbuffer[a]
-%D
-%D In \ETEX\ one can use \type {\scantokens} to circumvent this problem.
-%D
-%D \startbuffer[b]
-%D \def\rescan#1{\scantokens{#1}}
-%D \def\whatever#1{[\rescan{#1}]}
-%D \whatever{whatever \type {\whatever{you want}} $or$ not!}
-%D \stopbuffer
-%D
-%D \getbuffer[b] \typebuffer[b]
-%D
-%D This time the \type {\whatever} call gives:
-%D
-%D \getbuffer[b]
-%D
-%D In this example, two spaces have crept in. The first one, after the
-%D macro name, is inserted by \TEX\ and cannot be avoided. The last space
-%D is inserted by \type {\scantokens}, and is the consequence of the fact
-%D that this macro mimics reading from a file. You can avoid the last
-%D space by a slightly different definition:
-%D
-%D \startbuffer[c]
-%D \def\rescan#1{\scantokens{#1\ignorespaces}}
-%D \def\whatever#1{[\rescan{#1}]}
-%D \whatever{whatever \type {\whatever{you want}} $or$ not!}
-%D \stopbuffer
-%D
-%D \typebuffer[c]
-%D
-%D Unfortunately we still keep the first space, but at least it's better than
-%D a failure:
-%D
-%D \getbuffer[c]
-
-\long\def\rescan#1{\scantokens{#1\ignorespaces}}
-\long\def\rescanwithsetup#1#2{\begingroup\directsetup{#1}\scantokens{#2\ignorespaces}\endgroup}
-
-\ifx\scantextokens\undefined \else
- \long\def\rescan#1{\scantextokens{#1}}
- \long\def\rescanwithsetup#1#2{\begingroup\directsetup{#1}\scantextokens{#2}\endgroup}
-\fi
-
-% In 2005 we will abandon support for font encodings that don't have
-% the ascii characters { } $ etc in their normal slot, i.e. latin modern
-% instead of computer modern. Then we can also clean up some of the ugly
-% xml internals that are a result from the need to deal with funny
-% encodings.
-%
-% a solution:
-%
-% \defineXMLargument[ctx:c]{\getXMLcharacter}
-% \defineXMLargument[ctx:e]{\getXMLentity }
-% \defineXMLargument[ctx:u]{\unicodechar }
-%
-% \bgroup \catcode`\<=\active \catcode`\&=\active
-%
-% \gdef\dontexpandutf
-% {\def\getXMLcharacter##1{<ctx:c>##1</ctx:c>}%
-% \def\getXMLentity ##1{<ctx:e>##1</ctx:e>}%
-% \def\unicodechar ##1{<ctx:u>##1</ctx:u>}}
-%
-% \egroup
-%
-% more generic
-%
-% IS THIS STILL OK? TO BE CHECKED (UTF AND SUCH) ! ! ! !
-
-\def\XMLexpanded#1%
- {\bgroup
- \honorunexpanded
-% \dontexpandencoding
-% \dontexpandutf
- \chardef\activecharactermode\zerocount
- \xdef\@@globalexpanded{#1}%
- \egroup
- \@@globalexpanded}
-
-\def\setXMLexpandedmark#1#2% using a tok prevents unwanted expansion in mark
- {\XMLexpanded{\scratchtoks{\enableXML#2}}%
- \expanded{\normalsetnormalmark{#1}{\the\scratchtoks}}}
-
-% \separatestring123 456\to\test [\test]
-
-% \def\separatestring#1\to#2%
-% {\let#2\empty
-% \def\docommand##1{\edef#2{\ifx#2\empty\else#2,\fi##1}}%
-% \processseparatedlist[#1][ ]\docommand}
-%
-% \processseparatedlist[aap noot][]\ruledhbox
-
% this will be activated when
% \newinsert\thispageinsert % <- installinsertion
@@ -426,10 +263,6 @@
% \getmulticolumnlines -> now in cont-loc, to be tested and really needed
-\long\def\startprocesscommalist[#1]#2\stopprocesscommalist
- {\long\def\currentcommalistcommand##1{\def\currentcommalistitem{##1}#2}%
- \processcommalist[#1]\currentcommalistcommand}
-
% \tracefonthandlingtrue
% new, still to be improved
@@ -515,7 +348,7 @@
\expandafter#1%
\fi}
-\gdef\collapsespaces%
+\gdef\collapsespaces
{\prependtoksonce\relax\to\everyeof%
\ignorelines%
\ignoretabs%
@@ -524,232 +357,6 @@
\egroup
-% todo : test low level translation (nl->en) and optimize script
-
-% \definestylecollection[mine]
-
-% \definestyleinstance[mine][default][sorry]
-% \definestyleinstance[mine][tt][bs][ttbs:\rm\sl]
-% \definestyleinstance[mine][tt][bf][ttbf:\rm\sl]
-% \definestyleinstance[mine][bf][\sl]
-% \definestyleinstance[mine][sl][\tt]
-
-% {\bf test \mine test \sl test \mine test \bs oeps \mine oeps {\tt test \mine \bf test}}
-
-\definesystemvariable{sx}
-
-\def\definestylecollection
- {\dosingleargument\dodefinestylecollection}
-
-\def\dodefinestylecollection[#1]%
- {\iffirstargument
- \unexpanded\setvalue{#1}{\styleinstance[#1]}%
- \def\docommand##1%
- {\def\dodocommand####1{\letbeundefined{\??sx##1:####1:\commalistelement}}%
- \processcommacommand[\alternativelist,\s!default]\dodocommand}%
- \processcommacommand[\stylelist,\s!default]\docommand
- \fi}
-
-\def\definestyleinstance
- {\doquadrupleargument\dodefinestyleinstance}
-
-\def\dodefinestyleinstance[#1][#2][#3][#4]% [name] [rm|ss|tt|..] [sl|bf|...] [whatever]
- {\iffirstargument
- \doifundefined{#1}{\definestylecollection[#1]}%
- \fi
- \iffourthargument
- \setvalue{\??sx#1:#2:#3}{#4}%
- \else\ifthirdargument
- \setvalue{\??sx#1::#2}{#3}%
- \else\ifsecondargument
- \letvalue{\??sx#1::#2}\empty
- \fi\fi\fi}
-
-\unexpanded\def\styleinstance[#1]% will be faster
- {%\begingroup\expanded{\infofont[#1:\fontstyle:\fontalternative]}\endgroup
- \executeifdefined{\??sx#1:\fontstyle:\fontalternative}%
- {\executeifdefined{\??sx#1:\fontstyle:\s!default}%
- {\executeifdefined{\??sx#1::\fontalternative}
- {\getvalue {\??sx#1::\s!default}}}}}
-
-% \beginETEX \ifcsname
-%
-% \unexpanded\def\styleinstance[#1]%
-% {\csname\??sx#1%
-% \ifcsname:\fontstyle:\fontalternative\endcsname
-% :\fontstyle:\fontalternative
-% \else\ifcsname:\fontstyle:\s!default\endcsname
-% :\fontstyle:\s!default
-% \else\ifcsname::\fontalternative\endcsname
-% ::\fontalternative
-% \else\ifcsname::\s!default\endcsname
-% ::\s!default
-% \else
-% % nothing, \relax
-% \fi\fi\fi\fi
-% \endcsname}
-%
-% \endETEX
-
-% no, wrong! never!
-%
-% \def\tightlayer[#1]%
-% {\begingroup
-% \def\currentlayer{#1}% todo: left/right
-% \setbox\nextbox\emptybox % hoogte/breedte are \wd\nextbox/\ht\nextbox
-% \hsize\layerparameter\c!width % \overlaywidth = \hsize
-% \vsize\layerparameter\c!height % \overlaywheight = \vsize
-% \hbox to \hsize{\composedlayer{#1}}%
-% \endgroup}
-
-% todo : share symbols
-
-% \definecolor[rollover:n][red]
-% \definecolor[rollover:r][green]
-% \definecolor[rollover:d][blue]
-
-\definepalet
- [rollover]
- [n=red,
- r=green,
- d=blue]
-
-% \newcounter\nofrollovers
-%
-% \def\dorollbutton[#1][#2]#3[#4]%
-% {\dontleavehmode
-% \bgroup
-% \doglobal\increment\nofrollovers
-% \unexpanded\def\dosetlocationbox[##1]##2[##3]%
-% {\getparameters[##1][##3]%
-% \definecolor[rollover][rollover:##2]%
-% \let\next\hbox
-% \doif{##2}{n}
-% {\doifvalue{##1\c!variant}\v!verborgen{\let\next\phantom}}%
-% \next
-% {\localframed[##1]
-% [\c!framecolor=rollover,\c!backgroundcolor=rollover,\c!color=rollover]%
-% {\dolocationattributes{##1}\c!style\c!color{#3}}}}%
-% \iffirstargument
-% \ifsecondargument
-% \def\setlocationbox##1{\dosetlocationbox[\??am#1]{##1}[#2]}%
-% \else
-% \doifassignmentelse{#1}
-% {\def\setlocationbox##1{\dosetlocationbox[\??bt]{##1}[#1]}}
-% {\def\setlocationbox##1{\dosetlocationbox[\??am#1]{##1}[]}}%
-% \fi
-% \else
-% \def\setlocationbox##1{\dosetlocationbox[\??bt]{##1}[]}%
-% \fi
-% % todo: share symbols
-% \definesymbol[rsym:\nofrollovers:n][\setlocationbox n]%
-% \definesymbol[rsym:\nofrollovers:r][\setlocationbox r]%
-% \definesymbol[rsym:\nofrollovers:d][\setlocationbox d]%
-% \nextsystemfield
-% \setupfield
-% [rollbutton]
-% [\c!frame=\v!off,\c!offset=\v!overlay,\c!klickoff={#4}]%
-% \definefield
-% [\currentsystemfield][push][rollbutton]
-% [rsym:\nofrollovers:n,%
-% rsym:\nofrollovers:r,%
-% rsym:\nofrollovers:d]%
-% \fitfield[\currentsystemfield]%
-% \egroup}
-
-\newcounter\nofrollovers
-\newcounter\nofrollbuttons
-
-\def\dorollbutton[#1][#2]#3[#4]%
- {\dontleavehmode
- \bgroup
- \doglobal\increment\nofrollovers
- \doglobal\increment\nofrollbuttons
- \unexpanded\def\dosetlocationbox[##1]##2[##3]%
- {\getparameters[##1][##3]%
- \definecolor[rollover][rollover:##2]%
- \doifelse{##2}{n}{\doifelsevalue{##1\c!alternative}\v!hidden\phantom\hbox}\hbox
- {\localframed[##1]
- [\c!framecolor=rollover,\c!backgroundcolor=rollover,\c!color=rollover]%
- {\dolocationattributes{##1}\c!style\c!color{#3}}}}%
- \iffirstargument
- \ifsecondargument
- \def\setlocationbox##1{\dosetlocationbox[\??am#1]{##1}[#2]}%
- \else
- \doifassignmentelse{#1}
- {\def\setlocationbox##1{\dosetlocationbox[\??bt]{##1}[#1]}}
- {\def\setlocationbox##1{\dosetlocationbox[\??am#1]{##1}[]}}%
- \fi
- \else
- \def\setlocationbox##1{\dosetlocationbox[\??bt]{##1}[]}%
- \fi
- % todo: share symbols, tricky since different dimensions
- \definesymbol[rsym:\nofrollovers:n][\setlocationbox n]%
- \definesymbol[rsym:\nofrollovers:r][\setlocationbox r]%
- \definesymbol[rsym:\nofrollovers:d][\setlocationbox d]%
- \setupfield
- [rollbutton]
- [\c!frame=\v!off,
- \c!offset=\v!overlay,
- \c!clickout={#4}]%
- \definefield
- [roll:\nofrollbuttons][push][rollbutton]
- [rsym:\nofrollovers:n,%
- rsym:\nofrollovers:r,%
- rsym:\nofrollovers:d]%
- \fitfield[roll:\nofrollbuttons]%
- \egroup}
-
-\unexpanded\def\rollbutton
- {\dodoubleempty\dorollbutton}
-
-% \def\do@@amrob[#1]#2\\%
-% {\txt\rollbutton[\currentmenu]{\ignorespaces#2\unskip}[#1]\\}%
-
-% \appendtoks \let\rob\do@@amrob \to \everysetmenucommands
-
-\def\menu@rob[#1]#2\\%
- {\@@amboxcommand\rollbutton[\currentmenu]{\ignorespaces#2\unskip}[#1]\\}%
-
-\appendtoks \let\rob\menu@rob \to \everysetmenucommands
-
-% calls:
-% {..} [JS..]
-% [left] {..} [JS..]
-% [a=b] {..} [JS..]
-% [left] [a=b] {..} [JS..]
-%
-% \setupbuttons[offset=0pt,frame=off] % alternative=hidden
-%
-% \rollbutton {Manuals} [JS(Goto_File{show-man.pdf})]
-% \rollbutton {Articles} [JS(Goto_File{show-art.pdf})]
-% \rollbutton {Papers} [JS(Goto_File{show-pap.pdf})]
-% \rollbutton {Presentations} [JS(Goto_File{show-pre.pdf})]
-% \rollbutton {Resources} [JS(Goto_File{show-res.pdf})]
-%
-% \rob [JS(...)] bla bla \\
-
-\unexpanded\def\overlayrollbutton
- {\dodoubleargument\dooverlayrollbutton}
-
-\def\dooverlayrollbutton[#1][#2]%
- {\bgroup
- \nextsystemfield
- \setupfield
- [overlayrollbutton]
- [\c!frame=\v!off,\c!offset=\v!overlay,\c!regionin={#1},\c!regionout={#2}]%
- \definesymbol
- [\currentsystemfield]
- [{\framed[\c!frame=\v!off,\c!width=\overlaywidth,\c!height=\overlayheight]{}}]%
- \definefield
- [\currentsystemfield][push][overlayrollbutton][\currentsystemfield][\currentsystemfield]%
- \fitfield[\currentsystemfield]%
- \egroup}
-
-% \defineoverlay
-% [ShowMenu]
-% [{\overlayrollbutton[VideLayer{navigation}][HideLayer{navigation}]}]
-
\def\inlinedbox
{\bgroup
\dowithnextbox
@@ -781,32 +388,7 @@
\unexpanded\def\asciistr#1{\dontleavehmode{\defconvertedargument\ascii{#1}\verbatimfont\ascii}}
-% messy, will be improved:
-
-\prependtoks \setnormalcatcodes \to \everyTEXinputmode
-\appendtoks \processingXMLfalse \to \everyTEXinputmode
-
-\let\normalenableXML\enableXML % some day we move the normal \enableXML into the toks
-
-\prependtoks \normalenableXML \to \everyXMLinputmode
-\appendtoks \processingXMLtrue \to \everyXMLinputmode
-
-\unexpanded\def\enableXML {\setinputmode[XML]} % \enableXML is used in edef's and marks
-\unexpanded\def\disableXML{\setinputmode[TEX]}
-
-\beginTEX
-
- % else the skip aborts the reshape process
-
- \def\shapefill{\vskip\onepoint\!!plus\lineheight\!!minus\lineheight\relax}
-
-\endTEX
-
-\beginETEX
-
- \def\shapefill{\vskip\zeropoint\!!plus\lineheight\!!minus\lineheight\relax}
-
-\endETEX
+\def\shapefill{\vskip\zeropoint\!!plus\lineheight\!!minus\lineheight\relax}
\let\normaltype\type
@@ -856,10 +438,6 @@
\fi \fi
\advance\boislevel\minusone}
-\defineblankmethod [\v!synchronize] {\verticalstrut\vskip-2\lineheight\verticalstrut}
-
-% \vtop{\blank[synchronize]\blank[line]test}
-
\def\minimalhbox#1#%
{\dowithnextbox
{\bgroup
@@ -869,38 +447,6 @@
\egroup}
\hbox}
-% manual
-%
-% externfiguur -> grid =ja|hoogte|diepte|halveregel|passend -> helemaal in details
-% stelplaatsblokin -> zijuitlijnen=hoogte|diepte|regel|halveregel|grid -> halveregel in 'details'
-
-% TODO: TEST FIRST, NO CORRECTION NEEDED IN GRID MODE, EVT OPTION
-
-\def\OTRONEsomeherefloat[#1]% spacing between two successive must be better
- {\baselinecorrection % not really needed in grid mode:
- %\ifgridsnapping \else \baselinecorrection \fi % ! ! ! test test test ! ! ! !
- \doplacefloatbox
- \doinsertfloatinfo
- \dochecknextindentation\??bk
- \dorechecknextindentation}
-
-% todo: switch koppelen aan par scheelt pos
-
-% to be documented: \startspread .. \stopspread
-
-% to be documented primarydef p crossed d
-% to be documented PlainTextArea
-
-% manual
-%
-% Sometimes the demands are getting pretty weird:
-%
-% \startitemize
-% \item test
-% \item test
-% \headsym{xx} test \par test
-% \stopitemize
-
% \def\dodimchoice#1#2#3%
% {\ifx#3\relax
% #1\@EA\gobbleuntilrelax
@@ -948,22 +494,6 @@
\def\showsetupsdefinition[#1]{\showvalue{\??su:#1}} % temp hack for debugging
% documentation : \setupregister[alternative=a|b|A|B]
-
-\def\defineXMLstore {\doquadrupleargument\dodefineXMLstore[\saveXMLasdata]}
-\def\defineXMLgstore{\doquadrupleargument\dodefineXMLstore[\gsaveXMLasdata]}
-
-\def\dodefineXMLstore[#1][#2][#3][#4]% element attribute prefix % will become faster
- {\defineXMLargument[#2][#3=\s!dummy]{#1{#4:\XMLop{#3}}}}
-
-\def\countXMLchildren[#1]#2%
- {\startnointerference
- \doglobal\newcounter\nofXMLchildren
- \defineXMLargument[#1]{\doglobal\increment\nofXMLchildren}%
- \startXMLignore
- #2%
- \stopXMLignore
- \stopnointerference}
-
\unprotected \def\traceposstring#1#2#3%
{\iftracepositions
\smashedhbox%
@@ -973,144 +503,6 @@
\vrule\!!width4\scratchdimen\!!height\scratchdimen\!!depth\scratchdimen}%
\fi}
-% It took quite a while to figure this out (using the preliminary 1.5
-% spec). There are still a lot of things to be implemented. This is
-% the third alternative.
-
-% todo: multiple instances, dus indirect
-
-\let\currentrendering\empty
-
-\definereference[StartCurrentRendering] [\v!StartRendering {\currentrendering}]
-\definereference[StopCurrentRendering] [\v!StopRendering {\currentrendering}]
-\definereference[PauseCurrentRendering] [\v!PauseRendering {\currentrendering}]
-\definereference[ResumeCurrentRendering][\v!ResumeRendering{\currentrendering}]
-
-\newcounter\nofexternalrenderings
-
-\def\useexternalrendering{\doquadrupleempty\douseexternalrendering}
-\def\setinternalrendering{\dodoubleempty \dosetinternalrendering}
-
-\def\douseexternalrendering[#1][#2][#3][#4]% tag mime file options
- {\setgvalue{\??rd:#1}{\plusone{#1}{#2}{#3}{#4}}}
-
-\def\dosetinternalrendering[#1][#2]% tag options {content}
- {\bgroup
- \dowithnextbox
- {\setgvalue{\??rd:#1}{\plustwo{#1}{IRO}{#1}{#2}}%
- \let\objectoffset\zeropoint
- \setobject{IRO}{#1}\hbox{\box\nextbox}%
- \egroup}%
- \hbox}
-
-\def\checkrendering#1% let's hope that \next is not used
- {\iflocation
- \doifsomething{#1}%
- {\doifdefined{\??rd:#1}%
- {\expanded{\getvalue{\??rd::\number\renderingtype{#1}}%
- {\filterfromvalue{\??rd:#1}52}{\filterfromvalue{\??rd:#1}53}%
- {\filterfromvalue{\??rd:#1}54}{\filterfromvalue{\??rd:#1}55}}}}%
- \fi}
-
-\setvalue{\??rd::1}{\doinsertrendering}
-\setvalue{\??rd::2}{\doinsertrenderingobject}
-
-\def\renderingtype #1{\filterfromvalue{\??rd:#1}51}
-\def\renderingoptions#1{\filterfromvalue{\??rd:#1}55}
-
-\setexecutecommandcheck {startrendering} \checkrendering
-\setexecutecommandcheck {stoprendering} \checkrendering
-\setexecutecommandcheck {pauserendering} \checkrendering
-\setexecutecommandcheck {resumerendering} \checkrendering
-
-% by using a nice trick (used in other places of context as well) we
-% can easily overload the default size to match the opbject size
-
-\def\renderingwidth {8cm}
-\def\renderingheight{6cm}
-
-\def\definerenderingwindow
- {\dodoubleempty\dodefinerenderingwindow}
-
-\def\dodefinerenderingwindow[#1][#2]%
- {\presetlocalframed[\??rw#1]%
- \getparameters%
- [\??rw#1]%
- [\c!openpageaction=,\c!closepageaction=,%
- \c!width=\renderingwidth,\c!height=\renderingheight,%
- #2]}
-
-\def\setuprenderingwindow
- {\dodoubleargument\dosetuprenderingwindow}
-
-\def\dosetuprenderingwindow[#1]%
- {\getparameters[\??rw#1]}
-
-\def\placerenderingwindow
- {\dodoubleempty\doplacerenderingwindow}
-
-\def\doplacerenderingwindow[#1][#2]%
- {\bgroup
- \edef\currentrendering{\ifsecondargument#2\else#1\fi}%
- \ifcase\renderingtype\currentrendering\or
- % a file
- \or
- % an object
- \getobjectdimensions{IRO}\currentrendering
- \scratchdimen\objectheight
- \advance\scratchdimen\objectdepth
- \edef\renderingheight{\the\scratchdimen}%
- \edef\renderingwidth{\objectwidth}%
- \fi
- % create fall back if needed
- \doifdefinedelse{\??rw#1\c!width}
- {\def\currentrenderingwindow{#1}}
- {\let\currentrenderingwindow\s!default
- \definerenderingwindow[\currentrenderingwindow]}%
- \checkrendering\currentrendering
- \handlereferenceactions{\getvalue{\??rw\currentrenderingwindow\c!openpageaction }}\dosetuprenderingopenpageaction
- \handlereferenceactions{\getvalue{\??rw\currentrenderingwindow\c!closepageaction}}\dosetuprenderingclosepageaction
- \localframed
- [\??rw\currentrenderingwindow][\c!offset=\v!overlay]%
- {\expanded{\doinsertrenderingwindow
- \noexpand\currentrendering\hsize\vsize{\renderingoptions\currentrendering}}}%
- \egroup}
-
-% todo:
-%
-% \setinternalrendering[example-1][options]{}
-
-% test file:
-%
-% \definerenderingwindow
-% [example]
-% [width=320pt,height=150pt,frame=off,
-% background=color,backgroundcolor=gray,
-% openpageaction=StartCurrentRendering,
-% closepageaction=NextPage]% StopCurrentRendering]
-%
-% \useexternalrendering[example-1][audio/mpeg] [eldorado.mp3]
-% \useexternalrendering[example-2][audio/mpeg] [myst-12.mp3]
-% \useexternalrendering[example-3][application/x-shockwave-flash][http://localhost/mb.swf] [auto]
-% \useexternalrendering[example-4][application/x-shockwave-flash][celebration.swf]
-% \useexternalrendering[example-5][video/quicktime] [p1000726.mov]
-% \useexternalrendering[example-6][application/smil] [quadratic_map.smi]
-%
-% \def\renderingmenu[#1]%
-% {\hbox
-% {\setupbuttons[width=2.5em]%
-% \button{\symbol[StartRendering]} [StartRendering{#1}]\enspace
-% \button{\symbol[StopRendering]} [StopRendering{#1}]\enspace
-% \button{\symbol[PauseRendering]} [PauseRendering{#1}]\enspace
-% \button{\symbol[ResumeRendering]}[ResumeRendering{#1}]}}
-%
-% \renderingmenu[example-1]\blank
-% \renderingmenu[example-2]\blank
-% \renderingmenu[example-3]\blank
-% \renderingmenu[example-4] \placefigure{A ShockWave}{\placerenderingwindow[example][example-4]} \page
-% \renderingmenu[example-5] \placefigure{A Movie}{\placerenderingwindow[example][example-5]} \page
-% \renderingmenu[example-6] \placefigure{A Smile}{\placerenderingwindow[example][example-6]}
-
% will be a MyWay
%
% \setuplayout[grid=yes] \setupcaption[figure][inbetween=] \useMPlibrary[dum] \setupcolors[state=start]
@@ -1213,94 +605,12 @@
{\endgraf\verticalstrut\endgraf\kern-2\lineheight
\egroup}
-\def\definepushbutton % name optional setup
- {\dodoubleempty\dodefinepushbutton}
-
-\def\dodefinepushbutton[#1][#2]% name setup
- {\dododefinepushbutton{#1}{n}{push}%
- \dododefinepushbutton{#1}{r}{\symbol[psym:#1:n]}%
- \dododefinepushbutton{#1}{d}{\symbol[psym:#1:r]}%
- \setvalue{pushbutton:#1}{\dohandlepushbutton{#1}{#2}}}
-
-\def\dododefinepushbutton#1#2#3%
- {\doifsymboldefinedelse{psym:#1:#2}%
- \donothing{\definesymbol[psym:#1:#2][{#3}]}}
-
-\def\definepushsymbol
- {\dotripleargument\dodefinepushsymbol}
-
-\def\dodefinepushsymbol[#1][#2]% [#3]
- {\definesymbol[psym:#1:#2]}
-
-\def\dopushbutton[#1][#2]%
- {\executeifdefined{pushbutton:#1}\gobbleoneargument{#2}}
-
-\def\pushbutton
- {\dodoubleargument\dopushbutton}
-
-\def\dohandlepushbutton#1#2#3% identifier setup script
- {\bgroup
- \nextsystemfield
- \setupfield
- [pushbutton]
- [\c!frame=\v!overlay,
- \c!offset=\v!overlay,
- \c!clickout=#3,#2]%
- \definefield
- [\currentsystemfield]
- [push]
- [pushbutton]
- [psym:#1:n,psym:#1:r,psym:#1:d]%
- \fitfield
- [\currentsystemfield]%
- \egroup}
-
-% \def\do@@ampsh
-% {\dodoubleargument\dodo@@ampsh}
-%
-% \def\dodo@@ampsh[#1][#2]#3\\%
-% {\txt\pushbutton[#1][#2]\\}%
-%
-%\appendtoks \let\psh\do@@ampsh \to \everysetmenucommands
-
-\def\@@ampsh{\txt\pushbutton}
-
-\appendtoks \let\psh\@@ampsh \to \everysetmenucommands
-
-% \definepushbutton [reset]
-%
-% \definepushsymbol [reset] [n] [\uniqueMPgraphic{whatever}{color=green}]
-% \definepushsymbol [reset] [r] [\uniqueMPgraphic{whatever}{color=white}]
-%
-% \startinteractionmenu[bottom]
-% \psh [reset] [JS(reset_something)] \\
-% \stopinteractionmenu
-
\def\tabulaterule % to be redone, not correct
{\dotabulaterule
{\hrule\!!height.5\scratchdimen\!!depth.5\scratchdimen\relax
\doifvalue{\??tt\currenttabulate\c!distance}\v!grid
{\kern-\scratchdimen}}} % experimental tm-prikkels
-% todo: \setupinterlinespace[\c!regel=\v!vast] => ==\the\baselineskip
-
-%%%%%%%% todo: \chardef\snapstruts=1 => d=l-h
-
-\def\useMPvariables
- {\dodoubleargument\douseMPvariables}
-
-\def\douseMPvariables[#1][#2]%
- {\def\@@meta{#1:}%
- \prepareMPvariables{#2}}
-
-\def\processlinetableXMLfile#1%
- {\bgroup
- \let\startlinetable\donothing
- \let\stoplinetable \donothing
- \startlinetableanalysis\processXMLfile{#1}\stoplinetableanalysis
- \startlinetablerun \processXMLfile{#1}\stoplinetablerun
- \egroup}
-
% experimental: \synchronizegrid bla bla bla
\newcounter\currentgridsync
@@ -1336,13 +646,10 @@
% \message{no grid correction: \the\scratchdimen}\wait
\fi}
-% needed for extreme
+% needed for extreme (will go away)
\definesystemvariable{ie}
-% \def\definetest[#1]#2%
-% {\long\setvalue{\??ie#1}{#2}}
-
\def\definetest
{\dodoubleempty\dodefinetest}
@@ -1352,13 +659,13 @@
\processaction
[#2]
[% first test true, rest depends
- \v!next=>\setgvalue{\??ie#1}{\setgvalue{\??ie#1}{#3}\firstoftwoarguments},
+ \v!next=>\setgvalue{\??ie#1}{\setgvalue{\??ie#1}{#3}\firstoftwoarguments},
% rest true if first true
% \v!first=>\setgvalue{\??ie#1}{#3{\letgvalue{\??ie#1}%
- % \firstoftwoarguments\firstoftwoarguments}%
- % \secondoftwoarguments},
+ % \firstoftwoarguments\firstoftwoarguments}%
+ % \secondoftwoarguments},
% always true
- \v!yes=>\letgvalue{\??ie#1}\firstoftwoarguments,
+ \v!yes=>\letgvalue{\??ie#1}\firstoftwoarguments,
% always false
\v!no=>\letgvalue{\??ie#1}\secondoftwoarguments]%
\fi}
@@ -1391,42 +698,13 @@
% \tableifelse{\doifelse{a}{a}}{\NC Xtest \NC test \NC \NR}{}%
% \stoptabulate}
-\long \def\tableifelse#1%
+\long\def\tableifelse#1%
{\TABLEnoalign{#1%
{\aftergroup \firstoftwoarguments}%
{\aftergroup\secondoftwoarguments}}}
-% \long \def\tableif#1% whow, this is real ugly
-% {\TABLEnoalign{\let\gnext\gobbleoneargument#1%
-% {\let\gnext\firstofoneargument}}\gnext}
-
\long \def\tableiftextelse#1{\tableifelse{\doiftextelse{#1}}}
-\def\expandifnonempty#1%
- {\@EA\ifx\csname#1\endcsname\empty
- \expandafter\secondoftwoarguments
- \else
- \expandafter\firstoftwoarguments
- \fi
- {\csname#1\endcsname}}
-
-\def\@@sectiekoppeling#1%
- {\expandifnonempty{\??ko#1\c!coupling}{#1}}
-
-\def\@@sectiesectie#1%
- {\expandifnonempty{\??ko#1\c!section}{\@@sectiekoppeling{#1}}}
-
-\def\sectioncountervalue#1%
- {\@@sectionvalue{\@@sectiesectie{#1}}}
-
-% todo namespace \@@meta:#1:... ! ! ! ! ! !
-
-\def\presetMPvariable
- {\dodoubleargument\dopresetMPvariable}
-
-\def\dopresetMPvariable[#1][#2=#3]%
- {\doifundefined{#1:#2}{\setvalue{#1:#2}{#3}}}
-
% experiment, not yet to be used
\def\displaybreak
@@ -1442,30 +720,6 @@
\def\tightvbox{\dowithnextbox{\nextboxdp\zeropoint\flushnextbox}\vbox}
\def\tightvtop{\dowithnextbox{\nextboxht\zeropoint\flushnextbox}\vtop}
-% \translateMPinput{il2-pl}
-%
-% \startMPenvironment[global]
-% \setupbodyfont[plr]
-% \stopMPenvironment
-%
-% \TeX: ± ¶
-%
-% \startMPcode
-% draw btex MetaPost: ± ¶ etex scaled 5 ;
-% \stopMPcode
-
-% now in cont-loc.tex, for the sake of testing.
-%
-% %D When \type {\somecolor} is issued, we can savely assume
-% %D grouping. Using \type {\groupedcommand} here (i.e.\ the
-% %D definition of \type {\color}) is unsafe because in
-% %D interferes with for instance switching attributes.
-%
-% \def\switchtocolor[#1]%
-% {\bgroup\startcolor[#1]
-% \aftergroup\stopcolor
-% \aftergroup\egroup}
-
% what is this stupid macro meant for:
\def\hyphenationpoint
@@ -1597,8 +851,6 @@
\egroup
\synchronizehsize}
-% todo : hoe komt box er uit
-
\long\def\startexternalfigure
{\dotripleempty\dostartexternalfigure}
@@ -1633,6 +885,18 @@
%% \def\changedpage#1%
%% {\getvalue{\s!paragraph:p:#1}}
+\newcount\nofprofiled
+
+\def\profilemacro#1%
+ {\nofprofiled\zerocount
+ \letvalue{\string#1\string#1}#1%
+ \appendtoks
+ \normalwritestatus\m!systems{profile \string#1: \number\nofprofiled}%
+ \to \everystoptext
+ \unexpanded\def#1%
+ {\global\advance\nofprofiled\plusone
+ \csname\string#1\string#1\endcsname}}
+
% incomplete, will be a special case of float placement
\def\startfixed{\dosingleempty\dostartfixed}
@@ -1650,7 +914,7 @@
\processaction
[#2]
[ \v!high=>\bbox {\flushnextbox},
- \v!low=>\tbox {\flushnextbox},
+ \v!low=>\tbox {\flushnextbox},
\v!middle=>\vcenter{\flushnextbox},
\v!lohi=>\vcenter{\flushnextbox},
\s!unknown=>\tbox {\flushnextbox},
@@ -1691,44 +955,29 @@
%
% \stopitemize
-% still needed for uguide
-
-\let\placefloatlabel \placefloatcaption
-\let\placefloatlabeltext \placefloatcaptiontext
-\let\placefloatlabelreference \placefloatcaptionreference
-
\def\obeyfollowingtoken{{}} % end \cs scanning
-\def\gobbleparameters{\doquadrupleempty\dogobbleparameters}
-\def\dogobbleparameters[#1][#2][#3][#4]{}
-
-% documentation
-
-% \starttable[|||]
-% \HL
-% \VL test \VS test \VL \FR
-% \VL test \VD test \VL \MR
-% \VL test \VT test \VL \LR
-% \HL
-% \stoptable
-
-%D To be documented, \type {\includemenu[menu]}.
-%D To be documented, \type {\emphbf} cum suis.
-
-%D For Ton. To be documented.
-
-\def\plaatsexterndocument[#1]%
- {\def\doexternaldocument##1##2##3{\readlocfile{##2}\donothing\donothing}%
- \getvalue{\v!file:::#1}}
-
-%D Far from complete.
-
-\def\startgeheel
- {\startlinecorrection
- \insidefloattrue}
-
-\def\stopgeheel
- {\stoplinecorrection}
+% \def\comparedimension#1#2%
+% {\chardef\compresult
+% \ifdim#1<#2%
+% \zerocount
+% \else\ifdim#1<#2%
+% \plusone
+% \else
+% \plustwo
+% \fi\fi}
+% \newdimen\roundingeps \roundingeps=10sp
+% \def\comparedimensioneps#1#2%
+% {\chardef\compresult
+% \ifdim\dimexpr(#1-#2)<\roudingeps
+% \zerocount
+% \else\ifdim\dimexpr(#2-#1)<\roudingeps
+% \zerocount
+% \else\ifdim#1<#2%
+% \plusone
+% \else
+% \plustwo
+% \fi\fi\fi}
%D Next we load a few local optimizations and new features. They
%D live on on my machine and are not distributed, but they may end
@@ -1738,6 +987,6 @@
\readsysfile {cont-loc} {} {} % local improvements, patches, new features
\readsysfile {cont-exp} {} {} % experimental features (e.g. local speed-ups)
-\readsysfile {cont-mtx} {} {} % experimental metatex features
+%readsysfile {cont-mtx} {} {} % experimental metatex features
\protect \endinput