diff options
Diffstat (limited to 'Master/texmf-dist/tex/context/base/cont-new.tex')
-rw-r--r-- | Master/texmf-dist/tex/context/base/cont-new.tex | 297 |
1 files changed, 47 insertions, 250 deletions
diff --git a/Master/texmf-dist/tex/context/base/cont-new.tex b/Master/texmf-dist/tex/context/base/cont-new.tex index 13790edd9e9..eda6471d25c 100644 --- a/Master/texmf-dist/tex/context/base/cont-new.tex +++ b/Master/texmf-dist/tex/context/base/cont-new.tex @@ -11,9 +11,7 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -% it's about time to clean up this file ... - -\newcontextversion{2007.01.12 15:56} +\newcontextversion{2008.05.21 15:21} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new @@ -21,23 +19,50 @@ \unprotect +% it's about time to clean up this file ... + \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\defXMLexpanded#1#2% - {\begingroup - \let\getXMLentity\expandedXMLentity - \expanded{\endgroup\edef\noexpand#1{#2}}} - -\def\gdefXMLexpanded#1#2% - {\begingroup - \let\getXMLentity\expandedXMLentity - \expanded{\endgroup\xdef\noexpand#1{#2}}} +\def\TransparencyHack + {\appendtoks + \doPDFpageattribute{/Group << /S /Transparency /I true /K true>>}% + \to \everyPDFxform + \appendtoks + \doPDFpageattribute{/Group << /S /Transparency /I true /K true>>}% + \to \everyshipout} + +% \setupcaption [figure] [align=flushleft] +% \setupcaption [figure-1] [align=flushleft,leftmargin=10mm] +% \setupcaption [figure-2] [align=flushleft,leftmargin=10mm,rightmargin=-10mm,width=\textwidth] +% +% \startsetups somefigure +% \ifdim\floatsetupwidth>\textwidth +% \placesetupfloat[figure-2] +% \else +% \placesetupfloat[figure-1] +% \fi +% \stopsetups +% +% \placefloatwithsetups[somefigure]{}{\externalfigure[dummy][width=5cm,height=2cm]} + +\def\placefloatwithsetups + {\dotripleempty\doplacefloatwithsetups} + +\def\doplacefloatwithsetups[#1][#2][#3]#4% + {\def\floatsetupcaption {#4}% + \def\floatsetupcontent {\copy\nextbox}% + \def\floatsetupwidth {\wd\nextbox}% + \def\floatsetupheight {\ht\nextbox}% + \def\placesetupfloat[##1]{\placefloat[##1][#2][#3]{#4}{\floatsetupcontent}}% #4 and not \floatsetupcaption (unexpanded) + \dowithnextbox{\setups[#1]}\vbox} \def\dividedsize#1#2#3% size gap n {\dimexpr @@ -98,29 +123,6 @@ \prependtoks \restoreendofline \to \everybeforeshipout -% The following may be a solution for the fact that one cannot -% change catcodes of characters like : and ; inside an environment. - -\appendtoks - \enablelanguagespecifics[\currentlanguage]% -\to \everystarttext - -% Peter M\"unster's test case: -% -% \defineoverlay[Draft][{\scale[factor=max]{\rotate[rotation=60]{~MY||DRAFT~}}}] -% \setupbackgrounds[page][background=Draft] -% \starttext -% \starttables[|l|] -% \dorecurse{200}{\NC hallo \NC\AR} -% \stoptables -% \stoptext -% -% \let\normalactivetilde~ -% \let\normalactivebar | -% -% \appendtoks\let~\normalactivetilde\to\everypagebody -% \appendtoks\let|\normalactivebar \to\everypagebody - \let\cs\getvalue % experimental so this may change @@ -217,105 +219,6 @@ % % \shapesynonym{eacute} -\chardef\baselinecorrectionmode\plusone - -\def\onbaselinecorrection {\chardef\baselinecorrectionmode\plusone } -\def\offbaselinecorrection {\chardef\baselinecorrectionmode\plustwo } -\def\forcebaselinecorrection{\chardef\baselinecorrectionmode\plusthree} - -\def\topbaselinecorrection - {\ifvmode \ifdim\pagegoal<\maxdimen - \forcedtopbaselinecorrection - \fi \fi} - -\def\forcedtopbaselinecorrection - {\ifvmode - \bgroup - \setbaselinecorrections - \whitespace - \nointerlineskip - \dotopbaselinecorrection - \egroup - \fi} - -\let\forcedbotbaselinecorrection\botbaselinecorrection - -\def\startbaselinecorrection - {\ifcase\baselinecorectionmode - \or % normal - \baselinecorrection - \ifvmode - \bgroup - \setbox\scratchbox\vbox\bgroup - \ignorespaces - \let\stopbaselinecorrection\donormalstopbaselinecorrection - \else - \bgroup - \let\stopbaselinecorrection\egroup - \fi - \or % off - \bgroup - \let\stopbaselinecorrection\egroup - \or % force - \baselinecorrection - \ifvmode - \bgroup - \setbox\scratchbox\vbox\bgroup - \ignorespaces - \let\stopbaselinecorrection\doforcedstopbaselinecorrection - \else - \bgroup - \let\stopbaselinecorrection\egroup - \fi - \fi} - -\def\startbaselinecorrection - {\bgroup - \let\stopbaselinecorrection\egroup - \ifcase\baselinecorrectionmode - \or % normal - \baselinecorrection - \ifvmode - \setbox\scratchbox\vbox\bgroup\ignorespaces - \let\stopbaselinecorrection\donormalstopbaselinecorrection - \fi - \or % off - \or % force - \baselinecorrection - \ifvmode - \setbox\scratchbox\vbox\bgroup\ignorespaces - \let\stopbaselinecorrection\doforcedstopbaselinecorrection - \fi - \fi} - -\let\stopbaselinecorrection\relax - -\def\donormalstopbaselinecorrection % I have to check columns yet. - {\egroup - \topbaselinecorrection - \box\scratchbox - \botbaselinecorrection - \egroup} - -\def\doforcedstopbaselinecorrection % I have to check columns yet. - {\egroup - \forcedtopbaselinecorrection - \box\scratchbox - \forcedbotbaselinecorrection - \egroup} - -% core-grd: - -\let\normalstartbaselinecorrection=\startbaselinecorrection - -\def\startbaselinecorrection - {\ifgridsnapping - \centertogrid\bgroup - \let\stopbaselinecorrection\egroup - \else - \normalstartbaselinecorrection - \fi} - % \page[left] % \definecolumntextarea[intro][left][x=1,y=1,nx=4,ny=20,state=start,background=introlayer] % \setupcolumntextareatext[intro][left][\setups{intro}] @@ -433,47 +336,6 @@ {\XMLexpanded{\scratchtoks{\enableXML#2}}% \expanded{\normalsetnormalmark{#1}{\the\scratchtoks}}} -\ifx\pagediscards\undefined \let\pagediscards\relax \fi - -\installoutput\synchronizeoutput % maybe add pagediscards - {\ifvoid\normalpagebox\else - \unvbox\normalpagebox - \pagediscards % maybe not needed ? - \fi} - -% temp hack, else no proper default fall back (like \textmultiply); todo: sync encoding - -\def\dealwithmathtextencoding - {\expanded{\everyhbox{\the\everyhbox\noexpand\fastenableencoding{\currentencoding}}}% - \def\dealwithmathtextencoding{\let\characterencoding\nocharacterencoding}% - \dealwithmathtextencoding} - -\appendtoks - \dealwithmathtextencoding -\to \everymathematics - -\let\outerencoding\empty - -\def\checkoutermathencoding - {\ifx\outerencoding\empty - \ifx\outerencoding\s!default\else - \edef\outerencoding{\currentencoding}% - \fi - \fi} - -\prependtoks - \checkoutermathencoding -\to \everymathematics - -% \startmathcollection[eul:texnansi] -% \definemathsymbol [breve] [accent] [tf] ["15] -% \stopmathcollection -% \startmathcollection[eul:ec] -% \definemathsymbol [breve] [accent] [tf] ["08] -% \stopmathcollection -% -% $\breve e$ - % \separatestring123 456\to\test [\test] % \def\separatestring#1\to#2% @@ -729,34 +591,6 @@ % % \endETEX -% cleaner -% -% \long\def\doMPTEXcheck#1% -% {\long\def\dodoMPTEXcheck##1#1##2##3\war{\if##2@\else\@EA\donoMPTEXcheck\fi}% -% \@EA\dodoMPTEXcheck\MPascii#1@@\war} - -% \long\def\donoMPTEXcheck#1\relax -% {\global\MPTEXgraphictrue} - -% \MPTEXgrapicchecks\emptytoks - -% \def\forceMPTEXcheck#1% -% {\convertargument#1\to\ascii -% \@EA\appendtoks\@EA\doMPTEXcheck\@EA{\ascii}\to\MPTEXgrapicchecks} - -% \forceMPTEXcheck{etex} -% \forceMPTEXcheck{textext} -% \forceMPTEXcheck{graphictext} - -% \long\def\checkMPTEXgraphic#1% -% {\ifforceMPTEXgraphic -% \global\MPTEXgraphictrue -% \else -% \global\MPTEXgraphicfalse -% \expandafter\convertargument#1\to\MPascii -% \the\MPTEXgrapicchecks\relax % \relax is end condition! -% \fi} - % no, wrong! never! % % \def\tightlayer[#1]% @@ -768,19 +602,6 @@ % \hbox to \hsize{\composedlayer{#1}}% % \endgroup} -\let\locatedfilepath\empty - -\def\locatefilepath#1% - {\let\locatedfilepath\empty - \ifx\allinputpaths\empty \else - \def\docommand##1% - {\doiffileelse{\pathplusfile{##1}{#1}}{\donetrue\def\locatedfilepath{##1}}\donefalse - \ifdone\expandafter\quitcommalist\fi}% - \doifparentfileelse{#1} % new - {\processcommacommand [\allinputpaths]\docommand} - {\processcommacommand[.,\allinputpaths]\docommand}% - \fi} - % todo : share symbols % \definecolor[rollover:n][red] @@ -958,7 +779,7 @@ \def\buttonframed{\dodoubleempty\localframed[\??bt]} % goodie -\unexpanded\def\asciistr#1{\convertargument#1\to\ascii{\verbatimfont\ascii}} +\unexpanded\def\asciistr#1{\dontleavehmode{\defconvertedargument\ascii{#1}\verbatimfont\ascii}} % messy, will be improved: @@ -989,13 +810,15 @@ \let\normaltype\type -\beginTEX - \unexpanded\def\retype#1{\bgroup\convertargument#1\to\ascii\@EA\normaltype\@EA{\ascii}\egroup} -\endTEX - -\beginETEX - \unexpanded\def\retype#1{\scantokens{\normaltype{#1}\ignorespaces}} -\endETEX +\ifx\scantextokens\undefined + \ifx\scantokens\undefined + \unexpanded\def\retype#1{\dontleavehmode{\defconvertedargument\ascii{#1}\@EA\normaltype\@EA{\ascii}}} + \else + \unexpanded\def\retype#1{\dontleavehmode\scantokens{\normaltype{#1}\ignorespaces}\relax} + \fi +\else + \unexpanded\def\retype#1{\dontleavehmode\scantextokens{\normaltype{#1}}} +\fi \def\simplifytype{\let\type\retype} @@ -1737,32 +1560,6 @@ \setinnerparpositions % see "techniek" for application \to \everytabulate -%D This alternative is slower, since it works on top of the -%D color (stack) mechanism, but it does provide nesting. - -\def\dosetrastercolor#1% - {\edef\@@cl@@s{#1}% - \ifx\@@cl@@s\empty - \let\@@cl@@s\@@rsscreen - \fi - \let\@@cl@@t\@@cl@@z % else we get rogue - \let\@@cl@@a\@@cl@@z % transpancies - \setevalue{\??cr\??rs}{\colorSpattern}} - -% beware, don't add extra grouping, else color in tables -% fails - -\def\localstartraster[#1]% - {\ifincolor\dosetrastercolor{#1}\localstartcolor[\??rs]\fi} - -\def\startraster[#1]% - {\ifincolor\dosetrastercolor{#1}\startcolor[\??rs]\fi} - -\def\localstopraster{\ifincolor\localstopcolor\fi} -\def\stopraster {\ifincolor\stopcolor\fi} - -\def\raster[#1]{\groupedcommand{\startraster[#1]}{\stopraster}} - \def\fontclassname#1#2% {\ifcsname\??ff#1#2\endcsname \fontclassname{#1}{\csname\??ff#1#2\endcsname}% |