diff options
Diffstat (limited to 'tex')
-rw-r--r-- | tex/context/base/colo-ini.tex | 161 | ||||
-rw-r--r-- | tex/context/base/colo-run.tex | 18 | ||||
-rw-r--r-- | tex/context/base/cont-new.tex | 2 | ||||
-rw-r--r-- | tex/context/base/context.tex | 2 | ||||
-rw-r--r-- | tex/context/base/core-mat.tex | 46 | ||||
-rw-r--r-- | tex/context/base/m-newmat.tex | 12 | ||||
-rw-r--r-- | tex/context/base/math-ext.tex | 185 | ||||
-rw-r--r-- | tex/context/base/spec-fdf.tex | 42 | ||||
-rw-r--r-- | tex/context/interface/keys-cz.xml | 2 | ||||
-rw-r--r-- | tex/context/interface/keys-de.xml | 2 | ||||
-rw-r--r-- | tex/context/interface/keys-en.xml | 2 | ||||
-rw-r--r-- | tex/context/interface/keys-fr.xml | 2 | ||||
-rw-r--r-- | tex/context/interface/keys-it.xml | 2 | ||||
-rw-r--r-- | tex/context/interface/keys-nl.xml | 2 | ||||
-rw-r--r-- | tex/context/interface/keys-ro.xml | 2 |
15 files changed, 338 insertions, 144 deletions
diff --git a/tex/context/base/colo-ini.tex b/tex/context/base/colo-ini.tex index da0ab0a06..81e7d1cf7 100644 --- a/tex/context/base/colo-ini.tex +++ b/tex/context/base/colo-ini.tex @@ -838,6 +838,7 @@ \dostartspotcolormode\@@cl@@n\@@cl@@p \else \doingspotcolortrue + \normalizespotcolor\@@cl@@p \let\spotcolorfactor\@@cl@@p \factorizecolortrue % using counter and array \dowithcolor\execcolorRCSP\@@cl@@n @@ -962,10 +963,6 @@ {\edef\@@cl@@s{#1}% \dohidecolor\@@cl@@s\@@cl@@o} -% \def\noexeccolorP#1:#2:#3\od -% {\edef\@@cl@@p{#2}% -% \dohidecolor\@@cl@@p\@@cl@@z} - \def\noexeccolorP#1:#2:#3:#4:#5\od {\edef\@@cl@@p{#4}% \dohidecolor\@@cl@@p\@@cl@@z} @@ -981,20 +978,28 @@ \def\spotcolorfactor{1} +% \def\normalizecolor#1% +% {\colordimen#1\thousandpoint +% \colordimen\spotcolorfactor\colordimen +% \colorcount\colordimen +% \advance\colorcount \medcard +% \divide\colorcount \maxcard +% \edef#1{\realcolorvalue\colorcount}} + \def\normalizecolor#1% - {\colordimen#1\thousandpoint - \colordimen\spotcolorfactor\colordimen - \colorcount\colordimen - \advance\colorcount \medcard - \divide\colorcount \maxcard + {\colorcount\numexpr(\dimexpr\spotcolorfactor\dimexpr#1\thousandpoint\relax\relax+\medcard)/\maxcard\relax \edef#1{\realcolorvalue\colorcount}} +% \def\normalizespotcolor#1% +% {\colordimen-#1\thousandpoint +% \advance\colordimen\thousandpoint +% \colorcount\colordimen +% \advance\colorcount \medcard +% \divide\colorcount \maxcard +% \edef#1{\realcolorvalue\colorcount}} + \def\normalizespotcolor#1% - {\colordimen-#1\thousandpoint - \advance\colordimen\thousandpoint - \colorcount\colordimen - \advance\colorcount \medcard - \divide\colorcount \maxcard + {\colorcount\numexpr(\dimexpr\thousandpoint-#1\thousandpoint\relax+\medcard)/\maxcard\relax \edef#1{\realcolorvalue\colorcount}} \def\donormalizeRGB @@ -1047,6 +1052,8 @@ \csname registerspotcolor#1\@EA\endcsname \fi} +% todo: convert to rgb if needed, will will do this in mkiv + \def\dontregisterspotcolor #1\od{} \def\registerspotcolorR #1:#2:#3:#4\od{\doregisterrgbspotcolor \@@cl@@n\@@cl@@f\@@cl@@d\@@cl@@p{#1}{#2}{#3}} \def\registerspotcolorC#1:#2:#3:#4:#5\od{\doregistercmykspotcolor\@@cl@@n\@@cl@@f\@@cl@@d\@@cl@@p{#1}{#2}{#3}{#4}} @@ -1426,18 +1433,26 @@ 1\fi\fi\fi \else 0\fi} +% \def\doconvertCMYKtoRGB#1\k#2\to#3% +% {\ifdim#2\points>#1\points% >= problem, repaired 2/12/2002 +% \let#3\@@cl@@z % k >= color +% \else +% \colordimen\onepoint +% \advance\colordimen -#1\points +% \advance\colordimen -#2\points +% \multiply\colordimen \plusthousand +% \colorcount\colordimen +% \advance\colorcount \medcard +% \divide\colorcount \maxcard +% \edef#3{\realcolorvalue\colorcount}% +% \fi} + \def\doconvertCMYKtoRGB#1\k#2\to#3% - {\ifdim#2\points>#1\points% >= problem, repaired 2/12/2002 - \let#3\@@cl@@z % k >= color - \else - \colordimen\onepoint - \advance\colordimen -#1\points - \advance\colordimen -#2\points - \multiply\colordimen \plusthousand - \colorcount\colordimen - \advance\colorcount \medcard - \divide\colorcount \maxcard + {\colorcount\numexpr(\dimexpr\plusthousand\dimexpr\onepoint-#1\points-#2\points\relax\relax+\medcard)/\maxcard\relax + \ifnum\colorcount>\zeropoint \edef#3{\realcolorvalue\colorcount}% + \else + \let#3\@@cl@@z \fi} \def\convertCMYKtoRGB#1#2#3#4% @@ -1445,14 +1460,18 @@ \doconvertCMYKtoRGB#2\k#4\to\@@cl@@g \doconvertCMYKtoRGB#3\k#4\to\@@cl@@b} +% \def\doconvertRGBtoCMYK#1\to#2% +% {\colordimen#1\points +% \multiply\colordimen \plusthousand +% \colorcount\colordimen +% \advance\colorcount \medcard +% \divide\colorcount \maxcard +% \colorcount-\colorcount +% \advance\colorcount \plusthousand +% \edef#2{\realcolorvalue\colorcount}} + \def\doconvertRGBtoCMYK#1\to#2% - {\colordimen#1\points - \multiply\colordimen \plusthousand - \colorcount\colordimen - \advance\colorcount \medcard - \divide\colorcount \maxcard - \colorcount-\colorcount - \advance\colorcount \plusthousand + {\colorcount\numexpr\plusthousand-(\dimexpr\plusthousand\dimexpr#1\points\relax\relax+\medcard)/\maxcard\relax \edef#2{\realcolorvalue\colorcount}} \def\convertRGBtoCMYK#1#2#3% @@ -1471,37 +1490,54 @@ \def\gGRAYfactor{\ifweightGRAY590\else\nGRAYfactor\fi} \def\bGRAYfactor{\ifweightGRAY110\else\nGRAYfactor\fi} +% \def\convertRGBtoGRAY#1#2#3% +% {\colordimen#1\points +% \colordimen\rGRAYfactor\colordimen +% \colorcount\colordimen +% \colordimen#2\points +% \colordimen\gGRAYfactor\colordimen +% \advance\colorcount \colordimen +% \colordimen#3\points +% \colordimen\bGRAYfactor\colordimen +% \advance\colorcount \colordimen +% \advance\colorcount \medcard +% \divide\colorcount \maxcard +% \edef\@@cl@@s{\realcolorvalue\colorcount}} + \def\convertRGBtoGRAY#1#2#3% - {\colordimen#1\points - \colordimen\rGRAYfactor\colordimen - \colorcount\colordimen - \colordimen#2\points - \colordimen\gGRAYfactor\colordimen - \advance\colorcount \colordimen - \colordimen#3\points - \colordimen\bGRAYfactor\colordimen - \advance\colorcount \colordimen - \advance\colorcount \medcard - \divide\colorcount \maxcard + {\colorcount\numexpr + (\dimexpr\rGRAYfactor\dimexpr#1\points\relax\relax+ + \dimexpr\gGRAYfactor\dimexpr#2\points\relax\relax+ + \dimexpr\bGRAYfactor\dimexpr#3\points\relax\relax+ + \medcard)/\maxcard + \relax \edef\@@cl@@s{\realcolorvalue\colorcount}} \def\convertCMYKtoGRAY#1#2#3#4% {\convertCMYKtoRGB{#1}{#2}{#3}{#4}% \convertRGBtoGRAY\@@cl@@r\@@cl@@g\@@cl@@b} +% \def\doconvertCMYKtoCMY#1\k#2\to#3% +% {\colordimen#1\points +% \advance\colordimen #2\points\relax +% \ifdim\colordimen>\onepoint +% \colordimen\onepoint +% %\else +% % \colordimen\colordimen +% \fi +% \multiply\colordimen \plusthousand +% \colorcount\colordimen +% \advance\colorcount \medcard +% \divide\colorcount \maxcard +% \edef#3{\realcolorvalue\colorcount}} + \def\doconvertCMYKtoCMY#1\k#2\to#3% - {\colordimen#1\points - \advance\colordimen #2\points\relax - \ifdim\colordimen>\onepoint - \colordimen\onepoint - %\else - % \colordimen\colordimen - \fi - \multiply\colordimen \plusthousand - \colorcount\colordimen - \advance\colorcount \medcard - \divide\colorcount \maxcard - \edef#3{\realcolorvalue\colorcount}} + {\colorcount\numexpr(\dimexpr\plusthousand\dimexpr#1\points+#2\points\relax\relax+\medcard)/\maxcard\relax + \ifnum\colorcount>\plusthousand + \let#3\@@cl@@o + \else + \edef#3{\realcolorvalue\colorcount}% + \fi} \def\convertCMYKtoCMY#1#2#3#4% {\doconvertCMYKtoCMY#1\k#4\to\@@cl@@c @@ -2050,7 +2086,7 @@ {\groupedcommand{\startcolor[#1]}\stopcolor} \unexpanded\def\graycolor[#1]% not \gray because this is a color - {\groupedcommand{\RGBsupportedfalse\CMYKsupportedfalse\startcolor[#1]}\stopcolor} + {\groupedcommand{\RGBsupportedfalse\CMYKsupportedfalse\SPOTsupportedfalse\startcolor[#1]}\stopcolor} \let\grey\graycolor @@ -2116,11 +2152,17 @@ \def\doformatcolorS#1:#2:#3\od {\dodoformatcolor{#1}} +\def\doformatcolorP#1:#2:#3:#4:#5:#6\od + {#1\colorformatseparator + \dodoformatcolor{#2}\colorformatseparator + \dodoformatcolor{#3}\colorformatseparator + \dodoformatcolor{#4}\colorformatseparator} + \def\doformatcolor#1:% {\csname doformatcolor#1\endcsname} \def\colorvalue - {\dowithcolor\doformatcolor} + {\dowithcolor\doformatcolor} \def\doformatgrayR#1:#2:#3:#4:#5\od {\convertRGBtoGRAY{#1}{#2}{#3}% @@ -2133,11 +2175,12 @@ \def\doformatgrayS#1:#2:#3\od {\dodoformatcolor{#1}} -% \def\doformatgrayP#1:#2:#3:#4\od -% {\dowithcolor\doformatcolor{#1}} +% \def\doformatgrayP#1:#2:#3:#4:#5:#6\od +% {\convertSPOTtoGRAY{#1}{#2}{#3}{#4}% +% \dodoformatcolor\@@cl@@s} \def\doformatgrayP#1:#2:#3:#4:#5:#6\od - {\dowithcolor\doformatcolor{#1}} + {todo} \def\doformatgray#1:% {\csname doformatgray#1\endcsname} diff --git a/tex/context/base/colo-run.tex b/tex/context/base/colo-run.tex index 82f106e2a..8d21430e1 100644 --- a/tex/context/base/colo-run.tex +++ b/tex/context/base/colo-run.tex @@ -13,6 +13,19 @@ \unprotect +% temp hack (not do be documented) + +% \gdef\doformatcolorP#1:#2:#3:#4:#5:#6\od % was undefined in colo-ini +% {#1\colorformatseparator +% \dodoformatcolor{#2}\colorformatseparator +% \dodoformatcolor{#3}\colorformatseparator +% \dodoformatcolor{#4}\colorformatseparator} + +% \gdef\doformatgrayP#1:#2:#3:#4:#5:#6\od +% {todo} + +% so far + \gdef\showpalet {\dodoubleargument\doshowpalet} @@ -60,8 +73,9 @@ \processpalet[#1]\doshowpalet}\cr \doifinset\v!name{#2}{#1\hskip.5em}% \def\doshowpalet##1% - {&\color[##1]{\vrule\!!width\!!widtha\!!height\strutht\!!depth\zeropoint}}% + {&\strut\color[##1]{\vrule\!!width\!!widtha\!!height\strutht\!!depth\zeropoint}}% \processpalet[#1]\doshowpalet\crcr + \noalign{\vskip-\strutdepth}% \def\doshowpalet##1% {&\graycolor[##1]{\vrule\!!width\!!widtha\!!height\zeropoint\!!depth\strutdp}}% \processpalet[#1]\doshowpalet\crcr @@ -222,6 +236,8 @@ \endgraf} \dorecurse\!!counta{\dododocomparecolorgroup\recurselevel}}} +% \def\execcolorRCSP#1:{\csname execcolor#1\endcsname} -> \execcolorR + \gdef\dogetcolorcomponents#1% {\startnointerference \localcolortrue diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index d8cea5446..941fc6a31 100644 --- a/tex/context/base/cont-new.tex +++ b/tex/context/base/cont-new.tex @@ -13,7 +13,7 @@ % it's about time to clean up this file ... -\newcontextversion{2007.07.24 14:36} +\newcontextversion{2007.07.25 12:35} %D This file is loaded at runtime, thereby providing an %D excellent place for hacks, patches, extensions and new diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex index b2ce3632e..70e4dc67a 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -42,7 +42,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2007.07.24 14:36} +\edef\contextversion{2007.07.25 12:35} %D For those who want to use this: diff --git a/tex/context/base/core-mat.tex b/tex/context/base/core-mat.tex index 3d44767bb..c73ee1cca 100644 --- a/tex/context/base/core-mat.tex +++ b/tex/context/base/core-mat.tex @@ -1690,17 +1690,17 @@ \presetdisplaymath \tabskip\centering} -% \def\dobotheqalignno#1#2% -% {\ifmmode -% \displ@y % \let\doplaceformulanumber\relax % strange hack -% \vcenter\bgroup -% \let\finishalignno\egroup -% \else -% \let\finishalignno\relax -% \fi -% #1% -% \halign \ifcase\eqalignmode \or to \displaywidth \fi \@EA {\the\scratchtoks\crcr#2\crcr}% -% \finishalignno} +\def\dobotheqalignno#1#2% + {\ifmmode + \displ@y % \let\doplaceformulanumber\relax % strange hack + \vcenter\bgroup + \let\finishalignno\egroup + \else + \let\finishalignno\relax + \fi + #1% + \halign \ifcase\eqalignmode \or to \displaywidth \fi \@EA {\the\scratchtoks\crcr#2\crcr}% + \finishalignno} \def\dobothaligneqalignno#1% {\ifmmode @@ -1725,18 +1725,18 @@ \box\scratchbox \global\chardef\mathnumberstatus\plustwo} -\def\dobothaligneqalignno#1% - {\ifmmode - \displ@y - \global\chardef\mathnumberstatus\plusone - % we're in a mathbox - \vcenter\bgroup - \def\finishalignno{\crcr\egroup\egroup}% - \else - \def\finishalignno{\crcr\egroup}% - \fi - #1% - \halign \ifcase\eqalignmode \or to \displaywidth \fi \@EA \bgroup\the\scratchtoks\crcr} +% \def\dobothaligneqalignno#1% +% {\ifmmode +% \displ@y +% \global\chardef\mathnumberstatus\plusone +% we're in a mathbox +% \vcenter\bgroup +% \def\finishalignno{\crcr\egroup\egroup}% +% \else +% \def\finishalignno{\crcr\egroup}% +% \fi +% #1% +% \halign \ifcase\eqalignmode \or to \displaywidth \fi \@EA \bgroup\the\scratchtoks\crcr} \def\reqalignno {\dobotheqalignno \preparereqalignno} \def\leqalignno {\dobotheqalignno \prepareleqalignno} diff --git a/tex/context/base/m-newmat.tex b/tex/context/base/m-newmat.tex index fad746d93..c36119cd4 100644 --- a/tex/context/base/m-newmat.tex +++ b/tex/context/base/m-newmat.tex @@ -102,20 +102,20 @@ %\def\tfrac {\genfrac\empty\empty\empty\textstyle} %\def\frac {\genfrac\empty\empty\empty\donothing} -\def\dfrac {\genfrac\empty\empty\empty\displaystyle} -\def\tfrac {\genfrac\empty\empty\empty\textstyle} -\def\frac {\genfrac\empty\empty\empty\donothing} +\def\dfrac {\genfrac\empty\empty{}\displaystyle} +\def\tfrac {\genfrac\empty\empty{}\textstyle} +\def\frac {\genfrac\empty\empty{}\donothing} \def\dbinom{\genfrac()\zeropoint\displaystyle} \def\tbinom{\genfrac()\zeropoint\textstyle} \def\binom {\genfrac()\zeropoint\donothing} -\def\xfrac {\genfrac\empty\empty\empty\scriptstyle} -\def\xxfrac{\genfrac\empty\empty\empty\scriptscriptstyle} +\def\xfrac {\genfrac\empty\empty{}\scriptstyle} +\def\xxfrac{\genfrac\empty\empty{}\scriptscriptstyle} %D Better: -\unexpanded\def\frac#1#2{\mathematics{\genfrac\empty\empty\empty\donothing{#1}{#2}}} +\unexpanded\def\frac#1#2{\mathematics{\genfrac\empty\empty{}\donothing{#1}{#2}}} %D [HH] This shows up as: %D diff --git a/tex/context/base/math-ext.tex b/tex/context/base/math-ext.tex index e2155503d..5358cf7bb 100644 --- a/tex/context/base/math-ext.tex +++ b/tex/context/base/math-ext.tex @@ -1,6 +1,6 @@ %D \module %D [ file=math-ext, -%D version=2006.01.14, +%D version=2007.07.19, %D title=\CONTEXT\ Math Macros, %D subtitle=Extra Macros, %D author={Hans Hagen \& Taco Hoekwater \& Aditya Mahajan}, @@ -10,6 +10,7 @@ %C This module is part of the \CONTEXT\ macro||package and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +%M \input math-ext \unprotect @@ -63,12 +64,13 @@ % temp here -%D We next define extensible arrows. Extensible arrows are arrows that change -%D their length accoding to the width of the text to be placed above and below -%D the arrow. Since we need to define a lot of arrows, we first define some -%D helper macros. The basic idea is to measure the width of the box to be -%D placed above and below the arrow, and make the \quotation{body} of the -%D arrow as long as the bigger of the two widths. +%D We next define extensible arrows. Extensible arrows are arrows that +%D change their length according to the width of the text to be placed +%D above and below the arrow. Since we need to define a lot of arrows, +%D we first define some helper macros. The basic idea is to measure +%D the width of the box to be placed above and below the arrow, and +%D make the \quotation{body} of the arrow as long as the bigger of the +%D two widths. \def\mtharrfactor{1} \def\mtharrextra {0} @@ -99,7 +101,7 @@ \mkern\muskip2\relax \mkern\muskip6\relax $}% - \setbox4\hbox{#3}% + \setbox4\hbox{#3\displaystyle}% \dimen0\wd0 \ifdim\wd4>\dimen0 \dimen0\wd4 \fi \setbox2\hbox{$\scriptstyle @@ -110,7 +112,7 @@ \mkern\muskip6\relax $}% \ifdim\wd2>\dimen0 \dimen0\wd2 \fi - \setbox4\hbox to \dimen0{#3}% + \setbox4\hbox to \dimen0{#3\displaystyle}% \mathrel{\mathop{\hbox to \dimen0{\hss\copy4\hss}}\limits^{\box0}_{\box2}} \endgroup} @@ -129,24 +131,31 @@ \lower\scratchdimen\box2}} %D \macros{definematharrow} -%D Macro for defining new arrows. We can define two types of arrows|<|single -%D arrows and double arrows. Single arrows are defined as +%D +%D Macro for defining new arrows. We can define two types of +%D arrows|<|single arrows and double arrows. Single arrows are defined +%D as +%D %D \starttyping %D \definematharrow [xrightarrow] [0359] [\rightarrowfill] %D \stoptyping -%D The first argument is the name of the arrow (\tex{xrightarrow} in this case.) -%D The second argument consists of a set of 4 numbers and specify the spacing -%D correction in math units~\type{mu}. These numbers define: +%D +%D The first argument is the name of the arrow (\tex{xrightarrow} in +%D this case.) The second argument consists of a set of 4 numbers and +%D specify the spacing correction in math units~\type{mu}. These +%D numbers define: +%D %D \startlines %D 1st number: arrow||tip correction %D 2nd number: arrow||tip correction %D 3rd number: space (multiplied by \tex{matharrfactor} and advanced by \tex{matharrextra}) %D 4th number: space (multiplied by \tex{matharrfactor} and advanced by \tex{matharrextra}) %D \stoplines -%D -%D The third argument is the name of the extensible fill. The third argument -%D is optional when the arrow is redefined later (this is useful for font -%D specific tweaking of the skips.) For example, +%D +%D The third argument is the name of the extensible fill. The third +%D argument is optional when the arrow is redefined later (this is +%D useful for font specific tweaking of the skips.) For example, +%D %D \startbuffer %D \math{\xrightarrow{above}} %D \definematharrow[xrightarrow][0000] @@ -157,18 +166,21 @@ %D \typebuffer gives {\getbuffer} %D %D The double arrows are defined as follows +%D %D \starttyping -%D \definematharrow [xrightleftharpoons] [3095,0359] +%D \definematharrow [xrightleftharpoons] [3095,0359] %D [\rightharpoonupfill,\leftharpoondownfill] %D \stoptyping -%D The second and the third set of arguments consist of comma separated -%D values. The first element of the second argument (\type{3095}) corresponds -%D to the spacing correction of top arrow fill (\tex{rightarrowupfill}). -%D Similarly, \type{0359} corresponds to bottom arrow fill -%D \tex{leftharpoondownfill}). Stacking them on top of each other we get -%D $\xrightleftharpoons[big]{above}{below}$. +%D +%D The second and the third set of arguments consist of comma +%D separated values. The first element of the second argument +%D (\type{3095}) corresponds to the spacing correction of top arrow +%D fill (\tex{rightarrowupfill}). Similarly, \type{0359} corresponds +%D to bottom arrow fill \tex{leftharpoondownfill}). Stacking them on +%D top of each other we get $\xrightleftharpoons[big]{above}{below}$. %D The following math arrows are defined -%D \midaligned{\starttable[|l|m|] +%D +%D \placetable[none]{}{\starttable[|l|m|] %D \NC \tex{xrightarrow } \NC \xrightarrow [big] \NC \NR %D \NC \tex{xleftarrow } \NC \xleftarrow [big] \NC \NR %D \NC \tex{xequal } \NC \xequal [big] \NC \NR @@ -238,25 +250,28 @@ % Adapted from amsmath. %D \macros{mtharrowfill,defaultmtharrowfill} -%D To extend the arrows we need to define a \quotation{math arrow fill}. This -%D command takes 7 arguments: the first four correspond the second argument of -%D \tex{definematharrow} explained above. The other three specify the tail, -%D body and head of the arrow. \tex{defaultmtharrowfill} has values tweaked to -%D match latin modern fonts. For fonts that are significantly different (e.g. -%D cows) a different set of values need to be determined. - -\def\mtharrowfill#1#2#3#4#5#6#7% +%D +%D To extend the arrows we need to define a \quotation{math arrow +%D fill}. This command takes 7 arguments: the first four correspond +%D the second argument of \tex{definematharrow} explained above. The +%D other three specify the tail, body and head of the arrow. +%D \tex{defaultmtharrowfill} has values tweaked to match latin modern +%D fonts. For fonts that are significantly different (e.g. cows) a +%D different set of values need to be determined. + +\def\mtharrowfill#1#2#3#4#5#6#7#8% {$\mathsurround 0pt \thickmuskip0mu\medmuskip\thickmuskip\thinmuskip\thickmuskip - \relax#5% + \relax#8#5% \mkern-#1mu - \cleaders\hbox{$\mkern -#2mu#6\mkern -#3mu$}\hfill + \cleaders\hbox{$#8\mkern -#2mu#6\mkern -#3mu$}\hfill \mkern-#4mu#7$} \def\defaultmtharrowfill{\mtharrowfill 7227} -%D We now define some arrow fills that will be used for defining the arrows. -%D \tex{leftarrowfill} and \tex{rightarrowfill} are redefined using \tex{defaultmtharrowfill}. +%D We now define some arrow fills that will be used for defining the +%D arrows. \tex{leftarrowfill} and \tex{rightarrowfill} are redefined +%D using \tex{defaultmtharrowfill}. \def\rightarrowfill {\defaultmtharrowfill \relbar \relbar \rightarrow } \def\leftarrowfill {\defaultmtharrowfill \leftarrow \relbar \relbar } @@ -276,9 +291,10 @@ \def\hookleftfill {\defaultmtharrowfill \leftarrow \relbar{\relbar\joinrel\rhook}} \def\hookrightfill{\defaultmtharrowfill{\lhook\joinrel\relbar}\relbar \rightarrow} -%D Now we define most commonly used arrows. These include arrows defined in -%D \filename{amsmath.sty}, \filename{extarrows.sty}, \filename{extpfel.sty} -%D and mathtools.sty packages for \LATEX. +%D Now we define most commonly used arrows. These include arrows +%D defined in \filename{amsmath.sty}, \filename{extarrows.sty}, +%D \filename{extpfel.sty} and \filename{mathtools.sty} packages for +%D \LATEX. \definematharrow [xrightarrow] [0359] [\rightarrowfill] \definematharrow [xleftarrow] [3095] [\leftarrowfill] @@ -301,7 +317,8 @@ \definematharrow [xhookleftarrow] [3095] [\hookleftfill] \definematharrow [xhookrightarrow] [0395] [\hookrightfill] -%D These arrows can be used as folows: +%D These arrows can be used as follows: +%D %D \startbuffer %D \startformula \xrightarrow{stuff on top}\stopformula %D \startformula \xrightarrow{}{stuff on top}\stopformula @@ -313,6 +330,90 @@ %D \startformula \xleftarrow [medium]{stuff below}{stuff on top}\stopformula %D \startformula \xleftarrow [big]{stuff below}{stuff on top}\stopformula %D \stopbuffer +%D %D \typebuffer which gives \getbuffer +%D \macros{definemathoverarrow,defineunderarrow} +%D +%D These macros for define math-overarrows are adapted from +%D \filename{amsmath.sty} + +\def\definemathoverarrow + {\dotripleargument\dodefinemathoverarrow} + +\def\dodefinemathoverarrow[#1][#2][#3]% + {\ifthirdargument + \setvalue{#1}{\dohandlemathoverarrow[#2][#3]}% + \else + \setvalue{#1}{\dohandlemathoverarrow[\zeropoint][#2]}% + \fi} + +\def\dohandlemathoverarrow[#1][#2]% + {\mathpalette{\dodohandlemathoverarrow{#1}{#2}}} + +%D Note: \filename{math-pln.tex} has \type{\kern-\onepoint} and +%D \filename{amsmath.sty} does not. We keep the kern amount +%D configurable. This is useful for harpoons. + +\def\dodohandlemathoverarrow#1#2#3#4% + {\vbox{\ialign{##\crcr + #2#3\crcr + \noalign{\kern#1\nointerlineskip}% + $\m@th\hfil#3#4\hfil$\crcr}}} + +%D Now the under arrows + +\def\definemathunderarrow + {\dotripleargument\dodefinemathunderarrow} + +%D For underarrows the default kern is 0.3ex + +\def\dodefinemathunderarrow[#1][#2][#3]% + {\ifthirdargument + \setvalue{#1}{\dohandlemathunderarrow[#2][#3]}% + \else + \setvalue{#1}{\dohandlemathunderarrow[0.3ex][#2]}% + \fi} + +\def\dohandlemathunderarrow[#1][#2]% + {\mathpalette{\dodohandlemathunderarrow{#1}{#2}}} + +\def\dodohandlemathunderarrow#1#2#3#4% + {\vtop{\ialign{##\crcr + $\m@th\hfil#3#4\hfil$\crcr + \noalign{\nointerlineskip\kern#1}% + #2#3\crcr}}} + +%D Now we define the arrows + +\definemathoverarrow [overleftarrow] [\leftarrowfill] +\definemathoverarrow [overrightarrow] [\rightarrowfill] +\definemathoverarrow [overleftrightarrow] [\leftrightarrowfill] +\definemathoverarrow [overtwoheadrightarrow] [\twoheadrightarrowfill] +\definemathoverarrow [overtwoheadleftarrow] [\twoheadleftarrowfill] +\definemathoverarrow [overrightharpoondown] [1pt] [\rightharpoondownfill] +\definemathoverarrow [overrightharpoonup] [\rightharpoonupfill] +\definemathoverarrow [overleftharpoondown] [1pt] [\leftharpoondownfill] +\definemathoverarrow [overleftharpoonup] [\leftharpoonupfill] + +\definemathunderarrow [underleftarrow] [\leftarrowfill] +\definemathunderarrow [underrightarrow] [\rightarrowfill] +\definemathunderarrow [underleftrightarrow] [\leftrightarrowfill] +\definemathunderarrow [undertwoheadrightarrow][\twoheadrightarrowfill] +\definemathunderarrow [undertwoheadleftarrow] [\twoheadleftarrowfill] +\definemathunderarrow [underrightharpoondown] [\rightharpoondownfill] +\definemathunderarrow [underrightharpoonup] [\rightharpoonupfill] +\definemathunderarrow [underleftharpoondown] [\leftharpoondownfill] +\definemathunderarrow [underleftharpoonup] [\leftharpoonupfill] + +%D These can be used as follows: +%D +%D \startbuffer +%D $\overleftarrow{A}$ $\overleftarrow{ABC}$ +%D $a_{\overleftarrow{A}}$ $b_{\overleftarrow{ABC}}$ +%D \stopbuffer +%D \typebuffer which gives \getbuffer + +%D TODO: Possibly have a single arrow command define all the arrows. + \protect \endinput diff --git a/tex/context/base/spec-fdf.tex b/tex/context/base/spec-fdf.tex index 250fd1ad0..d6f912df5 100644 --- a/tex/context/base/spec-fdf.tex +++ b/tex/context/base/spec-fdf.tex @@ -2912,17 +2912,51 @@ \definespecial\doregisterspotcolorname{\doPDFregisterspotcolorname} -\def\doPDFregisterrgbspotcolor#1#2#3#4#5#6#7% name noffractions names p's r g b +\def\dodoPDFregisterrgbspotcolor#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}} -\def\doPDFregistercmykspotcolor#1#2#3#4#5#6#7#8% name noffractions names p's c m y k +\def\dodoPDFregistercmykspotcolor#1#2#3#4#5#6#7#8% name noffractions names p's c m y k {\doPDFregistersomespotcolor{#1}{#2}{#3}{#4}{CMYK}{0.0 1.0 0.0 1.0 0.0 1.0 0.0 1.0}% {\ifcase#2\or dup #5 mul exch dup #6 mul exch dup #7 mul exch #8 mul\else #5 #6 #7 #8\fi}} -\def\doPDFregistergrayspotcolor#1#2#3#4#5% name noffractions names p's s +\def\dodoPDFregistergrayspotcolor#1#2#3#4#5% name noffractions names p's s {\doPDFregistersomespotcolor{#1}{#2}{#3}{#4}{Gray}{0.0 1.0}% - {\ifcase#2\or pop\else#5\fi}} + {\ifcase#2\or #5 mul\else #5\fi}} + +% \let\doPDFregisterrgbspotcolor \dodoPDFregisterrgbspotcolor +% \let\doPDFregistercmykspotcolor\dodoPDFregistercmykspotcolor +% \let\doPDFregistergrayspotcolor\dodoPDFregistergrayspotcolor + +\def\doPDFregisterrgbspotcolor#1#2#3#4#5#6#7% name noffractions names p's r g b + {\ifRGBsupported + \dodoPDFregisterrgbspotcolor{#1}{#2}{#3}{#4}{#5}{#6}{#7}% + \else + \edef\@@cl@@r{#5}\edef\@@cl@@g{#6}\edef\@@cl@@b{#7}% + \ifCMYKsupported + \convertRGBtoCMYK\@@cl@@r\@@cl@@g\@@cl@@b + \dodoPDFregistercmykspotcolor{#1}{#2}{#3}{#4}\@@cl@@c\@@cl@@m\@@cl@@y\@@cl@@k + \else + \convertRGBtoGRAY\@@cl@@r\@@cl@@g\@@cl@@b + \dodoPDFregistergrayspotcolor{#1}{#2}{#3}{#4}\@@cl@@s + \fi + \fi} + +\def\doPDFregistercmykspotcolor#1#2#3#4#5#6#7#8% name noffractions names p's c m y k + {\ifCMYKsupported + \dodoPDFregistercmykspotcolor{#1}{#2}{#3}{#4}{#5}{#6}{#7}{#8}% + \else + \edef\@@cl@@c{#5}\edef\@@cl@@m{#6}\edef\@@cl@@y{#7}\edef\@@cl@@k{#8}% + \ifRGBsupported + \convertCMYKtoRGB\@@cl@@c\@@cl@@m\@@cl@@y\@@cl@@k + \dodoPDFregisterrgbspotcolor{#1}{#2}{#3}{#4}\@@cl@@r\@@cl@@g\@@cl@@b + \else + \convertCMYKtoGRAY\@@cl@@c\@@cl@@m\@@cl@@y\@@cl@@k + \dodoPDFregistergrayspotcolor{#1}{#2}{#3}{#4}\@@cl@@s + \fi + \fi} + +\def\doPDFregistergrayspotcolor{\dodoPDFregistergrayspotcolor} %D New and very experimental. diff --git a/tex/context/interface/keys-cz.xml b/tex/context/interface/keys-cz.xml index 41bf3c338..4a67e283b 100644 --- a/tex/context/interface/keys-cz.xml +++ b/tex/context/interface/keys-cz.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> -<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2007.07.24 14:36"> +<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2007.07.25 12:35"> <cd:variables> <cd:variable name="lesshyphenation" value="lesshyphenation"/> diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml index 1b042b3dd..a05e281b4 100644 --- a/tex/context/interface/keys-de.xml +++ b/tex/context/interface/keys-de.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> -<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2007.07.24 14:36"> +<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2007.07.25 12:35"> <cd:variables> <cd:variable name="lesshyphenation" value="lesshyphenation"/> diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml index acce559b9..e205814a8 100644 --- a/tex/context/interface/keys-en.xml +++ b/tex/context/interface/keys-en.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> -<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2007.07.24 14:36"> +<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2007.07.25 12:35"> <cd:variables> <cd:variable name="lesshyphenation" value="lesshyphenation"/> diff --git a/tex/context/interface/keys-fr.xml b/tex/context/interface/keys-fr.xml index a3f06eb2f..291669d90 100644 --- a/tex/context/interface/keys-fr.xml +++ b/tex/context/interface/keys-fr.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> -<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="fr" version="2007.07.24 14:36"> +<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="fr" version="2007.07.25 12:35"> <cd:variables> <cd:variable name="lesshyphenation" value="lesshyphenation"/> diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml index f34789f34..d038e931d 100644 --- a/tex/context/interface/keys-it.xml +++ b/tex/context/interface/keys-it.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> -<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2007.07.24 14:36"> +<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2007.07.25 12:35"> <cd:variables> <cd:variable name="lesshyphenation" value="lesshyphenation"/> diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml index c066fc013..1c67d4b4b 100644 --- a/tex/context/interface/keys-nl.xml +++ b/tex/context/interface/keys-nl.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> -<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2007.07.24 14:36"> +<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2007.07.25 12:35"> <cd:variables> <cd:variable name="lesshyphenation" value="lesshyphenation"/> diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml index c6130bb68..dfcc7003a 100644 --- a/tex/context/interface/keys-ro.xml +++ b/tex/context/interface/keys-ro.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> -<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2007.07.24 14:36"> +<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2007.07.25 12:35"> <cd:variables> <cd:variable name="lesshyphenation" value="lesshyphenation"/> |