diff options
Diffstat (limited to 'tex')
157 files changed, 20192 insertions, 8410 deletions
diff --git a/tex/context/base/colo-ini.tex b/tex/context/base/colo-ini.tex index d5b9beb6e..02b6ca694 100644 --- a/tex/context/base/colo-ini.tex +++ b/tex/context/base/colo-ini.tex @@ -123,6 +123,36 @@ 11: barva je prevedena na sed \stopmessages +\startmessages italian library: colors + title: colore + 1: sistema -- attivato globalmente + 2: sistema -- attivato localmente + 3: -- non definito + 4: sistema -- caricato + 5: sistema -- sconosciuto + 6: tavolozza -- resa disponibile + 7: tavolozza -- non disponibile + 8: specifica -- del colore -- convertita in nero + 9: spazio dei colori -- non supportato + 10: spazio dei colori -- supportato + 11: il colore è convertito in grigio +\stopmessages + +\startmessages norwegian library: colors + title: farge + 1: system -- er aktivert globalt + 2: system -- er aktivert lokalt + 3: -- er udefinert + 4: system -- er lest inn + 5: ukjent system -- + 6: palett -- er tilgjengelig + 7: palett -- er ikke tilgjengelig + 8: spesifikasjon -- for farge -- gir kun svart + 9: -- fargerom er ikke støttet + 10: -- fargerom er støttet + 11: fargen vil bli vist som grå +\stopmessages + %D \macros %D {definecolor} %D @@ -256,7 +286,7 @@ \newif\ifRGBsupported \newif\ifCMYKsupported -\newif\ifconverttoGRAY +\newif\ifconverttoGRAY % obsolete \newif\ifpreferGRAY \newif\ifGRAYprefered \newif\ifreduceCMYK @@ -272,14 +302,19 @@ %D Color modes are entered using the next set of commands. %D The \type{\stop} alternatives are implemented in a way -%D that permits non||grouped use. +%D that permits non||grouped use. +%D +%D The, for this module redundant, check if we are in color +%D mode is needed when we use these macros in other modules. \def\dostartcolormodeR#1:#2:#3\od% {\bgroup - \def\@@cl@@r{#1}\def\@@cl@@g{#2}\def\@@cl@@b{#3}% + %\def\@@cl@@r{#1}\def \@@cl@@g{#2}\def \@@cl@@b{#3}% + \edef\@@cl@@r{#1}\edef\@@cl@@g{#2}\edef\@@cl@@b{#3}% \ifpreferGRAY\ifx\@@cl@@r\@@cr@@g\ifx\@@cl@@r\@@cl@@b \GRAYpreferedtrue \fi\fi\fi + \ifincolor\else\RGBsupportedfalse\CMYKsupportedfalse\fi \ifGRAYprefered \dostartgraycolormode\@@cl@@r \else\ifRGBsupported @@ -295,10 +330,12 @@ \def\dostartcolormodeC#1:#2:#3:#4\od% {\bgroup - \def\@@cl@@c{#1}\def\@@cl@@m{#2}\def\@@cl@@y{#3}\def\@@cl@@k{#4}% + %\def\@@cl@@c{#1}\def \@@cl@@m{#2}\def \@@cl@@y{#3}\def \@@cl@@k{#4}% + \edef\@@cl@@c{#1}\edef\@@cl@@m{#2}\edef\@@cl@@y{#3}\edef\@@cl@@k{#4}% \ifpreferGRAY\ifx\@@cl@@k\@@cl@@z\ifx\@@cl@@c\@@cr@@m\ifx\@@cl@@c\@@cl@@y \GRAYpreferedtrue \fi\fi\fi\fi + \ifincolor\else\RGBsupportedfalse\CMYKsupportedfalse\fi \ifGRAYprefered \dostartgraycolormode\@@cl@@c \else\ifCMYKsupported @@ -336,13 +373,15 @@ {\getvalue{dostartcolormode#1}} \def\startcolormode#1% - {\doifcolorelse{#1} - {\getcurrentcolorspecs{#1}% - \expandafter\dostartcolormode\currentcolorspecs\od} - {\dostopcolormode}} + {\ifincolor + \doifcolorelse{#1} + {\getcurrentcolorspecs{#1}% + \expandafter\dostartcolormode\currentcolorspecs\od} + {\dostopcolormode}% + \fi} \def\stopcolormode% - {\dostopcolormode} + {\ifincolor\dostopcolormode\fi} %D We use some reserved names for local color components. %D Consistent use of these scratch variables saves us @@ -429,15 +468,25 @@ \doconvertRGBtoCMYK#3\to\@@cl@@y \let\@@cl@@k=\@@cl@@z} +%D The following switch is mainly meant for (hidden) +%D documentation purposes. + +\newif\ifweightGRAY \weightGRAYtrue + +\def\nGRAYfactor{333.333} +\def\rGRAYfactor{\ifweightGRAY300\else\nGRAYfactor\fi} +\def\gGRAYfactor{\ifweightGRAY590\else\nGRAYfactor\fi} +\def\bGRAYfactor{\ifweightGRAY110\else\nGRAYfactor\fi} + \def\convertRGBtoGRAY#1#2#3% {\scratchdimen=#1\s!pt - \scratchdimen=300\scratchdimen + \scratchdimen=\rGRAYfactor\scratchdimen \scratchcounter=\scratchdimen \scratchdimen=#2\s!pt - \scratchdimen=590\scratchdimen + \scratchdimen=\gGRAYfactor\scratchdimen \advance\scratchcounter by \scratchdimen \scratchdimen=#3\s!pt - \scratchdimen=110\scratchdimen + \scratchdimen=\bGRAYfactor\scratchdimen \advance\scratchcounter by \scratchdimen \advance\scratchcounter by \!!medcard \divide\scratchcounter by \!!maxcard @@ -1476,27 +1525,28 @@ \def\MPcolor#1% {\ifMPgraphics - \@EA\@EA\@EA\doMPcolor\csname\??cr#1\endcsname::::\end + \@EA\@EA\@EA\doMPcolor\csname\??cr#1\endcsname:::::\end \else #1% \fi} -\def\doMPcolor#1:#2:#3:#4:#5\end% +\def\doMPcolor#1:#2:#3:#4:#5:#6\end% {\if #1R(#2,#3,#4)% - \else\if#1C(1-#2+#5,1-#3+#5,1-#4+#5)% + \else\if#1C(1-#2-#5,1-#3-#5,1-#4-#5)% +% \else\if#1C(1-#2+#5,1-#3+#5,1-#4+#5)% \else\if#1S(#2,#2,#2)% \else (0,0,0)% \fi\fi\fi} - + %D \macros %D {PDFcolor,FDFcolor} %D %D Similar alternatives are avaliable for \PDF: \def\PDFcolor#1% - {\@EA\@EA\@EA\doPDFcolor\csname\??cr#1\endcsname::::\end} + {\@EA\@EA\@EA\doPDFcolor\csname\??cr#1\endcsname:::::\end} -\def\doPDFcolor#1:#2:#3:#4:#5\end% +\def\doPDFcolor#1:#2:#3:#4:#5:#6\end% {\if #1R#2 #3 #4 rg% \else\if#1C#2 #3 #4 #5 k% \else\if#1S#2 g% @@ -1504,9 +1554,9 @@ \fi\fi\fi} \def\FDFcolor#1% - {\@EA\@EA\@EA\doFDFcolor\csname\??cr#1\endcsname::::\end} + {\@EA\@EA\@EA\doFDFcolor\csname\??cr#1\endcsname:::::\end} -\def\doFDFcolor#1:#2:#3:#4:#5\end% +\def\doFDFcolor#1:#2:#3:#4:#5:#6\end% {[\if #1R#2 #3 #4% \else\if#1C#2 #3 #4 #5% \else\if#1S#2% diff --git a/tex/context/base/colo-rgb.tex b/tex/context/base/colo-rgb.tex index 19934eee7..0b5a7de1c 100644 --- a/tex/context/base/colo-rgb.tex +++ b/tex/context/base/colo-rgb.tex @@ -54,9 +54,9 @@ \definecolor [darkyellow] [r=.8, g=.8, b=.6] \definecolor [middleyellow] [r=1, g=1, b=.2] -\definecolor [darkgray] [r=.5, g=.5, b=.5] -\definecolor [middlegray] [r=.7, g=.7, b=.7] -\definecolor [lightgray] [r=.9, g=.9, b=.9] +\definecolor [darkgray] [s=.5] +\definecolor [middlegray] [s=.7] +\definecolor [lightgray] [s=.9] %D These colors are mapped to interface dependant colornames. @@ -112,6 +112,7 @@ \definecolor [gelb] [yellow] \definecolor [weiss] [white] + \definecolor [grau] [gray] \definecolor [schwarz] [black] \definecolor [dunkelrot] [darkred] @@ -143,44 +144,87 @@ \startinterface czech - \definecolor [cervena] [red] - \definecolor [zelena] [green] - \definecolor [modra] [blue] + \definecolor [cervena] [red] + \definecolor [zelena] [green] + \definecolor [modra] [blue] - \definecolor [azurova] [cyan] - \definecolor [fialova] [magenta] - \definecolor [zluta] [yellow] + \definecolor [azurova] [cyan] + \definecolor [fialova] [magenta] + \definecolor [zluta] [yellow] - \definecolor [bila] [white] - \definecolor [cerna] [black] + \definecolor [bila] [white] + \definecolor [cerna] [black] - \definecolor [tmavecervena] [darkred] - \definecolor [strednecervena][middlered] - \definecolor [svetlecervena] [lightred] + \definecolor [tmavecervena] [darkred] + \definecolor [strednecervena] [middlered] + \definecolor [svetlecervena] [lightred] - \definecolor [tmavezelena] [darkgreen] - \definecolor [strednezelena] [middlegreen] - \definecolor [svetlezelena] [lightgreen] + \definecolor [tmavezelena] [darkgreen] + \definecolor [strednezelena] [middlegreen] + \definecolor [svetlezelena] [lightgreen] - \definecolor [tmavemodra] [darkblue] - \definecolor [strednemodra] [middleblue] - \definecolor [svetlemodra] [lightblue] + \definecolor [tmavemodra] [darkblue] + \definecolor [strednemodra] [middleblue] + \definecolor [svetlemodra] [lightblue] - \definecolor [tmaveazurova] [darkcyan] - \definecolor [stredneazurova][middlecyan] + \definecolor [tmaveazurova] [darkcyan] + \definecolor [stredneazurova] [middlecyan] - \definecolor [tmavefialova] [darkmagenta] - \definecolor [strednefialova][middlemagenta] + \definecolor [tmavefialova] [darkmagenta] + \definecolor [strednefialova] [middlemagenta] - \definecolor [tmavezluta] [darkyellow] - \definecolor [strednezluta] [middleyellow] + \definecolor [tmavezluta] [darkyellow] + \definecolor [strednezluta] [middleyellow] - \definecolor [tmaveseda] [darkgray] - \definecolor [stredneseda] [middlegray] - \definecolor [svetleseda] [lightgray] + \definecolor [tmaveseda] [darkgray] + \definecolor [stredneseda] [middlegray] + \definecolor [svetleseda] [lightgray] \stopinterface +\startinterface italian + + \definecolor [rosso] [red] + \definecolor [verde] [green] + \definecolor [blu] [blue] + + \definecolor [cyan] [cyan] + \definecolor [magenta] [magenta] + \definecolor [giallo] [yellow] + + \definecolor [bianco] [white] + \definecolor [grigio] [gray] + \definecolor [nero] [black] + + \definecolor [rossoscuro] [darkred] + \definecolor [rossomedio] [middlered] + \definecolor [rossochiaro] [lightred] + + \definecolor [verdescuro] [darkgreen] + \definecolor [verdemedio] [middlegreen] + \definecolor [verdechiaro] [lightgreen] + + \definecolor [bluscuro] [darkblue] + \definecolor [blumedio] [middleblue] + \definecolor [bluchiaro] [lightblue] + + \definecolor [cyanscuro] [darkcyan] + \definecolor [cyanchiaro] [middlecyan] + + \definecolor [magentascuro] [darkmagenta] + \definecolor [magentachiaro] [middlemagenta] + + + \definecolor [gialloscuro] [darkyellow] + \definecolor [giallomedio] [middleyellow] + + \definecolor [grigioscuro] [darkgray] + \definecolor [grigiomedio] [middlegray] + \definecolor [grigiochiaro] [lightgray] + +\stopinterface + + %D Like colors, we first define the english colorgroups. These %D colorgroups are tuned for distinctive gray scale printing. @@ -340,19 +384,34 @@ \stopinterface \startinterface czech - \definecolorgroup [seda] [gray] - \definecolorgroup [cervena] [red] - \definecolorgroup [zelena] [green] - \definecolorgroup [modra] [blue] - \definecolorgroup [azurova] [cyan] - \definecolorgroup [fialova] [magenta] - \definecolorgroup [zluta] [yellow] - \definecolorgroup [cervena*][red*] - \definecolorgroup [zelena*] [green*] - \definecolorgroup [modra*] [blue*] - \definecolorgroup [zluta*] [yellow*] + \definecolorgroup [seda] [gray] + \definecolorgroup [cervena] [red] + \definecolorgroup [zelena] [green] + \definecolorgroup [modra] [blue] + \definecolorgroup [azurova] [cyan] + \definecolorgroup [fialova] [magenta] + \definecolorgroup [zluta] [yellow] + \definecolorgroup [cervena*] [red*] + \definecolorgroup [zelena*] [green*] + \definecolorgroup [modra*] [blue*] + \definecolorgroup [zluta*] [yellow*] \stopinterface +\startinterface italian + \definecolorgroup [grigio] [gray] + \definecolorgroup [rosso] [red] + \definecolorgroup [verde] [green] + \definecolorgroup [blu] [blue] + \definecolorgroup [ciano] [cyan] + \definecolorgroup [magenta] [magenta] + \definecolorgroup [giallo] [yellow] + \definecolorgroup [rosso*] [red*] + \definecolorgroup [verde*] [green*] + \definecolorgroup [blu*] [blue*] + \definecolorgroup [giallo*] [yellow*] +\stopinterface + + %D The next set of color palets is quite language independant. %D These palets are meant as examples. diff --git a/tex/context/base/cont-cz.tex b/tex/context/base/cont-cz.tex index e2ba2b56e..05ac01287 100644 --- a/tex/context/base/cont-cz.tex +++ b/tex/context/base/cont-cz.tex @@ -28,8 +28,4 @@ \setupbodyfont [csr,rm,12pt] -\protect - -\dump - -\endinput +\protect \errorstopmode \dump \endinput diff --git a/tex/context/base/cont-de.tex b/tex/context/base/cont-de.tex index eb0ab22c4..2e410fd54 100644 --- a/tex/context/base/cont-de.tex +++ b/tex/context/base/cont-de.tex @@ -25,15 +25,11 @@ \installlanguage [\s!uk] [\c!status=\v!start] \installlanguage [\s!de] [\c!status=\v!start] \installlanguage [\s!fr] [\c!status=\v!start] -\installlanguage [\s!sp] [\c!status=\v!start] +\installlanguage [\s!es] [\c!status=\v!start] \installlanguage [\s!nl] [\c!status=\v!start] \installlanguage [deo] [\c!status=\v!start] \setupbodyfont [cmr,rm,12pt] -\protect - -\dump - -\endinput +\protect \errorstopmode \dump \endinput diff --git a/tex/context/base/cont-en.tex b/tex/context/base/cont-en.tex index 544876940..a0ff80769 100644 --- a/tex/context/base/cont-en.tex +++ b/tex/context/base/cont-en.tex @@ -25,13 +25,9 @@ \installlanguage [\s!uk] [\c!status=\v!start] \installlanguage [\s!de] [\c!status=\v!start] \installlanguage [\s!fr] [\c!status=\v!start] -\installlanguage [\s!sp] [\c!status=\v!start] +\installlanguage [\s!es] [\c!status=\v!start] \installlanguage [\s!nl] [\c!status=\v!start] \setupbodyfont [cmr,rm,12pt] -\protect - -\dump - -\endinput +\protect \errorstopmode \dump \endinput diff --git a/tex/context/base/cont-fil.tex b/tex/context/base/cont-fil.tex index 0f68ef860..2d27b9dad 100644 --- a/tex/context/base/cont-fil.tex +++ b/tex/context/base/cont-fil.tex @@ -13,7 +13,7 @@ \writestatus{loading}{Context File Synonyms} -\definefilesynonym [chemie] [chemic] +\definefilesynonym [chemie] [chemic] \definefilesynonym [unit] [units] \definefilesynonym [eenheid] [units] @@ -23,23 +23,31 @@ \definefilesynonym [pre-general] [pre-00] -\definefilesynonym [pre-original] [pre-01] -\definefilesynonym [pre-green] [pre-02] -\definefilesynonym [pre-funny] [pre-03] -\definefilesynonym [pre-colorful] [pre-04] -\definefilesynonym [pre-fuzzy] [pre-05] -\definefilesynonym [pre-polish] [pre-06] +\definefilesynonym [pre-original] [pre-01] % public +\definefilesynonym [pre-green] [pre-02] % public +\definefilesynonym [pre-funny] [pre-03] % public +\definefilesynonym [pre-colorful] [pre-04] % public +\definefilesynonym [pre-fuzzy] [pre-05] % public +\definefilesynonym [pre-polish] [pre-06] % public \definefilesynonym [pre-spider] [pre-07] -\definefilesynonym [pre-split] [pre-08] +\definefilesynonym [pre-wonder] [pre-08] \definefilesynonym [pre-windows] [pre-09] \definefilesynonym [pre-grow] [pre-10] \definefilesynonym [pre-stack] [pre-11] \definefilesynonym [pre-arrows] [pre-12] \definefilesynonym [pre-writing] [pre-13] -\definefilesynonym [pre-wonder] [pre-14] -\definefilesynonym [pre-balls] [pre-15] +\definefilesynonym [pre-split] [pre-14] +\definefilesynonym [pre-balls] [pre-15] % public \definefilesynonym [pre-knot] [pre-16] - + +% [pre-17] % experimental +% [pre-18] % experimental + +\definefilesynonym [pre-organic] [pre-19] +\definefilesynonym [pre-super] [pre-20] +\definefilesynonym [pre-zoom] [pre-21] +\definefilesynonym [pre-cycle] [pre-22] + \definefilesynonym [abr-pseudocaps] [abr-01] \definefilesynonym [abr-smallcaps] [abr-02] diff --git a/tex/context/base/cont-it.tex b/tex/context/base/cont-it.tex new file mode 100644 index 000000000..b5b020644 --- /dev/null +++ b/tex/context/base/cont-it.tex @@ -0,0 +1,34 @@ +%D \module +%D [ file=cont-en, +%D version=1997.08.19, +%D title=\CONTEXT, +%D subtitle=\CONTEXT\ English Format Generation, +%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. + +\catcode`\{=1 \catcode`\}=2 \def\defaultinterface{italian} + +\input context.tex + +\unprotect + +\setupcurrentlanguage[\s!it] + +\loaduserspecifications + +\installlanguage [\s!en] [\c!status=\v!start] +%\installlanguage [\s!uk] [\c!status=\v!start] +\installlanguage [\s!de] [\c!status=\v!start] +\installlanguage [\s!fr] [\c!status=\v!start] +%\installlanguage [\s!es] [\c!status=\v!start] +\installlanguage [\s!it] [\c!status=\v!start] +%\installlanguage [\s!nl] [\c!status=\v!start] + +\setupbodyfont [cmr,rm,12pt] + +\protect \errorstopmode \dump \endinput diff --git a/tex/context/base/cont-log.tex b/tex/context/base/cont-log.tex index 1aecd0efd..8fd0774f1 100644 --- a/tex/context/base/cont-log.tex +++ b/tex/context/base/cont-log.tex @@ -38,7 +38,7 @@ \kern-.125emX} \def\ConTeXt% - {C% + {C% \CMRkern-.0333emo% \CMRkern-.0333emn% \CMRkern-.0333em\TeX% @@ -98,14 +98,26 @@ 10 at \currentfontscale\bodyfontsize \logofont} +%\unexpanded\def\MetaFont% +% {\hbox{\setMFPfont METAFONT}} +% +%\unexpanded\def\MetaPost% +% {\hbox{\setMFPfont METAPOST}} + +\def\MetaHyphen% there is no hyphenchar in this font + {\discretionary{\vrule\!!height.33em\!!depth-.27em\!!width.33em}{}{}} + \unexpanded\def\MetaFont% - {{\setMFPfont METAFONT}} + {{\setMFPfont META\MetaHyphen FONT}} \unexpanded\def\MetaPost% - {{\setMFPfont METAPOST}} + {{\setMFPfont META\MetaHyphen POST}} + +\unexpanded\def\MetaFun% + {MetaFun} %D \macros -%D {TEX, METAFONT, METAPOST, +%D {TEX, METAFONT, METAPOST, METAFUN, %D PICTEX, TABLE, %D CONTEXT, PPCHTEX, %D AMSTEX, LATEX, LAMSTEX} @@ -119,6 +131,7 @@ \def\METAPOST {\MetaPost} \def\PPCHTEX {\PPCHTeX} \def\CONTEXT {\ConTeXt} +\def\METAFUN {\MetaFun} \def\TEX {\TeX} \def\LATEX {\LaTeX} @@ -142,9 +155,9 @@ %D Some placeholders: -\def\eTeX {\mathematics{\varepsilon}-\TEX} -\def\pdfTeX {pdf\TEX} -\def\pdfeTeX {pdfe-\TEX} +\def\eTeX {\mathematics{\varepsilon}-\TeX} +\def\pdfTeX {pdf\TeX} +\def\pdfeTeX {pdfe-\TeX} \let\ETEX \eTeX \let\PDFTEX \pdfTeX diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex index ef0d14211..b33c6cc56 100644 --- a/tex/context/base/cont-new.tex +++ b/tex/context/base/cont-new.tex @@ -18,223 +18,33 @@ \writestatus{\m!systems}{beware: some patches loaded from cont-new.tex!} -%D Hm. Needed for low level calls, like in verbatim. - -\def\startcolormode#1% - {\ifincolor - \doifcolorelse{#1} - {\getcurrentcolorspecs{#1}% - \expandafter\dostartcolormode\currentcolorspecs\od} - {\dostopcolormode}% - \fi} - -\def\stopcolormode% - {\ifincolor\dostopcolormode\fi} - -%D New table stuff. - -\readfile{supp-ali}{}{} % alignment stuff -\readfile{core-ntb}{}{} % new table mechanism - -\ifx\alignmentclass\undefined \else % [|lg{.}|] \NG 12.34 \NC - -\gdef\handletabulatecharalign#1 % space delimited ! - {\edef\alignmentclass{\tabulatecolumn}% - \edef\alignmentcharacter{\getvalue{\@@tabalign@@\tabulatecolumn}}% - \ifcase\tabulatepass\or - \setfirstpasscharacteralign\checkalignment{#1}% - \fi % force hsize - \setsecondpasscharacteralign\checkalignment{#1}} - -\fi - -%D A funny (but rather stupid) one. - -\def\removebottomthings% - {\dorecurse{5}{\unskip\unkern\unpenalty}} - -%D We also support broad here: - -\def\dosetraggedcommand#1% - {\expanded{\dodosetraggedcommand{#1}}} - -\def\dodosetraggedcommand#1% - {\doifinsetelse{\v!ruim} {#1}{\!!doneatrue}{\!!doneafalse}% - \doifinsetelse{\v!breed}{#1}{\!!donebtrue}{\!!donebfalse}% - \let\raggedcommand\relax - \let\raggedtopcommand\empty - \let\raggedbottomcommand\empty - \ExpandFirstAfter\processallactionsinset - [#1] - [ \v!links=>\if!!donea \def\raggedcommand{\veryraggedleft}% - \else \def\raggedcommand{\raggedleft}% - \fi, - \v!rechts=>\if!!donea \def\raggedcommand{\veryraggedright}% - \else \def\raggedcommand{\raggedright}% - \fi, - \v!midden=>\if!!doneb \def\raggedcommand{\raggedwidecenter}% - \else\if!!donea \def\raggedcommand{\veryraggedcenter}% - \else \def\raggedcommand{\raggedcenter}% - \fi\fi, - \v!hoog=>\let\raggedbottomcommand\vfilll, % bonus, pretty strong - \v!laag=>\let\raggedtopcommand \vfilll, % used with \framed - \v!nee=>\def\raggedcommand{\raggedright}, - \v!ja=>\let\raggedcommand\relax, - \v!normaal=>\let\raggedcommand\relax]} - -%D Sometimes a capstrut comes in handy -%D -%D \starttabulatie[|Tl|l|l|] -%D \NC yes \NC normal strut \NC {\toonstruts\setupstrut[ja]\strut} \NC \NR -%D \NC no \NC no strut \NC {\toonstruts\setupstrut[nee]\strut} \NC \NR -%D \NC kap \NC a capital strut (i.e. Q) \NC {\toonstruts\setupstrut[kap]\strut} \NC \NR -%D \NC A B \unknown \NC a character strut (e.g. A) \NC {\toonstruts\setupstrut[A]\strut} \NC \NR -%D \NC \NC a normal strut \NC {\toonstruts\setupstrut\strut} \NC \NR -%D \stoptabulatie - -\def\setstrut% - {\setstrutdimen\strutheight\strutheightfactor\spacingfactor - \setstrutdimen\strutdepth \strutdepthfactor \spacingfactor - \dosetstrut} - -\def\setcharstrut#1% - {\setbox\strutbox=\hbox{#1}% - \edef\strutheight{\the\ht\strutbox}% - \edef\strutdepth {\the\dp\strutbox}% - \dosetstrut} - -\def\setcapstrut% could be M, but Q has descender - {\setcharstrut{Q}} - -\def\setupstrut% - {\dosingleempty\dosetupstrut} - -\def\dosetupstrut[#1]% - {\processaction - [#1] - [ \v!ja=>\setstrut, - \v!nee=>\setnostrut, - \v!kap=>\setcapstrut, - \s!default=>\setstrut, - \s!unknown=>\setcharstrut{\commalistelement}]} - -%D Centered looks nicer: - -\def\dosetstrut% - {\let\strut=\normalstrut - \setbox\strutbox=\normalhbox - {\normalhbox to \!!zeropoint - {% \hss % new, will be option - \vrule - \!!width \strutwidth - \!!height\strutheight - \!!depth \strutdepth - \hss}}} - -%D in case of no color we don't want to see the rules - -\def\dophantombox#1\\{\hphantom{\dofilledbox#1\\}} - -\def\raster[#1]% - {\groupedcommand{\startraster[#1]}{\stopraster}} - -\def\setgraybox\width#1\height#2\depth#3\raster#4\corner#5\radius#6\\% - {\doifelsenothing{#4} - {\dophantombox\width#1\height#2\depth#3\corner#5\radius#6\\} - {\raster[#4]% - {\dofilledbox \width#1\height#2\depth#3\corner#5\radius#6\\}}} - -\def\setcolorbox\width#1\height#2\depth#3\color#4\corner#5\radius#6\\% - {\ifincolor - \doifcolorelse{#4}{\color[#4]% - {\dofilledbox \width#1\height#2\depth#3\corner#5\radius#6\\}} - {\dophantombox\width#1\height#2\depth#3\corner#5\radius#6\\}% +%D Interesting, saves keystrokes, but also dangerous. + +%\def\checkMPbackground% +% {\doifoverlayelse\currentbackground +% {} +% {\doifMPgraphicelse\currentbackground +% {\defineoverlay[\currentbackground][\useMPgraphic{\currentbackground}]} +% {}}} +% +%\appendtoks \checkMPbackground \to \everybackgroundbox + +%D Better (no zero dimension mp figs) and faster: + +\def\dododopagebodybackground#1#2#3#4% + {\ifsomebackgroundfound{#3#4}% + \ifdim#1>\!!zeropoint\relax + \ifdim#2>\!!zeropoint\relax + \localframed + [\??ma#3#4] + [\c!breedte=#1,\c!hoogte=#2,\c!offset=\v!overlay] + {\getvalue{\??ma#3#4\c!commando}}% {\hsize=#1\vsize=#2....} + \fi + \fi \else - \dophantombox\width#1\height#2\depth#3\corner#5\radius#6\\% + \hskip#1% \fi} -%D more and more - -\def\lhbox{\dowithnextbox{\hbox to \hsize{\box\nextbox\hss }}\hbox} -\def\mhbox{\dowithnextbox{\hbox to \hsize{\hss\box\nextbox\hss}}\hbox} -\def\rhbox{\dowithnextbox{\hbox to \hsize{\hss\box\nextbox }}\hbox} - -\let\lefthbox =\lhbox -\let\midhbox =\mhbox -\let\righthbox=\rhbox - -%D to be tested - -\def\docomplexuit[#1::#2]% - {\dontleavehmode % added, but probably not needed - \bgroup - \doifdefinedelse{\v!file:::#1} - {\def\doexternaldocument[##1][##2][##3]% - {\naar{##3}[#1::#2]}% - \getvalue{\v!file:::#1}} - {\tttf[#1]}% - \egroup} - -%D Makes sense: - -\def\removelastskip% \ifvmode the plain tex one \fi - {\ifvmode\ifdim\lastskip=\z@\else\vskip-\lastskip\fi\fi} - -%D More hyphention control, will be combined with hz setup. - -\def\nohyphens% - {\ifx\dohyphens\relax - \edef\dohyphens% - {\hyphenpenalty\the\hyphenpenalty - \exhyphenpenalty\the\exhyphenpenalty\relax}% - \fi - \hyphenpenalty\@M\exhyphenpenalty\@M} - -\let\dohyphens\relax - -%D Better (a mere copy with \dohyphens): - -\bgroup \catcode`\~=\active \catcode`\/=\active - -\unexpanded\gdef\hyphenatedurl#1% {}{} handles accents - {\bgroup - \ifnum\hyphenpenalty<10000 \else - \def\discretionary##1##2##3{##1\allowbreak##2}% - \fi - \obeyhyphens - \def\splitbefore##1% - {\setbox\scratchbox=\hbox{##1{}{}}% - \ifcase\urlsplitmode - \box\scratchbox - \or - \postwordbreak\box\scratchbox\prewordbreak - \or - \prewordbreak\discretionary{\box\scratchbox}{}{\box\scratchbox}\prewordbreak - \else - \postwordbreak\box\scratchbox\prewordbreak - \fi}% - \def\splitafter##1% - {\ifcase\urlsplitmode - ##1{}{}% - \or - \prewordbreak\discretionary{##1{}{}}{}{##1{}{}}\prewordbreak - \or - \prewordbreak\discretionary{##1{}{}}{}{##1{}{}}\prewordbreak - \else - \prewordbreak\discretionary{}{##1{}{}}{##1{}{}}\prewordbreak - \fi}% - \def\flushurl% - {\savedurl\let\savedurl\empty}% - \def\\% - {\spliturl\#}% - \let\~=\tildeletter \let~=\~% - \let\/=\slashletter \let/=\/% - \let\savedurl\empty - \handletokens#1\with\scanurl - \egroup} - -\egroup - %D A prelude to strategies. Note for myself: overloads %D previous stuff from local pragma test files. @@ -291,9 +101,11 @@ \def\doifstrategyvariable #1#2{\doifstrategyvariableelse{#1}{#2}{}} \def\doifnotstrategyvariable#1#2{\doifstrategyvariableelse{#1}{}{#2}} -%D New: only at start of columns; may change ! +%D New: only at start of columns; may change ! Rather +%D interwoven and therefore to be integrated when the multi +%D column modules are merged. -\definesystemvariable {ks} % KolomSpan +% already taken care of: \definesystemvariable{ks} \def\setupcolumnspan[#1]% {\getparameters[\??ks][#1]} @@ -312,16 +124,14 @@ {\bgroup \setupcolumnspan[#1]% \forgetall -% - \ifbinnenkolommen - \advance\hsize by \intercolumnwidth - \hsize=\@@ksn\hsize - \advance\hsize by -\intercolumnwidth - \fi -% + \ifbinnenkolommen + \advance\hsize by \intercolumnwidth + \hsize=\@@ksn\hsize + \advance\hsize by -\intercolumnwidth + \fi \dowithnextbox {\setbox\columnspanbox=\box\nextbox -\ifbinnenkolommen\wd\columnspanbox=\hsize\fi + \ifbinnenkolommen\wd\columnspanbox=\hsize\fi \postprocesscolumnspanbox\columnspanbox \scratchdimen=\ht\columnspanbox \setbox\columnspanbox=\hbox % depth to be checked, probably option! @@ -353,11 +163,6 @@ \prevdepth\dp\strutbox \egroup} \vbox\bgroup -% \ifbinnenkolommen -% \advance\hsize by \intercolumnwidth -% \hsize=\@@ksn\hsize -% \advance\hsize by -\intercolumnwidth -% \fi %\topskipcorrection % becomes an option ! \EveryPar{\begstrut\EveryPar{}}} % also ! @@ -367,147 +172,14 @@ \def\stopcolumnspan% {\egroup} -%D A test: - -\def\EndTableParBox% - {\removelastskip % added - %\MakeStrut{0pt}{\StrutDepthFactor\StrutUnit} % removed -\par -\ifnum\prevgraf>0 - \strut - \vskip-\lineheight -\fi - \egroup % finishes the \vtop begun by \BeginTableParbox - \getboxheight\scratchdimen\of\box\scratchbox\relax % added - \ifdim\scratchdimen>\TABLEparheight % added - \global\TABLEparheight=\scratchdimen % added - \fi % added - \box\scratchbox} - -%D A few local optimizations and new features: - -\readfile {cont-loc} {} {} - -%D For Ton: +%D For Ton. Do be documented. \def\plaatsexterndocument[#1]% {\def\doexternaldocument[##1][##2][##3]% {\readlocfile{##2}{}{}}% \getvalue{\v!file:::#1}} -%D For me: - -\beginTEX - -\def\p!doifinstringelse#1#2% - {\def\pp!doifinstringelse##1#1##2##3\war% - {\csname if\if##2@fals\else tru\fi e\endcsname}% - \expanded{\pp!doifinstringelse#2#1@@\noexpand\war}} % expand #2 here - -\endTEX - -\beginETEX \unless - -\def\p!doifinstringelse#1#2% - {\def\pp!doifinstringelse##1#1##2##3\war% - {\unless\if##2@}% - \expanded{\pp!doifinstringelse#2#1@@\noexpand\war}} % expand #2 here - -\endETEX - -%D For Willy's nested commented buffers: - -\def\processnextbufferline#1#2#3% - {\relax % checken waarom eerdere macro dit nodig heeft / supp-mps run - \convertargument#1 \to\next - \doifinstringelse{\delcharacter\texcommentsymbol}{\delcharacter\next} - {\def\next{#3}} - {\doifinstringelse{\endofblock}{\next} - {\ifnum\nestedbufferlevel=0\relax % \relax ? - \def\next{#2}% - \else - \decrement\nestedbufferlevel\relax - \def\next{#3}% - \fi} - {\doifinstringelse{\beginofblock}{\next} - {\increment\nestedbufferlevel\relax - \def\next{#3}} - {\def\next{#3}}}}% - \next} - -%D Some day: - -% \definieermarkering[\v!margetitel] -% -% \def\complexmargewoord[#1][#2]#3% -% {\doglobal\increment\margincontent -% \stelinmargein[\margincontent][]% see next macro -% \@EA\setgvalue\@EA{\@EA\??im\@EA\margincontent\@EA}\@EA -% {\@EA\stelinmargein\@EA[\margincontent][]% see next macro -% \flushmargincontent[#1][#2]{#3}% -% \markeer[\v!margetitel]{#3}}} - -%D Undocumented and still under development. - -\def\startsimplecolumns% - {\dosingleempty\dostartsimplecolumns} - -\def\dostartsimplecolumns[#1]% - {\bgroup - \getparameters[\??kl][\c!breedte=\hsize,\c!afstand=1em,\c!n=2,#1]% - \setrigidcolumnhsize\@@klbreedte\@@klafstand\@@kln - \setbox\scratchbox=\vbox\bgroup - \forgetall} % \blanko[\v!blokkeer] - -\def\stopsimplecolumns% - {\removebottomthings - \egroup - \rigidcolumnbalance\scratchbox - \egroup} - -%D Improved: - -\newbox\rigidcolumnbox - -\def\rigidcolumnbalance#1% - {\ifnum\rigidcolumns=1 % tzt ook h/d correctie - \ifinner\ifhmode\box\else\unvbox\fi\else\unvbox\fi#1\relax - \else - \vbox - {\forgetall - \dontcomplain - \setbox\rigidcolumnbox=\vbox - {\line{}\goodbreak\unvbox#1\removebottomthings}% - \splittopskip=\openstrutheight - \setbox\scratchbox=\vsplit\rigidcolumnbox to \!!zeropoint - \scratchdimen=\ht\rigidcolumnbox - \divide\scratchdimen by \rigidcolumns - \getnoflines\scratchdimen - \scratchdimen=\noflines\lineheight - \setbox\scratchbox=\hbox to \savedrigidhsize - {\dorecurse{\rigidcolumns} - {\setbox\scratchbox=\vsplit\rigidcolumnbox to \scratchdimen - \dp\scratchbox=\openstrutdepth - \vtop - \ifalignrigidcolumns to - \ifstretchrigidcolumns\vsize\else\scratchdimen\fi - \fi - {\unvbox\scratchbox}% - \hfill}% - \hfillneg}% - \advance\scratchdimen by -\openstrutdepth - \setbox\scratchbox\hbox{\raise\scratchdimen\box\scratchbox} - \dp\scratchbox=\openstrutdepth - \ht\scratchbox=\scratchdimen - \box\scratchbox} - \fi} - -%D Is this a better default? - -\def\doverbatimgoodbreak% - {} % instead of {\ifoptimizeverbatim\penalty100\fi} - -%D Hm: +%D Far from complete. \def\startgeheel% {\startregelcorrectie @@ -516,56 +188,12 @@ \def\stopgeheel {\stopregelcorrectie} -%D Under construction: - -\def\resetpositions% - {\let\someposition=\gobblesevenarguments % old - \let\pxypos =\gobblefourarguments % new - \let\pxywhdpos =\gobblesevenarguments} % new - -\resetpositions - -%D Some more box stuff, related to positioning (under -%D construction). Nice stuff for a tips and tricks maps -%D article. -%D -%D \starttypen -%D \raisebox{100pt}\hbox{test} -%D \raisebox50pt\hbox{test} -%D \hsmash{\raisebox{100pt}\hbox{test}} -%D \stoptypen - -\def\doraiselowerbox#1#2% a nice trick us used to accept - {\def\next% % both direct and {} dimensions - {\dowithnextbox - {\setbox\nextbox=\hbox{#1\scratchdimen\box\nextbox}% - \ht\nextbox=\ht\strutbox - \dp\nextbox=\dp\strutbox - \box\nextbox}}% - \afterassignment\next\scratchdimen=#2} +%D No more news. -\def\raisebox{\doraiselowerbox\raise} -\def\lowerbox{\doraiselowerbox\raise} - -%D It's more convenient to use \type {\columnwidth} instead -%D of messing around with boxes each time. - -\newdimen\columnwidth -\newdimen\gutterwidth - -\def\determinecolumnwidth% - {\bgroup - \setbox\scratchbox=\hbox - {\setcolumnhsize - \global\columnwidth=\usercolumnwidth - \global\gutterwidth=\intercolumnwidth}% - \egroup} - -%D The next line can be uncommented when Taco's extensions to -%D \quote {\TEX\ The Program} are used. +\protect -% \readfile {syst-eet} {} {} +%D A few local optimizations and new features, if defined: -\protect +\readfile {cont-loc} {} {} \endinput diff --git a/tex/context/base/cont-nl.tex b/tex/context/base/cont-nl.tex index 7b64f597e..2f4d33662 100644 --- a/tex/context/base/cont-nl.tex +++ b/tex/context/base/cont-nl.tex @@ -25,13 +25,9 @@ \installlanguage [\s!uk] [\c!status=\v!start] \installlanguage [\s!de] [\c!status=\v!start] \installlanguage [\s!fr] [\c!status=\v!start] -\installlanguage [\s!sp] [\c!status=\v!start] +\installlanguage [\s!es] [\c!status=\v!start] \installlanguage [\s!nl] [\c!status=\v!start] \setupbodyfont [cmr,rm,12pt] -\protect - -\dump - -\endinput +\protect \errorstopmode \dump \endinput diff --git a/tex/context/base/cont-sys.rme b/tex/context/base/cont-sys.rme index 0378f95b7..847f51d6b 100644 --- a/tex/context/base/cont-sys.rme +++ b/tex/context/base/cont-sys.rme @@ -63,12 +63,22 @@ % % Enabling run time \METAPOST\ (also enable \write18 in texmf.cnf): -\runMPgraphicstrue -\recycleMPslotstrue + \runMPgraphicstrue +\runMPTEXgraphicstrue + \recycleMPslotstrue +\useMETAFUNformattrue % Enabling nested pretty printing: -\newprettytrue + \newprettytrue + +% Protect filenames: + + \protectbufferstrue + +% not really needed + +% \runutilityfiletrue % So far. diff --git a/tex/context/base/cont-uk.tex b/tex/context/base/cont-uk.tex index e1bb62d9d..cc087c36d 100644 --- a/tex/context/base/cont-uk.tex +++ b/tex/context/base/cont-uk.tex @@ -25,7 +25,7 @@ \installlanguage [\s!uk] [\c!status=\v!start] \installlanguage [\s!de] [\c!status=\v!start] \installlanguage [\s!fr] [\c!status=\v!start] -\installlanguage [\s!sp] [\c!status=\v!start] +\installlanguage [\s!es] [\c!status=\v!start] \installlanguage [\s!nl] [\c!status=\v!start] \setupbodyfont [cmr,rm,12pt] diff --git a/tex/context/base/cont-usr.ori b/tex/context/base/cont-usr.ori index 161c076c0..a02a01429 100644 --- a/tex/context/base/cont-usr.ori +++ b/tex/context/base/cont-usr.ori @@ -39,6 +39,7 @@ \definefilesynonym [lang-no.pat] [nohyph.tex] \definefilesynonym [lang-pl.pat] [plhyph.tex] \definefilesynonym [lang-pt.pat] [pthyph.tex] +\definefilesynonym [lang-ro.pat] [rohyph.tex] \definefilesynonym [lang-sk.pat] [skhyph.tex] \definefilesynonym [lang-sp.pat] [sphyph.tex] \definefilesynonym [lang-sv.pat] [sehyph.tex] @@ -46,6 +47,20 @@ \definefilesynonym [lang-uk.pat] [ukhyphen.tex] \definefilesynonym [lang-us.pat] [ushyph1.tex] +%D When the dutch spelling changed, new patterns were +%D constructed. For long these were named \type {dutch96.pat}. +%D From 2000 however, the old \type {nehyph} files were +%D replaced by \type {nehyph96.tex}. Typical something that +%D you have to find out by accident. The names of hyphenation +%D files as well as their coding is one of the dark areas of +%D \TEX\ distributions. + +\doiffileelse{nehyph96.tex} + {\definefilesynonym[lang-nl.pat][nehyph96.tex]} + {\doiffileelse{dutch96.pat} + {\definefilesynonym[lang-nl.pat][dutch96.pat]} + {\definefilesynonym[lang-nl.pat][nehyph.tex]}} + %D Pattern files are (can be) encoded! And, alas, not all %D pattern files are self contained, which is why (for the %D moment) we specify encodings here. @@ -79,8 +94,9 @@ % \installlanguage [\s!no] [\c!status=\v!start] % norwegian % \installlanguage [\s!pl] [\c!status=\v!start] % polish % \installlanguage [\s!pt] [\c!status=\v!start] % portuguese +% \installlanguage [\s!ro] [\c!status=\v!start] % romanian % \installlanguage [\s!sk] [\c!status=\v!start] % slovak -% \installlanguage [\s!sp] [\c!status=\v!start] % spanish +% \installlanguage [\s!es] [\c!status=\v!start] % spanish % \installlanguage [\s!sv] [\c!status=\v!start] % swedish % \installlanguage [\s!tr] [\c!status=\v!start] % turkish % \installlanguage [\s!uk] [\c!status=\v!start] % english uk @@ -105,8 +121,9 @@ % \setupcurrentlanguage[\s!no] % \setupcurrentlanguage[\s!pl] % \setupcurrentlanguage[\s!pt] +% \setupcurrentlanguage[\s!ro] % \setupcurrentlanguage[\s!sk] -% \setupcurrentlanguage[\s!sp] +% \setupcurrentlanguage[\s!es] % \setupcurrentlanguage[\s!sv] % \setupcurrentlanguage[\s!tr] @@ -119,6 +136,13 @@ % \definefilesynonym [font-cmr] [font-csr] % czech & slovak % \definefilesynonym [font-cmr] [font-plr] % polish +%D In some languages, compound characters, like \type {"e} +%D are used to get accented and non latin characters. + + \useencoding[fde] % german +% \useencoding[fro] % romanian +% \useencoding[fpl] % polish + %D Don't remove the next few lines. \protect \endinput diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex index 0c18656cc..098c55493 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -13,7 +13,7 @@ \catcode`\{=1 \catcode`\}=2 -\def\contextversion{2000.5.11} +\def\contextversion{2000.10.22} %D Welcome to the main module. When this module is ran through %D \type{initex} or \type{tex -i} or \type{whatevertex} using @@ -28,6 +28,7 @@ %D minimal as possible. \input syst-tex.tex +\input syst-etx.tex \input syst-gen.tex \input syst-ext.tex \input syst-new.tex @@ -36,6 +37,12 @@ \CONTEXTtrue +%D In order to conveniently load files, we need a few +%D support modules. + +\input supp-ini.tex +\input supp-fil.tex + %D After this we're ready for the multi||lingual interface %D modules. @@ -52,8 +59,6 @@ %D Now we're ready for some general support modules. These %D modules implement some basic typesetting functionality. -\input supp-ini.tex -\input supp-fil.tex \input supp-box.tex \input supp-mrk.tex \input supp-vis.tex @@ -66,8 +71,14 @@ \input supp-tpi.tex \input supp-mat.tex \input supp-ran.tex +\input supp-ali.tex -%D Verbatim typestting is implemented in a separate class of +%D The next module deals with language specific typographic +%D extensions. + +\input typo-ini.tex + +%D Verbatim typesetting is implemented in a separate class of %D modules. The pretty typesetting modules are loaded at run %D time. @@ -164,8 +175,19 @@ \input core-pag.tex \input core-tbl.tex \input core-mis.tex -\input core-mps.tex \input core-int.tex +\input core-ntb.tex + +%D Like languages, fonts, encodings and symbols, \METAPOST\ +%D support is also organized in its own class of modules. + +\input meta-ini.tex +\input meta-pag.tex +\input meta-fig.tex + +%D On which the next one depends: + +\input core-pos.tex %D A few more languages, that have specifics using core %D functionality: @@ -198,7 +220,7 @@ \input main-002.tex % still to be split \input main-003.tex % still to be split -\input core-fig.tex +\input core-fig.tex % after page body \input core-par.tex %D The next two modules implement some additional @@ -276,6 +298,21 @@ \stopinterface +\startinterface italian + +\writestring{Questo pacchetto è basato sul Plain TeX. Usa una versione adattata del} +\writestring{meccanismo di marcatura esteso di J. Fox (1987) ad alcune parti del} +\writestring{meccanismo per i float laterali di D. Comenetz (1993). La maggior parte} +\writestring{Plain TeX di D.E. Knuth (\fmtversion) è disponibile e può essere usata} +\writestring{senza problemi. Questo pacchetto usa TaBlE, un pacchetto progettato e} +\writestring{con diritti di copia di M.J. Wichura (1988). Solo qualche file ausiliario} +\writestring{viene generato, alcuni dei quali devono essere elaborati da TeXUtil} +\writestring{(\utilityversion). La versione attuale del blocco è \blockversion.} +\writestring{} +\writestring{L'INTERFACCIA UTENTE ITALIANA E' ANCORA IN VIA DI SVILUPPO!} + +\stopinterface + \edef\copyrightversion% {Copyright 1990-\the\normalyear\normalspace / PRAGMA ADE / J. Hagen - A.F. Otten} @@ -345,6 +382,15 @@ \stopinterface +\startinterface italian + + \installlanguage [\s!it] [\c!status=\v!start] + + \appendtoks \language [\s!it] \to \everyjob + \appendtoks \mainlanguage [\s!it] \to \everyjob + +\stopinterface + \protect %D Finally we load some fonts. @@ -353,6 +399,6 @@ %D Now dumping the format is all that's left to be done. -\dump +\errorstopmode \dump \endinput diff --git a/tex/context/base/core-buf.tex b/tex/context/base/core-buf.tex index 445abc564..431669918 100644 --- a/tex/context/base/core-buf.tex +++ b/tex/context/base/core-buf.tex @@ -79,6 +79,38 @@ 12: -- preskoceno \stopmessages +\startmessages italian library: textblocks + title: blocchi di testo + 1: nuova versione, seconda passata necessaria + 2: scrittura dei blocchi su -- + 3: lettura dei blocchi da -- + 4: seconda passata necessaria + 5: -- non nascosto + 6: -- nascosto ed elaborato + 7: -- nascosto + 8: -- composto + 9: -- non composto + 10: -- caricato ed elaborato + 11: -- caricato e composto + 12: -- saltato +\stopmessages + +\startmessages norwegian library: textblocks + title: tekstblokker + 1: ny versjon, andre gjennomkjøring nødvendig + 2: skriver blokker til -- + 3: leser blokker fra -- + 4: andre gjennomkjøring nødvendig + 5: -- ikke skjult + 6: -- skjult og behandlet + 7: -- skjult + 8: -- tegnsatt + 9: -- ikke tegnsatt + 10: -- lest inn og behandlet + 11: -- lest inn og tegnsatt + 12: -- utelatt +\stopmessages + \unprotect % PAS OP! @@ -109,6 +141,12 @@ \fi \egroup} +\def\resetbuffer% + {\dosingleempty\doresetbuffer} + +\def\doresetbuffer[#1]% + {\unlinkfile{\TEXbufferfile{\iffirstargument#1\else\jobname\fi}}} + % \EveryPar% % {\doglobal\newcounter\NOfLines} % @@ -117,26 +155,25 @@ % \hskip-3em% % \hbox to 3em{\hss\NOfLines\hskip1em}} +%D For Willy's nested commented buffers, we need the \type +%D {\delcharacter} trick. + \def\processnextbufferline#1#2#3% {\relax % checken waarom eerdere macro dit nodig heeft / supp-mps run \convertargument#1 \to\next - \ifx\next\emptybufferline - \ifsegmentatebuffer \emptybufferlinetrue \fi - \def\next{#3}% - \else - \emptybufferlinefalse - \doifinstringelse{\endofblock}{\next} - {\ifnum\nestedbufferlevel=0\relax % \relax ? - \def\next{#2}% - \else - \decrement\nestedbufferlevel\relax - \def\next{#3}% - \fi} - {\doifinstringelse{\beginofblock}{\next} - {\increment\nestedbufferlevel\relax - \def\next{#3}} - {\def\next{#3}}}% - \fi + \doifinstringelse{\delcharacter\texcommentsymbol}{\delcharacter\next} + {\def\next{#3}} + {\doifinstringelse{\endofblock}{\next} + {\ifnum\nestedbufferlevel=0\relax % \relax ? + \def\next{#2}% + \else + \decrement\nestedbufferlevel\relax + \def\next{#3}% + \fi} + {\doifinstringelse{\beginofblock}{\next} + {\increment\nestedbufferlevel\relax + \def\next{#3}} + {\def\next{#3}}}}% \next} \def\dostartbuffer% @@ -153,7 +190,7 @@ \next} \def\dododostartbuffer[#1][#2][#3][#4]% - {\showmessage{\m!systems}{15}{#2}% + {%\showmessage{\m!systems}{15}{#2}% \doifelsevalue{\??bu#1\c!alinea}{\v!ja} {\segmentatebuffertrue} {\doifnumberelse{\getvalue{\??bu#1\c!alinea}} @@ -175,8 +212,10 @@ \egroup \getvalue{#4}}% \doifelsenothing{#2} - {\immediate\openout\tmpblocks=\TEXbufferfile{\jobname}} - {\immediate\openout\tmpblocks=\TEXbufferfile{#2}}% + {\message{<\TEXbufferfile{\jobname}>}% + \immediate\openout\tmpblocks=\TEXbufferfile{\jobname}} + {\message{<\TEXbufferfile{#2}>}% + \immediate\openout\tmpblocks=\TEXbufferfile{#2}}% \ifsegmentatebuffer \immediate\write\tmpblocks{\string\startbufferparagraph}% \fi @@ -197,7 +236,7 @@ \def\dobuffer#1[#2]#3% {\def\dodobuffer##1% - {\showmessage{\m!systems}{#1}{##1}% + {%\showmessage{\m!systems}{#1}{##1}% \beginrestorecatcodes \doifdefinedelse{\??bu##1\c!nummer} {#3{\TEXbufferfile{def-\getvalue{\??bu##1\c!nummer}}}{}{}} @@ -497,7 +536,7 @@ \endrestorecatcodes} \def\setupcopyblock% - {\dostepwiserecurse{1}{255}{1}{\catcode\recurselevel=\@@other}% + {\makeallother % \dostepwiserecurse{1}{255}{1}{\catcode\recurselevel=\@@other}% \obeylines} \def\writeoutblocks% @@ -514,13 +553,13 @@ \bgroup \obeylines -\gdef\copyblocklineAB#1 +\long\gdef\copyblocklineAB#1 {\processnextblocklineAB{#1}% {\closeblock}% {\writeoutblocks{#1}% \writetmpblock{#1}% \copyblocklineAB}} -\gdef\skipblocklineAB#1 +\long\gdef\skipblocklineAB#1 {\processnextblocklineAB{#1}% {\closeblock}% {\skipblocklineAB}} @@ -541,13 +580,13 @@ \bgroup \obeylines -\gdef\copyblockline#1 +\long\gdef\copyblockline#1 {\processnextblockline{#1}% {\closeblock}% {\writeoutblocks{#1}% \writetmpblock{#1}% \copyblockline}} -\gdef\skipblockline#1 +\long\gdef\skipblockline#1 {\processnextblockline{#1}% {\closeblock}% {\skipblockline}} @@ -856,6 +895,47 @@ \def\beginvanblok[#1]% % er wordt ook gechecked op \eindvanblok[..] {\getvalue{\e!beginvan#1}} + +\def\forceerblokken[#1]% + {\def\docommando##1% + {\setvalue{\e!beginvan##1}% + {\setblocklevel+\bgroup + \dodoubleempty\doforceerblok[##1]}% + \setvalue{\e!eindvan##1}% + {\getvalue{\??tb##1\c!na}% + \egroup\setblocklevel-}}% + \processcommalist[#1]\docommando} + +\def\doforceerblok[#1][#2]% + {\doifassignmentelse{#2} + {\settrue \blockassignmentstatus} + {\setfalse\blockassignmentstatus}% + \ifconditional\blockassignmentstatus + \dosetupblockparameters[#1][#2]% + \fi + \getvalue{\??tb#1\c!voor}% + \doattributes{\??tb#1}\c!letter\c!kleur{}% + \getvalue{\??tb#1\c!binnen}} + +\def\passeerblokken[#1]% + {\def\docommando##1% + {\setvalue{\e!beginvan##1}% + {\setblocklevel+\bgroup + \obeylines % here, since we look ahead + \dodoubleempty\dopasseerblok[##1]}%}% + \setvalue{\e!eindvan##1}% + {}}% + \processcommalist[#1]\docommando} + +\def\dopasseerblok[#1][#2]% + {\def\closeblock% + {\egroup\setblocklevel-}% + \checkcopyingblocks + \obeylines + \@EA\@EA\@EA\convertargument\@EA\string\csname\e!eindvan#1\endcsname\to\endofblockA + \@EA\convertargument\string\eindvanblok[#1]\to\endofblockB % MULTI LINGUAL MAKEN + \setupcopyblock + \skipblocklineAB} % the buffer mechanism handles nesting, add some switch diff --git a/tex/context/base/core-con.tex b/tex/context/base/core-con.tex index b378db9d9..07a3072a8 100644 --- a/tex/context/base/core-con.tex +++ b/tex/context/base/core-con.tex @@ -155,6 +155,18 @@ \fi}} %D \macros +%D {oldstylenumerals,oldstyleromannumerals} +%D +%D These conversions are dedicated to Frans Goddijn. + +\unexpanded\def\oldstylenumerals#1% + {{\os\number#1}} + +\unexpanded\def\oldstyleromannumerals#1% + {{\leftrulefalse\rightrulefalse\ss\txx\boxrulewidth=.15ex + \ruledhbox spread .15em{\hss\uppercased{\romannumerals{#1}}\hss}}} + +%D \macros %D {protectconversion} %D %D The previous two commands are not robust enough to be @@ -579,6 +591,9 @@ \defineconversion [g] [\greeknumerals] \defineconversion [G] [\Greeknumerals] +\defineconversion [o] [\oldstylenumerals] +\defineconversion [or] [\oldstyleromannumerals] + \defineconversion [\v!letter] [\character] \defineconversion [\v!Letter] [\Character] diff --git a/tex/context/base/core-dat.tex b/tex/context/base/core-dat.tex index b9f9b594c..dad330ebd 100644 --- a/tex/context/base/core-dat.tex +++ b/tex/context/base/core-dat.tex @@ -37,6 +37,32 @@ 4: unbekannte Datei -- \stopmessages +% TOM : + +\startmessages czech library: databases + title: databases + 1: -- + 2: local file -- + 3: global file -- + 4: unknown file -- +\stopmessages + +\startmessages italian library: databases + title: database + 1: -- + 2: file locale -- + 3: file globale -- + 4: file sconosciuto -- +\stopmessages + +\startmessages norwegian library: databases + title: databaser + 1: -- + 2: lokal fil -- + 3: global fil -- + 4: ukjent fil -- +\stopmessages + \unprotect %D This module is a (limited) rewrite of the original \type diff --git a/tex/context/base/core-des.tex b/tex/context/base/core-des.tex index c28867ae2..82799c7b7 100644 --- a/tex/context/base/core-des.tex +++ b/tex/context/base/core-des.tex @@ -513,7 +513,7 @@ \doifvaluesomething{\??dd#1\c!koppeling} {\processaction % genereert > of < [\getvalue{\??dd#1\c!koppelwijze}] - [ \v!lokaal=>\chardef\definitiekoppeling=1, % old: default + [ \v!lokaal=>\chardef\definitiekoppeling=1, % old: default \v!globaal=>\chardef\definitiekoppeling=2]}% new: global crosslinking \fi \stelnummerin % the number is called indirectly diff --git a/tex/context/base/core-fig.tex b/tex/context/base/core-fig.tex index 954f88c12..259acb0b7 100644 --- a/tex/context/base/core-fig.tex +++ b/tex/context/base/core-fig.tex @@ -15,6 +15,10 @@ \unprotect +% tex, tmp, mov and avi will become part of the fuzzy +% graphics and also behandled by special drivers; the +% current support is hackery + % figurefilemode checken % zowieso alles checken % movie scanner @@ -41,6 +45,7 @@ 7: figuurfile -- moet opnieuw worden aangemaakt 8: figuurobject -- wordt opnieuw gebruikt 9: suffix -- bij figuur -- wordt niet afgehandeld + 10: figuur -- heeft geen afmetingen \stopmessages \startmessages english library: figures @@ -54,6 +59,7 @@ 7: you have to regenerate figure file -- 8: figureobject -- is reused 9: suffix -- by figure -- is not handled + 10: figure -- has zero dimensions \stopmessages \startmessages german library: figures @@ -67,8 +73,11 @@ 7: Sie muessen eine neue Abbildungsdatei -- erstellen 8: Abbildungobjekt -- wurde wiederverwandt 9: Dateiendung -- der Abbildung -- wird nicht unterstuetzt + 10: figure -- has zero dimensions \stopmessages +% TOBIAS: 10 + \startmessages czech library: figures title: obrazy 1: obraz -- nelze nalezt @@ -80,6 +89,23 @@ 7: musite znovu vygenerovat soubor obrazu -- 8: obrazovy objekt -- je znovu pouzit 9: pripona -- obrazu -- neni uvazovana + 10: figure -- has zero dimensions +\stopmessages + +% TOM : 10 + +\startmessages italian library: figures + title: figure + 1: la figura -- non è stata trovata + 2: la figura -- non è preimpostata + 3: dimensioni della figura -- prese da -- + 4: dimensioni di -- caricate dal file di immagini stesso + 5: dimensioni di -- caricate dal file di immagini -- + 6: dimensioni di -- calcolate TeXUtil + 7: bisogna rigenerare il file di immagini -- + 8: oggetto-figura -- riutilizzato + 9: suffisso -- per figura -- non gestito + 10: figura -- ha dimensioni nulle \stopmessages %D Due to the mere fact that \DVI|/|\PDF\ drivers differ in their @@ -203,10 +229,12 @@ \def\dododoanalyzefigurefiles#1% {\ifcase\figurestatus \def\@@efcurrentpath{#1}% -\sanitizefilename#1\to\@@efcurrentpath + \sanitizefilename#1\to\@@efcurrentpath \doiffileinsertionsupportedelse{\@@efcurrenttype} - {\edef\@@efcurrentfile% - {\@@efcurrentpath\f!pathseparator\@@effilename.\figureextension{\@@efcurrenttype}}% + {\assignfullfilename % needed + {\@@efcurrentpath}% + {\@@effilename.\figureextension{\@@efcurrenttype}}% + \to\@@efcurrentfile% \dodododoanalyzefigurefiles} {}% \fi} @@ -216,11 +244,14 @@ %D two of course only take place when the first scan fails. \def\doanalyzefigurefilesA% - {\doiffileelse{\@@efcurrentfile} - {\getfiguredimensionsA - \getfiguredimensionsB - \getfiguredimensionsC} - {}} + {\ifcase\figurestatus + \@@eftrace{locating \@@efcurrentfile\space as \@@efcurrenttype}% + \doiffileelse{\@@efcurrentfile} + {\getfiguredimensionsA + \getfiguredimensionsB + \getfiguredimensionsC} + {}% + \fi} %D It is possible to let \TEX\ determine the dimensions itself. %D The next macro shows how such a test is implemented. The @@ -232,11 +263,9 @@ %D Should be a special! \def\dogetfiguresizetex#1#2#3#4#5#6% file pagina ... - {\doifinset{\@@efextension}{\c!tex,\c!tmp} - {\doifnumberelse{\@@efextension} - {\executedfalse} - {\ExpandBothAfter\doifinset{\@@efextension}{\figuretypes} - {\executedfalse}}}% + {\doifinsetelse{\@@efextension}{\c!tex,\c!tmp} + {\ifx\@@efcurrentpath\empty\executedfalse\else\executedtrue\fi} + {\executedfalse}% \ifexecuted \global\setbox\foundexternalfigure=\vbox {\insidefloattrue @@ -253,29 +282,38 @@ #4=\!!zeropoint #5=\wd\foundexternalfigure #6=\ht\foundexternalfigure + \else + \@@eftrace{ignored}% \fi} \let\dogetfiguresizetmp\dogetfiguresizetex %D Here we start scanning the other types: +\def\@@dogetfiguresize{dogetfiguresize} + \def\getfiguredimensionsA% {\ifcase\figurestatus - \@@eftrace{analyzing \@@efcurrentfile\space as \@@efcurrenttype}% - \!!widthb=\!!zeropoint - \executeifdefined{dogetfiguresize\@@efcurrenttype}\gobblesixarguments - {\@@efcurrentfile}{\@@efpagina}% - {\!!widtha}{\!!heighta}{\!!widthb}{\!!heightb}% -% new from here - \ifdim\!!widtha=\!!zeropoint\relax\ifdim\!!heighta=\!!zeropoint\relax - \ifdim\!!widthb=\!!zeropoint\relax\ifdim\!!heightb=\!!zeropoint\relax - \executedfalse % nothing decent found + \@@eftrace{analyzing \@@efcurrentfile\space + on \@@efcurrentpath\space + as \@@efcurrenttype}% + \!!widthb=\!!zeropoint % ? + \doifdefinedelse{\@@dogetfiguresize\@@efcurrenttype} + {\executedtrue + \getvalue{\@@dogetfiguresize\@@efcurrenttype}% + {\@@efcurrentfile}{\@@efpagina}% + {\!!widtha}{\!!heighta}{\!!widthb}{\!!heightb}} + {\executedfalse}% + \ifexecuted + \ifdim\!!widtha=\!!zeropoint\relax\ifdim\!!heighta=\!!zeropoint\relax + \ifdim\!!widthb=\!!zeropoint\relax\ifdim\!!heightb=\!!zeropoint\relax + \showmessage{\m!figures}{10}{\@@efcurrentfile}% + \@@eftrace{zero}% + \fi\fi \fi\fi - \fi\fi - \ifexecuted % searching for mps, eps found, but no valid mps - \doif{\@@efcurrenttype}{\c!mps}{\ifcase\EPScreator\executedfalse\fi}% + \doif{\@@efcurrenttype}{\c!mps} + {\ifcase\EPScreator\executedfalse\fi}% \fi -% until here \ifexecuted \chardef\figurestatus=3 \doifelse{\@@efcurrenttype}{\c!eps} @@ -308,9 +346,12 @@ \def\getfiguredimensionsB% {\ifcase\figurestatus\ifcase\figurefilemode\else - \def\@@efloadname{\@@efcurrentpath\f!pathseparator\@@exfile}% + %\def\@@efloadname{\@@efcurrentpath\f!pathseparator\@@exfile}% + \assignfullfilename\@@efcurrentpath\@@exfile\to\@@efloadname \edef\@@effilenametype{\@@effilename.\@@efcurrenttype}% - \@@eftrace{analyzing \@@efloadname\space on \@@effilenametype}% + \@@eftrace{analyzing \@@efloadname\space + on \@@efcurrentpath\space + for \@@effilenametype}% \pushendofline \let\presetfigure=\presetfigureA \readsetfile{\@@efcurrentpath}{\@@exfile}\relax\relax @@ -332,7 +373,8 @@ \def\getfiguredimensionsC% {\ifcase\figurestatus\ifrunutilityfile\ifcase\figurefilemode\else - \doif{\@@efcurrenttype}{\c!tex} + %\doif{\@@efcurrenttype}{\c!tex} % oeps, was wrong + \doifnotinset{\@@efextension}{\c!tex,\c!tmp} {\doiffileelse{\@@efcurrentfile} {\edef\@@effilenametype{\@@effilename.\@@efcurrenttype}% \@@eftrace{running texutil on \@@effilenametype}% @@ -342,8 +384,8 @@ \@@eftrace{analyzing \@@efloadname\space on \@@effilenametype}% \pushendofline \let\presetfigure=\presetfigureB - \readsetfile{.}{\@@efloadname}\relax\relax - \popendofline + \readsetfile{.}{\@@efloadname}\relax\relax + \popendofline \@@eftrace{\ifcase\figurestatus not \fi found}} {}}% \fi\fi\fi} @@ -359,9 +401,12 @@ \def\doanalyzefigurefilesB% {\ifcase\figurestatus\ifcase\figurefilemode\else - \def\@@efloadname{\@@efcurrentpath\f!pathseparator\@@exfile}% + %\def\@@efloadname{\@@efcurrentpath\f!pathseparator\@@exfile}% + \assignfullfilename\@@efcurrentpath\@@exfile\to\@@efloadname \edef\@@effilenametype{\@@effilename.\figureextension{\@@efcurrenttype}}% - \@@eftrace{analyzing \@@efloadname\space on \@@effilenametype}% + \@@eftrace{analyzing \@@efloadname\space + on \@@efcurrentpath\space + for \@@effilenametype}% \pushendofline \let\presetfigure=\presetfigureC \readsetfile{\@@efcurrentpath}{\@@exfile}\relax\relax @@ -386,8 +431,11 @@ \def\doanalyzefigurefilesC% {\ifcase\figurestatus\ifcase\figurefilemode\else - \def\@@efloadname{\@@efcurrentpath\f!pathseparator\@@exfile}% - \@@eftrace{analyzing \@@efloadname\space on \@@effilename.* surrogate}% + %\def\@@efloadname{\@@efcurrentpath\f!pathseparator\@@exfile}% + \assignfullfilename\@@efcurrentpath\@@exfile\to\@@efloadname + \@@eftrace{analyzing \@@efloadname\space + on \@@efcurrentpath\space + for \@@effilename.* surrogate}% \pushendofline \let\presetfigure=\presetfigureD \readsetfile{\@@efcurrentpath}{\@@exfile}\relax\relax @@ -435,8 +483,11 @@ \def\dodolocatepresetfigurefiles#1% {\ifcase\figurestatus \doiffileinsertionsupportedelse{\@@efcurrenttype} - {\edef\@@efcurrentfile% - {#1\f!pathseparator\@@effilename.\figureextension{\@@efcurrenttype}}% + {%\edef\@@efcurrentfile% + % {#1\f!pathseparator\@@effilename.\figureextension{\@@efcurrenttype}}% + \assignfullfilename + {#1}{\@@effilename.\figureextension{\@@efcurrenttype}}% + \to\@@efcurrentfile \@@eftrace{only searching for \@@efcurrentfile}% \doiffileelse{\@@efcurrentfile} {\chardef\figurestatus=1 @@ -454,9 +505,9 @@ \def\setnaturalfiguresize% {\doifsomething{\@@efbreedte} - {\figwid=\@@efbreedte}% + {\global\figwid=\@@efbreedte}% \doifsomething{\@@efhoogte} - {\fighei=\@@efhoogte}% + {\global\fighei=\@@efhoogte}% \doifsomething{\@@efschaal} {\figxsca=\@@efschaal \figysca=\@@efschaal}} @@ -465,25 +516,25 @@ {\doifinsetelse{\@@effactor}{\v!max,\v!passend,\v!ruim} {\doapplyfiguresize \ifdim\@@epw>\@@eph\relax - \docalculatefigurenorm\figwid\@@effactor\@@efbreedte\hsize\@@efhsize + \docalculatefigurenorm\figwid\@@effactor\@@efmaxbreedte\hsize\@@efhsize \docalculatefigurescales\figwid\@@epw\fighei\@@eph \else - \docalculatefigurenorm\fighei\@@effactor\@@efhoogte\teksthoogte\@@efvsize + \docalculatefigurenorm\fighei\@@effactor\@@efmaxhoogte\figurevsize\@@efvsize \docalculatefigurescales\fighei\@@eph\figwid\@@epw \fi \!!doneatrue} {\doifinsetelse{\@@efhfactor}{\v!max,\v!passend,\v!ruim} {\doapplyfiguresize - \docalculatefigurenorm\fighei\@@efhfactor\@@efhoogte\teksthoogte\@@efvsize + \docalculatefigurenorm\fighei\@@efhfactor\@@efmaxhoogte\figurevsize\@@efvsize \docalculatefigurescales\fighei\@@eph\figwid\@@epw \!!doneatrue} {\doifinsetelse{\@@efbfactor}{\v!max,\v!passend,\v!ruim} {\doapplyfiguresize - \docalculatefigurenorm\figwid\@@efbfactor\@@efbreedte\hsize\@@efhsize + \docalculatefigurenorm\figwid\@@efbfactor\@@efmaxbreedte\hsize\@@efhsize \docalculatefigurescales\figwid\@@epw\fighei\@@eph - \!!doneatrue} - {\docalculatefigurenorm\fighei\@@effactor\@@efhoogte\teksthoogte\@@efvsize - \docalculatefigurenorm\fighei\@@efhfactor\@@efhoogte\teksthoogte\@@efvsize + \!!doneatrue} % max ??? + {\docalculatefigurenorm\fighei\@@effactor \@@efhoogte \teksthoogte\@@efvsize + \docalculatefigurenorm\fighei\@@efhfactor\@@efhoogte \teksthoogte\@@efvsize \docalculatefigurenorm\figwid\@@efbfactor\@@efbreedte\hsize\hsize \!!doneafalse}}}% \if!!donea @@ -502,59 +553,107 @@ \doapplyfigurescale\fighei\@@eph\figysca \global\figwid=\!!zeropoint \global\fighei=\!!zeropoint - \doifelsenothing{\@@efbreedte} - {\doifsomething{\@@efhoogte} - {\ifdim\@@eph>\@@efhoogte - \global\fighei=\@@efhoogte + \doifelsenothing{\@@efmaxbreedte} + {\doifsomething{\@@efmaxhoogte} + {\ifdim\@@eph>\@@efmaxhoogte + \global\fighei=\@@efmaxhoogte \fi}} - {\ifdim\@@epw>\@@efbreedte - \global\figwid=\@@efbreedte + {\ifdim\@@epw>\@@efmaxbreedte + \global\figwid=\@@efmaxbreedte \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}} + \def\setdimensionfiguresize% {\ifdim\figwid>\!!zeropoint\relax \ifdim\fighei>\!!zeropoint\relax - \docalculatefigurescale\fighei\@@eph\figysca - \docalculatefigurescale\figwid\@@epw\figxsca + \dosetdimensionfiguresize% + {\docalculatefigurescale\fighei\@@eph\figysca + \docalculatefigurescale\figwid\@@epw\figxsca}% + {\docalculatefigurescale\fighei\@@eph\figysca + \docalculatefigurescale\figwid\@@epw\figxsca}% + {\docalculatefigurescale\fighei\@@eph\figysca + \docalculatefigurescale\figwid\@@epw\figxsca}% \else - \docalculatefigurescales\figwid\@@epw\fighei\@@eph + \dosetdimensionfiguresize% + {\docalculatefigurescales\figwid\@@epw\fighei\@@eph}% + {\docalculatefigurescales\figwid\@@epw\fighei\@@eph}% + {\docalculatefigurescales\figwid\@@epw\fighei\@@eph}% \fi \else \ifdim\fighei>\!!zeropoint\relax - \docalculatefigurescales\fighei\@@eph\figwid\@@epw + \dosetdimensionfiguresize% + {\docalculatefigurescales\fighei\@@eph\figwid\@@epw}% + {\docalculatefigurescales\fighei\@@eph\figwid\@@epw}% + {\docalculatefigurescales\fighei\@@eph\figwid\@@epw}% \else - \doapplyfigurescale\figwid\@@epw\figxsca - \doapplyfigurescale\fighei\@@eph\figysca + \dosetdimensionfiguresize% + {\doapplyfigurescale\figwid\@@epw\figxsca + \doapplyfigurescale\fighei\@@eph\figysca}% + {\docalculatefigurescales\figwid\@@epw\fighei\@@eph}% + {\docalculatefigurescales\fighei\@@eph\figwid\@@epw}% \fi \fi} \def\setupexternalfigures% {\dosingleempty\dosetupexternalfigures} -\def\dosetupexternalfigures[#1]% +\def\dosetupexternalfigures[#1]% needs a good clean up {\getparameters[\??ex][#1]% - \doifelsenothing{\@@explaats} + \getparameters[\??ef][#1]% dangerous for figs with backgrounds + \doifelsenothing{\@@explaats} % fig file paths {\scratchcounter=3 } - {\doifelsenothing{\@@exfile} + {\doifelsenothing{\@@exfile} % tuf file paths {\scratchcounter=3 } {\scratchcounter=0 \ExpandBothAfter\doifinset{\v!lokaal}{\@@explaats} {\advance\scratchcounter by 1 }% \ExpandBothAfter\doifinset{\v!globaal}{\@@explaats} {\advance\scratchcounter by 2 }}}% - \chardef\figurefilemode=\scratchcounter} + \chardef\figurefilemode=\scratchcounter + \ifcase\figurefilemode + \let\@@ex@@gebied\f!currentpath + \or % lokaal + \let\@@ex@@gebied\f!currentpath + \or % globaal + \let\@@ex@@gebied\@@exgebied + \or % lokaal,globaal / non empty gebied + \edef\@@ex@@gebied{\f!currentpath\ifx\@@exgebied\empty\else,\fi\@@exgebied}% + \fi + \ExpandBothAfter\doifinset{\v!default}{\@@explaats} + {\edef\@@ex@@gebied{\@@ex@@gebied,}}% default tex path search + \ifx\@@exfile\empty + \chardef\figurefilemode=0 + \fi} + +\def\resetexternalfigures% + {\setupexternalfigures + [\c!optie=,\c!maxbreedte=,\c!maxhoogte=, + \c!kader=\v!uit,\c!achtergrond=]} + +% will move: + +\appendtoks \resetexternalfigures \to \everyoverlay +\appendtoks \resetexternalfigures \to \everypagebody + +%appendtoks \resetexternalfigures \to \everysymbol \def\docalculatefigurenorm#1#2#3#4#5% {\processaction [#2] - [ \v!max=>#1=#4\relax, - \v!passend=>#1=#5\relax, - \v!ruim=>#1=#5\relax - \advance #1 by -4\@@exkorps\relax, - \s!default=>\doifsomething{#3}{#1=#3\relax}, - \s!unknown=>#1=\@@exkorps\relax - \divide#1 by \!!ten\relax - \multiply#1 by #2\relax]} + [ \v!max=>\global#1=#4\relax, + \v!passend=>\global#1=#5\relax, + \v!ruim=>\global#1=#5\relax + \global\advance #1 by -4\@@exkorps\relax, + \s!default=>\doifsomething{#3}{\global#1=#3\relax}, + \s!unknown=>\global#1=\@@exkorps\relax + \global\divide#1 by \!!ten\relax + \global\multiply#1 by #2\relax]} \def\docalculatefigurescales#1#2#3#4% {\dimen0=#1\relax % #1 = new 1-value @@ -576,37 +675,43 @@ #3=\dimen0 } % #3 = schaal \def\doapplyfigurescale#1#2#3% - {#1=#2\relax + {\global#1=#2\relax \ifcase0\@@efschaal\relax #3=\!!thousand \else #3=\@@efschaal \fi - \relax % important ! + \relax % important ! \ifnum#3=\!!thousand\else - \divide#1 by \!!thousand - \multiply#1 by #3\relax + \global\divide#1 by \!!thousand + \global\multiply#1 by #3\relax \fi} +\newdimen\figurevsize % we cannot manipulate any global vsize ! + \def\doapplyfiguresize% - {\ifinner - \teksthoogte=\vsize - \scratchdimen=\teksthoogte + {\figurevsize=\teksthoogte + \ifinner + \figurevsize =\vsize % \teksthoogte =\vsize + \scratchdimen=\vsize % \scratchdimen=\teksthoogte + \else\ifinsidefloat + \figurevsize =\vsize % \teksthoogte =\vsize + \scratchdimen=\vsize % \scratchdimen=\teksthoogte \else\ifinpagebody - \teksthoogte=\vsize - \scratchdimen=\teksthoogte + \figurevsize =\vsize % \teksthoogte =\vsize + \scratchdimen=\vsize % \scratchdimen=\teksthoogte \else \ifdim\pagegoal<\maxdimen \ifdim\pagetotal<\pagegoal \scratchdimen=\pagegoal \advance\scratchdimen by -\pagetotal \else - \scratchdimen=\teksthoogte + \scratchdimen=\figurevsize % \teksthoogte \fi \else - \scratchdimen=\teksthoogte + \scratchdimen=\figurevsize % \teksthoogte \fi - \fi\fi + \fi\fi\fi \doifelsenothing{\@@efhoogte} {\edef\@@efvsize{\the\scratchdimen}} {\let\@@efvsize=\@@efhoogte}% @@ -616,7 +721,7 @@ \def\convertfigureinsertscale#1#2#3#4% {\scratchdimen=#1\relax - \ifnum#3=\!!thousand\else % better 1000 100 10 ranges, evt round 2sp + \ifnum#3=\!!thousand\else % better 1000 100 10 ranges, evt round 2sp \divide\scratchdimen by \!!thousand \multiply\scratchdimen by #3\relax \fi @@ -628,14 +733,17 @@ \newbox\foundexternalfigure -\def\presetfiguremov% - {\let\@@eftype \c!mov - \let\@@efextension \c!mov +\def\presetundefinedfigure#1% + {\let\@@eftype #1% + \let\@@efextension #1% \let\@@efobject \v!nee \let\@@efpreset \v!nee \ifx\@@efbreedte\empty\def\@@breedte{4cm}\fi \ifx\@@efhoogte \empty\def\@@hoogte {3cm}\fi} +\def\presetfiguremov{\presetundefinedfigure\c!mov} +\def\presetfigureavi{\presetundefinedfigure\c!avi} + % The page number (frame) is passed as first option. \newcounter\forcedMPSobject % better something \every<type> @@ -645,17 +753,27 @@ %D scales is according to the specifications. This macro is %D quite unreadable, for which I appologize. The main %D complication is that we have to catch all kind of border -%D cases, like \METAPOST\ graphics and buffers. +%D cases, like \METAPOST\ graphics and buffers. + +% note * : this is needed because reusable graphics +% combined with funny page aspect aspect ratio's can lead to +% strange side effects of preceding factor=max specs. This +% surfaced in the metafun manual, where the two side by +% side clipped cow heads [the second one was a reused object] +% where the second one inherited some characteristics from +% the factor=max one some 30 pages back. Sigh. \def\calculateexternalfigure[#1][#2][#3][#4][#5][#6]% {\mindermeldingen + \global\figwid=\!!zeropoint \figxsca=1 % see note * + \global\fighei=\!!zeropoint \figysca=1 % see note * \global\setbox\foundexternalfigure=\box\voidb@x - \beforesplitstring#3\at.\to\@@effilename - \aftersplitstring #3\at.\to\@@efextension -\doifelse{\@@effilename}{mprun} - {\edef\@@effilepref{\bufferprefix}} - {\let \@@effilepref\empty}% -\edef\@@effilename{\@@effilepref\@@effilename}% + \expandafter\beforesplitstring#3\at.\to\@@effilename + \expandafter\aftersplitstring #3\at.\to\@@efextension + \doifelse{\@@effilename}{mprun} + {\edef\@@effilepref{\bufferprefix}} + {\let \@@effilepref\empty}% + \edef\@@effilename{\@@effilepref\@@effilename}% \restorecatcodes % recently added; we presume local use \def\@@eflabel{#2}% \global\let\externalfigurelog\empty @@ -669,14 +787,18 @@ [\??ef] [\c!type=\s!unknown,\c!methode=\@@eftype,\c!symbool=\v!nee, \c!object=\@@exobject,\c!preset=\v!ja, +% old \c!achtergrond=,\c!achtergrondkleur=,\c!achtergrondraster=\@@rsraster, +% old \c!hoek=,\c!straal=.5\korpsgrootte,\c!kader=\v!uit, \c!pagina=0,\c!preview=\v!nee,\c!herhaal=\v!nee, +\c!maxbreedte=\@@exmaxbreedte,\c!maxhoogte=\@@exmaxhoogte, \c!schaal=,\c!breedte=,\c!hoogte=,\c!scherm=, - \c!factor=,\c!hfactor=,\c!bfactor=, - \c!achtergrond=,\c!achtergrondkleur=,\c!achtergrondraster=\@@rsraster, - \c!hoek=,\c!straal=.5\korpsgrootte,\c!kader=\v!uit]% + \c!factor=,\c!hfactor=,\c!bfactor=]% \doif{\@@efextension}{\c!mov}{\presetfiguremov}% + \doif{\@@efextension}{\c!avi}{\presetfigureavi}% #1[#4][#5][#6]% + \doif{\@@efreset}{\v!ja}{\resetexternalfigures}% \doif{\@@eftype}{\c!mov}{\presetfiguremov}% + \doif{\@@eftype}{\c!avi}{\presetfigureavi}% \doif{\@@eftype}{\v!buffer} {\ifx\@@efextension\empty \let\@@efextension\c!tmp @@ -688,6 +810,7 @@ \c!tmp=>\let\@@eftype\c!tex \edef\@@effilepref{\bufferprefix}% \edef\@@effilename{\@@effilepref\@@effilename}, + \c!avi=>\presetfigureavi, \c!mov=>\presetfiguremov]% \edef\figuretypes{\figuretypes,\c!tex}% \doifelse{\@@efobject}{\v!nee} @@ -698,11 +821,12 @@ \doifobjectfoundelse{FIG}{\@@efobjectname}{\donetrue}{\donefalse}} {\donefalse}} {\donefalse}}% - \doif{\@@effilename}{\jobname} + \doifparentfileelse{\@@effilename} {\@EA\removefromcommalist\@EA{\jobsuffix}\figuretypes \let\@@efextension=\empty \showmessage{\m!figures}{9}{\@@effilename,\jobsuffix}% - \donefalse}% + \donefalse} + {}% \ifdone \getobjectdimensions{FIG}{\@@efobjectname}% \geteparameters % e ! @@ -725,15 +849,15 @@ \edef\@@effullname{\@@effilename.\@@efextension}% \def\figureextension##1{\@@efextension}% \fi}% - \ifcase\figurefilemode - \let\@@ex@@gebied\f!currentpath - \or - \let\@@ex@@gebied\f!currentpath - \or - \let\@@ex@@gebied\@@exgebied - \or - \edef\@@ex@@gebied{\f!currentpath\ifx\@@exgebied\empty\else,\fi\@@exgebied}% - \fi +% \ifcase\figurefilemode +% \let\@@ex@@gebied\f!currentpath +% \or % lokaal +% \let\@@ex@@gebied\f!currentpath +% \or % globaal +% \let\@@ex@@gebied\@@exgebied +% \or % lokaal,globaal / non empty gebied +% \edef\@@ex@@gebied{\f!currentpath\ifx\@@exgebied\empty\else,\fi\@@exgebied}% +% \fi \doifelse{\@@efpreset}{\v!nee} {\doifelse{\@@eftype}{\s!unknown} {\chardef\figurestatus=0 @@ -752,13 +876,15 @@ \fi \doifelse{#2}{\s!figurepreset} {\chardef\figurestatus=4 - \def\@@efloadname{\f!currentpath\f!pathseparator\@@exfile}% + %\def\@@efloadname{\f!currentpath\f!pathseparator\@@exfile}% + \assignfullfilename\f!currentpath\@@exfile\to\@@efloadname \let\@@eftype=\@@epe} {\chardef\figurestatus=0 \analyzefigurefiles}}% \let\@@epe=\@@eftype \edef\@@efextension{\figureextension{\@@eftype}}% dirty trick - \figwid=\!!zeropoint \fighei=\!!zeropoint \figxsca=1 \figysca=1 + \global\figwid=\!!zeropoint \figxsca=1 + \global\fighei=\!!zeropoint \figysca=1 \doif{\@@exoptie}{\v!kader} {\let\@@efkader=\v!aan}% \fi @@ -773,7 +899,7 @@ \showmessage{\m!figures}{4}{\@@effullname}% \or \showmessage{\m!figures}{5}{\@@effullname,\@@efloadname}% - \or + \or % no message \doifnot{\@@efsymbool}{\v!ja} {\showmessage{\m!figures}{8}{\@@effullname}}% \fi @@ -804,29 +930,30 @@ \doif{\@@exoptie}{\v!leeg} {\skipexternalfigurestrue \let\@@efkader=\v!uit}% -\doifelsenothing{\@@efpagina} % NIEUW - {\let\@@efoptions\empty} - {\let\@@efoptions\@@efpagina}% + \doifelsenothing{\@@efpagina} % NIEUW + {\let\@@efoptions\empty} + {\let\@@efoptions\@@efpagina}% \doif{\@@efpreview}{\v!ja} {\addtocommalist\v!preview\@@efoptions}% \doif{\@@efherhaal}{\v!ja} {\addtocommalist\v!herhaal\@@efoptions}% -\doif{\@@eftype}{\c!mps} - {\ifcase\EPSspecial\else\ifinobject\else - \@@eftrace{special mps, object forced}% - \doglobal\increment\forcedMPSobject - \edef\@@efobjectname{\c!mps::\forcedMPSobject}% - \let\@@efobject\v!ja - \fi\fi}% -\global\let\lastfigureobjectname\@@efobjectname - \doifelse{\@@efobject}{\v!nee} + \doif{\@@eftype}{\c!mps} + {\ifcase\EPSspecial\else\ifinobject\else + \@@eftrace{special mps, object forced}% + \doglobal\increment\forcedMPSobject + \edef\@@efobjectname{\c!mps::\forcedMPSobject}% + \let\@@efobject\v!ja + \fi\fi}% + \global\let\lastfigureobjectname\@@efobjectname + \doifelse{\@@efobject}{\v!nee} {\donefalse} {\doifobjectssupportedelse{\donetrue}{\donefalse}}% \ifdone \doifobjectfoundelse{FIG}{\@@efobjectname} {} {\bgroup - \figwid=\@@epw\fighei=\@@eph + \figwid=\@@epw % local ? + \fighei=\@@eph % local ? \scratchdimen=\@@epx\scratchdimen=-\scratchdimen \edef\@@epx{\number\scratchdimen}% \scratchdimen=\@@epy\scratchdimen=-\scratchdimen @@ -918,7 +1045,7 @@ \gdef\noffigurepages{\nofinsertpages} \def\dogetfiguredimensions[#1][#2]% - {{\let\immediate\relax % very dirty but prevents flushing, will change + {{\let\immediate\relax % very dirty but prevents flushing, will change \setbox0=\hbox{\externalfigure[#1][#2,\c!scherm=,\c!object=\v!nee]}}} \presetlocalframed[\??ef] @@ -926,36 +1053,58 @@ \def\doplaceexternalfigure% used direct and indirect {\dosixtupleempty\dodoplaceexternalfigure} +\newconditional\externalfigurelevel + \def\dodoplaceexternalfigure[#1][#2][#3][#4][#5][#6]% {\bgroup \setupexternalfigures \calculateexternalfigure[#1][#2][#3][#4][#5][#6]% \setupexternalfigures \calculateexternalscreenfigure[#1][#2][#3][#4][#5][#6]% +\pushmacro\figurewidth +\pushmacro\figureheight \xdef\figurewidth {\the\figwid}% \xdef\figureheight{\the\fighei}% - \ifskipexternalfigures - \localframed - [\??ef] - [\c!breedte=\figwid, - \c!hoogte=\fighei, - \c!kader=\v!aan] - {\ttx name: #2 \\ file: #3 \\ skipped}% - \else\ifcase\figurestatus - \localframed - [\??ef] - [\c!breedte=\figwid, - \c!hoogte=\fighei, - \c!kader=\v!aan] - {\ttx name: #2 \\ file: #3 \\ unknown}% + \ifconditional\externalfigurelevel % probably background + \ifskipexternalfigures + % nothing + \else\ifcase\figurestatus + % nothing + \else + \box\foundexternalfigure + \fi\fi \else - \localframed - [\??ef] - [\c!breedte=\figwid, - \c!hoogte=\fighei, - \c!offset=\v!overlay] - {\vfilll\box\foundexternalfigure}% - \fi\fi + \settrue\externalfigurelevel + \ifskipexternalfigures + \localframed + [\??ef] + [\c!breedte=\figurewidth, + \c!hoogte=\figureheight, + \c!kader=\v!aan] + {\ttx name: #2 \\ file: #3 \\ skipped}% + \else\ifcase\figurestatus + \localframed + [\??ef] + [\c!breedte=\figurewidth, + \c!hoogte=\figureheight, + \c!kader=\v!aan] + {\ttx name: #2 \\ file: #3 \\ unknown}% + \else +\doifelse{\@@efreset}{\v!ja} + {\ht\foundexternalfigure=\figureheight + \dp\foundexternalfigure=\!!zeropoint + \wd\foundexternalfigure=\figurewidth + \box\foundexternalfigure} + {\localframed + [\??ef] + [\c!breedte=\figurewidth, + \c!hoogte=\figureheight, + \c!offset=\v!overlay] + {\vfilll\box\foundexternalfigure}}% + \fi\fi + \fi +\popmacro\figureheight +\popmacro\figurewidth \egroup} \def\getexternalfigure#1% @@ -996,7 +1145,9 @@ \def\dosetuseexternalfigure[#1][#2][#3][#4]% {\doifinstringelse{=}{#3} {\setvalue{\??ef\??ef#1}{\doplaceexternalfigure[\dopresetfigure][#1][#2][#3][#4]}} - {\setvalue{\??ef\??ef#1}{\doplaceexternalfigure[\doprecopfigure][#1][#2][#3][#4]}}% + {\doifelsenothing{#3} % catch [1][2][leeg][leeg] + {\setvalue{\??ef\??ef#1}{\doplaceexternalfigure[\dopresetfigure][#1][#2][#3][#4]}} + {\setvalue{\??ef\??ef#1}{\doplaceexternalfigure[\doprecopfigure][#1][#2][#3][#4]}}}% \doifundefined{#1}{\setvalue{#1}{\getexternalfigure{#1}}}} % upward compatible \def\useexternalfigure% @@ -1137,6 +1288,9 @@ \def\showexternalfigures% {\dosingleempty\doshowexternalfigures} +\def\overlayfigure#1% + {\externalfigure[#1][\c!breedte=\overlaywidth,\c!hoogte=\overlayheight]} + %D Still undocumented! \newcount\efreference @@ -1451,21 +1605,21 @@ \def\setupclipping% {\dodoubleargument\getparameters[\??cp]} -%D defining sound tracks: +%D defining sound tracks: %D -%D \starttypen +%D \starttypen %D \useexternalsoundtrack[label][file] -%D \stoptypen +%D \stoptypen %D %D associated actions: StartSound StopSound PauseSound ResumeSound %D -%D Todo: like external figures, also search on path, +%D Todo: like external figures, also search on path, %D although, they need to be present ar viewing time, so ... \def\useexternalsoundtrack% {\dodoubleargument\douseexternalsoundtrack} -\def\douseexternalsoundtrack[#1][#2]% +\def\douseexternalsoundtrack[#1][#2]% {\setgvalue{\??sd#1}{#2}} \def\checksoundtrack#1% @@ -1486,12 +1640,16 @@ \setupexternalfigures [\c!optie=, \c!object=\v!ja, + \c!reset=\v!nee, + \c!maxbreedte=\@@efbreedte, + \c!maxhoogte=\@@efhoogte, \c!korps=\korpsgrootte, \c!gebied=, \c!file=\f!utilityfilename.\f!figureextension, \c!straal=.5\korpsgrootte, \c!hoek=\v!recht, \c!kader=\v!uit, + \c!achtergrond=, % new \c!plaats={\v!lokaal,\v!globaal}] \setupexternalfigures diff --git a/tex/context/base/core-fil.tex b/tex/context/base/core-fil.tex index c67aa1702..50a05693a 100644 --- a/tex/context/base/core-fil.tex +++ b/tex/context/base/core-fil.tex @@ -39,6 +39,16 @@ 1: synonymum souboru -- je jiz pouzito pro -- \stopmessages +\startmessages italian library: files + title: file + 1: sinonimo file -- già in uso per -- +\stopmessages + +\startmessages norwegian library: files + title: filer + 1: filesynonym -- er allerede brukt for -- +\stopmessages + %D \macros %D {definefilesynonym} %D @@ -184,10 +194,10 @@ %D We also redefine: \def\MPgraphicfile% - {\bufferprefix mp\ifMPrun run\else graph\fi} + {\bufferprefix mp\ifMPrun run\else graph\fi} \def\convertMPcolorfile% - {\bufferprefix metacmyk.tmp} + {\bufferprefix metacmyk.tmp} %D Temporarily here: diff --git a/tex/context/base/core-fld.tex b/tex/context/base/core-fld.tex index 33b77f9ad..d7957fc85 100644 --- a/tex/context/base/core-fld.tex +++ b/tex/context/base/core-fld.tex @@ -843,15 +843,16 @@ {\doifundefined{fieldstack:#1} {\setgvalue{fieldstack:#1}{\dodofieldstack[#1][#2][#3]}}} -\def\dodofieldstack[#1][#2][#3]% +\def\dodofieldstack[#1][#2][#3]% start=n, 0 == leeg {\bgroup + \getparameters[\??fd][\c!start=1,#3]% \setupfields[\v!reset]% \definesymbol[\v!leeg][]% - \useJSscripts[fld]% + \useJSscripts[fld][FieldStack]% \newcounter\stackedfieldnumber \def\dododofieldstack##1% {\increment\stackedfieldnumber - \ifnum\stackedfieldnumber=1 + \ifnum\stackedfieldnumber=\@@fdstart\relax \definefield[#1:\stackedfieldnumber][check][#1][##1,\v!leeg][##1]% \else \definefield[#1:\stackedfieldnumber][check][#1][##1,\v!leeg][\v!leeg]% @@ -880,6 +881,20 @@ \def\fieldstack% {\dotripleempty\dofieldstack} +%D When submitting a form, we need to tell the driver module +%D that we want \FDF\ or \HTML. + +\def\setupforms% + {\dodoubleargument\getparameters[\??fr]} + +\def\checksubmitform#1% + {\setsubmitoutputformat{\@@frmethode}} + +\setexecutecommandcheck {submitform} \checksubmitform + +\setupforms + [\c!methode=HTML] + \protect \endinput diff --git a/tex/context/base/core-fnt.tex b/tex/context/base/core-fnt.tex index a7ce7f68f..9928d64ee 100644 --- a/tex/context/base/core-fnt.tex +++ b/tex/context/base/core-fnt.tex @@ -72,8 +72,8 @@ %D \type {\groupedcommand}. \def\usepseudocaps% - {\def\cap@@uppercase{\the\everyuppercase\uppercase}% - \def\cap@@lowercase{\the\everylowercase\lowercase}% + {\def\cap@@uppercase{\the\everyuppercase\uppercased}% + \def\cap@@lowercase{\the\everylowercase\lowercased}% \def\cap@@visualize{\tx}} \def\userealcaps% @@ -145,13 +145,16 @@ {\definealternativestyle[\v!kapitaal][\normalkap][\normalkap]% \definealternativestyle[\v!smallcaps][\sc][\sc]% \let\kap\normalkap} - {\definealternativestyle[\v!kapitaal][\normalkap][\uppercase]% - \definealternativestyle[\v!smallcaps][\sc][\uppercase]% + {\definealternativestyle[\v!kapitaal][\normalkap][\uppercased]% + \definealternativestyle[\v!smallcaps][\sc][\uppercased]% \def\kap{\doconvertfont{\v!kapitaal}}}% \doifelse{\@@kksc}{\v!ja} {\userealcaps} {\usepseudocaps}} +\ifx\uppercased\undefined \let\uppercased\uppercase \fi +\ifx\lowercased\undefined \let\lowercased\lowercase \fi + \setupcapitals [\c!titel=\v!ja, \c!sc=\v!nee] @@ -201,8 +204,10 @@ \def\processwords#1% {\doprocesswords#1 \od\unskip} +\let\processword\relax + \unexpanded\def\Words% - {\let\processwords=\Word + {\let\processword=\Word \processwords} \unexpanded\def\WORD#1% @@ -277,22 +282,71 @@ %D %D The default skip can be set with: +% \def\stretchedspacefactor{4} +% \def\stretchedspaceamount{.25em} +% +% \unexpanded\def\stretcheduppercase#1% +% {\bgroup +% \the\everyuppercase +% \uppercase{\def\textstring{#1}}% +% \ifdim\stretchedspaceamount>\!!zeropoint +% \def\textkern% +% {\kern\stretchedspaceamount}% +% \def\textskip% +% {\scratchdimen=\stretchedspaceamount +% \hskip\stretchedspacefactor\scratchdimen}% +% \@EA\processtokens\@EA\relax\@EA\textkern\@EA\relax\@EA +% \textskip\@EA{\textstring}% +% \else +% \textstring +% \fi +% \egroup} + +\def\stretchedspacefactor{4} \def\stretchedspaceamount{.25em} +\def\stretchedbreaktokens{.@/} -\unexpanded\def\stretcheduppercase#1% +\unexpanded\def\stretcheduppercase#1% {\bgroup \the\everyuppercase \uppercase{\def\textstring{#1}}% \ifdim\stretchedspaceamount>\!!zeropoint - \def\textkern{\kern \stretchedspaceamount}% - \def\textskip{\hskip\stretchedspaceamount}% - \@EA\processtokens\@EA\relax\@EA\textskip\@EA\relax\@EA - {\@EA\textkern\@EA\textkern\@EA}\@EA{\textstring}% + \def\textkern##1% + {\determinemidwordbreak{##1}{\stretchedbreaktokens}% + \kern\stretchedspaceamount##1\domidwordbreak}% + \def\textskip% + {\scratchdimen=\stretchedspaceamount + \hskip\stretchedspacefactor\scratchdimen}% + \@EA\processtokens\@EA\relax\@EA\textkern\@EA\relax\@EA + \textskip\@EA{\textstring}% \else \textstring \fi \egroup} +%D An auxiliary macro, see for usage \type {\stretcheduppercase}. + +\let\domidwordbreak\relax + +\def\setmidwordbreaktoken#1% + {\sfcode`#1=5000\relax} + +\def\determinemidwordbreak#1#2% + {\edef\midwordbreaktokens{#2}% + \ifx\midwordbreaktokens\empty + \global\let\domidwordbreak\relax + \else + \setbox\scratchbox=\hbox + {\expandafter\handletokens\midwordbreaktokens\with\setmidwordbreaktoken + a\space \!!dimena=\the\lastskip + #1\space\!!dimenb=\the\lastskip \relax % needed + \ifdim\!!dimena=\!!dimenb + \global\let\domidwordbreak\relax + \else + \global\let\domidwordbreak\allowbreak + \fi}% + \fi} + %D \macros %D {underbar,underbars, %D overbar,overbars, @@ -377,10 +431,10 @@ \unexpanded\def\dodounderbar#1% {\bgroup - \dimen0=1.5\normallineskip + \dimen0=\@@ononderoffset \dimen0=\underbarlevel\dimen0 \ifdone \else - \advance\dimen0 by -\normallineskip + %\advance\dimen0 by -1pt \advance\dimen0 by -\ht\strutbox \fi \dimen2=\dimen0 @@ -431,7 +485,7 @@ \def\dooverstrike#1% {\bgroup - \dimen0=2.5\normallineskip + \dimen0=\@@onbovenoffset \dimen2=\dimen0 \advance\dimen2 by \@@onlijndikte \dododounderbar{\dimen2}{-\dimen0}{#1}% @@ -492,7 +546,8 @@ \fi} \def\dohighlow#1#2#3#4#5% - {\bgroup + {\dontleavehmode + \bgroup \scratchdimen= \ifdim\fontdimen5\textfont2=1ex\fontdimen#2\textfont2\else#3ex\fi \advance\scratchdimen by #4ex @@ -507,7 +562,8 @@ \unexpanded\def\low {\dohighlow\lower{16}{.48}{0}} \unexpanded\def\lohi#1#2% - {\hbox + {\dontleavehmode + \hbox {\setbox4=\hbox{\dohighlow\lower{16}{.48}{.1}{#1}}% \setbox6=\hbox{\dohighlow\raise{14}{.86}{.1}{#2}}% \ifdim\wd4<\wd6 @@ -516,11 +572,48 @@ \wd6=\!!zeropoint\box6\box4 \fi}} +%D \macros +%D {setupinitial,placeinitial,checkinitial} +%D +%D {\em To be documented.} +%D +%D \starttypen +%D \setupinitial[state=start] \placeinitial \input tufte +%D \stoptypen +%D +%D and +%D +%D \starttypen +%D \def\bpar{\ifvmode\checkinitial\fi} +%D \def\epar{\ifhmode\par\fi\checkinitial} +%D \stoptypen + +% to do: more fine tuning + +\def\setupinitial% + {\dodoubleempty\getparameters[\??dc]} + +\definefontsynonym[Initial][Regular] % prefered initial identifier +\definefontsynonym[initial][Initial] % internal but accepted too + +\setupinitial + [\c!status=\v!stop, + \c!n=3, + \s!font=initial] + +\def\placeinitial% + {\doif{\@@dcstatus}{\v!start} + {\ifnum\@@dcn>0 \AutoDroppedCaps \fi}} + +\let\checkinitial\CheckDroppedCaps + %D This module has only a few setups: \setupunderbar [\c!variant=a, - \c!lijndikte=\linewidth] + \c!lijndikte=\linewidth, + \c!onderoffset=1.5pt, + \c!bovenoffset=2.5pt] \protect diff --git a/tex/context/base/core-grd.tex b/tex/context/base/core-grd.tex index f5518afec..2fe0b971a 100644 --- a/tex/context/base/core-grd.tex +++ b/tex/context/base/core-grd.tex @@ -209,7 +209,6 @@ %D %D \macros %D {getnoflines} -%D {} %D %D Het commando \type{\getnoflines} converteert een hoogte %D (dimensie) in een aantal regels en kent dit toe aan @@ -310,7 +309,7 @@ \forcepresnaptrue \fi \ifforcepresnap - \vbox{\strut}\nobreak\vskip-\openlineheight + \vbox{\hsize\!!zeropoint\strut}\nobreak\vskip-\openlineheight \fi % \ifdim\ht\nextbox>\ht\strutbox @@ -444,26 +443,27 @@ \fi} \def\setgridbox#1#2#3% - {\setbox#1=\ruledvbox to #3 + {\setbox#1=\ruledvbox to #3 % given size {\forgetall \offinterlineskip \hsize=#2 - \getnoflines{#3}% - \vskip\topskip - \vskip-\ht\strutbox - \scratchdimen=#2\advance\scratchdimen by \lineheight - \dorecurse - {\noflines} - {\strut - \hskip-.5\lineheight - \rlap - {\hskip\scratchdimen\hskip2pt\infofont - \hbox to 1em{\hss\recurselevel}}% - \vrule - \!!height .5\testrulewidth - \!!depth .5\testrulewidth - \!!width \scratchdimen - \par} + \ruledvbox % calculated size + {\getnoflines{#3}% + \vskip\topskip + \vskip-\ht\strutbox + \scratchdimen=#2\advance\scratchdimen by \lineheight + \dorecurse + {\noflines} + {\strut + \hskip-.5\lineheight + \rlap + {\hskip\scratchdimen\hskip2pt\infofont + \hbox to 1em{\hss\recurselevel}}% + \vrule + \!!height .5\testrulewidth + \!!depth .5\testrulewidth + \!!width \scratchdimen + \par}} \vfill}} %D Some intervention macros: diff --git a/tex/context/base/core-int.tex b/tex/context/base/core-int.tex index e99c6af56..7ae8ab6d5 100644 --- a/tex/context/base/core-int.tex +++ b/tex/context/base/core-int.tex @@ -47,6 +47,22 @@ 4: zadna strankova synchronizace (--) v hmode \stopmessages +\startmessages italian library: interactions + title: interazione + 1: rapporto -- x -- (b x a) + 2: attiva + 3: inattiva + 4: sincronizzazione di pagina (--) non disponibile in hmode +\stopmessages + +\startmessages norwegian library: interactions + title: interaksjon + 1: forholdstall -- x -- (b x h) + 2: aktiv + 3: inaktiv + 4: ingen sidesynkronisering (--) i hmode +\stopmessages + \startmessages dutch library: versions title: versie 1: er mankeert een @+ @@ -75,6 +91,20 @@ 3: oznacene strany: -- \stopmessages +\startmessages italian library: versions + title: version + 1: @+ mancante + 2: marcatura pagine + 3: pagine selezionate: -- +\stopmessages + +\startmessages norwegian library: versions + title: versjon + 1: manglende @+ + 2: markerer sider + 3: valgte sider: -- +\stopmessages + \unprotect \definesystemconstant {link} @@ -271,20 +301,44 @@ \def\initializeidentity% The macro is not to be changed; {\iflocation % only the \@@ia-variables may be set! - \dosetupidentity % Although ConTeXt is the producer - {\@@iatitel} % we no longer set this field, since + \dosetupidentity % ConTeXt is the producer but we + {\@@iatitel} % no longer mention the pragma site, since {\@@iasubtitel} % we don't want to be bothered with {\@@iaauteur} % remarks about third party documents - {\jobname.tex} % and/or associated with documents + {ConTeXt/user/\jobname.tex} % and/or associated with documents {\@@iadatum}% % produced outside our control. \global\let\initializeidentity\relax \fi} \appendtoks \initializeidentity \to \everyshipout +% \def\initializepaper% +% {\bgroup +% \doif\@@pcstatus\v!start\locationfalse +% \iflocation % without screen settings +% \egroup +% \dosetuppaper +% {\papierformaat} +% {\the\papierbreedte} +% {\the\papierhoogte}% +% \else +% \egroup +% \dosetuppaper +% {\printpapierformaat} +% {\the\printpapierbreedte} +% {\the\printpapierhoogte}% +% \fi} + \def\initializepaper% {\bgroup - \doif\@@pcstatus\v!start\locationfalse + %\doif\@@pcstatus\v!start\locationfalse + %\doifsomething + % {\@@pplinks\@@pprechts\@@ppboven\@@pponder}\locationfalse + \ifx\@@pplinks \empty \else\locationfalse\fi + \ifx\@@pprechts\empty \else\locationfalse\fi + \ifx\@@ppboven \empty \else\locationfalse\fi + \ifx\@@pponder \empty \else\locationfalse\fi + \ifx\@@pcstatus\v!start \locationfalse\fi \iflocation % without screen settings \egroup \dosetuppaper @@ -299,6 +353,8 @@ {\the\printpapierhoogte}% \fi} +\appendtoks \initializepaper \to \everyshipout + \def\doinitializepaper% {\bgroup \berekeninteractiescherm @@ -314,6 +370,8 @@ {\the\papierhoogte}% \egroup} +\let\@@pcscreendata\empty + \def\dosetupinteractionscreens% met a, b en \number {\doifnot{\@@pcstatus}{\v!start} {\bgroup @@ -324,8 +382,16 @@ \v!bookmark=>\!!counte=2, \s!unknown=>\!!counte=0, \s!default=>\!!counte=0]% - \showmessage{\m!interactions}{1} % niet waterdicht - {\@EA\withoutpt\the\!!widtha,\@EA\withoutpt\the\!!heighta}% + \edef\temp% + {{\number\rugoffset}{\number\kopoffset}% + {\number\!!widtha}{\number\!!heighta}% + {\the\!!counte}}% + \doifnot{\the\!!widtha\the\!!heighta}{\@@pcscreendata} + {\xdef\@@pcscreendata{\the\!!widtha\the\!!heighta}% + \showmessage{\m!interactions}{1} % niet waterdicht + {\@EA\withoutpt\the\!!widtha,\@EA\withoutpt\the\!!heighta}}% + % need to be split: dimensions for each page + % and mode per document and only once ! \dosetupscreen {\number\rugoffset}{\number\kopoffset} {\number\!!widtha}{\number\!!heighta} @@ -339,6 +405,8 @@ \let\setupinteractionscreens\dosetupinteractionscreens \fi} +\appendtoks \setupinteractionscreens \to \everyshipout + \def\stelinteractieschermin% {\dosingleempty\dostelinteractieschermin} @@ -610,7 +678,7 @@ \c!achtergrond=\locationboxbackground, #2] {\dolocationattributes{#1}\c!letter\c!kleur{#3}}}% - \hbox{#4{\box\locationbox}}}%{\copy\locationbox}}} + \hbox{#4{\box\locationbox}}} \def\setlocationboxyes#1[#2]#3[#4]% {\ifx\currentouterreference\empty @@ -657,21 +725,11 @@ \global\skippedmenuitemtrue \fi} -%\def\setlocationbox#1[#2]#3[#4]% -% {\doifinstringelse{#4}{\getvalue{#1\c!blokkade}} -% {\setlocationboxnop{#1}[#2]{#3}[#4]} -% {\doifreferencefoundelse{#4} -% {\setlocationboxyes{#1}[#2]{#3}[#4]} -% {\setlocationboxnop{#1}[#2]{#3}[#4]% -% \unknownreference{#4}}}} - \def\setlocationbox#1[#2]#3[#4]% {\doifreferencepermittedelse{#4}{\getvalue{#1\c!blokkade}} {\setlocationboxyes{#1}[#2]{#3}[#4]} {\setlocationboxnop{#1}[#2]{#3}[#4]}} -%\dolocationattributes{#1}\c!letter\c!kleur{#3}}}% - \def\dodosetlocationcommanditem#1#2#3[#4]#5\\% {\bgroup \leavevmode @@ -712,6 +770,8 @@ \unskip \getvalue{\??am#1#5}} +\newcounter\currentamposition + \def\setamboxcommands#1#2% {\def\@@amboxcommand##1\\% {\bgroup @@ -721,26 +781,31 @@ \fi \egroup \ignorespaces}% + \doglobal\newcounter\currentamposition %%% experiment \def\raw[##1]##2\\% {\@@amboxcommand\naarbox{\ignorespaces##2\unskip}[##1]\\}% \def\but[##1]##2\\% - {\@@amboxcommand\setlocationbox{\??am#1}[]{\ignorespaces##2\unskip}[##1]\\}% + {\@@amboxcommand\do@@amposition{#1}{##1}{\setlocationbox{\??am#1}[]{\ignorespaces##2\unskip}[##1]}\\}% \def\got[##1]##2\\% pas op! offset {\@@amboxcommand\setlocationbox{\??am#1}[\c!kader=\v!uit,\c!achtergrond=]{\ignorespaces##2\unskip}[##1]\\}% \def\nop##1\\% {\@@amboxcommand\phantom{\localframed[\??am#1][]{}}\\}% \def\txt##1\\% {\@@amboxcommand\localframed[\??am#1][\c!kader=\v!uit,\c!achtergrond=]{\ignorespaces##1\unskip}\\}% - \def\rul##1\\% + \def\rul##1\\% ook \do@@amposition ! {\@@amboxcommand\localframed[\??am#1][]{\ignorespaces##1\unskip}\\}% \def\com##1\\% {\ignorespaces##1\unskip\ignorespaces}} +\ifx\do@@amposition\undefined + \let\do@@amposition\gobbletwoarguments % hook for positional thingies +\fi + \def\@@amhbox#1#2#3#4% {\testinteractiemenu{#3}% \iflocationmenupermitted \bgroup -\showcomposition + \showcomposition \def\dolocationcommand##1% {\dosetlocationcommanditem{#3}{##1}}% \dimen0=\zetbreedte @@ -751,6 +816,7 @@ \setbox0=\hbox to \dimen0 {\forgetall \executeamboxcommands{#3}{#4}\c!links\c!midden\c!rechts}% + \setbox0=\hbox{\do@@ammenuposition{#3}{\box0}}% \wd0=\zetbreedte % geen \ht=#2 setting (yet) \hskip-\pagebackgroundhoffset @@ -765,7 +831,7 @@ {\testinteractiemenu{#3}% \iflocationmenupermitted \bgroup -\showcomposition + \showcomposition \dimen0=\teksthoogte \advance\dimen0 by \pagebackgroundvoffset \advance\dimen0 by \pagebackgroundvoffset @@ -777,6 +843,7 @@ \stelblankoin[\v!standaard]% % (tijdelijk) is aangepast. \hsize#2\relax \executeamboxcommands{#3}{#4}\c!voor\c!tussen\c!na}% + \setbox0=\vbox{\hbox{\do@@ammenuposition{#3}{\box0}}}% \setbox0=\vbox {\vskip-\pagebackgroundvoffset \vskip\getvalue{\??am#3\c!bovenoffset}% @@ -791,6 +858,10 @@ #1\relax \fi} +\ifx\do@@ammenuposition\undefined + \let\do@@ammenuposition\gobbleoneargument % hook for positional thingies +\fi + \setvalue{\??am\s!do\v!rechts}% {\@@amvbox{\dodummypageskip\v!rechts}\rechterrandbreedte} @@ -876,9 +947,13 @@ \def\dodefinieerinteractiemenu[#1][#2][#3]% {\ConvertToConstant\doifelse{#3}{} {\setvalue{\??am\c!menu#1}% - {\extendedmenufalse\dointeractiemenu{#1}{#2}}} + {\extendedmenufalse\dointeractiemenu{#1}{#2}}% + \setvalue{\@@dodolijstelement#1}% + {\def\dosomelijstelement{\dodomenulijstelement{#1}}}} % of #2 ? {\setvalue{\??am\c!menu#1}% {\extendedmenufalse\dointeractiemenu{#1}{}}% + \setvalue{\@@dodolijstelement#1}% + {\def\dosomelijstelement{\dodomenulijstelement{#1}}}% \presetlocalframed[\??am#1]% \letvalue{\??am#1\c!blokkade}\empty \edef\!!stringe{\getvalue{\??am#2}}% @@ -905,6 +980,23 @@ \def\definieerinteractiemenu% {\dotripleempty\dodefinieerinteractiemenu} +\def\dodomenulijstelement#1#2#3#4#5#6#7% + {\setbox0=\hbox + {\let\gotolocation\gobbleoneargument % hack to catch last [] + \docheckrealreferencepage{#7}% + \setlocationboxyes + {\??am#1}% % needed ! + []% no settings + {\doifelsenothing{\??li#2\c!maxbreedte} + {#5} + {\limitatetext + {#5} + {\getvalue{\??li#2\c!maxbreedte}} + {\unknown}}}% % needed ! + []}% normally the destination, catch by gobble + \@@amboxcommand\do@@amposition{#1}{#7}% beware, we pass the pagenumber + {\ignorespaces\linklisttoelement{#2}{#3}{#6}{#7}{\box0}\unskip}\\} + \processbetween{\e!interactiemenu}\dostartinteractiemenu \def\dostartinteractiemenu#1% @@ -1546,8 +1638,11 @@ \def\stopprofiel% {\processprofile1[#1]% \egroup}% - \DoAfterFi\processprofile0[#1]% - \fi} + \def\next{\processprofile0[#1]}% % \DoAfterFi \processprofile0[#1]% + \else % ^^^^^^^^^^ will be obsolete + \let\next\relax % since ugly and never used + \fi + \next} \let\stopprofiel=\relax @@ -1962,22 +2057,26 @@ % text, the symbols scale down. % \stopcommentaar +% jammer, tussen/midden had erin gemoeten; \c!commando toevoegen + +\def\registermenucommand#1% + {\noindent#1\space} + \def\doregistermenubuttons[#1][#2]% [menu id] [register] {\bgroup \ifsecondargument \stelinteractiemenuin [#1][\c!onbekendeverwijzing=\v!ja,\c!zelfdepagina=\v!ja]% \def\docommando##1% - {\noindent - \menubutton[#1]{##1}[#2:##1]% - \space}% + {\registermenucommand{\menubutton[#1]{##1}[#2:##1]}}% \else \def\docommando##1% - {\noindent - \button[\c!onbekendeverwijzing=\v!ja,\c!zelfdepagina=\v!ja]{##1}[#1:##1]% - \space}% + {\registermenucommand + {\button + [\c!onbekendeverwijzing=\v!ja,\c!zelfdepagina=\v!ja] + {##1}[#1:##1]}}% \fi - \handletokens abcdefghijklmnopqrstuvwxyz\with\docommando + \handletokens abcdefghijklmnopqrstuvwxyz\with\docommando % moet anders \egroup} \def\registermenubuttons% @@ -2040,6 +2139,7 @@ \stelinteractiemenuin [\v!links,\v!rechts,\v!boven,\v!onder] [\c!offset=.25em, + \c!positie=\v!nee, \c!kader=\v!aan, \c!achtergrond=, \c!achtergrondkleur=, diff --git a/tex/context/base/core-itm.tex b/tex/context/base/core-itm.tex index 702c5fe5d..d62127e42 100644 --- a/tex/context/base/core-itm.tex +++ b/tex/context/base/core-itm.tex @@ -29,6 +29,14 @@ 9: aktualne ne vice nez -- urovne/urovni vyctu \stopmessages +\startmessages italian library: layouts + 9: attualmente non più di -- livelli di elencazione +\stopmessages + +\startmessages norwegian library: layouts + 9: for øyeblikket maksimalt -- nivåer i opplisting +\stopmessages + \unprotect % - meerdere niveaus (moet niet moeilijk zijn) @@ -111,6 +119,8 @@ {\getparameters[\??op\itemlevel][#2]}% {\getparameters[\??op#1][#2]}} +\newconditional\inlinelistitem \setfalse\inlinelistitem + \def\dododostelopsomminginconstant[#1][#2#3#4]% * permits [2] {\processaction [#2#3#4] @@ -125,6 +135,7 @@ \v!inmarge*=>{\doassign[\??op#1][\c!breedte=-2em]}, % signal \v!opmarge*=>\doifnot{#1}{1}{\doassign[\??op#1][\c!breedte=0em]}, % signal \v!kolommen*=>\packitems, +\v!intekst*=>\settrue\inlinelistitem, % new \v!los*=>\optimizeitemsfalse, \v!alinea*=>{\paragraphitemstrue \packitems}, @@ -213,7 +224,9 @@ \setgvalue{\??op\c!symbool\s!local\itemlevel}% {\convertnumber{#1}{\countervalue{\s!itemcount\itemlevel}}}% \def\listitem% - {\getvalue{\??op\c!symbool\s!local\itemlevel}\tempsymbool}% + {\getvalue{\??op\itemlevel\c!links}% new + \getvalue{\??op\c!symbool\s!local\itemlevel}\tempsymbool + \getvalue{\??op\itemlevel\c!rechts}}% new \let\docommando\gobbleoneargument} {\let\listitem\empty}}} @@ -230,9 +243,25 @@ \multiply#2 by \getvalue{\??op#1\c!factor}\relax \advance#2 by \getvalue{\??op#1\c!breedte}\relax} +% The next conditionals deal with \item \startitemize. It +% looks like a hack to skip back, but that way we preserve +% the indentation and bullet placement. It's a rather +% untested feature. + +\newconditional\concatnextitem \setfalse\concatnextitem +\newconditional\autoconcatnextitem \settrue \autoconcatnextitem +\newsignal \itemsignal + \def\dodostartopsomming[#1][#2]% - {\ifhmode - \par + {\setfalse\inlinelistitem % new, no indent (leftskip) + \setfalse\concatnextitem % new, concat + \ifhmode + \ifconditional\autoconcatnextitem % new, concat + \ifdim\lastskip=\itemsignal % new, concat + \settrue\concatnextitem % new, concat + \fi % new, concat + \fi % new, concat + \par \fi \ifnum\itemlevel=\maxitemlevel\relax \showmessage{\m!layouts}{9}{\maxitemlevel}% @@ -351,7 +380,9 @@ \fi\fi \calculatelistwidth{\itemlevel}{\dimen0}% \ifdim\dimen0>\!!zeropoint\relax +\ifconditional\inlinelistitem\else \advance\leftskip by \dimen0\relax +\fi \fi} \def\dostartopsomming[#1][#2]% @@ -445,11 +476,15 @@ \else \calculatelistwidth{\itemlevel}{\dimen0}% \fi +\ifconditional\inlinelistitem + \hbox to \dimen0{\ifsubsom\llap{+}\fi\box8\hfill}% +\else \llap{\hbox to \dimen0{\ifsubsom\llap{+}\fi\box8\hfill}}% +\fi \fi \setevalue{\??op\c!symbool\itemlevel}% - %{\getvalue{\??op\c!symbool\s!local\itemlevel}}% problems with \uchar - {\noexpand\getvalue{\??op\c!symbool\s!local\itemlevel}}% + {\getvalue{\??op\c!symbool\s!local\itemlevel}}% still problems with \uchar ? + %{\noexpand\getvalue{\??op\c!symbool\s!local\itemlevel}}% no, spoils subrefs \kopsomfalse \subsomfalse \symsomfalse @@ -459,6 +494,9 @@ \def\complexdosom[#1]% {\par \ignorespaces + \ifconditional\concatnextitem % new, concat + \dosomebreak\nobreak % new, concat + \fi % new, concat \doadvanceitem \ifnum\itemcolumndepth=0\relax\ifnum\noflistelements>0\relax \dosomebreak\nobreak @@ -483,6 +521,11 @@ \else \itemuse\c!tussen \fi + \ifconditional\concatnextitem % new, concat + \vskip-\lastskip % new, concat + \vskip-\lineheight % new, concat + \nobreak % new, concat + \fi % new, concat \ignorespaces \dolistitem \ifpackeditems @@ -498,6 +541,8 @@ \rawreference{\s!lst}{#1}{\itemreference}% \egroup}}% \strut % added 11-08-99 + \setfalse\concatnextitem % new, concat + \hskip\itemsignal % new, concat \ignorespaces} \def\complexsom[#1]#2\par% todo: no two pass data diff --git a/tex/context/base/core-lst.tex b/tex/context/base/core-lst.tex index a9e4d4142..75d8e8649 100644 --- a/tex/context/base/core-lst.tex +++ b/tex/context/base/core-lst.tex @@ -56,6 +56,12 @@ % \schrijfwegnaarlijst % \endgroup}} +% Auto cross document links work by either using logical or +% page references, depending on the general settings. The +% locations are stored in global references where the auto tag +% number uses the text container. We use reference mapping +% (define reference) to keep track of the current ref. + \def\doschrijfnaarlijst#1#2#3#4% {\doifvalue{\??li#1\c!status}{\v!start} {\begingroup @@ -66,24 +72,26 @@ {\def\dopaginanummer{0}}% % niet waterdicht, wat te doen met figuren en zo % first hack: scheelt rommel, second hack: alleen koppen - \ExpandBothAfter\rawdoifinsetelse{#1}{\crossdocumentelements} + \doifelsevalue{\??rf#1\c!status}{\v!start} {\doif{\@@sectionlevel\@@sectie}{0}{\autocrossdocumentfalse}} {\autocrossdocumentfalse}% - % blijft nog wat zwakjes + % blijft nog wat zwakjes en inefficient \ifautocrossdocument \bgroup - \thisisdestination{#1::\sectionformat}% + \thisisnextinternal{#1}% + %\thisisdestination{#1::\sectionformat}% \@EA\setsectieenkoppeling\@EA{#1}% \edef\currentlevel{\@@sectionlevel\@@sectie}% - \def\docommando##1% - {\def\dodocommando####1% - {\setsectieenkoppeling{####1}% - \def\level{\@@sectionlevel\@@sectie}% - \ifnum\level>\currentlevel - \expanded{\definereference[##1::####1][\v!geen]}% - \else\ifnum\level=\currentlevel - \expanded{\definereference[##1::####1][##1::{####1::\sectionformat}]}% - \fi\fi}% + \def\docommando##1% + {\def\dodocommando####1% + {\doifvalue{\??rf####1\c!status}{\v!start} + {\setsectieenkoppeling{####1}% + \def\level{\@@sectionlevel\@@sectie}% + \ifnum\level>\currentlevel + \expanded{\definereference[##1::####1][\v!geen]}% + \else\ifnum\level=\currentlevel + \expanded{\definereference[##1::####1][##1::{####1::\sectionformat}]}% + \fi\fi}}% \processcommacommand[\crossdocumentelements]\dodocommando}% \processcommacommand[\crossdocumentreferences]\docommando \egroup @@ -301,26 +309,28 @@ \strut\splitlistsymbol\getvalue{\??li#1\c!scheider}% \doifvalue{\??li#1\c!label}{\v!ja}{\rightlabeltext{#1}}}]} +\def\@@dodolijstelement{dodolijstelement} + \def\dosomelijstelement#1#2#3{#1 #2 \translatednumber[#3]} -\def\dodolijstelementa{\let\dosomelijstelement\dodofixdlijstelementABC} -\def\dodolijstelementb{\let\dosomelijstelement\dodofixdlijstelementABC} -\def\dodolijstelementc{\let\dosomelijstelement\dodofixdlijstelementABC} -\def\dodolijstelementd{\let\dosomelijstelement\dodofixdlijstelementD} -\def\dodolijstelemente{\let\dosomelijstelement\dodofixdlijstelementE} -\def\dodolijstelementf{\let\dosomelijstelement\dodofixdlijstelementF} -\def\dodolijstelementg{\let\dosomelijstelement\dodofixdlijstelementG} +\setvalue{\@@dodolijstelement a}{\let\dosomelijstelement\dodofixdlijstelementABC} +\setvalue{\@@dodolijstelement b}{\let\dosomelijstelement\dodofixdlijstelementABC} +\setvalue{\@@dodolijstelement c}{\let\dosomelijstelement\dodofixdlijstelementABC} +\setvalue{\@@dodolijstelement d}{\let\dosomelijstelement\dodofixdlijstelementD} +\setvalue{\@@dodolijstelement e}{\let\dosomelijstelement\dodofixdlijstelementE} +\setvalue{\@@dodolijstelement f}{\let\dosomelijstelement\dodofixdlijstelementF} +\setvalue{\@@dodolijstelement g}{\let\dosomelijstelement\dodofixdlijstelementG} -\setvalue{dodolijstelement\v!geen}% +\setvalue{\@@dodolijstelement\v!geen}% {\def\dosomelijstelement{\dodofreevlijstelement}} -\setvalue{dodolijstelement\v!vertikaal}% +\setvalue{\@@dodolijstelement\v!vertikaal}% {\def\dosomelijstelement{\dodofreevlijstelement}} -\setvalue{dodolijstelement\v!horizontaal}% +\setvalue{\@@dodolijstelement\v!horizontaal}% {\def\dosomelijstelement{\dodofreehlijstelement}} -\setvalue{dodolijstelement\v!commando}% +\setvalue{\@@dodolijstelement\v!commando}% {\let\dosomelijstelement\dodocommandlijstelement} % Here I learned something new: \leftskip can be changed @@ -336,7 +346,7 @@ \def\dolijstelement#1#2#3#4#5#6% pas op: wordt ook elders gedefinieerd {\doiftoclevelelse[#5] - {\getvalue{dodolijstelement\getvalue{\??li#1\c!variant}}% + {\getvalue{\@@dodolijstelement\getvalue{\??li#1\c!variant}}% %\showcomposition \let\@@iabreedte=\!!zeropoint % moet boolean worden \bgroup @@ -589,11 +599,12 @@ \def\strippedlistentry[#1::#2::#3]{#1::#2}% \def\linklisttoelement#1#2#3#4#5% % list location format page data - {\ifautocrossdocument - \gotodestination{}{}{#1::\strippedlistentry[#3]}{#4}{#5}% - \else + {%\ifautocrossdocument + % \gotodestination{}{}{#1::\strippedlistentry[#3]}{#4}{#5}% + %\else \gotonextinternal{#1}{#2}{#4}{#5}% - \fi} + %\fi} + } \def\schrijfnaarlijst[#1]#2#3% {\doifsomething{#1} diff --git a/tex/context/base/core-mat.tex b/tex/context/base/core-mat.tex index 1cc32fcb6..76f60ff41 100644 --- a/tex/context/base/core-mat.tex +++ b/tex/context/base/core-mat.tex @@ -44,7 +44,7 @@ %D and \type{sub}. \global\let\normalsuper=^ -\global\let\normalsub =_ +\global\let\normalsuber=_ \newcount\supersubmode @@ -53,16 +53,16 @@ \appendtoks \advance\supersubmode by 1 \to \everysupersub % \def\dodosuper#1{\normalsuper{\the\everysupersub#1}} -% \def\dodosub #1{\normalsub {\the\everysupersub#1}} +% \def\dodosuber#1{\normalsuber{\the\everysupersub#1}} % % \def\dosuper{\ifx\next\bgroup\expandafter\dodosuper\else\normalsuper\fi} -% \def\dosub {\ifx\next\bgroup\expandafter\dodosub \else\normalsub \fi} +% \def\dosuber{\ifx\next\bgroup\expandafter\dodosuber\else\normalsuber\fi} % -% \def\super {\futurelet\next\dosuper} -% \def\sub {\futurelet\next\dosub } +% \def\super{\futurelet\next\dosuper} +% \def\suber{\futurelet\next\dosuber} \def\super#1{\normalsuper{\the\everysupersub#1}} -\def\sub #1{\normalsub {\the\everysupersub#1}} +\def\suber#1{\normalsuber{\the\everysupersub#1}} %D \macros %D {enablesupersub} @@ -75,9 +75,9 @@ \catcode`\_=\@@active \gdef\enablesupersub% {\catcode`\^=\@@active - \def^{\ifmmode\expandafter\super\else\expandafter\donormalsuper\fi}% + \def^{\ifmmode\expandafter\super\else\expandafter\normalsuper\fi}% \catcode`\_=\@@active - \def_{\ifmmode\expandafter\sub \else\expandafter\donormalsub \fi}} + \def_{\ifmmode\expandafter\suber\else\expandafter\normalsuber\fi}} \egroup %D \macro diff --git a/tex/context/base/core-mps.tex b/tex/context/base/core-mps.tex deleted file mode 100644 index 724402983..000000000 --- a/tex/context/base/core-mps.tex +++ /dev/null @@ -1,143 +0,0 @@ -%D \module -%D [ file=core-mps, -%D version=1999.07.10, -%D title=\CONTEXT\ Core Macros, -%D subtitle=\METAPOST\ Connectivity, -%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. - -\writestatus{loading}{Context Core Macros / MetaPost Connectivity} - -\unprotect - -%D Let's first preload a few auxiliary \METAPOST\ files. - -\appendtoks - input mp-tool ; - input mp-spec ; - _inline_shading_ := true ; -\to \MPinitializations - -%D We save the number of graphics for the sake of \TEXEXEC. - -\newcounter\totalnumberofMPgraphics -\def\thecurrentMPgraphic{\the\currentMPgraphic} - -\appendtoks - \savecurrentvalue\totalnumberofMPgraphics\thecurrentMPgraphic -\to \everybye - -%D The next few macros tell \METAPOST\ how the \CONTEXT\ -%D pagebody looks. - -\def\writeMPpagedata% - {\bgroup - \def\writeMPpagedata ##1 ##2% - {\scratchdimen=##2% - \immediate\write\scratchwrite{##1 := \the\scratchdimen;}}% - \immediate\openout\scratchwrite=\TEXbufferfile{mp-state}\relax - \writeMPpagedata PaperHeight \papierhoogte - \writeMPpagedata PaperWidth \papierbreedte - \writeMPpagedata PrintPaperHeight \printpapierhoogte - \writeMPpagedata PrintPaperWidth \printpapierbreedte - \writeMPpagedata TopSpace \kopwit - \writeMPpagedata BackSpace \rugwit - \writeMPpagedata MakeupHeight \zethoogte - \writeMPpagedata MakeupWidth \zetbreedte - \writeMPpagedata TopHeight \bovenhoogte - \writeMPpagedata TopDistance \bovenafstand - \writeMPpagedata HeaderHeight \hoofdhoogte - \writeMPpagedata HeaderDistance \hoofdafstand - \writeMPpagedata TextHeight \teksthoogte - \writeMPpagedata FooterDistance \voetafstand - \writeMPpagedata FooterHeight \voethoogte - \writeMPpagedata BottomDistance \onderafstand - \writeMPpagedata BottomHeight \onderhoogte - \writeMPpagedata LeftEdgeWidth \linkerrandbreedte - \writeMPpagedata LeftEdgeDistance \linkerrandafstand - \writeMPpagedata LeftMarginWidth \linkermargebreedte - \writeMPpagedata LeftMarginDistance \linkermargeafstand - \writeMPpagedata TextWidth \tekstbreedte - \writeMPpagedata RightMarginDistance \rechtermargeafstand - \writeMPpagedata RightMarginWidth \rechtermargebreedte - \writeMPpagedata RightEdgeDistance \rechterrandafstand - \writeMPpagedata RightEdgeWidth \rechterrandbreedte - \doifelsevalue{\??ma\v!pagina\c!offset}{\v!overlay} - {\writeMPpagedata PageOffset {0pt}} - {\writeMPpagedata PageOffset {\getvalue{\??ma\v!pagina\c!offset}}}% - \writeMPpagedata PageDepth {\getvalue{\??ma\v!pagina\c!diepte}}% - \immediate\closeout\scratchwrite - \egroup} - -\prependtoks \flushMPpagedata \to \everyMPgraphic - -\let\flushMPpagedata\relax - -\def\setMPpagedata% - {\gdef\flushMPpagedata{\writeMPpagedata\global\let\flushMPpagedata\relax}} - -%D We have to make sure that the right page data is loaded, -%D especially when we run multiple jobs on one path. - -\prependtoks \prepareMPpagedata \to \everyMPgraphic - -\def\prepareMPpagedata% - {\appendtoks - input mp-page ; - def LoadPageState = - scantokens "input \TEXbufferfile{mp-state}" ; - enddef ; - \to \MPinitializations - \let\prepareMPpagedata\relax} - -%D \macros -%D {startuniqueMPgraphic, uniqueMPgraphic} -%D -%D This macros is probably of most use to myself, since I like -%D to use graphics that adapt themselves. The next \METAPOST\ -%D kind of graphic is both unique and reused when possible. -%D -%D \starttypen -%D \defineoverlay[example][\uniqueMPgraphic{test}] -%D -%D \startuniqueMPgraphic {test} -%D draw unitsquare xscaled \overlaywidth yscaled \overlayheight ; -%D \stopuniqueMPgraphic -%D \stoptypen - -\long\def\startuniqueMPgraphic#1#2\stopuniqueMPgraphic% - {\setvalue{MP:#1}% - {\startreusableMPgraphic{\overlaystamp:#1}#2\stopreusableMPgraphic - \reuseMPgraphic{\overlaystamp:#1}}} - -\def\uniqueMPgraphic#1% - {\getvalue{MP:#1}} - -\def\overlaystamp% - {\overlaywidth:\overlayheight:\overlaydepth:\overlaycolor} - -%D We redefine a macro from \type {supp-mps.tex}: - -\def\MPdatafile% - {\bufferprefix mpd-\the\currentMPgraphic.tmp} - -%D We also have to make sure that \METAPOST\ knows this: - -\appendtoks - if not known _data_prefix_ : - string _data_prefix_ , _data_suffix_ ; - fi ; - _data_prefix_ := "\bufferprefix mpd-" ; - _data_suffix_ := ".tmp" ; -\to \MPinitializations - -%D Happy drawing. - -\protect - -\endinput diff --git a/tex/context/base/core-mul.tex b/tex/context/base/core-mul.tex index f358604e0..ec5578012 100644 --- a/tex/context/base/core-mul.tex +++ b/tex/context/base/core-mul.tex @@ -101,6 +101,40 @@ 13: siroky plovouci objekt je presunut nad sloupce \stopmessages +\startmessages italian library: columns + title: colonne + 1: solo -- colonne possibili + 2: in alternativa, usare \string\filbreak + 3: problemi, disabilitare il bilanciamento + 4: float in cima non ancora supportato + 5: float in fondo non ancora supportato + 6: -- float(s) posticipate + 7: bilanciamento annullato dopo 100 passi + 8: bilanciamento in -- passo/i + 9: controllare seghettamento + 10: (meno di) una riga rimasta + 11: oggetto mobile troppo ampio per la colonna + 12: oggetto mobile spostata alla colonna successiva / -- + 13: oggetto mobile ampio spostato sopra le colonne +\stopmessages + +\startmessages norwegian library: columns + title: kolonner + 1: maksimalt -- kolonner + 2: bruk \string\filbreak\space som et alternativ + 3: problemer, slår av balansering + 4: flytblokker øverst er ikke støttet enda + 5: flytblokker nedert er ikke støttet enda + 6: -- flytblokk forskjøvet + 7: balansering avbrutt etter 100 iterasjoner + 8: balansert etter -- iterasjoner + 9: kontroller tekstlayout! + 10: (mindre enn) 1 linje igjen + 11: flytblokk for bredt for kolonna + 12: flytblokk forskjøvet til neste kolonne / -- + 13: bred flytblokk forksjøvet til toppen av kolonnene +\stopmessages + %D This completely new implementation can handle enough %D situations for everyday documents, but is still far from %D perfect. While at the moment the routine doesn't support @@ -139,8 +173,8 @@ %D %D \interface \type{\nofcolumns} \\ %D the number of columns \\ -%D \interface \type{\minbalancetoplines} -%D the minimum number op balanced top lines +%D \interface \type{\minbalancetoplines} \\ +%D the minimum number op balanced top lines \\ %D \interface \type{\betweencolumns} \\ %D the stuff between columns \\ %D \interface \type{\finaloutput{action}{box}} \\ @@ -205,6 +239,8 @@ %D %D \interface \type{\finishcolumnbox} \\ %D do something special (a hook) \\ +%D \interface \type{\postprocesscolumnpagebox} \\ +%D do something with each columnbox (also a hook) \\ %D \interface \type{\postprocesscolumnbox} \\ %D do something with each columnbox (also a hook) \\ %D \interface \type{\postprocesscolumnline} \\ @@ -276,6 +312,20 @@ \newdimen\finalcolumnheights \newcount\finalcolumnlines +%D It's more convenient to use \type {\columnwidth} instead +%D of messing around with boxes each time. + +\newdimen\columnwidth +\newdimen\gutterwidth + +\def\determinecolumnwidth% + {\bgroup + \setbox\scratchbox=\hbox + {\setcolumnhsize + \global\columnwidth=\usercolumnwidth + \global\gutterwidth=\intercolumnwidth}% + \egroup} + %D During initialization the temporary boxes are allocated. %D This enables us to use as much columns as we want, without %D exhausting the pool of boxes too fast. We could have packed @@ -451,7 +501,7 @@ \ifdim\partialpageheight>\!!zeropoint \global\advance\vsize by -\partialpageheight \fi - \getinsertionheights\to\dimen0\\% + \getinsertionheights\to\dimen0\\% \global\advance\vsize by -\dimen0 \ifgridsnapping % evt altijd, nog testen \getnoflines\vsize @@ -546,7 +596,7 @@ %D reasoning to find out what happens and maybe I'm making %D some mistake, but it works. %D -%D Unvoiding box \type{\partialpage} is sometimes necessary, +%D Voiding box \type{\partialpage} is sometimes necessary, %D e.g. when there is no text given between \type{\begin..} %D and \type{\end..}. The \type{\par} is needed! @@ -554,9 +604,9 @@ {%\par \vskip\lineheight\vskip-\lineheight % take footnotes into account \dontshowcomposition -\doflushcolumnfloat % added recently - \doflushcolumnfloats % added recently - \flushfootnotes + \doflushcolumnfloat % added recently + %\doflushcolumnfloats % no, since it results in wrong top floats + \flushfootnotes % before start of columns \par \ifbalancecolumns \global\output={\continuousmulticolumnsout}% @@ -645,6 +695,8 @@ \let\maxcolumnheight=\!!zeropoint \let\maxcolumndepth =\!!zeropoint +\newbox\columnpagebox + \def\setmaxcolumndimensions% {\let\maxcolumnheight=\!!zeropoint \let\maxcolumndepth =\!!zeropoint @@ -656,6 +708,76 @@ \edef\maxcolumndepth{\the\dp\currentcolumnbox}% \fi}} +% \def\flushcolumnedpage% +% {\bgroup +% \forgetall +% \setmulticolumnsout +% \showcomposition +% \setmaxcolumndimensions +% \postprocesscolumns +% \dohandleallcolumns % \hbox i.v.m. \showcomposition +% {\global\setbox\currentcolumnbox=\hbox to \localcolumnwidth +% {\box\currentcolumnbox +% \global\wd\currentcolumnbox=\localcolumnwidth +% \ifheightencolumns +% \global\ht\currentcolumnbox=\fixedcolumnheight +% \fi}}% +% \setmaxcolumndimensions +% \overlaycolumnfootnotes +% \setbox0=\vbox +% {\hbox to \finalcolumntextwidth +% {\ifreversecolumns +% \@EA\dohandlerevcolumns +% \else +% \@EA\dohandleallcolumns +% \fi +% {\finishcolumnbox{\hbox +% {\ifx\finishcolumnbox\relax\else\strut\fi +% \box\currentcolumnbox}}% +% \hfil}% +% \unskip}}% +% \scratchdimen=\!!zeropoint +% \dohandleallcolumns +% {\ifdim-\ht\currenttopcolumnbox<\scratchdimen +% \scratchdimen=-\ht\currenttopcolumnbox +% \fi +% \global\setbox\currenttopcolumnbox=\box\voidb@x}% +% \advance\scratchdimen by \ht0 +% \setbox2=\hbox to \columntextwidth +% {\vrule\!!width\!!zeropoint\!!height\scratchdimen\!!depth\dp0 +% \dostepwiserecurse{2}{\nofcolumns}{1}{\hfil\betweencolumns}\hfil}% +% \setbox0=\hbox +% {\box0\hskip-\columntextwidth\color[black]{\box2}}% +% \ifvoid\partialpage \else +% \ifgridsnapping % do you believe this junk? +% \scratchdimen=\savedpagetotal +% \advance\scratchdimen by -\ht\partialpage +% \advance\scratchdimen by -\dp\partialpage +% \advance\scratchdimen by -\topskip +% \box\partialpage +% \kern\scratchdimen +% \else +% \unvbox\partialpage +% \fi +% \fi +% \global\partialpageheight=\!!zeropoint +% \setvsize +% \dosomebreak\nobreak +% \ifgridsnapping \else +% \dimen0=\topskip +% \advance\dimen0 by -\openstrutheight +% \nointerlineskip +% \vskip-\dimen0 +% \fi +% \prevdepth\openstrutdepth +% \nointerlineskip +% \dp0=\!!zeropoint +% \global\finalcolumnheights=\ht0 +% \getnoflines\finalcolumnheights +% \global\finalcolumnlines=\noflines +% \box0 +% \egroup} + \def\flushcolumnedpage% {\bgroup \forgetall @@ -672,7 +794,7 @@ \fi}}% \setmaxcolumndimensions \overlaycolumnfootnotes - \setbox0=\vbox + \setbox\columnpagebox=\vbox {\hbox to \finalcolumntextwidth {\ifreversecolumns \@EA\dohandlerevcolumns @@ -690,12 +812,18 @@ \scratchdimen=-\ht\currenttopcolumnbox \fi \global\setbox\currenttopcolumnbox=\box\voidb@x}% - \advance\scratchdimen by \ht0 - \setbox2=\hbox to \columntextwidth - {\vrule\!!width\!!zeropoint\!!height\scratchdimen\!!depth\dp0 + \advance\scratchdimen by \ht\columnpagebox + \setbox\scratchbox=\hbox to \columntextwidth + {\vrule + \!!width\!!zeropoint + \!!height\scratchdimen + \!!depth\dp\columnpagebox \dostepwiserecurse{2}{\nofcolumns}{1}{\hfil\betweencolumns}\hfil}% - \setbox0=\hbox - {\box0\hskip-\columntextwidth\color[black]{\box2}}% + \setbox\columnpagebox=\hbox + {\box\columnpagebox + \hskip-\columntextwidth + \color[black]{\box\scratchbox}}% + \postprocesscolumnpagebox % new, acts upon \box\columnpagebox \ifvoid\partialpage \else \ifgridsnapping % do you believe this junk? \scratchdimen=\savedpagetotal @@ -712,18 +840,18 @@ \setvsize \dosomebreak\nobreak \ifgridsnapping \else - \dimen0=\topskip - \advance\dimen0 by -\openstrutheight + \scratchdimen=\topskip + \advance\scratchdimen by -\openstrutheight \nointerlineskip - \vskip-\dimen0 + \vskip-\scratchdimen \fi \prevdepth\openstrutdepth \nointerlineskip - \dp0=\!!zeropoint - \global\finalcolumnheights=\ht0 + \dp\columnpagebox=\!!zeropoint + \global\finalcolumnheights=\ht\columnpagebox \getnoflines\finalcolumnheights \global\finalcolumnlines=\noflines - \box0 + \box\columnpagebox \egroup} %D In case one didn't notice, finaly \type{\finishcolumnbox} is @@ -803,8 +931,9 @@ %D We default to doing nothing! -\let\postprocesscolumnline=\undefined -\let\postprocesscolumnbox =\undefined +\let\postprocesscolumnline =\undefined +\let\postprocesscolumnbox =\undefined +\let\postprocesscolumnpagebox=\relax %D \macros %D {reversecolumnstrue} @@ -1344,17 +1473,19 @@ \fi} \def\docolumnroomfloat% - {\ifnofloatpermitted + {\ifpostponecolumnfloats + \global\roomforfloatfalse + \else\ifnofloatpermitted \global\roomforfloatfalse \else \bgroup \getcolumnstatus\column\count255\total\dimen0\goal\dimen2\\% \advance\dimen0 by 2\openlineheight % nog nodig ? -%\ifnum\count255=\nofcolumns -% \getinsertionheight -% %\message{\insertionheight}\wait -% \advance\dimen0 by \insertionheight -%\fi + %\ifnum\count255=\nofcolumns + % \getinsertionheight + % %\message{\insertionheight}\wait + % \advance\dimen0 by \insertionheight + %\fi \setbox\scratchbox=\vbox % tricky met objecten ? {\blanko[\@@bkvoorwit] \snaptogrid\vbox{\copy\floatbox}}% @@ -1371,7 +1502,7 @@ \global\roomforfloatfalse \fi \egroup - \fi} + \fi\fi} %D Flushing one float is done as soon as possible, i.e. %D \type{\everypar}. This means that (at the moment) @@ -1380,7 +1511,7 @@ \newif\ifflushingcolumnfloats \flushingcolumnfloatstrue \def\doflushcolumnfloat% - {\ifflushingcolumnfloats\ifprocessingverbatim\else\ifsomefloatwaiting + {\ifpostponecolumnfloats\else\ifflushingcolumnfloats\ifprocessingverbatim\else\ifsomefloatwaiting \bgroup \forgetall \let\doflushcolumnfloat=\relax @@ -1390,10 +1521,10 @@ \ifdim\wd\floatbox>\hsize \doresavefloat \else -% \setbox2=\vbox -% {\blanko[\@@bkvoorwit] -% \snaptogrid\vbox{\copy\floatbox}% -% \blanko[\@@bknawit] + %\setbox2=\vbox + % {\blanko[\@@bkvoorwit] + % \snaptogrid\vbox{\copy\floatbox}% + % \blanko[\@@bknawit] \setbox2=\vbox {\blanko[\@@bkvoorwit] \snaptogrid\vbox{\copy\floatbox}}% @@ -1426,9 +1557,9 @@ \par \ifdim\prevdepth<\!!zeropoint\relax % anders bovenaan kolom witruimte \else -\nobreak + \nobreak \blanko[\@@bkvoorwit] -\nobreak + \nobreak \fi \flushfloatbox \blanko[\@@bknawit] @@ -1436,7 +1567,7 @@ \fi \fi \egroup - \fi\fi\fi} + \fi\fi\fi\fi} %D This one looks complicated. Upto \type{\nofcolumns} floats %D are placed, taking the width of a float into account. This @@ -1453,76 +1584,81 @@ %D because of lining out the columns. \def\doflushcolumnfloats% - {\bgroup - \forgetall - \ifsomefloatwaiting - \dimen8=\!!zeropoint - \dimen4=\!!zeropoint - \count0=0 % count0 can be used local - \count2=\nofcolumns % count2 can be used local - \dohandleallcolumns - {\ifnum\count0>0\relax % the wide one's reserved space - \global\setbox\currenttopcolumnbox=\vbox - {\snaptogrid\vbox - {\copy\currenttopcolumnbox - \hbox{\vphantom{\copy\floatbox}}} - \witruimte % nodig ? - \blanko[\@@bknawit]}% - \else - \dogetfloat - \ifdim\wd\floatbox>\hsize - \dimen0=\wd\floatbox - \advance\dimen0 by \intercolumnwidth - \dimen2=\hsize - \advance\dimen2 by \intercolumnwidth -\advance\dimen0 by .5pt -\advance\dimen2 by .5pt - \divide\dimen0 by \dimen2 - \count0=\dimen0 - \advance\count0 by 1 - \ifnum\count0>\count2 - \doresavefloat - \count0=0 - \else - \dimen0=\count0\hsize - \advance\dimen0 by \count0\intercolumnwidth - \advance\dimen0 by -\intercolumnwidth - \global\setbox\floatbox=\hbox to \dimen0 - %{\hss\hbox{\copy\floatbox}\hss}% - {\processaction[\@@bkplaats] % how easy to forget - [ \v!links=>\copy\floatbox\hss, - \v!rechts=>\hss\copy\floatbox, - \s!default=>\hss\copy\floatbox\hss, - \s!unknown=>\hss\copy\floatbox\hss]}% - \fi - \showmessage{\m!columns}{13}{}% - \else - % \showmessage{\m!columns}{13}{}% - \fi - \ifdim\ht\floatbox>\!!zeropoint\relax + {\ifpostponecolumnfloats\else + \bgroup + \forgetall + \ifsomefloatwaiting + \dimen8=\!!zeropoint + \dimen4=\!!zeropoint + \count0=0 % count0 can be used local + \count2=\nofcolumns % count2 can be used local + \dohandleallcolumns + {\ifnum\count0>0\relax % the wide one's reserved space \global\setbox\currenttopcolumnbox=\vbox {\snaptogrid\vbox {\copy\currenttopcolumnbox - \copy\floatbox} - \witruimte % nodig ? - \blanko[\@@bknawit]}% + \hbox{\vphantom{\copy\floatbox}}} + \witruimte % nodig ? + \blanko[\@@bknawit]}% + \else + \dogetfloat +\ifdim\wd\floatbox>\finalcolumntextwidth % better somewhere else too + \global\setbox\floatbox=\hbox to \finalcolumntextwidth{\hss\box\floatbox\hss}% +\fi % otherwise the graphic may disappear + \ifdim\wd\floatbox>\hsize + \dimen0=\wd\floatbox + \advance\dimen0 by \intercolumnwidth + \dimen2=\hsize + \advance\dimen2 by \intercolumnwidth + \advance\dimen0 by .5pt % hm, why 1 + \advance\dimen2 by .5pt % hm, why 2 + \divide\dimen0 by \dimen2 + \count0=\dimen0 + \advance\count0 by 1 + \ifnum\count0>\count2 + \doresavefloat + \count0=0 + \else + \dimen0=\count0\hsize + \advance\dimen0 by \count0\intercolumnwidth + \advance\dimen0 by -\intercolumnwidth + \global\setbox\floatbox=\hbox to \dimen0 + %{\hss\hbox{\copy\floatbox}\hss}% + {\processaction[\@@bkplaats] % how easy to forget + [ \v!links=>\copy\floatbox\hss, + \v!rechts=>\hss\copy\floatbox, + \s!default=>\hss\copy\floatbox\hss, + \s!unknown=>\hss\copy\floatbox\hss]}% + \fi + \showmessage{\m!columns}{13}{}% + \else + % \showmessage{\m!columns}{13}{}% + \fi + \ifdim\ht\floatbox>\!!zeropoint\relax + \global\setbox\currenttopcolumnbox=\vbox + {\snaptogrid\vbox + {\copy\currenttopcolumnbox + \copy\floatbox} + \witruimte % nodig ? + \blanko[\@@bknawit]}% + \fi + \dimen6=\ht\currenttopcolumnbox + \advance\dimen6 by \dp\currenttopcolumnbox \fi - \dimen6=\ht\currenttopcolumnbox - \advance\dimen6 by \dp\currenttopcolumnbox - \fi - \ifdim\dimen4<\ht\currenttopcolumnbox - \dimen4=\ht\currenttopcolumnbox - \fi - \advance\dimen8 by \dimen6 - \advance\count2 by -1 - \advance\count0 by -1 }% - \setvsize - \global\advance\vsize by -\dimen8 - \global\pagegoal=\vsize - \else - %\doflushfloats % does not snap! - \fi - \egroup} + \ifdim\dimen4<\ht\currenttopcolumnbox + \dimen4=\ht\currenttopcolumnbox + \fi + \advance\dimen8 by \dimen6 + \advance\count2 by -1 + \advance\count0 by -1 }% + \setvsize + \global\advance\vsize by -\dimen8 + \global\pagegoal=\vsize + \else + %\doflushfloats % does not snap! + \fi + \egroup + \fi} %D This were the multi||column routines. They can and need to %D be improved but at the moment their behaviour is acceptable. @@ -1534,9 +1670,7 @@ %D \normalizevbox{...} %D \stoptypen -\protect - -\endinput +\protect \endinput % border case, should fit on one page % diff --git a/tex/context/base/core-nav.tex b/tex/context/base/core-nav.tex index acbbeec47..5bb611bf6 100644 --- a/tex/context/base/core-nav.tex +++ b/tex/context/base/core-nav.tex @@ -74,6 +74,9 @@ \doifelse{\@@iaklik}{\v!ja} {\highlighthyperlinkstrue} {\highlighthyperlinksfalse}% + \doifelse{\@@iasplitsen}{\v!ja} + {\locationsplittrue} + {\locationsplitfalse}% \doifelse{\@@iascherm}{\v!nieuw} {\gotonewwindowtrue} {\gotonewwindowfalse}% @@ -125,6 +128,7 @@ %D This macro stores the current strut values. \newif\iflocationstrut +\newif\iflocationsplit \def\resetgoto% {\global\let\@@ia@@hoogte=\!!zeropoint @@ -319,7 +323,8 @@ \c!klik=\v!ja, \c!scherm=, %\c!openactie={\v!eerstepagina,AtOpenInitializeForm}, - \c!openactie={\v!eerstepagina,\v!ResetForm}, + %\c!openactie={\v!eerstepagina,\v!ResetForm}, + \c!openactie=\v!ResetForm, \c!sluitactie=, \c!openpaginaactie=, \c!sluitpaginaactie=, @@ -328,6 +333,7 @@ \c!letter=\v!vet, \c!bereken=, \c!strut=\v!ja, + \c!splitsen=\v!ja, \c!kleur=interactioncolor, \c!contrastkleur=interactioncontrastcolor, \c!symboolset=, diff --git a/tex/context/base/core-new.tex b/tex/context/base/core-new.tex index 610d89aae..3119af447 100644 --- a/tex/context/base/core-new.tex +++ b/tex/context/base/core-new.tex @@ -48,8 +48,23 @@ % % this one fails in removing system modes +% \def\enablemode[#1]% +% {\expanded{\addtocommalist{#1}\noexpand\currentmode}} + +%D Sometimes, we want to prevent a mode for being set. Think +%D of situations where a style enables a mode, but an outer +%D level style does not want that. Preventing can be +%D considered a permanent disabling on forehand. + +\let\preventedmodes\empty + +\def\preventmode[#1]% + {\expanded{\addtocommalist{#1}\noexpand\preventedmodes}} + \def\enablemode[#1]% - {\expanded{\addtocommalist{#1}\noexpand\currentmode}} + {\expanded + {\doifnotinset{#1}{\preventedmodes} + {\noexpand\addtocommalist{#1}\noexpand\currentmode}}} \def\disablemode[#1]% {\expanded{\removefromcommalist{#1}\noexpand\currentmode}} diff --git a/tex/context/base/core-not.tex b/tex/context/base/core-not.tex index 7b88a254b..89b411f7f 100644 --- a/tex/context/base/core-not.tex +++ b/tex/context/base/core-not.tex @@ -98,10 +98,12 @@ {\dosingleempty\dosetupfootnotes} \def\dodofootnoterule% - {\color - [\@@vnlijnkleur] - {\hrule\!!width.2\hsize\!!height\@@vnlijndikte\!!depth\!!zeropoint} - \kern\strutdepth} + {\ifvmode + \color + [\@@vnlijnkleur] + {\hrule\!!width.2\hsize\!!height\@@vnlijndikte\!!depth\!!zeropoint} + \kern\strutdepth + \fi} \def\dosetupfootnotes[#1]% {\getparameters[\??vn][#1]% @@ -150,6 +152,12 @@ \dimen\footins=\@@vnhoogte \multiply\dimen\footins by \scratchcounter} +\ifx\setfootnotehsize\undefined + + \def\setfootnotehsize{\hsize=\@@vnbreedte} % can be overloaded + +\fi + \def\setcleverfootnotes% {\def\startpushfootnote {\bgroup % wellicht ooit kopuitlijnen \stelinmargein[\c!uitlijnen=\v!links]% @@ -160,7 +168,8 @@ \def\stoppopfootnotes {}} \def\setcolumnfootnotes% - {\def\startpushfootnote {\setrigidcolumnhsize\@@vnbreedte\@@vnkolomafstand\@@vnn + {\def\startpushfootnote {\setfootnotehsize % possibly overloaded + \setrigidcolumnhsize\hsize\@@vnkolomafstand\@@vnn \bgroup \stelinmargein[\c!uitlijnen=\v!links]% \getvalue{\e!start\??vn\??vn}}% @@ -177,7 +186,7 @@ \stopvboxtohbox}% \def\startpopfootnotes {\vbox\bgroup % \doifdimenelse \doifnotinset{\@@vnbreedte}{\v!passend,\v!ruim} - {\hsize=\@@vnbreedte}}% + {\setfootnotehsize}}% \def\stoppopfootnotes {\convertvboxtohbox\egroup}} %D The numbers that accompany a footnote are generated using @@ -348,6 +357,8 @@ \def\dostartfootnote% nog gobble als in pagebody {\bgroup + %\restorecatcodes % to be tested first + \ignorelines % makes footnotes work in \startlines ... \stoplines \unskip\unskip \ifdim\lastkern=\footnotesignal \high{\kern\@@vnafstand}% gets the font right, hack ! @@ -374,7 +385,8 @@ \def\linkermargeafstand{\@@vnmargeafstand}% \def\rechtermargeafstand{\@@vnmargeafstand}% \ifcase\@@vnn\relax % new 31-07-99 ; always ? - \doifnotinset{\@@vnbreedte}{\v!passend,\v!ruim}{\hsize\@@vnbreedte}% + \doifnotinset{\@@vnbreedte}{\v!passend,\v!ruim} + {\setfootnotehsize}% \fi \startpushfootnote {\ifx\footnotenumber\empty \else @@ -430,32 +442,6 @@ \let\startpopfootnotes = \relax \let\stoppopfootnotes = \relax -% \def\placefootnoteinserts% -% {%\ifvoid\footins \else % unsafe, strange -% \ifdim\ht\footins>\!!zeropoint\relax -% \ifendnotes \else -% \@@vnvoor -% \dofootnoterule % alleen in ..mode -% \bgroup -% \setfootnotebodyfont -% \localframed -% [\??vn] -% [\c!breedte=\v!passend, -% \c!hoogte=\v!passend, -% \c!strut=\v!nee, -% \c!offset=\v!overlay] -% {\startpopfootnotes % == \vbox -% \ifdim\dp\footins=\!!zeropoint % this hack is needed because \vadjust -% \hbox{\lower\dp\strutbox\box\footins}% % in margin number placement -% \else % hides the (always) present depth -% \box\footins -% \fi -% \stoppopfootnotes}% -% \egroup -% \@@vnna -% \fi -% \fi} - \def\placefootnoteinserts% {%\ifvoid\footins \else % unsafe, strange \ifdim\ht\footins>\!!zeropoint\relax @@ -516,7 +502,8 @@ \newbox\postponedfootnotes \def\autopostponefootnotes% - {\gdef\localfootinsert% +% {\gdef\localfootinsert% + {\def\localfootinsert% {\ifinner %\message{[postponed footnote]}% \global\setbox\postponedfootnotes=\vbox\bgroup @@ -531,7 +518,8 @@ \def\postponefootnotes% {\let\autopostponefootnotes=\postponefootnotes \let\postponefootnotes\relax % prevent loops - \gdef\localfootinsert% +% \gdef\localfootinsert% + \def\localfootinsert% {%\message{[postponed footnote]}% \global\setbox\postponedfootnotes=\vbox\bgroup \unvbox\postponedfootnotes @@ -540,7 +528,8 @@ \def\doflushfootnotes% also called directly, \ifvoid is needed ! {\ifendnotes \else \ifvoid\postponedfootnotes - \global\let\localfootinsert=\insert +% \global\let\localfootinsert=\insert + \let\localfootinsert=\insert \else \bgroup \ifdim\ht\postponedfootnotes>\!!zeropoint @@ -551,7 +540,8 @@ \fi \fi \egroup - \global\let\localfootinsert=\insert +% \global\let\localfootinsert=\insert + \let\localfootinsert=\insert \insert\footins\bgroup\unvbox\postponedfootnotes\egroup \fi \fi} diff --git a/tex/context/base/core-ntb.tex b/tex/context/base/core-ntb.tex new file mode 100644 index 000000000..7a3119c17 --- /dev/null +++ b/tex/context/base/core-ntb.tex @@ -0,0 +1,921 @@ +%D \module +%D [ file=core-tbl, +%D version=2000.04.18, +%D title=\CONTEXT\ Core Macros, +%D subtitle=Natural Tables, +%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. + +%D This is an unfinished, preliminary module. At least two +%D runs are needed to get the table fixed. + +\writestatus{loading}{Context Core Macros / Natural Tables} + +%D As always, this is the nth version. Much time went in +%D trying to speed up the many cell calculations, some +%D optimizations were rejected in order not to complicate this +%D module too much (and in order to prevail extensibility). + +%D To Do: +%D +%D \starttypen +%D break over pagina +%D kop herhalen +%D reset settings +%D +%D \setupTABLE [c|column|x] [nx|odd|even|first|last][a=b] +%D \setupTABLE [r|row |y] [nx|odd|even|first|last][a=b] +%D \setupTABLE [nx|odd|even|first|last][ny|odd|even|first|last][a=b] +%D \setupTABLE [nx|odd|even|first|last] [a=b] +%D \setupTABLE [a=b] +%D +%D \bTH \eTH +%D \stoptypen + +\unprotect + +%D A simple way to force equal line spacing is to say: +%D +%D \starttypen +%D \def\bTBLCELL{\begstrut} +%D \def\eTBLCELL{\endstrut} +%D \stoptypen + +%D However, the next alternative also takes care of preceding +%D and following white space. + +\def\bTBLCELL% + {\inhibitblank\doconvertfont\tbltblletter\empty\everypar{\begstrut}} + +\def\eTBLCELL% + {\ifhmode + \endstrut + \else + \par + \ifdim\prevdepth<\!!zeropoint % =-1000pt ? + \vskip-\dp\strutbox + \else + \removebottomthings + \fi + \fi} + +\newcounter\currenttbl + +%\def\@@tbl{tbl} \def\tblcell{m} \def\tblnone{n} +\def\@@tbl{tbl} \def\tblcell{1} \def\tblnone{2} + +\def\@@tblprefix{tbl:} + +%D This should be done more efficient: + +\def\settbltag#1#2#3{\setevalue{\@@tblprefix#1:#2:s}{#3}} % \number#3 +\def\settblcol#1#2#3{\setevalue{\@@tblprefix#1:#2:c}{#3}} +\def\settblrow#1#2#3{\setevalue{\@@tblprefix#1:#2:r}{#3}} + +\def\settblwd #1#2#3{\setxvalue{\@@tblprefix#1:#2:wd}{#3}} % global ! +\def\settblht #1#2#3{\setxvalue{\@@tblprefix#1:#2:ht}{#3}} % global ! + +\def\gettbltag#1#2{\getvalue{\@@tblprefix#1:#2:s}} +\def\gettblcol#1#2{\getvalue{\@@tblprefix#1:#2:c}} +\def\gettblrow#1#2{\getvalue{\@@tblprefix#1:#2:r}} + +\def\gettblwd #1#2{\getvalue{\@@tblprefix#1:#2:wd}} +\def\gettblht #1#2{\getvalue{\@@tblprefix#1:#2:ht}} + +\def\settblwid#1#2{\setxvalue{\@@tblprefix#1:w}{#2}} % global ! +\def\settblhei#1#2{\setxvalue{\@@tblprefix#1:h}{#2}} % global ! +\def\settblaut#1#2{\setxvalue{\@@tblprefix#1:a}{#2}} % global ! + +\def\gettblwid#1{\ifundefined{\@@tblprefix#1:w}\!!zeropoint\else\getvalue{\@@tblprefix#1:w}\fi} +\def\gettblhei#1{\ifundefined{\@@tblprefix#1:h}\!!zeropoint\else\getvalue{\@@tblprefix#1:h}\fi} +\def\gettblaut#1{\getvalue{\@@tblprefix#1:a}} + +\def\doiftbltag #1#2{\doifdefined {\@@tblprefix#1:#2:s}} +\def\doifnottbltag #1#2{\doifundefined {\@@tblprefix#1:#2:s}} +\def\doifelsetbltag#1#2{\doifdefinedelse{\@@tblprefix#1:#2:s}} +\def\doiftblrow #1#2{\doifdefined {\@@tblprefix#1:#2:r}} +\def\doiftblcol #1#2{\doifdefined {\@@tblprefix#1:#2:c}} +\def\doifnottblcol #1#2{\doifundefined {\@@tblprefix#1:#2:c}} + +\def\settbltxt#1#2{\long\setvalue{\@@tblprefix:#1:#2:t}} +\def\gettbltxt#1#2{\getvalue {\@@tblprefix:#1:#2:t}} + +%\def\doiftbl #1#2#3{\ifcase0\getvalue{\@@tblprefix#1:#2:s}\relax \else#3\fi} +%\def\doifnottbl #1#2#3{\ifcase0\getvalue{\@@tblprefix#1:#2:s}\relax #3\fi} +%\def\doifelsetbl#1#2#3#4{\ifcase0\getvalue{\@@tblprefix#1:#2:s}\relax#4\else#3\fi} +% +%\let\doiftbltag \doiftbl +%\let\doifnottbltag \doifnottbl +%\let\doifelsetbltag\doifelsetbl + +\newtoks\tbltoks + +\let\pushTBLparameters\relax +\let\popTBLparameters \relax + +\newif\ifautoTBLspread \autoTBLspreadfalse +\newif\ifautoTBLhsize \autoTBLhsizetrue +\newif\ifautoTBLrowspan \autoTBLrowspantrue +\newif\ifautoTBLemptycell \autoTBLemptycelltrue +\newif\ifappendTBLsetups \appendTBLsetupstrue + +\newif\iftraceTABLE \traceTABLEfalse + +\presetlocalframed[\@@tbl\@@tbl] + +\long\def\handleTBLcell#1#2[#3]{} + +\long\def\bTC#1\eTC{\bTD#1\eTD} +\long\def\bTX#1\eTX{\bTD#1\eTD} +\long\def\bTY#1\eTY{\bTR#1\eTR} + +\let\getTABLEparameters\getparameters + +\unexpanded\def\setupTABLE% + {\dotripleempty\dosetupTABLE} + +\def\dosetupTABLE[#1][#2][#3]% + {\ifthirdargument + \processaction + [#1] + [ \v!rij=>{\dosetupTABLExy[\c!y][#2][#3]}, + \v!kolom=>{\dosetupTABLExy[\c!x][#2][#3]}, + r=>{\dosetupTABLExy[\c!y][#2][#3]}, + c=>{\dosetupTABLExy[\c!x][#2][#3]}, + y=>{\dosetupTABLExy[\c!y][#2][#3]}, + x=>{\dosetupTABLExy[\c!x][#2][#3]}, + \s!unknown=>{\dosetupTABLEzz[#1][#2][#3]}]% + \else\ifsecondargument + \processaction + [#1] + [ \v!rij=>{\dosetupTABLExy[\c!y][\v!elk][#2]}, + \v!kolom=>{\dosetupTABLExy[\c!x][\v!elk][#2]}, + r=>{\dosetupTABLExy[\c!y][\v!elk][#2]}, + c=>{\dosetupTABLExy[\c!x][\v!elk][#2]}, + y=>{\dosetupTABLExy[\c!y][\v!elk][#2]}, + x=>{\dosetupTABLExy[\c!x][\v!elk][#2]}, + \s!unknown=>{\dosetupTABLEzz[\c!x][#1][#2]}]% + \else + \getparameters[\@@tbl\@@tbl][#1]% + \fi\fi} + +\def\dosetupTABLExy[#1][#2][#3]% + {\def\dodosetupTABLE##1% + {\setTABLEparameters[#1##1][#3]}% + \processcommalist[#2]\dodosetupTABLE} + +\def\dosetupTABLEzz[#1][#2][#3]% + {\def\dodosetupTABLE##1% + {\def\dododosetupTABLE####1% + {\setTABLEparameters[\c!x##1\c!y####1][#3]}% + \processcommalist[#2]\dododosetupTABLE}% + \processcommalist[#1]\dodosetupTABLE} + +\def\nopTABLEparameters[#1][#2]% + {\setvalue{\@@tblprefix#1}{}} + +\def\setTABLEparameters[#1][#2]% + {\pushTBLparameters + \ifappendTBLsetups + \doifdefinedelse{\@@tblprefix#1} + {\def\getTABLEparameters[##1][##2]% + {\setvalue{\@@tblprefix#1}{\getTABLEparameters[\@@tbl\@@tbl][##2,#2]}}% + \getvalue{\@@tblprefix#1}% + \let\getTABLEparameters\getparameters} + {\setvalue{\@@tblprefix#1}{\getTABLEparameters[\@@tbl\@@tbl][#2]}}% + \else + \setvalue{\@@tblprefix#1}{\getTABLEparameters[\@@tbl\@@tbl][#2]}% + \fi + \popTBLparameters} + +\def\v!oddeven#1{\ifodd#1\v!oneven\else\v!even\fi} + +\let\setupTBLsection\relax + +\def\setupTBLcell#1#2% cell over col over row + {\setupTBLsection % here ? + \getvalue{\@@tblprefix\c!y\v!elk}% + \getvalue{\@@tblprefix\c!x\v!elk}% + \getvalue{\@@tblprefix\c!y\v!oddeven{#1}}% + \getvalue{\@@tblprefix\c!x\v!oddeven{#2}}% + \getvalue{\@@tblprefix\c!x\v!oddeven{#2}\c!y\v!oddeven{#1}}% + \ifnum#1=1 \getvalue{\@@tblprefix\c!y\v!eerste }\fi + \ifnum#2=1 \getvalue{\@@tblprefix\c!x\v!eerste }\fi + \ifnum#1=\maximumrow\relax\getvalue{\@@tblprefix\c!y\v!laatste}\fi + \ifnum#2=\maximumcol\relax\getvalue{\@@tblprefix\c!x\v!laatste}\fi + \getvalue{\@@tblprefix\c!y#1}% + \getvalue{\@@tblprefix\c!x#2}% + \getvalue{\@@tblprefix\c!x#2\c!y#1}\relax} + +\long\def\parseTR[#1][#2]#3\eTR% [#2] is dummy that kills spaces + {\def\currentcol{0}\increment\maximumrow#3} + +% \long\def\parseTD[#1][#2]#3\eTD% [#2] is dummy that kills spaces +% {\getparameters[\@@tbl][\c!ny=\tblnr,\c!nx=\tblnc,nc=1,nr=1,#1]% +% \let\row\maximumrow +% \let\col\currentcol +% % goto first cell +% \doloop{\increment\col \doifnottbltag\row\col\exitloop}% +% % fill r*c cells and set span +% \let\currentcol\col +% \let\currentrow\row +% \dorecurse{\tblny} +% {\let\col\currentcol +% \settblcol\row\col\tblnx +% \ifnum\tblnx>\maximumrowspan\relax +% \let\maximumrowspan\tblnx +% \fi +% \dorecurse{\tblnx} +% {\settbltag\row\col\tblnone +% \increment\col}% +% \increment\row}% +% \decrement\row +% % set values +% \settbltag\maximumrow\currentcol\tblcell +% \settblcol\maximumrow\currentcol\tblnx +% \settblrow\maximumrow\currentcol\tblny +% % save text +% \edef\celltag{{\maximumrow}{\currentcol}}% +% \@EA\settbltxt\@EA\maximumrow\@EA\currentcol\@EA +% {\@EA\handleTBLcell\celltag[#1]{#3}}% +% % check max column +% \let\currentcol\col +% \decrement\currentcol +% \ifnum\currentcol>\maximumcol\let\maximumcol\currentcol\fi} + +\long\def\parseTD[#1][#2]#3\eTD% [#2] is dummy that kills spaces + {\getparameters[\@@tbl][\c!ny=\tblnr,\c!nx=\tblnc,nc=1,nr=1,#1]% + % goto first cell + \doloop + {\increment\currentcol + \doifnottbltag\maximumrow\currentcol\exitloop}% + % fill r*c cells and set span + \let\row\maximumrow + \let\col\currentcol + \dorecurse{\tblny} + {\let\col\currentcol + \settblcol\row\col\tblnx + \ifnum\tblnx>\maximumrowspan\relax + \let\maximumrowspan\tblnx + \fi + \dorecurse{\tblnx} + {\settbltag\row\col\tblnone + \increment\col}% + \increment\row}% + % check max column + \decrement\col + \ifnum\col>\maximumcol + \let\maximumcol\col + \fi + % set values + \settbltag\maximumrow\currentcol\tblcell + \settblcol\maximumrow\currentcol\tblnx + \settblrow\maximumrow\currentcol\tblny + % save text + \edef\celltag{{\maximumrow}{\currentcol}}% + \@EA\settbltxt\@EA\maximumrow\@EA\currentcol\@EA + {\@EA\handleTBLcell\celltag[#1]{#3}}} + +\long\def\parseTH[#1]#2\eTH% +% {\parseTD[#1,\c!letter=\v!vet,\c!karakteruitlijnen=\v!nee]#2\eTD} + {\parseTD[#1,\c!kleur=\tbltblkopkleur,\c!letter=\tbltblkopletter,\c!karakteruitlijnen=\v!nee]#2\eTD} + +\newtoks\TBLhead +\newtoks\TBLbody +\newtoks\TBLfoot + +% to be done: head <raw> foot, dus state var + +\long\def\bTABLEhead{\dosingleempty\doTABLEhead} +\long\def\bTABLEbody{\dosingleempty\doTABLEbody} +\long\def\bTABLEfoot{\dosingleempty\doTABLEfoot} + +\long\def\doTABLEhead[#1]#2\eTABLEhead% + {\appendtoks\doTABLEsection[#1]{#2}\to\TBLhead} + +\long\def\doTABLEbody[#1]#2\eTABLEbody% + {\appendtoks\doTABLEsection[#1]{#2}\to\TBLbody} + +\long\def\doTABLEfoot[#1]#2\eTABLEfoot% + {\appendtoks\doTABLEsection[#1]{#2}\to\TBLfoot} + +\long\def\doTABLEsection[#1]#2% + {\def\setupTBLsection{\getparameters[\@@tbl\@@tbl][#1]}% + #2% + \let\setupTBLsection\relax} + +\let\pushTBL\relax +\let\popTBL \relax + +\chardef\TBLpass=0 + +\def\bTABLE% + {\dosingleempty\dobTABLE} + +\def\dobTABLE[#1]% + {\pushTBL + \vbox\bgroup + \localcolortrue + \getparameters + [\@@tbl\@@tbl] + [\c!uitlijnen={\v!rechts,\v!ruim,\v!hoog},#1]% + \dontcomplain + \def\currentcol{0}% + \def\maximumrowspan{1}% + \let\maximumcol\currentcol + \let\maximumrow\currentcol + \def\bTR{\dodoubleempty\parseTR}% + \def\bTD{\dodoubleempty\parseTD}% + \def\bTH{\dodoubleempty\parseTH}% + \endgraf} + +\def\eTABLE% + {\the\TBLhead\the\TBLbody\the\TBLfoot\endgraf % tricky and dirty order -) + % finish cells + \dorecurse{\maximumrow} + {\let\row\recurselevel + \dorecurse{\maximumcol} + {\let\col\recurselevel \let\xxcol\col \let\xxrow\row + \doifnottbltag\row\col + {\let\xrow\row + \doloop + {\let\xcol\col + \doloop + {\doifelsetbltag\xrow\xcol + {\exitloop} + {\increment\xcol \relax + \ifnum\xcol>\maximumcol \exitloop \fi}}% + \doifelsetbltag\xrow\xcol + {\exitloop} + {\let\xxrow\xrow \let\xxcol\xcol \increment\xrow \relax + \ifnum\xrow>\maximumrow \exitloop \fi}}}% + \ifnum\xxrow>\maximumrow\let\xxrow\maximumrow\fi + \ifnum\xxcol>\maximumcol\let\xxcol\maximumcol\fi + \decrement(\xxrow,\row)\increment\xxrow + \decrement(\xxcol,\col)\increment\xxcol + \doifnottbltag\row\col + {\let\xrow\row + \dorecurse{\xxrow} + {\let\xcol\col \settblcol\xrow\xcol\xxcol + \dorecurse{\xxcol} + {\settbltag\xrow\xcol\tblnone \increment\xcol}% + \increment\xrow}% + \settbltag\row\col\tblcell + \settblcol\row\col\xxcol + \settblrow\row\col\xxrow + \ifautoTBLemptycell + \edef\celltag{{\row}{\col}}% + \@EA\settbltxt\@EA\row\@EA\col\@EA + {\@EA\handleTBLcell\celltag[]{\strut}}% + \fi}}}% + % to be sure + \dorecurse{\maximumrow} + {\let\row\recurselevel + \dorecurse{\maximumcol} + {\let\col\recurselevel + \doiftblrow\row\col + {\scratchcounter=\maximumrow + \advance\scratchcounter by -\row + \advance\scratchcounter by 1 + \ifnum\gettblrow\row\col>\scratchcounter + \settblrow\row\col{\the\scratchcounter}% + \fi}% + \settblht\row\col\!!zeropoint + \settblwd\row\col\!!zeropoint + \doifnottblcol\row\col{\settblcol\row\col0}% + \doifnottbltag\row\col{\settbltag\row\col\tblnone}}}% + % check and do + \begTBL + \dorecurse{\maximumrow} + {\bTBL + \let\row\recurselevel + \dorecurse{\maximumcol} + {\let\col\recurselevel + \expanded{\doTBL{\row}{\col}}}% + \eTBL}% + \endTBL + \egroup + \popTBL} + +\def\spanTBL#1#2% + {\scratchcounter=\gettblcol{#1}{#2}\relax + \ifnum\scratchcounter>0 + \advance\scratchcounter by -1 + \dorecurse{\scratchcounter}{\appendtoks\spantblcol\to\tbltoks}% + \dorecurse{\scratchcounter} + {\appendtoks + \skiptblcol + \to\tbltoks}% + \appendtoks + \nexttblcol + \to\tbltoks + \fi} + +\def\bTBL% + {\appendtoks + \begintblrow + \to\tbltoks} + +\def\eTBL% + {\appendtoks + \endtblrow + \to\tbltoks} + +% We use aligments to handle the empty (skipped) columns, so +% that we don't have to (re|)|calculate these. + +\def\skiptblcol% + {\doglobal\increment\colTBL} + +\def\nexttblcol% + {\doglobal\increment\colTBL&} + +\def\spantblcol% + {\span} + +\def\begintblrow% + {\noalign + {\doglobal\increment\rowTBL + \doglobal\newcounter\colTBL}% + \nexttblcol} + +\def\endtblrow% + {\crcr\noalign{\nointerlineskip}} + +\def\begintbl% + {\doglobal\newcounter\colTBL + \doglobal\newcounter\rowTBL + \doglobal\decrement\rowTBL + \tabskip\!!zeropoint + \halign\bgroup\ignorespaces##\unskip&&\ignorespaces##\unskip\cr} + +\def\endtbl% + {\egroup} + +\setvalue{\tblnone TBL}#1#2% + {\spanTBL{#1}{#2}} + +\setvalue{\tblcell TBL}#1#2% + {\appendtoks + \makeTBL{#1}{#2}% % append nog isoleren + \to\tbltoks + \spanTBL{#1}{#2}} + +\def\doTBL#1#2% + {\getvalue{\gettbltag{#1}{#2}TBL}{#1}{#2}} + +\def\begTBL% + {\doglobal\newcounter\rowTBL + \doglobal\newcounter\colTBL + \chardef\TBLpass=0 + \tbltoks\emptytoks + \appendtoks + \begintbl + \to\tbltoks} + +\def\endTBL% + {\appendtoks + \endtbl + \to\tbltoks + \setbox\scratchbox=\hbox + {\localframed + [\@@tbl\@@tbl] + [\c!kader=\v!uit,\c!achtergrond=,\c!uitlijnen=\v!nee] + {\strut}}% + \edef\minimalcellheight{\the\ht\scratchbox}% + \dorecurse{\maximumcol} + {\settblaut\recurselevel\!!zeropoint +% new +\let\xcol\recurselevel +\dorecurse{\maximumrow} + {\settblwd \recurselevel\xcol\!!zeropoint + \settblht \recurselevel\xcol\!!zeropoint}% +% till here + \settblwid\recurselevel\!!zeropoint}% + \dorecurse{\maximumrow} + {\settblhei\recurselevel\maxdimen}% + \chardef\TBLpass=1 + \let\handleTBLcell\dohandleTBLcellA + \def\makeTBL##1##2% + {\gettbltxt{##1}{##2}}% + \def\inTBLcell##1##2% + {\ExpandBothAfter\doifinsetelse{\localwidth}{\v!passend,\v!ruim} % user set + {} + {\scratchdimen=\gettblaut\colTBL\relax + \ifdim\localwidth>\scratchdimen + \settblaut\colTBL\localwidth + \fi}}% + \setbox0=\vbox{\the\tbltoks}% +%\ifautoTBLspread +%\else + \ifdim\wd0>\hsize + \ifautoTBLhsize + \checktblwidthsone % trial run + \checktblwidthstwo % real run + \let\handleTBLcell\dohandleTBLcellB + \setbox\scratchbox=\vbox{\the\tbltoks}% + \fi + \else\ifautoTBLrowspan\ifnum\maximumrowspan>1 % max ? + \let\handleTBLcell\dohandleTBLcellC + \setbox\scratchbox=\vbox{\the\tbltoks}% + \fi\fi\fi +%\fi + \let\handleTBLcell\dohandleTBLcellD + \chardef\TBLpass=2 + \def\makeTBL##1##2% meer in cellD + {\dimen2=\!!zeropoint + \pushmacro\colTBL + \dorecurse{\gettblcol{##1}{##2}} + {\advance\dimen2 by \gettblwid\colTBL + \increment\colTBL}% + \edef\widthTBL{\the\dimen2}% + \popmacro\colTBL + \setbox\scratchbox=\hbox{\gettbltxt{##1}{##2}}% + \settblht{##1}{##2}{\the\ht\scratchbox}% + \settblwd{##1}{##2}{\the\wd\scratchbox}% + \ifdim\ht\scratchbox>\gettblhei{##1}\relax + \settblhei{##1}{\the\ht\scratchbox}% + \fi}% + \setbox\scratchbox=\vbox{\the\tbltoks}% + \checktblheightsone + \checktblheightstwo + \let\handleTBLcell\dohandleTBLcellE + \chardef\TBLpass=3 + \def\makeTBL##1##2% + {% height + \pushmacro\rowTBL + \scratchdimen=\!!zeropoint + \def\rowTBL{##1}% + \ifnum\gettblcol{##1}{##2}=\maximumcol\relax + % case: nc=maxcolumns + \else + \dorecurse{\gettblrow{##1}{##2}} + {\advance\scratchdimen by \gettblhei\rowTBL + \increment\rowTBL}% + \ifdim\scratchdimen<\gettblht{##1}{##2}\relax + \scratchdimen=\gettblht{##1}{##2}\relax + \fi + \fi + \edef\heightTBL{\the\scratchdimen}% + \popmacro\rowTBL + % width + \pushmacro\colTBL + \scratchdimen=\!!zeropoint + \dorecurse{\gettblcol{##1}{##2}} + {\advance\scratchdimen by \gettblwid\colTBL + \increment\colTBL}% + \edef\widthTBL{\the\scratchdimen}% + \popmacro\colTBL + % cell + \setbox\scratchbox=\hbox{\gettbltxt{##1}{##2}}% + \ifnum\gettblcol{##1}{##2}=\maximumcol\relax + % case: nc=maxcolumns + \else + \scratchdimen=\gettblhei{##1}% + \setbox\scratchbox=\hbox + {\lower\ht\scratchbox\hbox{\raise\scratchdimen\box\scratchbox}}% + \ht\scratchbox=\scratchdimen + \fi + \dp\scratchbox=\!!zeropoint + \box\scratchbox}% + \iftraceTABLE\showtbltoks\fi + \vbox{\the\tbltoks}} + +\def\checktblwidthsone{\dochecktblwidths0} % 0 = trial run +\def\checktblwidthstwo{\dochecktblwidths1} % 1 = real run + +\def\dochecktblwidths#1% + {\iftraceTABLE\showtblwids{B#1}\fi + \!!dimena=\hsize + \!!counta=0 + \dorecurse{\maximumcol} + {\scratchdimen=\gettblaut\recurselevel\relax + \ifdim\scratchdimen>\!!zeropoint\relax + \advance\!!dimena by -\scratchdimen + \else + \scratchdimen=\gettblwid\recurselevel\relax + \ifdim\scratchdimen>\tbltblmaxbreedte\relax + \ifcase#1\else\settblwid\recurselevel\!!zeropoint\fi + \advance\!!counta by 1 + \else + \ifdim\scratchdimen>\!!zeropoint\relax + \advance\!!dimena by -\scratchdimen + \else + % eigenlijk moet dit alleen als de kolom wordt overspannen door een + % vorige, maw extra dubbele loop en status var + \advance\!!counta by 1 + \fi + \fi + \fi}% + \ifcase\!!counta \else \divide\!!dimena by \!!counta \fi + \dorecurse{\maximumcol} + {\scratchdimen=\gettblwid\recurselevel\relax + \ifcase#1 + \ifdim\scratchdimen<\!!dimena % take natural width + \settblaut\recurselevel{\the\scratchdimen}% + \fi + \else + \ifdim\scratchdimen=\!!zeropoint\relax % auto set width + \settblwid\recurselevel{\the\!!dimena}% + \fi + \fi}% + \iftraceTABLE\showtblwids{E#1}\fi} + +% \def\checktblwidthsXXX% +% {\!!dimena=\hsize +% \!!counta=0 +% \dorecurse{\maximumcol} +% {\scratchdimen=\gettblaut\recurselevel\relax +% \ifdim\scratchdimen>\!!zeropoint\relax +% \advance\!!dimena by -\scratchdimen +% \else +% \advance\!!counta by 1 +% \fi}% +% \ifcase\!!counta \else \divide\!!dimena by \!!counta \fi +% \dorecurse{\maximumcol} +% {\scratchdimen=\gettblaut\recurselevel\relax +% \ifdim\scratchdimen=\!!zeropoint\relax +% \settblaut\recurselevel{\the\!!dimena}% +% \fi +% \settblwid\recurselevel{\the\!!dimena}% +% }} + +\def\checktblheightsone% + {\dorecurse{\maximumrow} + {\let\xrowTBL\recurselevel + \dorecurse{\maximumcol} + {\let\xcolTBL\recurselevel + \count0=0\gettblrow\xrowTBL\xcolTBL\relax + % check row span + \ifnum\count0>1 + % current height in row + \dimen0=\gettblht\xrowTBL\xcolTBL + % find nearest height in row + \dimen2=\!!zeropoint + \dorecurse{\maximumcol} + {\ifnum\recurselevel=\xcolTBL\else + \count2=0\gettblrow\xrowTBL\recurselevel\relax + \ifnum\count2=1 + \dimen4=\gettblht\xrowTBL\recurselevel\relax + \ifdim\dimen2<\dimen4 + \dimen2=\dimen4 + \fi + \fi + \fi}% + \let\xxrowTBL\xrowTBL + % calculate cummulative height + \dimen4=\dimen2 + \dorecurse{\count0} + {\ifnum\xxrowTBL=\xrowTBL\else + \advance\dimen4 by \gettblhei\xxrowTBL + \fi + \increment\xxrowTBL}% + % distribute overshoot equally + \ifdim\dimen4<\dimen0 + \advance\dimen0 by -\dimen4 + \divide\dimen0 by \count0 + \let\xxrowTBL\xrowTBL + \settblhei\xrowTBL{\the\dimen2}% + \dorecurse{\count0} + {\dorecurse{\maximumcol} + {\ifnum\recurselevel=\xcolTBL\else + \scratchdimen=\gettblht\xxrowTBL\recurselevel + \advance\scratchdimen by \dimen0 + \settblht\xxrowTBL\recurselevel{\the\scratchdimen}% + \ifdim\gettblhei\xxrowTBL<\scratchdimen + \settblhei\xxrowTBL{\the\scratchdimen}% + \fi + \fi}% + \increment\xxrowTBL}% + \else\ifdim\dimen4>\dimen0 + \settblhei\xrowTBL{\the\dimen2}% + \fi\fi + \fi}}} + +\def\checktblheightstwo% + {} + +\def\showtblwids#1% + {\vbox + {\forgetall\tttf + [#1]\dorecurse{\maximumcol}{[\recurselevel:\gettblwid\recurselevel]}}} + +\def\showtbltoks% + {\vbox + {\forgetall\tttf + \let\begintbl \relax \let\endtbl \relax + \let\begintblrow\par \let\endtblrow \par + \def\nexttblcol {[next]}\def\spantblcol{[span]} + \def\makeTBL##1##2{[##1,##2]} + \the\tbltoks}} + +\def\TBLcharalign% + {\doifelse{\tbltblkarakteruitlijnen}{\v!ja} + {\let\next\doTBLcharalign} + {\let\next\gobbleoneargument}% + \next} + +\long\def\doTBLcharalign#1#2% column data + {\edef\alignmentclass{#1}% + \edef\alignmentcharacter{\tbltbluitlijnkarakter}% + \ifcase\TBLpass\or + \setfirstpasscharacteralign\checkalignment{\strut#2\unskip}% + \fi % force hsize, so always a second + \setsecondpasscharacteralign\checkalignment{\strut#2\unskip}% + \ignorespaces} + +\long\def\dohandleTBLcellA#1#2[#3]#4% + {\setbox\scratchbox=\hbox + {\setupTBLcell{#1}{#2}% + \localframed + [\@@tbl\@@tbl] + [#3,\c!achtergrond=,\c!kader=\v!uit]% 25% faster + {\bTBLCELL\TBLcharalign{#2}{#4}\eTBLCELL\inTBLcell{##1}{##2}}}% + \scratchdimen=\gettblwid\colTBL\relax + \ifdim\wd\scratchbox>\scratchdimen + \settblwid\colTBL{\the\wd\scratchbox}% auto set + \fi + \let\rowTBLx\rowTBL\increment\rowTBLx + \scratchdimen=\gettblhei\rowTBLx\relax + \ifdim\ht\scratchbox<\scratchdimen + \settblhei\rowTBLx{\the\ht\scratchbox}% auto set + \fi + \settblht{#1}{#2}{\the\ht\scratchbox}% + \settblwd{#1}{#2}{\the\wd\scratchbox}% + \ifdim\wd\scratchbox<.75\hsize + \ifdim\ht\scratchbox>2\openlineheight % honor width since this can be a + \scratchdimen=\gettblaut\colTBL\relax % figure or so + \ifdim\wd\scratchbox>\scratchdimen + \settblaut\colTBL{\the\wd\scratchbox}% + %\message{[forcing width of \colTBL\space(\the\wd\scratchbox/\the\hsize)]}% + \fi + \fi + \fi + \setbox2=\null + \wd2=\wd\scratchbox \ht2=\ht\scratchbox \dp2=\dp\scratchbox + \box2} + +\long\def\dohandleTBLcellBC#1#2#3[#4]#5% + {\setbox\scratchbox=\hbox + {\setupTBLcell{#2}{#3}% + \localframed + [\@@tbl\@@tbl] + [#4,#1,\c!kader=\v!uit,\c!achtergrond=] + {\bTBLCELL#5\eTBLCELL}}% + \setbox2=\null + \wd2=\wd\scratchbox \ht2=\ht\scratchbox \dp2=\dp\scratchbox + \ifautoTBLrowspan + \let\rowTBLx\rowTBL\increment\rowTBLx + \scratchdimen=\gettblhei\rowTBLx\relax + \ifnum\gettblrow\rowTBLx\colTBL>1 \ifdim\ht\scratchbox>\scratchdimen + \scratchdimen=-\scratchdimen \advance\scratchdimen by -\ht\scratchbox + \ht2=\scratchdimen + \fi \fi + \fi + \box2 } + +\long\def\dohandleTBLcellB#1#2[#3]#4% + {\scratchdimen=\gettblaut\colTBL\relax + \ifdim\scratchdimen>\!!zeropoint\relax + \let\tblwidthkey\c!breedte \edef\tblwidth{\the\scratchdimen}% + \else + \scratchdimen=\gettblwid\colTBL\relax + \ifdim\scratchdimen>\!!zeropoint\relax + \ifnum\gettblcol{#1}{#2}=\maximumcol\relax + \scratchdimen=\hsize + \fi + \let\tblwidthkey\c!breedte \edef\tblwidth{\the\scratchdimen}% + \else + \let\tblwidthkey\s!unknown \let \tblwidth \!!zeropoint + \fi + \fi + \dohandleTBLcellBC{\tblwidthkey=\tblwidth}{#1}{#2}[#3]{\TBLcharalign{#2}{#4}}} + +\long\def\dohandleTBLcellC% + {\dohandleTBLcellBC{}} + +\long\def\dohandleTBLcellD#1#2[#3]#4% + {\setupTBLcell{#1}{#2}% + \localframed + [\@@tbl\@@tbl] + [#3,\c!breedte=\widthTBL, + \c!achtergrond=,\c!kader=\v!uit]% 25% faster + {\bTBLCELL\TBLcharalign{#2}{#4}\eTBLCELL}} + +\long\def\dohandleTBLcellE#1#2[#3]#4% + {\setupTBLcell{#1}{#2}% + \getparameters[\@@tbl\@@tbl][#3]% to get the color right, the way we + \color % handle color here prevents interference due to whatsit nodes + [\tbltblkleur] % as well as permits local colors to take precedence + {\ifdim\heightTBL=\!!zeropoint\relax % case: nc=maxcolumns + \localframed + [\@@tbl\@@tbl] + [\c!kleur=,\c!breedte=\widthTBL] + {\bTBLCELL\TBLcharalign{#2}{#4}\eTBLCELL}% + \else + \localframed + [\@@tbl\@@tbl] + [\c!kleur=,\c!breedte=\widthTBL,\c!hoogte=\heightTBL] + {\bTBLCELL\TBLcharalign{#2}{#4}\eTBLCELL}% + \fi}} + +\setupTABLE + [\c!kaderoffset=.5\linewidth, + \c!achtergrondoffset=\v!kader, + \c!kaderkleur=black, + \c!kleur=, + \c!letter=, +\c!kopletter=\v!vet, +\c!kopkleur=, + \c!strut=\v!nee, + \c!karakteruitlijnen=\v!nee, + \c!uitlijnkarakter={,}, + \c!maxbreedte=8em] + +%D We have already prepared the previous macros for nesting, +%D so we only have to pop in the right ones: + +%D Redefined: + +\newcounter\TBLlevel + +\def\@@tblprefix{\@@tbl:\ifnum\TBLlevel>1 \TBLlevel:\fi} + +\long\def\settbltxt#1#2#3% + {\setxvalue{\@@tblprefix#1:#2:l}{\TBLlevel}% + \long\setvalue{\@@tblprefix#1:#2:t}% + {\doifdefined{\@@tblprefix#1:#2:l} + {\edef\TBLlevel{\getvalue{\@@tblprefix#1:#2:l}}}% + #3}} + +\def\gettbltxt#1#2% + {\getvalue{\@@tblprefix#1:#2:t}} + +%D New: + +\def\pushTBLparameters% + {\pushmacro\TBLlevel + \ifcase\TBLpass + % we're just after \bTABLE + \else\ifnum\TBLlevel>0 + \doglobal\increment\TBLlevel\relax + \fi\fi} + +\def\popTBLparameters% + {\popmacro\TBLlevel} + +\def\pushTBL% + {\ifnum\TBLlevel=0 + \doglobal\increment\currenttbl\relax + \fi + \doglobal\increment\TBLlevel\relax + \ifnum\TBLlevel>1 + \resetallTABLEparameters + \pushmacro\colTBL + \pushmacro\rowTBL + \else + \global\intabletrue + \fi} + +\def\popTBL% + {\ifnum\TBLlevel>1 + \popmacro\rowTBL + \popmacro\colTBL + \else + \global\intablefalse + \fi + \doglobal\decrement\TBLlevel\relax} + +\chardef\resetTABLEmode=0 + +\def\resetallTABLEparameters% moet genest wel werken + {\ifnum\TBLlevel>1 % in ieder geval + \ifcase\resetTABLEmode + \presetlocalframed % breedte hoogte diepte offset + [\@@tbl\@@tbl]% % achtergrond, achtergrondraster, achtergrondkleur + % not ok yet + \setupTABLE + [\c!kaderoffset=.5\linewidth, + \c!achtergrondoffset=\v!kader, + \c!kaderkleur=black, + \c!kleur=, + \c!letter=, +\c!kopletter=, +\c!kopkleur=, + \c!strut=\v!nee, + \c!karakteruitlijnen=\v!nee, + \c!uitlijnkarakter={,}, + \c!maxbreedte=8em]% + \else + \setupTABLE + [\c!breedte=\v!passend, + \c!hoogte=\v!passend]% + \fi + \fi} + +\protect \endinput diff --git a/tex/context/base/core-obj.tex b/tex/context/base/core-obj.tex index 8c6d0e079..d44235a22 100644 --- a/tex/context/base/core-obj.tex +++ b/tex/context/base/core-obj.tex @@ -35,6 +35,16 @@ 31: duplicitni object -- \stopmessages +\startmessages italian library: references + 30: oggetto sconosciuto -- + 31: oggetto duplicato -- +\stopmessages + +\startmessages norwegian library: references + 30: ukjent objekt -- + 31: duplikat objekt -- +\stopmessages + %D \macros %D {setobject,getobject,ifinobject} %D diff --git a/tex/context/base/core-pag.tex b/tex/context/base/core-pag.tex index 6ed2f3475..8a175b972 100644 --- a/tex/context/base/core-pag.tex +++ b/tex/context/base/core-pag.tex @@ -124,7 +124,7 @@ \fi \fi} -% cleaner, but unchecked +% cleaner, but unchecked, and incomplete % % \def\dostelarrangereninXY#1#2#3#4#5#6#7#8% % {\global\chardef\arrangedpageX =#1% diff --git a/tex/context/base/core-pos.tex b/tex/context/base/core-pos.tex new file mode 100644 index 000000000..761acf08d --- /dev/null +++ b/tex/context/base/core-pos.tex @@ -0,0 +1,1088 @@ +%D \module +%D [ file=core-pos, +%D version=1999.08.01, +%D title=\CONTEXT\ Core Macros, +%D subtitle=Positioning Support, +%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. + +\writestatus{loading}{Context Positioning Support} + +%D Although \TEX\ has a rather powerful channel to the outside +%D world, called \type {\special}, real communication with +%D other programs is complicated by the fact that no positional +%D information is available. Mid 1999, I discussed this with +%D \THANH, the author of \PDFTEX, and after some experiments, +%D \PDFTEX\ was extended with a simple but effective mechanism, +%D that provided positional information. The interesting +%D thought is that, although \TEX\ is frozen, similar +%D functionality could have been achieved with \type +%D {\specials} and an additional \DVI\ postprocessor. +%D +%D Since we want to be as compatible as can be, \CONTEXT\ will +%D support both methods, although the development is primarily +%D driven by the \PDFTEX\ way of doing things. Since the +%D mechanism is basically not limited to one application, for +%D the moment we stick to building the functionality around one +%D \CONTEXT\ special command, but at the same time we keep our +%D eyes open for extensions in other directions. +%D +%D A question that may arise when one reads this module, is to +%D what extend these macros are generic, in the sense that they +%D could be collected in a support module instead of a core +%D module. Since the mechanism described here will closely +%D cooperate with the \METAPOST\ support built in \CONTEXT, +%D which in turn will be tightly integrated with the \CONTEXT\ +%D overlay mechanisms, I decided to write a core module instead +%D of a support one. This makes even more sense, when one takes +%D into account that this kind of support depends on special +%D drivers. + +\unprotect + +%D The first application of positional information was embedded +%D graphics. Since we are interacting with text, it made sense +%D to take the current line height and depth into account too. +%D This is why we have two basic position macros: one for +%D simple positions, and one for boxes. +%D +%D We could have sticked to one special, and actually did so in +%D earlier experiments, but for convenience, as well for +%D clearness, we now have two alternatives. This approach will +%D save us quite some bytes when storing large quantities of +%D positional information. We save as less information as +%D needed, that is, we save no dimensions, in a \METAPOST\ +%D friendly way. +%D +%D The three specials involved are: +%D +%D \starttypen +%D \dosetposition {identifier} +%D \dosetpositionwhd {identifier} {width} {height} {depth} +%D \dosetpositionpapersize {width} {height} +%D \stoptypen +%D +%D Either directly, when using \PDFTEX, or by means of a +%D postprocessor, when using \DVI\ output, these end up in the +%D utility file as: +%D +%D \starttypen +%D \pospxy {identifier} {page} {x} {y} +%D \pospxywhd {identifier} {page} {x} {y} {w} {h} {d} +%D \stoptypen +%D +%D This means that we have to provide both a utility set and +%D reset macro for positions. + +\def\POSprefix{POS::} + +\def\pxypos {\pospxy} +\def\pxyposwhd{\pospxywhd} + +\def\resetpositions% + {\let\pospxy =\gobblefourarguments + \let\pospxywhd=\gobblesevenarguments} + +\resetpositions + +\def\setpositions% + {\def\pospxy##1##2##3##4% + {\dosetpositionnm\@@posp{##2}% + \dosetpositionpt\@@posx{##3}% + \dosetpositionpt\@@posy{##4}% + \setxvalue{\POSprefix##1}{\@@posp,\@@posx,\@@posy}}% + \def\pospxywhd##1##2##3##4##5##6##7% + {\dosetpositionnm\@@posp{##2}% + \dosetpositionpt\@@posx{##3}% + \dosetpositionpt\@@posy{##4}% + \dosetpositionpt\@@posw{##5}% + \dosetpositionpt\@@posh{##6}% + \dosetpositionpt\@@posd{##7}% + \setxvalue{\POSprefix##1}{\@@posp,\@@posx,\@@posy,\@@posw,\@@posh,\@@posd}}} + +%D For postprocessing purposes, we save the number of +%D positions. + +\newcounter\currentpositions % current number of positions +\newcounter\totalnofpositions % total from previous run + +\prependtoks + \savecurrentvalue\totalnofpositions\currentpositions +\to \everybye % \everylastshipout + +%D We save positionional information without dimensions, which +%D saves some bytes. The conversion too saves some bytes, but +%D is primarily needed because we want to pass those values to +%D \METAPOST\ too. + +\def\dosetpositionpt#1#2% + {\scratchdimen=#2sp\xdef#1{\@EA\withoutpt\the\scratchdimen}} + +\def\dosetpositionnm#1#2% + {\xdef#1{\number#2}} + +\def\checkpositions% + {\bgroup + \setbox0=\hbox{\doutilities{positions}{\jobname}{}{}{}}% + \global\let\checkpositions=\relax + \egroup} + +%D Since the positional values are to be fully expandable, we +%D need to preload them as soon as possible, which is why we +%D load the data when we start a text. + +\appendtoks \checkpositions \to \everystarttext + +%D \macros +%D {MPp, MPx, MPy, MPw, MPh, MPd, +%D MPxy, MPll, MPlr, MPur, MPul, MPpos} +%D +%D Access to the positional information is provided by macros +%D with short names that are clearly meant for \METAPOST. + +\def\MPp {\doMPxyhdwlr\doMPp } +\def\MPx {\doMPxyhdwlr\doMPx } +\def\MPy {\doMPxyhdwlr\doMPy } +\def\MPw {\doMPxyhdwlr\doMPw } +\def\MPh {\doMPxyhdwlr\doMPh } +\def\MPd {\doMPxyhdwlr\doMPd } +\def\MPxy {\doMPxyhdwlr\doMPxy } +\def\MPll {\doMPxyhdwlr\doMPll } +\def\MPlr {\doMPxyhdwlr\doMPlr } +\def\MPur {\doMPxyhdwlr\doMPur } +\def\MPul {\doMPxyhdwlr\doMPul } +\def\MPpos{\doMPxyhdwlr\doMPpos} + +%D So \type {\MPx{identifier}} returns a position, specified +%D in points. When unknown, \type {0pt} is returned. From the +%D next definitions, we can see that some positions are +%D expressions. + +\def\doMPp #1,#2,#3,#4,#5,#6,#7\relax{#1} +\def\doMPx #1,#2,#3,#4,#5,#6,#7\relax{#2pt} +\def\doMPy #1,#2,#3,#4,#5,#6,#7\relax{#3pt} +\def\doMPw #1,#2,#3,#4,#5,#6,#7\relax{#4pt} +\def\doMPh #1,#2,#3,#4,#5,#6,#7\relax{#5pt} +\def\doMPd #1,#2,#3,#4,#5,#6,#7\relax{#6pt} +\def\doMPxy #1,#2,#3,#4,#5,#6,#7\relax{(#2pt,#3pt)} +\def\doMPll #1,#2,#3,#4,#5,#6,#7\relax{(#2pt,#3pt-#6pt)} +\def\doMPlr #1,#2,#3,#4,#5,#6,#7\relax{(#2pt+#4pt,#3pt-#6pt)} +\def\doMPur #1,#2,#3,#4,#5,#6,#7\relax{(#2pt+#4pt,#3pt+#5pt)} +\def\doMPul #1,#2,#3,#4,#5,#6,#7\relax{(#2pt,#3pt+#5pt)} +\def\doMPpos#1,#2,#3,#4,#5,#6,#7\relax{#1,#2pt,#3pt,#4pt,#5pt,#6pt} + +%D As said, we will default to zero (dimensions) when a +%D position is unknown. + +\def\doMPxyhdwlr#1#2% + {\ifundefined{\POSprefix#2}% + #10,0,0,0,0,0,0\relax + \else + \@EA\@EA\@EA#1\csname\POSprefix#2\endcsname,0,0,0,0\relax + \fi} + +%D \macros +%D {MPanchor} +%D +%D For readability we define a few synonyms: + +\let\MPanchor\MPpos + +%D \macros +%D {POSp, POSx, POSy, POSh, POSd, POSw} +%D +%D and: + +\let\POSp\MPp \let\POSx\MPx \let\POSy\MPy +\let\POSh\MPh \let\POSd\MPd \let\POSw\MPw + +\newbox\positionbox +\newif\ifpositioning + +%D There are two low level positioning macros. Both store the +%D position as well as execute an action associated with that +%D position. + +\def\initializenextposition% + {\ifpositioning \else + \global\positioningtrue + \dosetpositionpapersize + {\number\printpapierbreedte} + {\number\printpapierhoogte }% + \fi + \doglobal\increment\currentpositions} + +\def\setposition#1% + {\initializenextposition + \dosetposition{#1}% + \dopositionaction{#1}} + +\def\setpositionbox#1% + {\dowithnextbox + {\hbox to \wd\nextbox + {\initializenextposition + \def\currentposition{#1}% + \dosetpositionwhd{#1} + {\number\wd\nextbox}{\number\ht\nextbox}{\number\dp\nextbox}% + \setbox\positionbox=\box\nextbox + \dopositionaction{#1}% + \box\positionbox + \hss}}} + +\let\currentposition\s!unknown + +%D A few more low level macros take care of defining and +%D recalling actions. We could save this information in the +%D position containers themselves, this would save hash +%D entries, but at the cost of much more time consuming +%D expansion. Actions are saved globally! + +\newtoks\everypositionaction + +\let\POSactionprefix\POSprefix + +\def\dosetpositionaction#1% + {\setgvalue{\POSactionprefix#1::}} + +\def\dopositionaction#1% test saves hash entry in etex + {\doifdefined{\POSactionprefix#1::}% + {\bgroup + \the\everypositionaction + \getvalue{\POSactionprefix#1::}% + \egroup}} + +\def\doifpositionaction#1% + {\doifdefined{\POSactionprefix#1::}} + +%D We can copy a position with: +%D +%D \starttypen +%D \copyposition {to} {from} +%D \stoptypen +%D +%D Again, this is a global action. + +\def\copyposition#1#2% + {\bgroup + \edef\to {\POSprefix#1}% + \edef\from{\POSprefix#2}% + \doifdefined\from + {\global\@EA\@EA\@EA\let\@EA\csname\@EA\to\@EA\endcsname\csname\from\endcsname}% + \egroup} + +%D The fact that handling positions is a two pass operation, is +%D one of the reasons why we need to be able to test for +%D existence, using: +%D +%D \starttypen +%D \doifpositionelse {identifier} {found action} {not found action} +%D \stoptypen + +\def\doifpositionelse#1% + {\doifdefinedelse{\POSprefix#1}} + +%D We have now arrived at a few macros that would make sense as +%D support macros, but ended up in the core. + +%D \macros +%D {xypos} +%D +%D We have several macros available to save positions. Later +%D we will see applications. +%D +%D \starttabulatie[|l|l||] +%D \NC \type {\xypos} \NC \NC simple position with no dimensions \NC \NR +%D \NC \type {\hpos} \NC \NC position and characteristics of a \type {\hbox} \NC \NR +%D \NC \type {\vpos} \NC \NC position and characteristics of a \type {\vbox} \NC \NR +%D \NC \type {\lpos} \NC l: \NC left edge of a line \NC \NR +%D \NC \type {\rpos} \NC r: \NC right edge of a line \NC \NR +%D \NC \type {\bpos} \NC b: \NC begin point in a line \NC \NR +%D \NC \type {\epos} \NC e: \NC end point in a line \NC \NR +%D \NC \type {\fpos} \NC f: \NC begin point in a paragraph \NC \NR +%D \NC \type {\tpos} \NC t: \NC end point in a paragraph \NC \NR +%D \stoptabulatie +%D +%D Each macro takes an identifier as argument, and the \type +%D {\hpos} and \type {\vpos} also expect box content. + +\def\xypos{\initializenextposition\dosetposition} + +\def\hpos#1{\dontleavehmode\setpositionbox{#1}\hbox} +\def\vpos#1{\setpositionbox{#1}\vbox} + +\def\lpos#1{\lrpos{l:#1}{\kern\leftskip}} +\def\rpos#1{\lrpos{r:#1}{\hskip\hsize\hskip-\rightskip}} + +\def\bpos#1{\hpos{b:#1}{\strut}\ignorespaces} +\def\epos#1{\ifhmode\unskip\fi\hpos{e:#1}{\strut}} + +\def\fpos#1{\lpos{#1}\rpos{#1}\bpos{#1}} +\def\tpos#1{\epos{#1}} + +%D The macros \type {\lpos} and \type {\rpos} share some code. + +\def\lrpos#1#2% + {\dontleavehmode\vadjust + {\setbox0=\hbox{\raise\dp\strutbox\hbox{\hpos{#1}{\strut}}}% + \smashbox0 + \rlap{#2\box0}}} + +%D \macros +%D {doifoverlappingelse} +%D +%D A first application of positional information, is to +%D determine if two boxes do overlap: +%D +%D \starttypen +%D \doifoverlappingelse{point a}{point b} +%D {action when overlapping} +%D {action when not overlapping} +%D \stoptypen + +\def\doifoverlappingelse#1#2#3#4% + {\ifnum\MPp{#1}=\MPp{#2}\relax + \bgroup + \donefalse + \def\check##1##2% + {\ifdone\else + \ifdim\dimen1##1<\dimen0 \else \ifdim\dimen1##1>\dimen2 \else + \ifdim\dimen1##2<\dimen4 \else \ifdim\dimen1##2>\dimen6 \else + \donetrue + \fi\fi + \fi\fi + \fi}% + \dimen 0=\MPx{#1}% + \dimen 2=\MPx{#1}\advance\dimen 2 by \MPw{#1}% + \dimen 4=\MPy{#1}\advance\dimen 4 by -\MPd{#1}% + \dimen 6=\MPy{#1}\advance\dimen 6 by \MPh{#1}% + \dimen10=\MPx{#2}% + \dimen12=\MPx{#2}\advance\dimen12 by \MPw{#2}% + \dimen14=\MPy{#2}\advance\dimen14 by -\MPd{#2}% + \dimen16=\MPy{#2}\advance\dimen16 by \MPh{#2}% + %\message{\the\dimen 0-\the\dimen 2,\the\dimen 4-\the\dimen 6}\wait + %\message{\the\dimen10-\the\dimen12,\the\dimen14-\the\dimen16}\wait + \check04\check24\check26\check06\ifdone\egroup#3\else\egroup#4\fi + \else + #4% + \fi} + +%D \macros +%D {doifpositionsonsamepageelse, +%D doifpositionsonthispageelse} +%D +%D Instead of letting the user handle fuzzy expansion, we +%D provide a simple test on positione being on the same page. +%D +%D \starttypen +%D \doifpositionsonsamepageelse{point a}{point b} +%D {action when on same page} +%D {action when not on same page} +%D \doifpositionsonthispageelse{point a}{point b} +%D {action when on this page} +%D {action when not on this page} +%D \stoptypen + +\def\doifpositionsonsamepageelse#1#2#3#4% + {\bgroup + \scratchcounter=#1\donefalse + \def\docommando##1% + {\ifcase\scratchcounter + \scratchcounter=\MPp{##1}\donetrue + \else + \ifnum\scratchcounter=\MPp{##1}\relax\else\donefalse\fi + \fi}% + \rawprocesscommalist[#2]\docommando + \ifdone\egroup#3\else\egroup#4\fi} + +\def\doifpositionsonsamepageelse% + {\doifpositionsonsamepageelse{0}} + +\def\doifpositionsonthispageelse#1#2#3% + {\doifpositionsonsamepageelse\realfolio} + +%D Before we come to graphics support, we have to make sure of +%D the reference point on the page. The next macro does so and +%D is hooked into the page building routine. + +\def\placepositionanchors% + {\ifpositioning + \vbox to \teksthoogte + {\hpos{head:\realfolio}{\hskip\tekstbreedte} + \vfill + \hpos{tail:\realfolio}{\hskip\tekstbreedte}} + \else + \vskip\teksthoogte + \fi} + +%D \macros +%D {positionoverlay,startpositionoverlay} +%D +%D As long as we're dealing with graphics it makes much sense +%D to use the available overlay mechanism. For this purpose, we +%D define some dedicated overlay extensions. +%D +%D \startbuffer[sample] +%D \defineoverlay [sample] [\positionoverlay{sample}] +%D +%D \startpositionoverlay{sample} +%D \setMPpositiongraphic{A-1}{connectcenter}{from=A-1m,to=A-2} +%D \stoppositionoverlay +%D \stopbuffer +%D +%D \typebuffer[sample] +%D +%D \startbuffer[graphic] +%D \startMPpositiongraphic{connectcenter} +%D path pa, pb ; pair ca, cb ; +%D initialize_box(\MPvar{from}) ; pa := pxy ; ca := cxy ; +%D initialize_box(\MPvar{to}) ; pb := pxy ; cb := cxy ; +%D draw pa withcolor red ; +%D draw pb withcolor red ; +%D draw ca -- cb withcolor blue ; +%D anchor_box(\MPanchor{\MPvar{from}}) ; +%D \stopMPpositiongraphic +%D \stopbuffer +%D +%D We can best demonstrate this in an example, say: +%D +%D \startbuffer[text] +%D \omlijnd +%D [achtergrond=sample,uitlijnen=midden,breedte=7cm] +%D {We want to connect \hpos {A-1} {this} word with its +%D grammatical cousin \hpos {A-2} {that}.} +%D \stopbuffer +%D +%D \typebuffer[text] +%D +%D \startregelcorrectie +%D %\haalbuffer[graphic,sample,text] +%D \stopregelcorrectie +%D +%D The graphic is defined in the following way, using some +%D macros defined in an auxiliary \METAPOST\ module that is +%D preloaded. +%D +%D \typebuffer[graphic] + +\def\MPanchoridentifier{mp-anchor} +\def\MPoverlayposprefix{MO::} + +\long\def\defineMPpositiongraphic#1% + {\long\setvalue{\MPoverlayposprefix#1}} + +%D The rest of the definitions concerning such overlays may +%D look complicated, + +\let\currentpositionoverlay\empty + +%D Position actions are automatically executed when a position +%D is set. In the next macro, the definitions sort of prelude +%D this process. + +\def\positionoverlay#1% + {\ifpositioning + \vbox to \overlayheight + {\edef\MPanchor##1{\MPpos{#1::\MPanchoridentifier}}% + \def\dohandlepositionboxes##1##2##3% pos tag setups + {\ifnum\MPp{##1}=\realpageno\relax % extra saveguard / beter in \dodo + \dodohandlepositionboxes{##1}{##2}{##3}% + \fi}% + \def\dohandleMPpositiongraphic##1##2##3% pos tag setups + {\ifnum\MPp{##1}=\realpageno\relax % extra saveguard / beter in \dodo + \dodohandleMPpositiongraphic{##1}{##2}{##3}% + \fi}% + \hpos{#1::\MPanchoridentifier}{\hskip\overlaywidth}% + \vfill}% + \fi} + +\def\startpositionoverlay#1% + {\def\currentpositionoverlay{#1}} + +\def\stoppositionoverlay% + {\let\currentpositionoverlay\empty} + +\def\resetpositionoverlay#1% + {\dosetpositionaction{#1::\MPanchoridentifier::}{}} + +%D Here the complication has to do with collecting actions +%D for later execution. + +\def\handlepositionboxes#1#2#3% + {\bgroup + \ifx\currentpositionoverlay\empty + \edef\!!stringa{\POSactionprefix#2::}% + \else + \edef\!!stringa{\POSactionprefix\currentpositionoverlay::\MPanchoridentifier::}% + \fi + \let\dohandlepositionboxes\relax + \doifundefinedelse\!!stringa + {\let\!!stringb\empty} + {\edef\!!stringb{\getvalue\!!stringa}}% + \setxvalue\!!stringa + {\!!stringb\dohandlepositionboxes{#1}{#2}{#3}}% + \egroup} + +%D The indirectness enables us (as was demonstrated a few lines +%D ago) to redefine this macro but still use its functionality. + +\def\dodohandlepositionboxes#1#2#3% + {\doifdefined{\MPoverlayposprefix#1} + {\getvalue{\MPoverlayposprefix#1}{#1}{#2}{#3}}} + +\let\dohandlepositionboxes\dodohandlepositionboxes + +%D A position graphic is a normal (non||reused) \METAPOST\ +%D graphic, used immediately, with zero dimensions, so that a +%D sequence of them does not harm. + +\newbox\positiongraphicbox + +\def\setMPpositiongraphic% + {\dotriplegroupempty\dosetMPpositiongraphic} + +\def\dosetMPpositiongraphic#1#2#3% pos tag vars + {\ifx\currentpositionoverlay\empty + \dosetpositionaction{#1}{\MPpositiongraphic{#2}{#3}}% + \else % silly can be one + \handlepositiongraphics{#1}{#2}{#3}% + \fi} + +\def\handlepositiongraphics#1#2#3% combine with boxes + {\bgroup + \ifx\currentpositionoverlay\empty + \edef\!!stringa{\POSactionprefix#2::}% #2 ? + \else + \edef\!!stringa{\POSactionprefix\currentpositionoverlay::\MPanchoridentifier::}% + \fi + \let\dohandleMPpositiongraphic\relax + \doifundefinedelse\!!stringa + {\let\!!stringb\empty} + {\edef\!!stringb{\getvalue\!!stringa}}% + \setxvalue\!!stringa + {\!!stringb\dohandleMPpositiongraphic{#1}{#2}{#3}}% + \egroup} + +\def\dodohandleMPpositiongraphic#1#2#3% + {\def\currentposition{#1}\MPpositiongraphic{#2}{#3}} + +\let\dohandleMPpositiongraphic\dodohandleMPpositiongraphic + +\def\startMPpositiongraphic% id setups + {\dodoublegroupempty\dostartMPpositiongraphic} + +\long\def\dostartMPpositiongraphic#1#2#3\stopMPpositiongraphic% + {\long\setgvalue{MPG:#1}% tag list mpcode + {\useMPpositiongraphic{#1}{#2}{#3}}} + +\def\prepareMPpositionvariables% + {\doifundefined{\@@meta self}{\setvalue{\@@meta self}{\currentposition}}% + \doifundefined{\@@meta from}{\setvalue{\@@meta from}{\currentposition}}} + +\long\def\useMPpositiongraphic#1#2#3% + {\bgroup + \prepareMPvariables{#2}% + \prepareMPpositionvariables +% \startuseMPgraphic{MPG}#3\stopuseMPgraphic +% \getvalue{MP:MPG}% + \enableincludeMPgraphics + \startMPgraphic#3\stopMPgraphic + \loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{}% + \deallocateMPslot\currentMPgraphic + \placeMPgraphic + \egroup} + +\def\MPpositiongraphic% + {\dodoublegroupempty\doMPpositiongraphic} + +\def\doMPpositiongraphic#1#2% tag setups + {\bgroup + \def\@@meta{#1:}% + \setupMPvariables[#2]% + \prepareMPpositionvariables + \MPshiftdrawingtrue + \def\doMPpositiongraphic##1##2{\getvalue{MPG:##1}}% temp hack + \setbox\positiongraphicbox=\hbox + {\doifdefinedelse{MPM:#1} % method + {\ignorespaces\getvalue{MPM:#1}\unskip} + {\getvalue{MPG:#1}}}% + \smashbox\positiongraphicbox + \box\positiongraphicbox + \egroup} + +\long\def\startMPpositionmethod#1#2\stopMPpositionmethod% + {\long\setgvalue{MPM:#1}{#2}} % todo: var list here + +%D The auxiliary \METAPOST\ macros are defined by default, +%D by saying: + +\appendtoks + if unknown context_core : input mp-core.mp ; fi ; +\to \MPinitializations + +%D Some of these macros are pretty clever but too complicated +%D to be nice. + +\setupMPvariables + [mpos:box] + [linecolor=blue, + linewidth=\linewidth, + backgroundcolor=lightgray] + +\startMPpositiongraphic{mpos:box}{backgroundcolor,linecolor} + initialize_box(\MPpos{\MPvar{self}}) ; + boxfillcolor := \MPvar{backgroundcolor} ; + boxlinecolor := \MPvar{linecolor} ; + draw_box ; + anchor_box(\MPanchor{\MPvar{self}}) ; +\stopMPpositiongraphic + +\setupMPvariables + [mpos:area] + [linecolor=blue, + linewidth=\linewidth, + backgroundcolor=lightgray] + +\startMPpositiongraphic{mpos:area}{backgroundcolor,linecolor} + initialize_area(\MPpos{b:\MPvar{self}},\MPpos{e:\MPvar{self}}) ; + boxfillcolor := \MPvar{backgroundcolor} ; + boxlinecolor := \MPvar{linecolor} ; + draw_area ; + anchor_area(\MPanchor{b:\MPvar{self}}) ; +\stopMPpositiongraphic + +\setupMPvariables + [mpos:par] + [linecolor=blue, + linewidth=\linewidth, + backgroundcolor=lightgray] + +\startMPpositionmethod{mpos:par} + \ifnum\MPp{b:\MPvar{self}}=\MPp{e:\MPvar{self}}\relax + \startMPpositiongraphic{mpos:par}{backgroundcolor,linecolor} + initialize_par(\MPpos{b:\MPvar{self}},\MPpos{l:\MPvar{self}}, + \MPpos{r:\MPvar{self}},\MPpos{e:\MPvar{self}}) ; + boxfillcolor := \MPvar{backgroundcolor} ; + boxlinecolor := \MPvar{linecolor} ; + draw_par ; + anchor_par(\MPanchor{b:\MPvar{self}}) ; + \stopMPpositiongraphic + \MPpositiongraphic{mpos:par}{}% + \else + \startMPpositiongraphic{mpos:par}{backgroundcolor,linecolor} + initialize_par(\MPpos{b:\MPvar{self}},\MPpos{l:\MPvar{self}}, + \MPpos{r:\MPvar{self}},\MPpos{tail:\realfolio}) ; + boxfillcolor := \MPvar{backgroundcolor} ; + boxlinecolor := \MPvar{linecolor} ; + draw_par ; + anchor_par(\MPanchor{b:\MPvar{self}}) ; + \stopMPpositiongraphic + \MPpositiongraphic{mpos:par}{}% + \advance\realpageno by 1 + \dosetpositionaction{head:\realfolio}% + {\copyposition{b:\MPvar{self}}{head:\realfolio}% + \doshowpositionpar{\MPvar{self}}}% + \fi +\stopMPpositionmethod + +% lelijk, aanpassen + +\setupMPvariables + [mpos:connect] + [linecolor=blue, + linewidth=\linewidth, + arrowcolor=red, + backgroundcolor=lightgray] + +\startMPpositiongraphic{mpos:connect}{linecolor,linewidth,arrowcolor} + path pa, pb ; pair ca, cb ; + initialize_box(\MPpos{\MPvar{from}}) ; pa := pxy ; ca := cxy ; + initialize_box(\MPpos{\MPvar{to}}) ; pb := pxy ; cb := cxy ; + drawoptions(withpen pencircle scaled \MPvar{linewidth}) ; + draw pa withcolor \MPvar{linecolor} ; + draw pb withcolor \MPvar{linecolor} ; + drawoptions(withpen pencircle scaled (3*\MPvar{linewidth})) ; + drawarrow ca -- cb withcolor \MPvar{arrowcolor} ; + anchor_box(\MPanchor{\MPvar{from}}) ; +\stopMPpositiongraphic + +%D \macros +%D {stackposdown, stackposup, stackposleft,stackposright} +%D +%D A non graphic example of the use of positioning, is to stack +%D text in for instance the margin. +%D +%D \stackposdown \inlinker {some text}The text \type {some text} +%D goes into the left margin, and \stackposdown \inlinker {some +%D more}\type {some more} as well. When they overlap, they +%D will not touch. +%D +%D Here we said \type {\stackposdown \inlinker{some text}}. Instead +%D of \stackposleft \inlinker {one}stacking \stackposleft \inlinker +%D {two}vertically, one can stack horizontally by \stackposleft +%D \inlinker {three}using \type {\stackposleft}. +%D +%D We can go in all four directions, using \type {\stackposdown}, +%D \type {\stackposup}, \type {\stackposleft} and \type +%D {\stackposright}. + +\def\stackposdistance{.5em} + +\newcounter\currentautopos + +\def\POSstackprefix{stack:} + +\def\dostackposbox#1#2% + {\dowithnextbox + {#2{\let\previousautopos\currentautopos + \doglobal\increment\currentautopos + \hpos{\POSstackprefix\currentautopos} + {\doifoverlappingelse{\POSstackprefix\currentautopos}{\POSstackprefix\previousautopos} + {#1} + {\box\nextbox}}}}% + \hbox} + +\def\stackposup {\dostackposbox{\raise\lineheight\box\nextbox}} +\def\stackposdown {\dostackposbox{\lower\lineheight\box\nextbox}} +\def\stackposleft {\dostackposbox{\copy\nextbox\hskip\wd\nextbox\hskip\stackposdistance}} +\def\stackposright{\dostackposbox{\hskip\stackposdistance\hskip\wd\nextbox\box\nextbox}} + +%D The next hack make sure that margin texts near faulty +%D strutted lines are handled ok. + +\newif\ifrepositionmarginbox % \repositionmarginboxtrue + +\newcounter\currentmarginpos + +\def\dopositionmarginbox#1% + {\bgroup + \ifrepositionmarginbox + \doglobal\increment\currentmarginpos + \setposition{\s!margin:\currentmarginpos}% + \scratchdimen=\MPy{\s!margin:\currentmarginpos}% + \doglobal\increment\currentmarginpos + \advance\scratchdimen by -\MPy{\s!margin:\currentmarginpos}% + \advance\scratchdimen by -\dp\strutbox + \setbox#1=\hbox + {\setposition{\s!margin:\currentmarginpos}\raise\scratchdimen\box#1}% + \dp#1=\!!zeropoint + \ht#1=\!!zeropoint + \fi + \vadjust{\box#1}% + \egroup} + +%D For a right menu, a sequence of calls to \type +%D {right_menu_button} is generated. +%D +%D \starttypen +%D right_menu_button (n, p, s=0/1/2, x, y, w, h, d) ; +%D \stoptypen +%D +%D Here, n is the number of the button, s a status variable, +%D while the rest is positional info. The status variable is +%D 0, 1 or~2: not found, found and found but current page. + +% 0=not found 1=found 2=current page + +% geen leeg + +\newtoks\MPmenutoks + +\def\MPmenubuttons#1{\the\MPmenutoks} + +\appendtoks \global\MPmenutoks\emptytoks \to \everyshipout + +% 0=notfound 1=found 2=currentpage + +\def\do@@amposition#1#2#3% + {\doifelsevalue{\??am#1\c!positie}{\v!ja} + {\doglobal\increment\currentamposition + \doifnumberelse{#2} + {\docheckrealreferencepage{#2}% + \global\chardef\currentamrealpage=\ifrealreferencepage2\else1\fi} + {\doifreferencefoundelse{#2} + {\global\chardef\currentamrealpage=\ifrealreferencepage2\else1\fi} + {\global\chardef\currentamrealpage=0}}% % not found + \expanded + {\doglobal\noexpand\appendtoks + #1_menu_button(\currentamposition,\the\currentamrealpage,\noexpand\MPpos{#1:\currentamposition}) ; + \to \MPmenutoks}% + \hpos{#1:\currentamposition}{#3}} + {#3}} + +\def\do@@ammenuposition#1% + {\ifnum\currentamposition>0 + \dowithnextbox{\hpos{menu:#1:\realfolio}{\box\nextbox}}\hbox + \fi} + +\protect \endinput + +%D \macros +%D {GFC, GTC, GSC} +%D +%D The next macros extend tables and tabulation with +%D backgrounds and position related features. Areas are +%D specified with symbolic names, and symbolic references to +%D the graphics involved. Each table has its own namespace. + +\newcounter\noftabpositions +\newtoks \posXCtoks + +\def\tbPOSprefix% + {tbp:\noftabpositions:} + +\def\tablepos% + {\scratchtoks\posXCtoks + \global\posXCtoks\emptytoks + \the\scratchtoks} + +\let\tabulatepos\tablepos + +\def\dodododoGSC[#1:#2]% + {\remappositionframed{#2}{\tbPOSprefix#1}% + \bpos{\tbPOSprefix#1}% + \doglobal\appendtoks\@EA\epos\@EA{\tbPOSprefix#1}\to\posXCtoks} + +\def\dododoGSC[#1:#2:#3]% + {\doglobal\appendtoks\dodododoGSC[#1:#2]\to\posXCtoks\NC} + +\def\dodoGSC[#1]% + {\def\docommando##1{\dododoGSC[##1:##1]}% + \processcommalist[#1]\docommando} + +\def\dodododoGFC[#1:#2:#3]% + {\remappositionframed{#2}{\tbPOSprefix#1}% + \bpos{\tbPOSprefix#1}} + +\def\dododoGFC[#1]% + {\def\docommando##1{\dodododoGFC[##1:##1]}% + \processcommalist[#1]\docommando} + +\def\dodoGFC[#1]% + {\doglobal\appendtoks\dododoGFC[#1]\to\posXCtoks\NC} + +\def\dododododoGTC[#1:#2]% + {\epos{\tbPOSprefix#1}} + +\def\dodododoGTC[#1]% + {\def\docommando##1{\dododododoGTC[##1:##1]}% + \processcommalist[#1]\docommando} + +\def\dododoGTC[#1]% + {\doglobal\appendtoks\dodododoGTC[#1]\to\posXCtoks} + +\def\dodoGTC[#1]% + {\doglobal\appendtoks\dododoGTC[#1]\to\posXCtoks\NC} + +\def\dodododoXC[#1#2]% + {\if#1>\dodoGFC [#2:#2]\else + \if#1+\dodoGFC [#2:#2]\else + \if#1<\dodoGTC [#2:#2]\else + \if#1-\dodoGTC [#2:#2]\else + \if#1=\dodoGSC [#2:#2]\else + \dodoGSC[#1#2:#1#2]\fi\fi\fi\fi\fi} + +\def\dododoXC#1% + {\dodododoXC[#1]} + +\def\dodoXC[#1]% + {{\let\NC\relax\processcommalist[#1]\dododoXC}} + +\def\doGSC[#1]{\iffirstargument\dodoGSC[#1]\else\expandafter\NC\fi} +\def\doGFC[#1]{\iffirstargument\dodoGFC[#1]\else\expandafter\NC\fi} +\def\doGTC[#1]{\iffirstargument\dodoGTC[#1]\else\expandafter\NC\fi} +\def\doXC [#1]{\iffirstargument\dodoXC [#1]\else\expandafter\fi\NC} + +\def\GSC{\dosingleempty\doGSC} +\def\GFC{\dosingleempty\doGFC} +\def\GTC{\dosingleempty\doGTC} +\def\XC {\dosingleempty\doXC } + +%D The amount of code to support tables and tabulation is +%D rather minimalistic. + +\let\tabulatepos\tablepos + +\def\tabulatenormalpos% + {\hss\tabulatepos\hss} + +\def\tabulateequalpos% + {\setbox\scratchbox=\hbox{\tabulateEQ}% + \hbox to \wd\scratchbox{\hss\kern\!!zeropoint\tabulatepos\hss}% + \hskip-\wd\scratchbox + \box\scratchbox} + +\def\tabulatenormalcolumn#1% + {&\iftabulateequal\tabulateequalpos\else\tabulatenormalpos\fi + &\global\chardef\tabulatetype=#1&} + +\def\tabulateequalcolumn#1% + {&\tabulateequalpos + &\global\chardef\tabulatetype=#1&} + +\appendtoks \doglobal\increment\noftabpositions \to \everytabulate + +%D \macros +%D {definepositionframed} +%D +%D The next example show how to provide backgrounds to table +%D cells. First we define some framed backgrounds. +%D +%D \startbuffer +%D \definepositionframed[x][background=color,backgroundcolor=red] +%D \definepositionframed[y][background=color,backgroundcolor=green] +%D \definepositionframed[z][background=color,backgroundcolor=blue] +%D \stopbuffer +%D +%D \typebuffer +%D +%D % \haalbuffer +%D +%D \startbuffer +%D \starttabulatie[|c|c|c|] +%D \GFC[f:x] this is a small \NC table \NC in which we \NC \FR +%D \NC will demonstrate \GFC[g:z] that this \GTC[g] positioning \NC \MR +%D \GSC[e:y] mechanism also \GTC[f] works quite well \NC in tables \NC \LR +%D \stoptabulatie +%D \stopbuffer +%D +%D The table itself defines three areas (a, b and~c) using +%D these frames. +%D +%D \typebuffer +%D % \haalbuffer +%D +%D Tables (based on \TABLE) are supported by: + +\def\normalTABLEsimplebar {\unskip\!ttRightGlue&\tablepos&} % | +\def\normalTABLEcomplexbar{\unskip\!ttRightGlue&\omit\tablepos\!ttAlternateVrule} % \| +\def\normalTABLEquote {\unskip\!ttRightGlue&\omit\tablepos&} % " + +\appendtoks \doglobal\increment\noftabpositions \to \EveryTable + +%D In the previous example, we could have provided an overlay to +%D the framed definition. A more direct approach is demonstrated +%D below: +%D +%D \startbuffer +%D \def\cw#1{\color[white]{#1}} +%D +%D \def\TableShade#1#2% +%D {\startMPpositiongraphic +%D initialize_area(\MPpos{b:#1},\MPpos{e:#1}) ; +%D linear_shade(pxy,0,.4#2,.9#2) ; +%D anchor_area(\MPanchor{b:#1}) ; +%D \stopMPpositiongraphic} +%D +%D \dosetpositionaction{b:x}{\TableShade{x}{red}} +%D \dosetpositionaction{b:y}{\TableShade{y}{green}} +%D \dosetpositionaction{b:z}{\TableShade{z}{blue}} +%D \stopbuffer +%D +%D \typebuffer +%D +%D % \haalbuffer +%D +%D The definition of the table looks about the same as the +%D previous one: +%D +%D \startbuffer +%D \starttabel[|c|c|c|] +%D \GFC[b:z] \cw{this is a small} \NC \cw{table} \NC in which we \NC \FR +%D \NC \cw{will demonstrate} \GFC[c:y] \cw{that this} \GTC[c] \cw{positioning} \NC \MR +%D \GSC[a:x] \cw{mechanism also} \GTC[b] \cw{works quite well} \NC in tables \NC \LR +%D \stoptabel +%D \stopbuffer +%D +%D \typebuffer +%D +%D % \haalbuffer + +% \definepositionframed[w][background=color,backgroundcolor=yellow] +% \definepositionframed[x][background=color,backgroundcolor=red] +% \definepositionframed[y][background=color,backgroundcolor=green] +% \definepositionframed[z][background=color,backgroundcolor=blue] +% +% \starttabulate[|c|c|c|] +% \NC this is a small \NC table \NC in which we \NC \FR +% \NC will demonstrate \NC that this \NC positioning \NC \MR +% \NC mechanism also \NC works quite well \NC in tables \NC \LR +% \stoptabulate +% +% \starttabulate[|c|c|c|] +% \GFC[f:x] this is a small \GTC table \NC in which we \NC \FR +% \NC will demonstrate \GFC[g:z] that this \GTC[g] positioning \NC \MR +% \GSC[e:y] mechanism also \GTC[f] works quite well \NC in tables \NC \LR +% \stoptabulate +% +% \starttabulate[|c|c|c|] +% \GFC[f:x,d:w] this is a small \GTC[d] table \NC in which we \NC \FR +% \NC will demonstrate \GFC[g:z] that this \GTC[g] positioning \NC \MR +% \GSC[e:y] mechanism also \GTC[f] works quite well \NC in tables \NC \LR +% \stoptabulate +% +% \starttabulate[|c|c|c|] +% \XC[+f:x] this is a small \XC table \NC in which we \NC \FR +% \NC will demonstrate \XC[+g:z] that this \XC[-g] positioning \NC \MR +% \XC[=e:y] mechanism also \XC[-f] works quite well \NC in tables \NC \LR +% \stoptabulate +% +% \starttabulate[|c|c|c|] +% \XC[+f:x,+d:w] this is a small \XC[-d] table \NC in which we \NC \FR +% \NC will demonstrate \XC[+g:z] that this \XC[-g] positioning \NC \MR +% \XC[=e:y] mechanism also \XC[-f] works quite well \NC in tables \NC \LR +% \stoptabulate + +% evt [b:x] +% +% \definepositionframed[x][background=color,backgroundcolor=red] +% \definepositionframed[y][background=color,backgroundcolor=green] +% \definepositionframed[z][background=color,backgroundcolor=blue] + +\def\remappositionframed#1#2% from to + {\copyposition{b:#1}{b:#2}% + \copyposition{e:#1}{e:#2}% + \dosetpositionaction{b:#2}{\dopositionaction{b:#1}}} + +\def\definepositionframed% + {\dodoubleargument\dodefinepositionframed} + +\def\dodefinepositionframed[#1][#2]% + {\dosetpositionaction{b:#1}{\dopositionframed[#1][#2]}} + +\def\positionframed% + {\dodoubleempty\dopositionframed} + +\def\dopositionframed[#1][#2]% + {\bgroup + \setbox\scratchbox=\hbox + {\dimen0=\MPx{e:#1}% + \advance\dimen0 by -\MPx{b:#1}% + \dimen2=\MPy{b:#1}% + \advance\dimen2 by -\MPy{e:#1}% + \advance\dimen2 by \MPd{e:#1}% + \lower\dimen2\hbox + {\advance\dimen2 by \MPh{b:#1}% + \framed + [\c!breedte=\dimen0,\c!hoogte=\dimen2, + \c!offset=\v!overlay,#2]{}}}% + \smashbox\scratchbox + \box\scratchbox + \egroup} + +% \def\sethdistances#1% +% {\hbox{\lpos{ml:#1}\hpos{mh:#1}{\strut}\rpos{mr:#1}}} +% +% \def\gethdistances#1% +% {\scratchdimen=\MPx{mh:#1}% +% \advance\scratchdimen by -\MPx{ml#1}% +% \edef\lefthdistance{\the\scratchdimen}% +% \scratchdimen=\MPx{mr:#1}% +% \advance\scratchdimen by -\MPx{mh:#1}% +% \edef\righthdistance{\the\scratchdimen}} + +\protect \endinput diff --git a/tex/context/base/core-ref.tex b/tex/context/base/core-ref.tex index 8604bafab..c4705cd0e 100644 --- a/tex/context/base/core-ref.tex +++ b/tex/context/base/core-ref.tex @@ -37,9 +37,9 @@ % rt!list -> \definereference % rt!exec -> \definereference % -% not, because the current implementation permits to -% determine the page state and is more efficient. - +% but for the moment will not do so, if only because +% the current implementation permits us to determine +% the page state and is also more efficient \unprotect @@ -87,6 +87,28 @@ 23: obskurni (nejasna) reference -- (prefix=--) \stopmessages +\startmessages italian library: references + title: riferimenti + 1: riferimento sconosciuto -- + 2: riferimento duplicato -- a pagina -- + 3: riferimento di tipo sconosciuto -- + 4: riferimento illecito -- + 21: documento -- caricato + 22: il documento -- non è interattivo + 23: riferimento ambiguo -- (prefisso=--) +\stopmessages + +\startmessages norwegian library: references + title: referanser + 1: ukjent referanse -- + 2: duplikat referanse -- på side -- + 3: ukjent referansetype -- + 4: ulovlig referanse -- + 21: dokument -- er lest inn + 22: dokument -- er ikke interaktivt + 23: obskur referanse -- (Prefix=--) +\stopmessages + %D This module deals with referencing. In \CONTEXT\ referencing %D is one of the core features, although at a first glance %D probably nobody will notice. This is good, because @@ -259,18 +281,55 @@ %D In practice this comes to giving \type {\mainreference} a %D appropriate meaning and loading the utility file. -%\def\setreferences% -% {\def\mainreference##1##2##3##4##5% -% {\doifundefinedelse{\r!cross\fileprefix##1##2} -% {\setglobalcrossreference{##1##2}{##3}{##4}{##5}} -% {\showmessage{\m!references}{2}{[##1][##2],##4}}}} +% \def\setreferences% +% {\def\mainreference##1##2##3##4##5% +% {\doifundefinedelse{\r!cross\fileprefix##1##2} +% {\setglobalcrossreference{##1##2}{##3}{##4}{##5}} +% {\showmessage{\m!references}{2}{[##1][##2],##4}}}} + +% \def\setreferences% +% {\the\everyreference % we're grouped anyway +% \def\mainreference##1##2##3##4##5% +% {\doifundefinedelse{\r!cross\fileprefix##1##2} +% {\setglobalcrossreference{##1##2}{##3}{##4}{##5}} +% {\ifcase0##4\else\showmessage{\m!references}{2}{[##1][##2],##4}\fi}}} + +%D For a long time the only way to access an external file was +%D to use the file prefix (\type {somefile::}. However, when +%D you split up a document, redefining the references may be +%D such a pain, that another approach is feasible. By setting +%D the \type {autofile} variable to \type {yes} or \type +%D {page}, you can access the reference directly. The latter +%D case nills the prefix method, thereby saving some memory. +%D +%D \starttabulatie[||||] +%D \NC filename::tag \NC page(filename::pnum) \NC tag \NC\NR +%D \NC $\star$ \NC \NC \NC\NR +%D \NC $\star$ \NC $\star$ \NC $\star$ \NC\NR +%D \NC \NC $\star$ \NC \NC\NR +%D \stoptabulatie + +\chardef\autocrossfilereferences=0 -\def\setreferences% +\def\setreferences% some day, filename will be stored in ref record {\the\everyreference % we're grouped anyway \def\mainreference##1##2##3##4##5% {\doifundefinedelse{\r!cross\fileprefix##1##2} - {\setglobalcrossreference{##1##2}{##3}{##4}{##5}} - {\ifcase0##4\else\showmessage{\m!references}{2}{[##1][##2],##4}\fi}}} + {\ifcase\autocrossfilereferences + \setglobalcrossreference{##1##2}{##3}{##4}{##5}% + \or + \setglobalcrossreference{##1##2}{##3}{##4}{##5}% + \doifundefinedelse{\r!cross##1##2} + {\expanded{\definereference[##1##2][\fileprefix##1##2]}} + {\showmessage{\m!references}{2}{[##1][##2],##4 (auto \currentutilityfilename)}}% + \or + \doifundefinedelse{\r!cross##1##2} + {\expanded{\definereference[##1##2][\noexpand\v!pagina(\fileprefix##4)]}} + {\showmessage{\m!references}{2}{[##1][##2],##4 (auto \currentutilityfilename)}}% + \fi} + {\ifcase0##4\else + \showmessage{\m!references}{2}{[##1][##2],##4 (\currentutilityfilename)}% + \fi}}} \def\resetreferences% {\let\mainreference=\gobblefivearguments} @@ -291,6 +350,15 @@ \newtoks\everycheckreferences +%D When we load references, the file name is stored in a +%D list. + +\let\loadedreferences\empty + +%D We only load references ones. + +\newconditional\jobreferencesloaded + %D This token list is expanded after the references are loaded. %D This hook can be used to initialize mechanisms that depend %D on the reference mechsnism. An example can be found in the @@ -305,12 +373,27 @@ \egroup \the\everycheckreferences} +% \def\usereferences[#1]% +% {\bgroup +% \checkreferences % Load job ones first! +% \setbox0=\hbox +% {\doonlyonce{references:#1}{\doutilities{references}{#1}{}{}{}}}% +% \egroup} + \def\usereferences[#1]% - {\bgroup - \checkreferences - \setbox0=\hbox - {\doonlyonce{references:#1}{\doutilities{references}{#1}{}{}{}}}% - \egroup} + {\bgroup\setbox\scratchbox=\hbox\bgroup + \checkreferences + \doifparentfileelse{#1} + {\ifconditional\jobreferencesloaded\else + \doutilities{references}{#1}{}{}{}% + \global\settrue\jobreferencesloaded + \fi} + {\ExpandBothAfter\doifnotinset{#1}{\loadedreferences} + {\doutilities{references}{#1}{}{}{}% + \ifx\fileprefix\empty\else + \doglobal\addtocommalist{#1}\loadedreferences + \fi}} + \egroup\egroup} %D As mentioned we will also use the cross reference mechanism %D for navigational purposes. The main reason for this is that @@ -800,6 +883,9 @@ \ifx\currentreferencespecial\empty \ifx\currentouterreference\empty \docheckinnerreference + \ifreferencefound \else + \checkglobalfilereferences + \fi \else \docheckouterreference \fi @@ -822,6 +908,9 @@ \ifx\currentreferencespecial\empty \ifx\currentouterreference\empty \docheckinnerreference + \ifreferencefound \else + \checkglobalfilereferences + \fi \else \docheckouterreference \fi @@ -833,8 +922,6 @@ \fi \fi \fi -% \doif{\currentfullreference}{\v!geen} % DOCUMENT THIS ONE! -% {\global\referencefoundfalse} \iftracereferences \doshowcurrentreference\space \writestatus{\m!references}{\currentreferenceshow}% @@ -868,6 +955,9 @@ \ifx\currentreferencespecial\empty \ifx\currentouterreference\empty \docheckinnerreference + \ifreferencefound \else + \checkglobalfilereferences + \fi \else \docheckouterreference \fi @@ -890,6 +980,9 @@ \ifx\currentreferencespecial\empty \ifx\currentouterreference\empty \docheckinnerreference + \ifreferencefound \else + \checkglobalfilereferences + \fi \else \docheckouterreference \fi @@ -901,8 +994,6 @@ \fi \fi \fi -% \doif{\currentfullreference}{\v!geen} % DOCUMENT THIS ONE! -% {\global\referencefoundfalse}% \iftracereferences \doshowcurrentreference\space \writestatus{\m!references}{\currentreferenceshow}% @@ -913,6 +1004,26 @@ \endETEX +%D Although this can be considered a hack, we provide the +%D option to locate unknown references in other (loaded) files. +%D This can be dangerous, since there can be conflicting +%D definitions. + +\newconditional\autoglobalfilereferences + +\def\checkglobalfilereferences% + {\ifconditional\autoglobalfilereferences + \processcommacommand[\loadedreferences]\docheckglobalfilereference + \fi} + +\def\docheckglobalfilereference#1% + {\doifdefined{\r!cross#1::\currentinnerreference} + {\def\currentouterreference{#1}% + \edef\currentfullreference% + {\currentouterreference::\currentinnerreference}% + \global\referencefoundtrue + \quitcommalist}} + %D For most situations, we could use: %D %D \starttypen @@ -1340,15 +1451,28 @@ %D uppercase here, since the suffix is handled in the special %D driver. Conversion is taken care of by: %D -%D \startypen +%D \starttypen %D \setreferencefilename somefilename\to\SomeFileName %D \stoptypen +% \def\setreferencefilename#1\to#2% +% {\doifelse{\@@converteerfile}{\v!ja} % boolean is sneller +% {\uppercasestring#1\to#2} +% {\edef#2{#1}}} + +\chardef\referencefilecase=0 + \def\setreferencefilename#1\to#2% - {\doifelsevalue{\??rf\c!converteerfile}{\v!ja} % boolean is sneller - {\uppercasestring#1\to#2} - {\edef#2{#1}}} - + {\ifcase\referencefilecase + \edef#2{#1}% + \or + \uppercasestring#1\to#2% + \or + \lowercasestring#1\to#2% + \else + \edef#2{#1}% + \fi} + %D Internal references can best be set using the next few %D macros. Setting such references to unique values is %D completely up to the macros that call them. @@ -1569,8 +1693,8 @@ \setglobalsystemreference \rt!exec \v!ResumeMovie {resumemovie} \setglobalsystemreference \rt!exec \v!ResumeSound {resumesound} \setglobalsystemreference \rt!exec \v!SaveDocument {save} -\setglobalsystemreference \rt!exec \v!SearchAgain {searchagain} \setglobalsystemreference \rt!exec \v!SearchDocument {search} +\setglobalsystemreference \rt!exec \v!SearchAgain {searchagain} \setglobalsystemreference \rt!exec \v!StartMovie {startmovie} \setglobalsystemreference \rt!exec \v!StartSound {startsound} \setglobalsystemreference \rt!exec \v!StopMovie {stopmovie} @@ -1581,6 +1705,8 @@ \setglobalsystemreference \rt!exec \v!HideField {hide} \setglobalsystemreference \rt!exec \v!ShowField {show} \setglobalsystemreference \rt!exec \v!GotoPage {gotopage} +\setglobalsystemreference \rt!exec \v!Query {query} +\setglobalsystemreference \rt!exec \v!QueryAgain {queryagain} %D Executing the command looks alike the previous goto macros. @@ -1644,23 +1770,37 @@ \v!label=>\let\dowantedreference=\dolabelonlyreference, \v!tekst=>\let\dowantedreference=\dotextonlyreference, \v!symbool=>\let\dowantedreference=\dosymbolreference]% - %\doifelse{\@@rfstrut}{\v!ja} % some day an option - % {\referencetruttrue} - % {\referencestrutfalse}% - \ifx\@@rfprefix\s!unknown - % retain the current value - \else\ifx\@@rfprefix\empty - \let\referenceprefix=\empty - \else\ifx\@@rfprefix\incrementreferenceprefix - \advance\prefixcounter by 1 - \edef\referenceprefix{\the\prefixcounter:}% - \let\@@rfprefix\s!unknown - \else\ifx\@@rfprefix\decrementreferenceprefix - \let\referenceprefix=\empty - \let\@@rfprefix\s!unknown - \else - \edef\referenceprefix{\@@rfprefix:}% - \fi\fi\fi\fi} + \chardef\autocrossfilereferences=0 + \processaction + [\@@rfautofile] + [ \v!ja=>\chardef\autocrossfilereferences=1, + \v!pagina=>\chardef\autocrossfilereferences=2]% + \chardef\referencefilecase=0 + \processaction[\@@rfconverteerfile] + [ \v!ja=>\chardef\referencefilecase=1, + \v!groot=>\chardef\referencefilecase=1, + \v!klein=>\chardef\referencefilecase=2]% + % \doifelse{\@@rfstrut}{\v!ja} % some day an option + % {\referencetruttrue}{\referencestrutfalse}% + % + % This is a typical example where \ifx\@@rfprefix\s!unknown fails: + % + \doifnot{\@@rfprefix}{\s!unknown} % retain the current value + {\ifx\@@rfprefix\empty + \let\referenceprefix=\empty + \else\ifx\@@rfprefix\incrementreferenceprefix + \advance\prefixcounter by 1 + \edef\referenceprefix{\the\prefixcounter:}% + \let\@@rfprefix\s!unknown + \else\ifx\@@rfprefix\decrementreferenceprefix + \let\referenceprefix=\empty + \let\@@rfprefix\s!unknown + \else + \edef\referenceprefix{\@@rfprefix:}% + \fi\fi\fi}% + \doifelse{\@@rfglobaal}{\v!ja} + {\settrue \autoglobalfilereferences} + {\setfalse\autoglobalfilereferences}} \def\incrementreferenceprefix{+} \def\decrementreferenceprefix{-} @@ -1774,8 +1914,8 @@ {\dontleavehmode \bgroup \def\thecurrentsubtextreference% - {\limitatetext{\currentsubtextreference}{\@@rfbreedte}{...}}% - %\leaveoutervmode + {\limitatetext{\currentsubtextreference}{\@@rfbreedte}{\unknown}}% + %\leaveoutervmode % no \@@rflinks \doifreferencefoundelse{#1} {\let\crlf\space @@ -1908,9 +2048,13 @@ % better: \def\docompletereference#1#2[#3]% - {\doifsomespaceelse{#2} - {\donaarspace{\dotextprefix{#2}#1}[#3]} - {\donaarfixed{\dotextprefix{#2}#1}[#3]}} + {\iflocationsplit + \doifsomespaceelse{#2} + {\donaarspace{\dotextprefix{#2}#1}[#3]} + {\donaarfixed{\dotextprefix{#2}#1}[#3]}% + \else + \donaarfixed{\dotextprefix{#2}#1}[#3]% + \fi} \def\dolabelonlyreference#1#2[#3]% {\doifsomespaceelse{#2} @@ -1959,7 +2103,8 @@ \c!label=, % can be {left}{right} \c!commando=\in, #2]% - \unexpanded\setvalue{#1}{\doexecutereferenceformat{#1}}% + \unexpanded\setvalue{#1}% + {\dontleavehmode\doexecutereferenceformat{#1}}% \fi} \def\noexecutelabelreferenceformat#1% @@ -2063,20 +2208,29 @@ \newcount\similarreference % 0=noppes 1=create/refer 2,3,..=refer \def\donaarspace#1[#2]% - {\ifsecondaryreference\setbox0=\hbox\fi % due to space insertion - {\let\donaarspace=\donaarfixed - \iflocation - \def\processisolatedword##1% - {\ifisolatedwords\ifsharesimilarreferences - \global\advance\similarreference by 1 - \fi\fi - \hbox{\gotolocation{#2}{##1\presetgoto}}}% - \doattributes\??ia\c!letter\c!kleur - {\processisolatedwords{#1}\processisolatedword}% - \global\similarreference=0 - \else - #1\relax % \relax prevents #1's next macros from gobbling \fi - \fi}} + {\iflocationsplit + \ifsecondaryreference\setbox0=\hbox\fi % due to space insertion + {\let\donaarspace=\donaarfixed + \iflocation + \def\processisolatedword##1% + {\ifisolatedwords\ifsharesimilarreferences + \global\advance\similarreference by 1 + \fi\fi + \hbox{\gotolocation{#2}{##1\presetgoto}}}% + \doattributes\??ia\c!letter\c!kleur + {\processisolatedwords{#1}\processisolatedword}% + \else + #1\relax % \relax prevents #1's next macros from gobbling \fi + \fi}% + \else + \iflocation + \doattributes\??ia\c!letter\c!kleur + {\gotolocation{#2}{#1\presetgoto}}% + \else + #1\relax % \relax prevents #1's next macros from gobbling \fi + \fi + \fi + \global\similarreference=0 } \def\donaarfixed#1[#2]% {{\iflocation @@ -2142,22 +2296,30 @@ \def\dogebruikexterndocument[#1][#2][#3]% {\bgroup - \doifelsenothing{#1} - {\dogebruikexterndocument[#2][#2][#3]} - {\doifelsenothing{#3} - {\dogebruikexterndocument[#1][#2][#2]} - {\doifsomething{#2} - {\setgvalue{\v!file:::#1}{\doexternaldocument[][#2][#3]}% just \do - \doifparentfileelse{#2} - {\showmessage{\m!references}{21}{#2}} - {\bgroup % prevents wrong loading of \jobname - \def\fileprefix{#1::}% - \let\setglobalcrossreference=\setoutercrossreference - \usereferences[#2]% - \egroup % when called nested - \showmessage{\m!references}{21}{#2}}}}}% + \ifsecondargument + \doifelsenothing{#1} + {\dogebruikexterndocument[#2][#2][#3]} + {\doifelsenothing{#3} + {\dogebruikexterndocument[#1][#2][#2]} + {\doifsomething{#2} + {\setgvalue{\v!file:::#1}{\doexternaldocument[][#2][#3]}% just \do + \doif{\@@rfstatus}{\v!start} + {\doifparentfileelse{#2} + {\showmessage{\m!references}{21}{#2}} + {\dodogebruikexterndocument{#1}{#2}}}}}}% + \else + \dodogebruikexterndocument{#1}{#1}% + \fi \egroup} +\def\dodogebruikexterndocument#1#2% + {\bgroup % prevents wrong loading of \jobname + \def\fileprefix{#1::}% + \let\setglobalcrossreference=\setoutercrossreference + \usereferences[#2]% + \egroup % when called nested + \showmessage{\m!references}{21}{#2}} + %D The \URL\ alternative takes four arguments: %D %D \showsetup{\y!gebruikURL} @@ -2329,8 +2491,18 @@ {\docomplexuit[#1]} {\docomplexuit[#1::]}} +% \def\docomplexuit[#1::#2]% +% {\bgroup +% \doifdefinedelse{\v!file:::#1} +% {\def\doexternaldocument[##1][##2][##3]% +% {\naar{##3}[#1::#2]}% +% \getvalue{\v!file:::#1}} +% {\tttf[#1]}% +% \egroup} + \def\docomplexuit[#1::#2]% - {\bgroup + {\dontleavehmode % added, but probably not needed + \bgroup \doifdefinedelse{\v!file:::#1} {\def\doexternaldocument[##1][##2][##3]% {\naar{##3}[#1::#2]}% @@ -2652,16 +2824,16 @@ \def\docoupledocument[#1][#2][#3][#4]% {\ifthirdargument \begingroup - \def\dolijstelement##1##2##3##4##5##6% + \def\dolijstelement##1##2##3##4##5##6% 2=aut 6=pag / 2 goes into text ref slot {\global\utilitydonetrue %{Watch the braces here below!} - %\setglobalcrossreference{{##1::\strippedlistentry[##5]}}{}{}{##6}}% - \setglobalcrossreference{{##1::\strippedlistentry[##5]}}{}{##6}{}}% + \setglobalcrossreference{{##1::\strippedlistentry[##5]}}{}{##6}{##2}}% \def\usereferences[##1]% {\setbox0=\vbox{\doutilities{#3}{##1}{#3}{}{}}}% \dogebruikexterndocument[#1][#2][#4]% \doglobal\addtocommalist{#1}\crossdocumentreferences \def\docommando##1% - {\doglobal\addtocommalist{##1}\crossdocumentelements}% + {\setxvalue{\??rf##1\c!status}{\v!start}% for fast checking + \doglobal\addtocommalist{##1}\crossdocumentelements}% \processcommalist[#3]\docommando \ifutilitydone \global\autocrossdocumenttrue @@ -2796,8 +2968,8 @@ \checkinteractiebalk{1.5em}\v!ruim\!!zeropoint % brrrrr \setbox2=\hbox {\setupsymbolset[\@@iasymboolset]% - \localframed[\??ib][]{\symbol[\v!vorigepagina]}}% - \!!heighta=\ht2 + \localframed[\??ib][#1,\c!achtergrond=]{\symbol[\v!vorigepagina]}}% + \!!heighta=\ht2 % needed because we default to nothing \stelinteractiebalkin[#1,\c!strut=\v!nee]% \setupinteraction[\c!breedte=\!!zeropoint]% %\!!counta=1 @@ -2827,6 +2999,7 @@ \edef\localreference{##1}% \dodocomplexbutton\??ib [\c!hoogte=\!!heighta,\c!breedte=\!!widtha]% +% funny buggy left over: [\c!breedte=\!!widtha]% {\dontleavehmode\symbol[\localreference]}% [\localreference]% \hss}% @@ -2912,6 +3085,7 @@ \setupreferencing [\c!status=\v!start, + \c!autofile=\v!nee, \v!deel\c!nummer=\v!ja, \v!hoofdstuk\c!nummer=\v!nee, \c!interactie=\v!alles, @@ -2919,12 +3093,13 @@ %\c!urlspatie=\v!nee, %\c!urlletter=, %\c!urlkleur=, - \c!converteerfile=\v!ja, + \c!converteerfile=\v!nee, %\c!strut=\v!nee, % some day an option \c!prefix=, \c!breedte=.75\zetbreedte, \c!links=\citaat\bgroup, \c!rechts=\egroup, + \c!globaal=\v!nee, \c!scheider=~] \setupurl diff --git a/tex/context/base/core-rul.tex b/tex/context/base/core-rul.tex index c25fa87fb..26f93fb9d 100644 --- a/tex/context/base/core-rul.tex +++ b/tex/context/base/core-rul.tex @@ -164,10 +164,18 @@ %D A quite valid way of letting drivers do the job, is giving %D a solid rule a gray texture. +\def\raster[#1]% + {\groupedcommand{\startraster[#1]}{\stopraster}} + \def\setgraybox\width#1\height#2\depth#3\raster#4\corner#5\radius#6\\% - {\startraster[#4]% - \dofilledbox\width#1\height#2\depth#3\corner#5\radius#6\\% - \stopraster} + {\doifelsenothing{#4} % avoid black rules when no gray + {\dophantombox\width#1\height#2\depth#3\corner#5\radius#6\\} + {\raster[#4]% + {\dofilledbox \width#1\height#2\depth#3\corner#5\radius#6\\}}} + +%D The auxiliary macro is defined as: + +\def\dophantombox#1\\{\hphantom{\dofilledbox#1\\}} %D We don't have to stick to a \TEX\ drawn rule, but %D also can use rounded or even fancier shapes, as we will @@ -218,19 +226,18 @@ \def\setcolorbox\width#1\height#2\depth#3\color#4\corner#5\radius#6\\% {\ifincolor - \doifsomething{#4} - {\startcolor[#4]% - \dofilledbox\width#1\height#2\depth#3\corner#5\radius#6\\% - \stopcolor}% + \doifcolorelse{#4}{\color[#4]% + {\dofilledbox \width#1\height#2\depth#3\corner#5\radius#6\\}} + {\dophantombox\width#1\height#2\depth#3\corner#5\radius#6\\}% \else - \dofilledbox\width#1\height#2\depth#3\corner#5\radius#6\\% + \dophantombox\width#1\height#2\depth#3\corner#5\radius#6\\% \fi} \def\colorbox% {\setcolorbox} %D \macros -%D {defineoverlay, +%D {defineoverlay,doifoverlayelse, %D overlaywidth, overlayheight, overlaydepth, %D overlaycolor, overlaylinecolor, overlaylinewidth} %D @@ -287,12 +294,12 @@ %D %D The resulting box is lowered to the right depth. -\def\overlaywidth {\the\vsize} % We preset the variables -\def\overlayheight {\the\hsize} % to some reasonable default -\let\overlaydepth \!!zeropoint % values. The attributes -\let\overlaycolor \empty % of the frame can be (are) -\let\overlaylinewidth \!!zeropoint % set somewhere else. -\let\overlaylinecolor \empty % +\def\overlaywidth {\the\vsize\space} % We preset the variables +\def\overlayheight {\the\hsize\space} % to some reasonable default +\let\overlaydepth \!!zeropoint % values. The attributes +\let\overlaycolor \empty % of the frame can be (are) +\let\overlaylinewidth \!!zeropoint % set somewhere else. +\let\overlaylinecolor \empty % \newtoks\everyoverlay @@ -301,23 +308,23 @@ \def\dodefineoverlay[#1][#2]% {\def\docommando##1% - {\setvalue{executeoverlay##1}{\executedefinedoverlay##1\\#2\\}}% + {\setvalue{\??ov##1}{\executedefinedoverlay##1\\#2\\}}% \processcommalist[#1]\docommando} \long\def\executedefinedoverlay#1\\#2\\#3#4#5#6#7#8#9% {\bgroup \scratchdimen=#3% - \edef\overlaywidth{\the\scratchdimen}% + \edef\overlaywidth{\the\scratchdimen\space}% \scratchdimen=#4% \advance\scratchdimen by #5% - \edef\overlayheight{\the\scratchdimen}% + \edef\overlayheight{\the\scratchdimen\space}% \scratchdimen=#5% - \edef\overlaydepth{\the\scratchdimen}% + \edef\overlaydepth{\the\scratchdimen\space}% \edef\overlaycolor{#6}% -\prependtoks - \hsize=\overlaywidth - \vsize=\overlayheight -\to\everyoverlay + \prependtoks + \hsize=\overlaywidth + \vsize=\overlayheight + \to\everyoverlay %\writestatus % {overlay} % {#1\space w=\overlaywidth/h+d=\overlayheight/d=\overlaydepth]}% @@ -339,12 +346,17 @@ \def\executeoverlay#1#2#3#4#5#6#7% {} +%D For testing we provide: + +\def\doifoverlayelse#1% + {\doifdefinedelse{\??ov#1}} + %D We predefine two already familiar backgrounds: -\setvalue{executeoverlay\v!raster}#1#2#3#4#5#6#7% +\setvalue{\??ov\v!raster}#1#2#3#4#5#6#7% {\graybox\width#1\height#2\depth#3\raster#5\corner#6\radius#7\\} -\setvalue{executeoverlay\v!kleur}#1#2#3#4#5#6#7% +\setvalue{\??ov\v!kleur}#1#2#3#4#5#6#7% {\colorbox\width#1\height#2\depth#3\color#4\corner#6\radius#7\\} %D After all these preparations, the background macro does no @@ -358,21 +370,30 @@ %D \som a \TEX\ or driver based method %D \stopopsomming %D -%D Here we go: +%D The macro can be extended by adding commands to the token +%D list register \type {\everybackgroundbox}. For this +%D purpose, the name of the current background is available in +%D \type {\currentbackgound}. \newbox\extraframebox +\newtoks\everybackgroundbox + +\let\currentbackground\empty + \def\dodobackgroundbox#1#2#3#4#5#6% {\bgroup + \def\currentbackground{#1}% + \the\everybackgroundbox \setbox\extraframebox=\hbox - {\executeifdefined{executeoverlay#1}\gobblesevenarguments + {\executeifdefined{\??ov\currentbackground}\gobblesevenarguments {\dimen2}{\dimen4}{\dimen6}{#3}{#4}{#5}{#6}}% \setbox\extraframebox=\hbox {\vbox{\moveleft\dimen0\box\extraframebox}}% - \wd\extraframebox=\backgroundwidth + \wd\extraframebox=\!!zeropoint % \backgroundwidth \ht\extraframebox=\backgroundheight \dp\extraframebox=\backgrounddepth - \box\extraframebox\hskip-\backgroundwidth + \box\extraframebox % \hskip-\backgroundwidth \egroup} \def\dobackgroundbox#1\background#2\color#3\raster#4\offset#5\corner @@ -383,18 +404,20 @@ \dimen2=\wd#1\advance\dimen2 by 2\dimen0 \dimen4=\ht#1\advance\dimen4 by \dimen0 \dimen6=\dp#1\advance\dimen6 by \dimen0\advance\dimen6 by #8\relax + \edef\backgroundwidth {\the\wd#1}% + \edef\backgroundheight{\the\ht#1}% + \edef\backgrounddepth {\the\dp#1}% + %\edef\foregroundbox{\box#1}% + \def\foregroundbox% fuzzy but needed hack, this \vss, otherwise + {\vbox to \backgroundheight{\vss\box#1\vss}}% vertical shift \def\docommando##1% {\dodobackgroundbox{##1}{#1}{#3}{#4}{#6}{#7}}% - \hbox - {\edef\backgroundwidth {\the\wd#1}% - \edef\backgroundheight{\the\ht#1}% - \edef\backgrounddepth {\the\dp#1}% - \edef\foregroundbox{\box#1}% - \expanded{\rawprocesscommalist[#2]\noexpand\docommando}% - \box#1}}} + \hbox to \backgroundwidth % in case 'foreground' is uses as overlay + {\expanded{\rawprocesscommalist[#2]\noexpand\docommando}% + \box#1\hss}}} %D One can explictly insert the foreground box. For that -%D purpose we introduce the overlay \tyupe {foreground}. +%D purpose we introduce the overlay \type {foreground}. \defineoverlay[\v!voorgrond][\foregroundbox] @@ -536,6 +559,8 @@ %D mere fact that this way we can use the optional argument %D grabbers. +\def\defaultframeoffset{.25ex} + \unexpanded\def\framed% {\bgroup \presetlocalframed[\??ol]% @@ -576,7 +601,6 @@ \def\localframed% {\bgroup - \inframedtrue \dodoubleempty\startlocalframed} %D Before we go into details, we present (and implement) the @@ -592,16 +616,154 @@ %D backgrounds, when \type {#2} sets the offset to \type %D {overlay}, both offsets become invalid. +% \def\startlocalframed[#1][#2]% beware, also on cont-loc! +% {\bgroup +% \inframedtrue +% \edef\@@framed{#1}% +% % this piece of pre expansion is needed +% \scratchdimen\getvalue{\@@framed\c!kaderoffset}% +% \setevalue{\@@framed\c!kaderoffset}{\the\scratchdimen}% +% \doifnotvalue{\@@framed\c!achtergrondoffset}{\v!kader} +% {\scratchdimen\getvalue{\@@framed\c!achtergrondoffset}% +% \setevalue{\@@framed\c!achtergrondoffset}{\the\scratchdimen}}% +% % to prevent deadlock in case of self refering +% \ifsecondargument % faster +% \getparameters[\@@framed][#2]% here ! +% \fi +% % beware, both the frame and background offset can be overruled +% \edef\localoffset{\getvalue{\@@framed\c!offset}}% +% \edef\localwidth {\getvalue{\@@framed\c!breedte}}% +% \edef\localheight{\getvalue{\@@framed\c!hoogte}}% +% \edef\localformat{\getvalue{\@@framed\c!uitlijnen}}% +% \edef\localstrut {\getvalue{\@@framed\c!strut}}% +% \doifvaluesomething{\@@framed\c!lijndikte} % nested \framed inherits +% {\linewidth=\getvalue{\@@framed\c!lijndikte}}% +% \doifelsenothing{\localformat} +% {\boxhasformatfalse} +% {\boxhasformattrue +% \dosetraggedcommand{\localformat}% +% \edef\beforeframedbox{\raggedtopcommand\getvalue{\@@framed\c!boven}}% +% \edef\afterframedbox {\getvalue{\@@framed\c!onder}\raggedbottomcommand}}% +% \doifelse{\localoffset}{\v!geen} +% {\boxhasoffsetfalse +% \boxhasstrutfalse +% \boxisoverlaidfalse +% \@@localoffset=\linewidth} +% {\doifelse{\localoffset}{\v!overlay} +% {\boxhasoffsetfalse +% \boxhasstrutfalse +% \boxisoverlaidtrue +% \@@localoffset=\!!zeropoint} +% {\boxhasoffsettrue +% \boxhasstruttrue +% \boxisoverlaidfalse +% \ifx\localoffset\v!default % new per 2-6-2000 +% \let\localoffset\defaultframeoffset +% \letvalue{\@@framed\c!offset}\defaultframeoffset +% \else +% \let\defaultframeoffset\localoffset +% \fi +% \@@localoffset=\localoffset +% \advance\@@localoffset by \linewidth}}% +% \doifelse{\localwidth}{\v!passend} +% {\ifboxhasformat +% \boxhaswidthtrue +% \!!widtha=\hsize +% \else +% \boxhaswidthfalse +% \fi} +% {\boxhaswidthtrue +% \doifelse{\localwidth}{\v!ruim} +% {\!!widtha=\hsize} +% {\!!widtha=\localwidth}}% +% \doifelse{\localheight}{\v!passend} +% {\boxhasheightfalse} % no longer: \boxhasstrutfalse +% {\doifelse{\localheight}{\v!ruim} +% {\boxhasheightfalse} +% {\boxhasheighttrue +% \!!heighta=\localheight}}% +% \ifdim\!!widtha=\hsize +% \parindent=\!!zeropoint +% \setlocalhsize +% \!!widtha=\localhsize +% \fi +% \advance\!!widtha by -2\@@localoffset +% \advance\!!heighta by -2\@@localoffset +% \doif{\localstrut}{\v!nee} +% {\boxhasstrutfalse}% +% \ifboxhasstrut +% \setstrut +% \let\localbegstrut=\begstrut +% \let\localendstrut=\endstrut +% \let\localstrut =\strut +% \else +% \let\localbegstrut=\pseudobegstrut % was: \relax +% \let\localendstrut=\pseudoendstrut % was: \relax +% \let\localstrut =\pseudostrut % was: \relax +% %\ifboxhasheight\ifdim\!!heighta<\ht\strutbox % saveguard +% % \let\localbegstrut=\relax % but not that +% % \let\localstrut =\relax % save afterall +% %\fi\fi +% \fi +% \ifboxhasheight +% \let\\=\vboxednewline +% \ifboxhaswidth +% \let\hairline=\vboxedhairline +% \ifboxhasformat +% \let\next=\doformatboxSomeFormat +% \else +% \let\next=\doformatboxNoFormat +% \fi +% \else +% \let\hairline=\hboxedhairline +% \ifboxhasformat +% \let\next=\doformatboxHeight +% \else +% \let\next=\doformatboxVSize +% \fi +% \fi +% \else +% \ifboxhaswidth +% \ifboxhasformat +% \let\hairline=\vboxedhairline +% \let\\=\vboxednewline +% \let\next=\doformatboxWidth +% \else +% \let\hairline=\hboxedhairline +% \let\\=\hboxednewline +% \let\next=\doformatboxHSize +% \fi +% \else +% \let\hairline=\hboxedhairline +% \let\\=\hboxednewline +% \let\next=\doformatboxNoSize +% \fi +% \fi +% \def\dowithframedbox% +% {\let\postprocessframebox\undefined %new +% \aftergroup\stoplocalframed}% +% \edef\framedwidth % a new feature +% {\ifdim\!!widtha >\!!zeropoint\the\!!widtha \else\!!zeropoint\fi}% +% \edef\framedheight% a new feature +% {\ifdim\!!heighta>\!!zeropoint\the\!!heighta\else\!!zeropoint\fi}% +% \afterassignment\dowithframedbox +% \setbox\framebox=\next} + \def\startlocalframed[#1][#2]% {\bgroup + \inframedtrue \edef\@@framed{#1}% + % this piece of pre expansion is needed \scratchdimen\getvalue{\@@framed\c!kaderoffset}% \setevalue{\@@framed\c!kaderoffset}{\the\scratchdimen}% - \scratchdimen\getvalue{\@@framed\c!achtergrondoffset}% - \setevalue{\@@framed\c!achtergrondoffset}{\the\scratchdimen}% + \doifnotvalue{\@@framed\c!achtergrondoffset}{\v!kader} + {\scratchdimen\getvalue{\@@framed\c!achtergrondoffset}% + \setevalue{\@@framed\c!achtergrondoffset}{\the\scratchdimen}}% + % to prevent deadlock in case of self refering \ifsecondargument % faster \getparameters[\@@framed][#2]% here ! \fi + % beware, both the frame and background offset can be overruled \edef\localoffset{\getvalue{\@@framed\c!offset}}% \edef\localwidth{\getvalue{\@@framed\c!breedte}}% \edef\localheight{\getvalue{\@@framed\c!hoogte}}% @@ -609,45 +771,59 @@ \edef\localstrut{\getvalue{\@@framed\c!strut}}% \doifvaluesomething{\@@framed\c!lijndikte} {\linewidth=\getvalue{\@@framed\c!lijndikte}}% - \doifelsenothing{\localformat} - {\boxhasformatfalse} - {\boxhasformattrue - \dosetraggedcommand{\localformat}% - \edef\beforeframedbox{\raggedtopcommand\getvalue{\@@framed\c!boven}}% - \edef\afterframedbox {\getvalue{\@@framed\c!onder}\raggedbottomcommand}}% - \doifelse{\localoffset}{\v!geen} - {\boxhasoffsetfalse - \boxhasstrutfalse - \boxisoverlaidfalse - \@@localoffset=\linewidth} - {\doifelse{\localoffset}{\v!overlay} - {\boxhasoffsetfalse - \boxhasstrutfalse - \boxisoverlaidtrue - \@@localoffset=\!!zeropoint} - {\boxhasoffsettrue - \boxhasstruttrue - \boxisoverlaidfalse - \@@localoffset=\localoffset - \advance\@@localoffset by \linewidth}}% - \doifelse{\localwidth}{\v!passend} - {\ifboxhasformat - \boxhaswidthtrue - \!!widtha=\hsize - \else - \boxhaswidthfalse - \fi} - {\doifelse{\localwidth}{\v!ruim} - {\boxhaswidthtrue - \!!widtha=\hsize} - {\boxhaswidthtrue - \!!widtha=\localwidth}}% - \doifelse{\localheight}{\v!passend} - {\boxhasheightfalse} % no longer: \boxhasstrutfalse - {\doifelse{\localheight}{\v!ruim} - {\boxhasheightfalse} - {\boxhasheighttrue - \!!heighta=\localheight}}% + \ifx\localformat\empty + \boxhasformatfalse + \else + \boxhasformattrue + \dosetraggedcommand{\localformat}% + \edef\beforeframedbox{\raggedtopcommand\getvalue{\@@framed\c!boven}}% + \edef\afterframedbox {\getvalue{\@@framed\c!onder}\raggedbottomcommand}% + \fi + \ifx\localoffset\v!geen + \boxhasoffsetfalse + \boxhasstrutfalse + \boxisoverlaidfalse + \@@localoffset=\linewidth + \else\ifx\localoffset\v!overlay + \boxhasoffsetfalse + \boxhasstrutfalse + \boxisoverlaidtrue + \@@localoffset=\!!zeropoint + \else + \boxhasoffsettrue + \boxhasstruttrue + \boxisoverlaidfalse + \ifx\localoffset\v!default % new per 2-6-2000 + \let\localoffset\defaultframeoffset + \letvalue{\@@framed\c!offset}\defaultframeoffset + \else + \let\defaultframeoffset\localoffset + \fi + \@@localoffset=\localoffset + \advance\@@localoffset by \linewidth + \fi\fi + \ifx\localwidth\v!passend + \ifboxhasformat + \boxhaswidthtrue + \!!widtha=\hsize + \else + \boxhaswidthfalse + \fi + \else\ifx\localwidth\v!ruim + \boxhaswidthtrue + \!!widtha=\hsize + \else + \boxhaswidthtrue + \!!widtha=\localwidth + \fi\fi + \ifx\localheight\v!passend + \boxhasheightfalse % no longer: \boxhasstrutfalse + \else\ifx\localheight\v!ruim + \boxhasheightfalse + \else + \boxhasheighttrue + \!!heighta=\localheight + \fi\fi \ifdim\!!widtha=\hsize \parindent=\!!zeropoint \setlocalhsize @@ -655,8 +831,9 @@ \fi \advance\!!widtha by -2\@@localoffset \advance\!!heighta by -2\@@localoffset - \doif{\localstrut}{\v!nee} - {\boxhasstrutfalse}% + \ifx\localstrut\v!nee + \boxhasstrutfalse + \fi \ifboxhasstrut \setstrut \let\localbegstrut=\begstrut @@ -715,7 +892,9 @@ \afterassignment\dowithframedbox \setbox\framebox=\next} - +\let\afterframedbox \relax +\let\beforeframedbox\relax + %D Carefull analysis of this macro will learn us that not all %D branches in the last conditionals can be encountered, that %D is, some assignments to \type{\next} will never occur. @@ -739,6 +918,8 @@ \doif{\localwidth}{\v!passend} {\ifreshapeframebox\doreshapeframedbox\fi \boxhaswidthfalse}% + \else + \resetshapeframebox \fi \ifboxhaswidth \wd\framebox=\!!widtha @@ -759,9 +940,9 @@ \ifx\postprocessframebox\undefined \else \postprocessframebox\framebox \fi - \doifelsevalue{\@@framed\c!kader}{\v!overlay} - {\edef\overlaylinecolor{\getvalue{\@@framed\c!kaderkleur}}% - \edef\overlaylinewidth{\the\linewidth}}% + \edef\overlaylinecolor{\getvalue{\@@framed\c!kaderkleur}}% + \edef\overlaylinewidth{\the\linewidth}% + \doifnotvalue{\@@framed\c!kader}{\v!overlay} % faster -) {\doframedbox}% \doifvaluesomething{\@@framed\c!achtergrond} {\dobackedbox}% @@ -947,17 +1128,12 @@ %D putting rules around boxes, inserting offsets and aligning %D text. Each step is handled by separate macros. -\def\dooffsetframebox% - {\doifinstringelse{\getvalue{\@@framed\c!offset}}{\v!geen\c!offset} - {}{\doifelsevaluenothing{\@@framed\c!offset} - {}{\edef\do{\kern\getvalue{\@@framed\c!offset}}% - \setbox\framebox=\vbox{\do\hbox{\do\box\framebox\do}\do}}}} +\def\dowidenframebox#1% + {\setbox\framebox=\vbox + {\kern#1\hbox{\kern#1\box\framebox\kern#1}\kern#1}} -\def\dolocateframebox% - {\setbox\framebox=\vbox - {\kern\linewidth - \hbox{\kern\linewidth\box\framebox\kern\linewidth} - \kern\linewidth}} +\def\dooffsetframebox{\dowidenframebox\localoffset} +\def\dolocateframebox{\dowidenframebox\linewidth } %D Let's hope that the next few examples show us enough of %D what needs to be done by the auxiliary macros. @@ -1044,12 +1220,17 @@ %D have to take care of additional offsets. \def\dobackedbox% + {\doifelsevalue{\@@framed\c!achtergrondoffset}{\v!kader} % new + {\dodobackedbox\c!kaderoffset} + {\dodobackedbox\c!achtergrondoffset}} + +\def\dodobackedbox#1% {\setbox\framebox=\vbox {\dobackgroundbox\framebox \background \getvalue{\@@framed\c!achtergrond}% \color \getvalue{\@@framed\c!achtergrondkleur}% \raster \getvalue{\@@framed\c!achtergrondraster}% - \offset \getvalue{\@@framed\c!achtergrondoffset}% + \offset \getvalue{\@@framed#1}% \corner \getvalue{\@@framed\c!achtergrondhoek}% \radius \getvalue{\@@framed\c!achtergrondstraal}% \depth \getvalue{\@@framed\c!achtergronddiepte}\\}} @@ -1200,18 +1381,33 @@ %D \egroup %D \stopuitstellen +%D \macros +%D {framednoflines, framedlastlength} +%D %D It is possible to let the frame macro calculate the width %D of a centered box automatically (\type{\v!passend}). When %D doing so, we need to reshape the box: +\newcount\framednoflines +\newdimen\framedlastlength + +\def\resetshapeframebox% + {\framednoflines=0 + \framedlastlength=\!!zeropoint} + \def\doreshapeframedbox% {\beginofshapebox \unvcopy\framebox \endofshapebox \global\@@globalwidth=\!!zeropoint + \resetshapeframebox \reshapebox {\setbox0=\hbox {\strut\ifhbox\shapebox\unhbox\else\box\fi\shapebox}% + \global\advance\framednoflines by 1 + \ifdim\framedlastlength>\!!zeropoint\else + \global\framedlastlength=\wd0 + \fi \ifdim\wd0>\@@globalwidth \global\@@globalwidth=\wd0 \fi}% @@ -1230,7 +1426,13 @@ \reshapebox{\hbox to \hsize{\ifhbox\shapebox\unhbox\else\box\fi\shapebox}}% \innerflushshapebox}% \dp\framebox=\dp\strutbox - \fi} + \fi + \ifdim\framedlastlength=\!!zeropoint\global\framednoflines=\wd\framebox\fi + \ifcase\framednoflines\global\framednoflines=1\fi} + +%D The two variables \type {\framednoflines} and \type +%D {\framedlastlength} can be used in a second pass to +%D optimized framed material. %D The examples on the next page show how one can give the %D frame as well as the background an additional offset and @@ -1783,8 +1985,7 @@ {\ifoptimizethinrules\penalty500\fi} %D \macros -%D {startframedtext, setupframedtexts, -%D defineframedtext, start<<framedtext>>, <<framedtext>>} +%D {startframedtext, setupframedtexts, defineframedtext} %D %D The general framing command we discussed previously, is not %D entirely suited for what we call framed texts, as for @@ -2076,7 +2277,7 @@ {\bgroup \advance\hsize by -\rightskip \advance\hsize by -\leftskip - \setbox0=\hbox to \hsize + \setbox\scratchbox=\hbox to \hsize {\dimen4=.5ex \dimen6=-.5ex \advance\dimen4 by .5\linewidth @@ -2093,9 +2294,9 @@ \fi \color[\@@tllijnkleur] {\leaders\hrule\!!height\dimen4\!!depth\dimen6\hfill}}% - \ht0=\ht\strutbox - \dp0=\dp\strutbox - \noindent\box0 + \ht\scratchbox=\ht\strutbox + \dp\scratchbox=\dp\strutbox + \noindent\box\scratchbox \egroup} \def\dotoptextrule#1% @@ -2113,7 +2314,7 @@ \fi \dimen0=\dp\strutbox \ifdim\prevdepth<\dp\strutbox - \ifdim\prevdepth>\!!zeropoint + \ifdim\prevdepth>\!!zeropoint \advance\dimen0 by -\prevdepth \fi \fi @@ -2493,7 +2694,7 @@ \setupframed [\c!breedte=\v!passend, \c!hoogte=\v!ruim, - \c!offset=0.25ex, + \c!offset=0.25ex, % \defaultframeoffset \c!leeg=\v!nee, \c!kader=\v!aan, \c!bovenkader=, diff --git a/tex/context/base/core-sec.tex b/tex/context/base/core-sec.tex index ea24cf852..e37f015fa 100644 --- a/tex/context/base/core-sec.tex +++ b/tex/context/base/core-sec.tex @@ -8,8 +8,8 @@ %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. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. \writestatus{loading}{Context Core Macros / Sectioning} @@ -37,7 +37,19 @@ 2: konec oddilu (sekce) -- \stopmessages -\unprotect +\startmessages italian library: structures + title: struttura + 1: inizio del blocco (sezione) -- + 2: fine del blocco (sezione) -- +\stopmessages + +\startmessages norwegian library: structures + title: struktur + 1: starten av blokk -- (seksjon) + 2: slutten av blokk -- (seksjon) +\stopmessages + +\unprotect \def\dodochecknummer#1#2#3% {\bgroup @@ -125,7 +137,7 @@ \huidigenummer[#1]% \rawreference{#2}{#3}{\hetnummer}} -% sectioning +% sectioning \newcount\nofsections @@ -152,7 +164,7 @@ \setvalue{\??by\v!per }{\v!tekst} \setvalue{\??by\v!per\v!tekst }{\v!tekst} \setvalue{\??by\v!per\v!alles }{\v!tekst} -\setvalue{\??by\v!per\v!pagina}{\v!tekst} % see footnotes +\setvalue{\??by\v!per\v!pagina}{\v!tekst} % see footnotes %%%%%%%%% old @@ -165,7 +177,7 @@ \def\stelsectiein% {\dodoubleargument\dostelsectiein} -%%%%%%%%% new, multilingual +%%%%%%%%% new, multilingual \def\dostelsectiein[#1][#2][#3]% {\ifthirdargument @@ -255,10 +267,10 @@ % \def\@@sectionconversion#1% % {\getvalue{\??cv\getvalue{\??se#1\@@sectieblok\c!conversie}}} -% suited for chinese too: +% suited for chinese too: \def\@@sectionconversion#1#2% a doublure with \@@shortsectionnumber - {\ifnum#2=0 0\else % else troubles with \uchar + {\ifnum#2=0 0\else % else troubles with \uchar \@EA\ifx\csname\??se#1\@@sectieblok\c!conversie\endcsname\relax \@EA\ifx\csname\??se#1\c!conversie\endcsname\relax #2% @@ -398,7 +410,7 @@ \@@sectionconversion{#1}{\@@sectionvalue{#1}}% \fi} -% suited for chinese too: +% suited for chinese too: \def\@@shortsectionnumber#1% {\@EA\ifx\csname\??se#1\@@sectieblok\c!conversie\endcsname\relax @@ -424,11 +436,12 @@ \def\dostartsectieblok#1#2% {\begingroup - \doaroundsectieblok{#1}% - \getvalue{\??sb#1}% - \expandafter\csname#2true\endcsname % vervangen door mode - \enablemode[\systemmodeprefix#1]% - \getvalue{\??sb\@@sectieblok\c!voor}% don't move + \doaroundsectieblok{#1}% % going to a new page or so + \getvalue{\??sb#1}% % set name of section block + \getsectieblokomgeving{#1}% % special settings, grouped + %\expandafter\csname#2true\endcsname % obsolete + \enablemode[\systemmodeprefix#1]% % can be used in conditionals + \getvalue{\??sb\@@sectieblok\c!voor}% this one is not to be moved! \showmessage{\m!structures}{1}{\@@sectieblokken}} \def\dostopsectieblok% @@ -443,10 +456,43 @@ \def\stelsectieblokin% {\dodoubleargument\dostelsectieblokin} -% We used to use the first char as id, but a counter is -% better, because in english we get a name clash. - -\newcounter\currentsectionblock +\long\def\setsectieblokomgeving#1#2% + {\long\setvalue{\??sb\s!do#1}{\do{#2}}} + +\def\getsectieblokomgeving#1% + {\let\do\firstofoneargument\getvalue{\??sb\s!do#1}} + +\setvalue{\e!start\e!sectieblokomgeving}% + {\dosingleargument\dostartsectieblokomgeving} + +\def\dostartsectieblokomgeving[#1]% evt \pushendofline \popendofline + {\long\def\do##1##2{\setsectieblokomgeving{#1}{##1##2}}% + \grabuntil{\e!stop\e!sectieblokomgeving}{\getvalue{\??sb\s!do#1}}} + +%D \starttypen +%D \startsectionblockenvironment[frontpart] +%D \setuppagenumbering[conversion=romannumerals] +%D \stopsectionblockenvironment +%D +%D \startsectionblockenvironment[bodypart] +%D \setuppagenumber[number=1] +%D \stopsectionblockenvironment +%D +%D \startsectionblockenvironment[frontpart] +%D \setuppagenumbering[conversion=character] +%D \stopsectionblockenvironment +%D +%D \starttext +%D \startfrontmatter \chapter{test} \stopfrontmatter +%D \startbodymatter \chapter{test} \stopbodymatter +%D \startappendices \chapter{test} \stopappendices +%D \stoptext +%D \stoptypen + +% We used to use the first char as id, but a counter is +% better, because in english we get a name clash. + +\newcounter\currentsectionblock \def\dodefinieersectieblok[#1][#2][#3]% {\getparameters @@ -457,7 +503,8 @@ %\c!na=, #3]% \expandafter\newif\csname if#2\endcsname - \doglobal\increment\currentsectionblock + \doglobal\increment\currentsectionblock + \setsectieblokomgeving{#1}{}% \setevalue{\??sb#1}% {\noexpand\dosetlocalsectieblok{\currentsectionblock}{#1}{#2}}% \setvalue{\e!start#2}% @@ -557,17 +604,17 @@ %\def\dolocalkopsetup#1% koppeling met standaard kopcommando / engels % {\forgetall -% \doifvaluesomething{\??ko#1\c!uitlijnen} +% \doifvaluesomething{\??ko#1\c!uitlijnen} % {\ExpandFirstAfter\steluitlijnenin[\getvalue{\??ko#1\c!uitlijnen}]}% -% \doifvaluesomething{\??ko#1\c!tolerantie} +% \doifvaluesomething{\??ko#1\c!tolerantie} % {\ExpandFirstAfter\steltolerantiein[\getvalue{\??ko#1\c!tolerantie}]}% % \def\\{\crlf\strut\ignorespaces}} \def\dolocalkopsetup#1% koppeling met standaard kopcommando / engels {\forgetall - \doifvaluesomething{\??ko#1\c!uitlijnen} + \doifvaluesomething{\??ko#1\c!uitlijnen} {\expanded{\steluitlijnenin[\getvalue{\??ko#1\c!uitlijnen}]}}% - \doifvaluesomething{\??ko#1\c!tolerantie} + \doifvaluesomething{\??ko#1\c!tolerantie} {\expanded{\steltolerantiein[\getvalue{\??ko#1\c!tolerantie}]}}% \def\\{\crlf\strut\ignorespaces}} @@ -651,7 +698,7 @@ \def\setsomeheadconversion#1#2% {\someheadconversionfalse - \doifelsevalue{\??ko#1\c!eigennummer}{\v!ja} + \doifelsevalue{\??ko#1\c!eigennummer}{\v!ja} {\def\someheadconversion{#2}} {\bepaalkopnummer[#1]% \@EA\ifx\csname\??se\@@sectie\@@sectieblok\c!kopconversie\endcsname\relax @@ -674,11 +721,11 @@ \def\someheadconversion% {\fullsectionnumber{#1}{\getvalue{\??se\@@sectie\@@sectieblok\c!kopconversie}}{#2}}% \fi - \fi}} + \fi}} -\def\writtenfullsectionnumber{\string\fullsectionnumber} -\def\ignoredfullsectionnumber#1#2#3{#3} -\let\storedfullsectionnumber\relax + \def\writtenfullsectionnumber {\string\fullsectionnumber} + \def\ignoredfullsectionnumber#1#2#3{#3} + \let \storedfullsectionnumber \relax \unexpanded\def\naturalfullsectionnumber#1#2#3{\sectiebloklabel{#1}{\getvalue{\??cv#2}{#3}}} \unexpanded\def\limitedfullsectionnumber#1#2#3{\getvalue{\??cv#2}{#3}} @@ -694,7 +741,7 @@ % \dodododosomekop IS NON GROUPED, SO WE NEED TO RESTORE !!!! % -% dit kan dus beter \everyaroundhead zijn +% dit kan dus beter \everyaroundhead zijn \def\dodododosomekop#1[#2]#3#4#5% % pas met \ExpandFirstAfter op bij twee||taligheid {\flushingcolumnfloatsfalse % #3=#1=redundant @@ -745,7 +792,7 @@ \getvalue{\e!volgende\@@sectie}% \getvalue{\??ko#1\c!tussen}% \ifkopnummer -\setsomeheadconversion{#1}{#4}% +\setsomeheadconversion{#1}{#4}% \ifsomeheadconversion \let\fullsectionnumber\naturalfullsectionnumber \doplaatskopnummertekst @@ -780,7 +827,7 @@ {\marking[#1]{#5}% \doifelsevalue{\??ko#1\c!eigennummer}{\v!ja} % rommelig omdat {\edef\finalsectionnumber{#4}} % #4 al is toegekend - {\bepaalkopnummer[#1]}% migreert naar 3e argument + {\bepaalkopnummer[#1]}% migreert naar 3e argument \expanded{\marking[#1\v!nummer]{\finalsectionnumber}}}% \writesection{#1}{#4}{#5}% \fi @@ -818,7 +865,7 @@ \resetsectionmarks[\@@sectie]% \marking[#1]{#5}% \doifelsevalue{\??ko#1\c!eigennummer}{\v!ja} - {\edef\finalsectionnumber{#4}} + {\edef\finalsectionnumber{#4}} {\bepaalkopnummer[#1]}% \expanded{\marking[#1\v!nummer]{\finalsectionnumber}}% \ExpandFirstAfter\soortpagina[\@@koppeling]% @@ -869,7 +916,7 @@ \def\doplaatskoptekst#1#2#3#4% {\beginheadplacement{#1}% - \setbox0=\hbox + \setbox0=\ifvertical\vbox\else\hbox\fi % \vhbox {\getvalue{\??ko#1\c!commando} {} % no number {\doattributes @@ -897,7 +944,7 @@ \def\doplaatskopnummertekst#1#2#3#4#5% {\beginheadplacement{#1}% - \setbox0=\hbox + \setbox0=\ifvertical\vbox\else\hbox\fi % \vhbox {\getvalue{\??ko#1\c!commando}% {\doattributes{\??ko#1}\c!letter\c!kleur {\doattributes{\??ko#1}\c!nummerletter\c!nummerkleur @@ -953,27 +1000,35 @@ \startsynchronisatie} \def\endheadplacement#1#2% - {\doifvaluenothing{\??ko#1\c!file}{\locationfalse}% + {\doifelsevalue{\??rf#1\c!status}{\v!start} + {\doifvaluenothing{\??ko#1\c!file}{\autocrossdocumentfalse}} + {\autocrossdocumentfalse}% + % no message needed here, should be a proper switch + \let\unknownreference\relax + % \ifdisplaysectionhead \let\headlastlinewidth\!!zeropoint \snaptogrid\hbox {\iflocation \ifautocrossdocument - \naarbox{\box0}[\getvalue{\??ko#1\c!file}::#1]% + \doifreferencefoundelse{\getvalue{\??ko#1\c!file}::#1} + {\edef\currentinnerreference{\s!aut:\currenttextreference}% stored in + \gotoouterlocation{}{\box0}} % text slot + {\hbox{\box0}}% \else \hbox{\box0}% \fi \else \hbox{\box0}% - \fi - \doflushfootnotes}% new + \fi}% + \doflushfootnotes % new, not really needed \endgraf \nointerlineskip \dosomebreak\nobreak #2% \else \strut - \doflushfootnotes % new + \doflushfootnotes % new, here since we're in par mode \iflocation \ifautocrossdocument \hhboxindent=\ifcontinuoushead\headlastlinewidth\else\!!zeropoint\fi @@ -1003,7 +1058,6 @@ \stopsynchronisatie \egroup \egroup - \doflushfootnotes % new, still needed? \ifdisplaysectionhead \doifvalue{\??ko#1\c!springvolgendein}{\v!nee}{\noindentation}% \else @@ -1088,8 +1142,8 @@ \def\plaatskopalinea#1#2% {\vbox - {\localkopsetup - \begstrut\doifsomething{#1}{#1\hskip\numberheaddistance}#2}} + {\localkopsetup + \begstrut\doifsomething{#1}{#1\hskip\numberheaddistance}#2}} \def\plaatskopnormaal#1#2% {\doifelsenothing{#1} @@ -1124,7 +1178,7 @@ \def\plaatskopintekst#1#2% {\bgroup - \localkopsetup % no stretch in distance + \localkopsetup % no stretch in distance \doifsomething{#1}{{#1}\kern\numberheaddistance}{\begstrut#2}% \egroup} @@ -1469,7 +1523,7 @@ [\v!sub\v!sub\v!sub\v!sub\v!paragraaf] [\c!breedte=7em] -% hm +% hm \stelnummeringin % na instellen hoofdteksten ! [\c!variant=\v!enkelzijdig, @@ -1485,7 +1539,7 @@ \c!tekstscheider=\tfskip, \c!status=\v!start, \c!commando=, - \c!letter=\v!normaal, + \c!letter=, % \v!normaal, % empty, otherwise conflict \c!kleur=] -\protect \endinput +\protect \endinput diff --git a/tex/context/base/core-syn.tex b/tex/context/base/core-syn.tex index ad19dc973..6b6678392 100644 --- a/tex/context/base/core-syn.tex +++ b/tex/context/base/core-syn.tex @@ -327,7 +327,9 @@ \dowritesort{#2}{#4}{#4}% \fi} -\def\dodefinieersorteren[#1][#2][#3]% +% if #3=\relax or \v!geen, then no command but still protected + +\def\dodefinieersorteren[#1][#2][#3]% {\getparameters[\??so#1] [%\c!commando=, % we test for defined ! \c!status=\v!start, @@ -336,11 +338,13 @@ \c!voor=, \c!na=\endgraf]% \presetheadtext[#2=\Word{#2}]% - \setvalue{\e!stel#2\e!in}[##1]% vervalt tzt + \setvalue{\e!stel#2\e!in}[##1]% vervalt tzt, soort oo-mode {\getparameters[\??so#1][##1]}% \ifthirdargument - \def#3##1% - {\getvalue{\??so:#1:##1}} + \ConvertConstantAfter\doifnot{#3}{\v!geen} + {\ifx#3\relax \else + \def#3##1{\getvalue{\??so:#1:##1}} + \fi}% \setvalue{#1}% {\dotripleempty\docomplexsort[\??so:#1:][#1]}% \else diff --git a/tex/context/base/core-tab.tex b/tex/context/base/core-tab.tex index b216cf448..58025c2b5 100644 --- a/tex/context/base/core-tab.tex +++ b/tex/context/base/core-tab.tex @@ -487,12 +487,13 @@ \def\EndTableParBox% {\removelastskip % added - %\MakeStrut{0pt}{\StrutDepthFactor\StrutUnit} % removed + %\MakeStrut{0pt}{\StrutDepthFactor\StrutUnit} % removed + \par \ifnum\prevgraf>0 \strut \vskip-\lineheight \fi % added \egroup % finishes the \vtop begun by \BeginTableParbox - \getboxheight\scratchdimen\of\box\scratchbox\relax % added - \ifdim\scratchdimen>\TABLEparheight % added - \global\TABLEparheight=\scratchdimen % added - \fi % added + \getboxheight\scratchdimen\of\box\scratchbox\relax % added + \ifdim\scratchdimen>\TABLEparheight % added + \global\TABLEparheight=\scratchdimen % added + \fi % added \box\scratchbox} %D To give an impression of what the (well documented) source diff --git a/tex/context/base/core-tbl.tex b/tex/context/base/core-tbl.tex index db534fca7..9776464ac 100644 --- a/tex/context/base/core-tbl.tex +++ b/tex/context/base/core-tbl.tex @@ -129,7 +129,15 @@ \newbox \tabulatebox -\let\handletabulatecharalign\empty +% [|lg{.}|] => \NG 12.34 \NC + +\gdef\handletabulatecharalign#1 % space delimited ! + {\edef\alignmentclass{\tabulatecolumn}% + \edef\alignmentcharacter{\getvalue{\@@tabalign@@\tabulatecolumn}}% + \ifcase\tabulatepass\or + \setfirstpasscharacteralign\checkalignment{#1}% + \fi % force hsize + \setsecondpasscharacteralign\checkalignment{#1}} \def\noftabcolumns{16} % quick and dirty stack @@ -685,6 +693,7 @@ \setbox0=\vbox % outside if because of line counting {\footnotesenabledfalse \let\tabulateindent\!!zeropoint +\trialtypesettingtrue \@EA\halign\@EA{\the\!!toksa\cr\tabulatecontent\crcr}}% \ifnum\nofautotabulate>0 \tabulatewidth\hsize diff --git a/tex/context/base/core-uti.tex b/tex/context/base/core-uti.tex index 721ca9e69..8bd490fb8 100644 --- a/tex/context/base/core-uti.tex +++ b/tex/context/base/core-uti.tex @@ -163,6 +163,8 @@ \def\checkutilityfile% {} +\def\currentutilityfilename{\jobname} + \long\def\doutilities#1#2#3#4#5% % introduceren in utility file {\restorecatcodes \resetutilities @@ -170,9 +172,13 @@ {\getvalue{\s!set##1}}% % in een pass worden gedaan, \processcommacommand[#1]\docommando % zie bijvoorbeeld lijsten \begingroup + \def\currentutilityfilename{#2}% \footnotesenabledfalse \doinpututilitiestrue \global\utilitydonefalse +\catcode`\\=\@@escape +\catcode`\{=\@@begingroup +\catcode`\}=\@@endgroup \catcode`\%=\@@comment\relax \pushendofline % geeft problemen zodra andere file wordt ingelezen \ifunprotectutilities % nog nodig ? diff --git a/tex/context/base/core-var.tex b/tex/context/base/core-var.tex index 2b17ef1c5..ab9c3d6b0 100644 --- a/tex/context/base/core-var.tex +++ b/tex/context/base/core-var.tex @@ -29,6 +29,7 @@ \newevery \everystarttext \relax \newevery \everystoptext \relax \newevery \everypagebody \relax +\newevery \everyforgetall \relax %D \macros %D {ifproductionrun} diff --git a/tex/context/base/core-ver.tex b/tex/context/base/core-ver.tex index e85f23c7a..31a32f408 100644 --- a/tex/context/base/core-ver.tex +++ b/tex/context/base/core-ver.tex @@ -1,6 +1,6 @@ %D \module %D [ file=core-ver, -%D version=1996.06.01, +%D version=2000.05.09, %D title=\CONTEXT\ Core Macros, %D subtitle=Verbatim, %D author=Hans Hagen, @@ -33,6 +33,16 @@ 1: soubor -- neexistuje \stopmessages +\startmessages italian library: verbatims + title: verbatim + 1: il file -- non esiste +\stopmessages + +\startmessages norwegian library: verbatims + title: verbatim + 1: fil -- eksisterer ikke +\stopmessages + \unprotect % \type{ <crlf> char} geeft bagger @@ -46,41 +56,104 @@ \def\prettyidentifier {TEX} \def\prettypalet {} +% \def\setupprettiesintype#1% +% {\edef\prettyidentifier{#1}% +% \doifinstringelse{\prettyidentifier}{tex,TEX} +% {\def\prettyidentifier{TEX}} +% {\doifinstringelse{\prettyidentifier}{perl,pl,pm,PERL,PL,PM} +% {\def\prettyidentifier{PL}} +% {\doifinstringelse{\prettyidentifier}{metapost,mp,metafont,mf,METAPOST,MP,METAFONT,MF} +% {\def\prettyidentifier{MP}} +% {\doifinstringelse{\prettyidentifier}{javascript,js,java,jv,JAVASCRIPT,JS,JAVA,JV} +% {\def\prettyidentifier{JV}} +% {\doifinstringelse{\prettyidentifier}{sql,SQL} +% {\def\prettyidentifier{SQL}} +% {\doifinstringelse{\prettyidentifier}{pascal,pas,PAS,modula,mod,MOD,delphi,DELPHI} +% {\def\prettyidentifier{PAS}} +% {\doifinstringelse{\prettyidentifier}{eiffel,e,E,EIFFEL} +% {\def\prettyidentifier{EIF}} +% {\doifinstringelse{\prettyidentifier}{xml,XML} +% {\def\prettyidentifier{XML}} +% {\def\prettyidentifier{TEX}}}}}}}}}% +% \doifundefined{setuppretty\prettyidentifier type}% +% {\bgroup +% \setbox0=\hbox % get rid of spaces when in-line \newpretty loading +% {\restorecatcodes % also needed when loading during \newpretty +% \startreadingfile % restore < and > if needed +% \lowercasestring verb-\prettyidentifier.tex\to\filename +% \readsysfile{\filename}{}{} +% \stopreadingfile}% +% \egroup}% +% \doifdefinedelse{setuppretty\prettyidentifier type}% +% {\def\setupprettytype{\getvalue{setuppretty\prettyidentifier type}}} +% {\let\setupprettytype=\relax}} + +\def\installprettytype% + {\dodoubleargument\doinstallprettytype} + +\def\doinstallprettytype[#1][#2]% map #1 onto #2 + {\uppercasestring#1\to\asciiA + \uppercasestring#2\to\asciiB + \setevalue{\??ty\??ty\asciiA}{\asciiB}} + \def\setupprettiesintype#1% - {\edef\prettyidentifier{#1}% - \doifinstringelse{\prettyidentifier}{tex,TEX} - {\def\prettyidentifier{TEX}} - {\doifinstringelse{\prettyidentifier}{perl,pl,pm,PERL,PL,PM} - {\def\prettyidentifier{PL}} - {\doifinstringelse{\prettyidentifier}{metapost,mp,metafont,mf,METAPOST,MP,METAFONT,MF} - {\def\prettyidentifier{MP}} - {\doifinstringelse{\prettyidentifier}{javascript,js,java,jv,JAVASCRIPT,JS,JAVA,JV} - {\def\prettyidentifier{JV}} - {\doifinstringelse{\prettyidentifier}{sql,SQL} - {\def\prettyidentifier{SQL}} - {\def\prettyidentifier{TEX}}}}}}% + {\uppercasestring#1\to\ascii + \edef\prettyidentifier% + {\ifundefined{\??ty\??ty\ascii}TEX% + \else\getvalue{\??ty\??ty\ascii}\fi}% \doifundefined{setuppretty\prettyidentifier type}% {\bgroup \setbox0=\hbox % get rid of spaces when in-line \newpretty loading {\restorecatcodes % also needed when loading during \newpretty \startreadingfile % restore < and > if needed \lowercasestring verb-\prettyidentifier.tex\to\filename - \readsysfile{\filename}{}{} + \readsysfile{\filename}{}{}% \stopreadingfile}% \egroup}% \doifdefinedelse{setuppretty\prettyidentifier type}% {\def\setupprettytype{\getvalue{setuppretty\prettyidentifier type}}} {\let\setupprettytype=\relax}} +\installprettytype [TEX] [TEX] + +\installprettytype [PERL] [PL] +\installprettytype [PL] [PL] +\installprettytype [PM] [PL] + +\installprettytype [METAPOST] [MP] +\installprettytype [METAFONT] [MP] +\installprettytype [MP] [MP] +\installprettytype [MF] [MP] + +\installprettytype [JAVASCRIPT] [JV] +\installprettytype [JAVA] [JV] +\installprettytype [JS] [JV] +\installprettytype [JV] [JV] + +\installprettytype [SQL] [SQL] + +\installprettytype [PASCAL] [PAS] +\installprettytype [PAS] [PAS] +\installprettytype [MODULA] [PAS] +\installprettytype [MOD] [PAS] + +\installprettytype [EIFFEL] [EIF] +\installprettytype [EIF] [EIF] +\installprettytype [E] [EIF] + +\installprettytype [XML] [XML] + \installnewpretty M {\setupprettiesintype {MP}\setupprettytype} \installnewpretty P {\setupprettiesintype {PL}\setupprettytype} \installnewpretty T {\setupprettiesintype{TEX}\setupprettytype} \installnewpretty J {\setupprettiesintype {JV}\setupprettytype} \installnewpretty S {\setupprettiesintype{SQL}\setupprettytype} +\installnewpretty W {\setupprettiesintype{PAS}\setupprettytype} % Wirth +\installnewpretty E {\setupprettiesintype{EIF}\setupprettytype} +\installnewpretty X {\setupprettiesintype{XML}\setupprettytype} \def\setupcommonverbatim#1% - {\def\verbatimfont{\tttf}% - \def\prettyidentifier{TEX}% + {\def\prettyidentifier{TEX}% % \doifelsevalue{#1\c!tekst}{\v!ja} {\naturaltextexttrue}{\naturaltextextfalse}% @@ -106,8 +179,8 @@ \s!unknown=>\setupprettiesintype{\getvalue{#1\c!optie}}% \let\obeycharacters=\setupprettytype \let\obeytabs=\ignoretabs]% - \edef\prettypalet% - {\prettyidentifier\getvalue{#1\c!palet}}} + \def\verbatimfont{\getvalue{#1\c!letter}}% + \setupverbatimcolor{#1}} %D The verbatim commands have a rather long and turbulent %D history. Most users of \CONTEXT\ probably will never use @@ -153,7 +226,7 @@ \unexpanded\def\type% {\bgroup - \getvalue{\getvalue{\??ty\c!kleur}}% hm, assumes \somecolor + \verbatimcolor \catcode`\<=\@@other \catcode`\>=\@@other \futurelet\next\dotype} @@ -321,10 +394,36 @@ \fi \fi} +%\def\setupcommandsintype#1% +% {\setupgroupedtype +% \edef\!!stringa{\getvalue{#1\c!escape}}% +% \@EA\catcode\@EA`\!!stringa=\@@escape} + \def\setupcommandsintype#1% {\setupgroupedtype - \edef\!!stringa{\getvalue{#1\c!escape}}% - \@EA\catcode\@EA`\!!stringa=\@@escape} + \edef\\{\getvalue{#1\c!escape}}% + \letvalue{\\}=\\% for instance \/=/ + \@EA\catcode\@EA`\\=\@@escape + \def\BTEX##1\ETEX##2% ##2 gobbles active space + {\naturaltextext##1\unskip\relax}} + +%D The following lines show what happens when we set +%D \type {option=commands}. +%D +%D \startbuffer +%D \starttyping +%D test//test test/BTEX \footnote{test test test}/ETEX test +%D test//test test/BTEX \footnote{test test test}/ETEX test +%D test test test/BTEX \bf(nota bene)/ETEX test +%D test test test /BTEX \bf(nota bene)/ETEX test +%D \stoptyping +%D \stopbuffer +%D +%D % \bgroup\setuptyping[option=commands]\getbuffer\egroup +%D +%D this was keyed in as: +%D +%D \typebuffer \def\setupslantedtype% {\setupgroupedtype @@ -357,7 +456,7 @@ \def\initializetype% {\let\obeylines=\ignorelines - \setupcommonverbatim{\??ty}% + \setupcommonverbatim\??ty \setupinlineverbatim} %D \macros @@ -373,6 +472,7 @@ \setuptype [\c!spatie=\v!uit, \c!kleur=, + \c!letter=\tttf, \c!pagina=\v!nee, \c!tab=\v!nee, \c!optie=\v!normaal] @@ -514,7 +614,11 @@ \v!geen=>\scratchskip=\!!zeropoint, \s!unknown=>\scratchskip=\commalistelement]% \ifgridsnapping - \edef\verbatimbaselineskip{\the\baselineskip}% + \ifdim\scratchskip=.5\baselineskip\relax + \edef\verbatimbaselineskip{\the\scratchskip}% new + \else + \edef\verbatimbaselineskip{\the\baselineskip}% + \fi \else \edef\verbatimbaselineskip{\the\scratchskip}% \fi @@ -527,12 +631,12 @@ \def\dostarttyping#1% {\getvalue{\??tp#1\c!voor}% \startopelkaar % includes \bgroup - \startcolor[\getvalue{\??tp#1\c!kleur}]% \initializetyping{#1}% + \startverbatimcolor \expandafter\processdisplayverbatim\expandafter{\s!stop#1}} \def\dostoptyping#1% - {\stopcolor + {\stopverbatimcolor \stopopelkaar % includes \egroup \getvalue{\??tp#1\c!na}% \doifvalue{\??tp#1\c!springvolgendein}{\v!nee}{\noindentation}} @@ -584,9 +688,10 @@ \c!optie=\v!geen, \c!palet=colorpretty, \c!tekst=\v!nee, + \c!letter=\tttf, \c!icommando=\ttsl, \c!vcommando=, - \c!ccommando=\tf, + \c!ccommando=\tttf, \c!springvolgendein=\v!ja, \c!marge=\!!zeropoint, \c!evenmarge=\!!zeropoint, @@ -614,7 +719,7 @@ \def\presettyping[#1][#2]% {\copyparameters [\??tp#1][\??tp] - [\c!voor,\c!na,\c!spatie,\c!pagina,\c!tab,\c!kleur, + [\c!voor,\c!na,\c!spatie,\c!pagina,\c!tab,\c!kleur,\c!letter, \c!tekst,\c!icommando,\c!vcommando,\c!ccommando, \c!optie,\c!palet,\c!marge,\c!evenmarge,\c!onevenmarge, \c!springvolgendein,\c!blanko,\c!escape]% @@ -632,13 +737,20 @@ \definetyping[\v!typen] -\definetyping[MP] [\c!optie=MP] -\definetyping[PL] [\c!optie=PL] -\definetyping[PM] [\c!optie=PL] -\definetyping[JS] [\c!optie=JS] -\definetyping[JV] [\c!optie=JV] -\definetyping[SQL][\c!optie=SQL] -\definetyping[TEX][\c!optie=TEX] +\definetyping[MP] [\c!optie=MP] +\definetyping[PL] [\c!optie=PL] +\definetyping[PM] [\c!optie=PL] +\definetyping[JS] [\c!optie=JS] +\definetyping[JV] [\c!optie=JV] +\definetyping[SQL] [\c!optie=SQL] +\definetyping[TEX] [\c!optie=TEX] +\definetyping[PAS] [\c!optie=PAS] +\definetyping[PASCAL][\c!optie=PAS] +\definetyping[MOD] [\c!optie=PAS] +\definetyping[MODULA][\c!optie=PAS] +\definetyping[DELPHI][\c!optie=PAS] +\definetyping[EIFFEL][\c!optie=EIF] +\definetyping[XML] [\c!optie=XML] %D We use the \CONTEXT\ color system for switching to and from %D color mode. We can always redefine these colors afterwards. @@ -669,29 +781,65 @@ % ---> naar verb-* ? of predefine als undefined? -\definepalet [TEXcolorpretty] [colorpretty] -\definepalet [TEXgraypretty] [graypretty] -\definepalet [PLcolorpretty] [colorpretty] -\definepalet [PLgraypretty] [graypretty] -\definepalet [PMcolorpretty] [colorpretty] -\definepalet [PMgraypretty] [graypretty] -\definepalet [MPcolorpretty] [colorpretty] -\definepalet [MPgraypretty] [graypretty] -\definepalet [JVcolorpretty] [colorpretty] -\definepalet [JVgraypretty] [graypretty] -\definepalet [JScolorpretty] [colorpretty] -\definepalet [JSgraypretty] [graypretty] -\definepalet [SQLcolorpretty] [colorpretty] -\definepalet [SQLgraypretty] [graypretty] +\definepalet [TEXcolorpretty] [colorpretty] +\definepalet [TEXgraypretty] [graypretty] +\definepalet [PLcolorpretty] [colorpretty] +\definepalet [PLgraypretty] [graypretty] +\definepalet [PMcolorpretty] [colorpretty] +\definepalet [PMgraypretty] [graypretty] +\definepalet [MPcolorpretty] [colorpretty] +\definepalet [MPgraypretty] [graypretty] +\definepalet [JVcolorpretty] [colorpretty] +\definepalet [JVgraypretty] [graypretty] +\definepalet [JScolorpretty] [colorpretty] +\definepalet [JSgraypretty] [graypretty] +\definepalet [SQLcolorpretty] [colorpretty] +\definepalet [SQLgraypretty] [graypretty] +\definepalet [PAScolorpretty] [colorpretty] +\definepalet [PASgraypretty] [graypretty] +\definepalet [EIFcolorpretty] [colorpretty] +\definepalet [EIFgraypretty] [graypretty] +\definepalet [XMLcolorpretty] [colorpretty] +\definepalet [XMLgraypretty] [graypretty] + +% Some real in-depth knowlegde of palets: `palet:color' it is! %D We can use some core color commands. These are faster than %D the standard color switching ones and work ok on a line by %D line basis. - -% Some real in-depth knowlegde of palets: `palet:color' it is! - -\def\beginofpretty[#1]{\startcolormode{\prettypalet:#1}} -\def\endofpretty {\stopcolormode} +%D +%D \starttypen +%D \def\setupverbatimcolor#1% +%D {\edef\prettypalet{\prettyidentifier\getvalue{#1\c!palet}}% +%D \def\beginofpretty[##1]{\startcolormode{\prettypalet:##1}}% +%D \def\endofpretty {\stopcolormode}} +%D \stoptypen +%D +%D Since we support a global color too, the folowing +%D definition is better: + +\def\setupverbatimcolor#1% fast and local versus slow and global + {\doifelsevaluenothing{#1\c!kleur} + {\def\beginofpretty[##1]{\startcolormode{\prettypalet:##1}}% + \let\endofpretty \stopcolormode + \let\startverbatimcolor \relax + \let\stopverbatimcolor \relax + \let\verbatimcolor \relax} + {\def\beginofpretty[##1]{\startcolor[\prettypalet:##1]}% + \let\endofpretty \stopcolor + \def\startverbatimcolor{\startcolor[\getvalue{#1\c!kleur}]}% + \let\stopverbatimcolor \stopcolor + \def\verbatimcolor {\getvalue{\getvalue{#1\c!kleur}}}}% + \doifelsevaluenothing{#1\c!palet} + {\let\prettypalet\empty + \let\endofpretty\relax + \def\beginofpretty[##1]{}} + {\edef\prettypalet{\prettyidentifier\getvalue{#1\c!palet}}}} + +\let\prettypalet \empty +\let\startverbatimcolor\relax +\let\stopverbatimcolor \relax +\let\verbatimcolor \relax %D In the verbatim module, there are some examples given of %D the more obscure features of the verbatim environments. @@ -802,23 +950,28 @@ \presettyping[\v!file][] -\def\typefile#1% - {\getvalue{\??tp\v!file\c!voor}% - \doiflocfileelse{\pathplusfile\f!currentpath{#1}} +\definecomplexorsimple\typefile + +\def\simpletypefile% + {\complextypefile[\v!file]} + +\def\complextypefile[#1]#2% + {\getvalue{\??tp#1\c!voor}% + \doiflocfileelse{\pathplusfile\f!currentpath{#2}} {\startopelkaar % includes \bgroup - \startcolor[\getvalue{\??tp\v!file\c!kleur}]% - \doifinset{\getvalue{\??tp\v!file\c!optie}}{\v!commandos,\v!schuin,\v!normaal} - {\setuptyping[\v!file][\c!optie=\v!geen]}% - \doifvalue{\??tp\v!file\c!optie}{\v!kleur} - {\expandafter\aftersplitstring#1\at.\to\prettyidentifier - \letvalue{\??tp\v!file\c!optie}=\prettyidentifier}% - \initializetyping\v!file - \processfileverbatim{\pathplusfile\f!currentpath{#1}}% - \stopcolor + \doifinset{\getvalue{\??tp#1\c!optie}}{\v!commandos,\v!schuin,\v!normaal} + {\setuptyping[#1][\c!optie=\v!geen]}% + \doifvalue{\??tp#1\c!optie}{\v!kleur} + {\expandafter\aftersplitstring#2\at.\to\prettyidentifier + \letvalue{\??tp#1\c!optie}=\prettyidentifier}% + \initializetyping{#1}% + \startverbatimcolor + \processfileverbatim{\pathplusfile\f!currentpath{#2}}% + \stopverbatimcolor \stopopelkaar} % includes \egroup - {{\tttf[\makemessage{\m!verbatims}{1}{#1}]}% - \showmessage{\m!verbatims}{1}{#1}}% - \getvalue{\??tp\v!file\c!na}} + {{\tttf[\makemessage{\m!verbatims}{1}{#2}]}% + \showmessage{\m!verbatims}{1}{#2}}% + \getvalue{\??tp#1\c!na}} %D \macros %D {filename} diff --git a/tex/context/base/enco-ans.tex b/tex/context/base/enco-ans.tex index 79bb55d67..7936a9b18 100644 --- a/tex/context/base/enco-ans.tex +++ b/tex/context/base/enco-ans.tex @@ -3,9 +3,9 @@ %D version=1995.1.1, %D title=\CONTEXT\ Encoding Macros, %D subtitle=\YandY\ texnansi Encoding, -%D author=J. Hagen, +%D author=Hans Hagen, %D date=\currentdate, -%D copyright=J. Hagen] +%D copyright=Hans Hagen] %C %C This module is part of the \CONTEXT\ macro||package and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for diff --git a/tex/context/base/enco-chi.tex b/tex/context/base/enco-chi.tex index 2e420a9f7..5addd57e9 100644 --- a/tex/context/base/enco-chi.tex +++ b/tex/context/base/enco-chi.tex @@ -11,6 +11,8 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +% actually this is also a filter -> enco-fcn.tex + %D This is an experimental definition. Since we are dealing %D with unicode's, the registered values are not saved, so %D actually we're dealing with an pseudo encoding. The digits @@ -126,6 +128,28 @@ \defineudigit 10000* 184 85 \defineudigit 100000000* 187 245 +\defineudigit 20 164 220 +\defineudigit 21 164 64 +\defineudigit 22 164 71 +\defineudigit 23 164 84 +\defineudigit 24 165 124 +\defineudigit 25 164 173 +\defineudigit 26 164 187 +\defineudigit 27 164 67 +\defineudigit 28 164 75 +\defineudigit 29 164 69 + +\defineudigit 30 164 202 +\defineudigit 31 164 64 +\defineudigit 32 164 71 +\defineudigit 33 164 84 +\defineudigit 34 165 124 +\defineudigit 35 164 173 +\defineudigit 36 164 187 +\defineudigit 37 164 67 +\defineudigit 38 164 75 +\defineudigit 39 164 69 + \stopencoding \startencoding[gbk] @@ -210,6 +234,28 @@ \defineudigit 10000* 200 102 \defineudigit 100000000* 210 218 +\defineudigit 20 216 165 +\defineudigit 21 210 187 +\defineudigit 22 182 254 +\defineudigit 23 200 253 +\defineudigit 24 203 196 +\defineudigit 25 206 229 +\defineudigit 26 193 249 +\defineudigit 27 198 223 +\defineudigit 28 176 203 +\defineudigit 29 190 197 + +\defineudigit 30 216 166 +\defineudigit 31 210 187 +\defineudigit 32 182 254 +\defineudigit 33 200 253 +\defineudigit 34 203 196 +\defineudigit 35 206 229 +\defineudigit 36 193 249 +\defineudigit 37 198 223 +\defineudigit 38 176 203 +\defineudigit 39 190 197 + \stopencoding \endinput diff --git a/tex/context/base/enco-ec.tex b/tex/context/base/enco-ec.tex index 611523885..83cbf0174 100644 --- a/tex/context/base/enco-ec.tex +++ b/tex/context/base/enco-ec.tex @@ -173,8 +173,8 @@ \definecharacter OE 215 \definecharacter o 248 \definecharacter O 216 -\definecharacter sz 255 % was 223 -\definecharacter SS 255 % was 223 +\definecharacter sz 255 +\definecharacter SS 223 \definecharacter th 254 \definecharacter TH 222 diff --git a/tex/context/base/enco-fde.tex b/tex/context/base/enco-fde.tex new file mode 100644 index 000000000..fe6ea0312 --- /dev/null +++ b/tex/context/base/enco-fde.tex @@ -0,0 +1,118 @@ +%D \module +%D [ file=enco-fde, +%D version=2000.08.20, +%D title=\CONTEXT\ Encoding Macros, +%D subtitle=German Input Filter, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright=Hans Hagen] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D These definitions used to be part of lang-ger.tex. + +\unprotect + +\startlanguagespecifics[\s!de] + + \installcompoundcharacter "a {\moveaccent{-.1ex}\"a\midworddiscretionary} + \installcompoundcharacter "e {\moveaccent{-.1ex}\"e\midworddiscretionary} + \installcompoundcharacter "i {\moveaccent{-.1ex}\"\i\midworddiscretionary} + \installcompoundcharacter "o {\moveaccent{-.1ex}\"o\midworddiscretionary} + \installcompoundcharacter "u {\moveaccent{-.1ex}\"u\midworddiscretionary} + \installcompoundcharacter "s {\sz} + \installcompoundcharacter "z {\sz} + + + \installcompoundcharacter "A {\smashaccent\"A} + \installcompoundcharacter "E {\smashaccent\"E} + \installcompoundcharacter "I {\smashaccent\"I} + \installcompoundcharacter "O {\smashaccent\"O} + \installcompoundcharacter "U {\smashaccent\"U} + \installcompoundcharacter "Z {SZ} + \installcompoundcharacter "S {SS} + +\stoplanguagespecifics + +\startlanguagespecifics[\s!de] + + \installcompoundcharacter "ck {\discretionary {k-}{k}{ck}} + \installcompoundcharacter "ff {\discretionary{ff-}{f}{ff}} + \installcompoundcharacter "ll {\discretionary{ll-}{l}{ll}} + \installcompoundcharacter "mm {\discretionary{mm-}{m}{mm}} + \installcompoundcharacter "nn {\discretionary{nn-}{n}{nn}} + \installcompoundcharacter "pp {\discretionary{pp-}{p}{pp}} + \installcompoundcharacter "rr {\discretionary{rr-}{r}{rr}} + \installcompoundcharacter "tt {\discretionary{tt-}{t}{tt}} + + \installcompoundcharacter "CK {\discretionary {K-}{K}{CK}} + \installcompoundcharacter "FF {\discretionary{FF-}{F}{FF}} + \installcompoundcharacter "LL {\discretionary{LL-}{L}{LL}} + \installcompoundcharacter "MM {\discretionary{MM-}{M}{MM}} + \installcompoundcharacter "NN {\discretionary{NN-}{N}{NN}} + \installcompoundcharacter "PP {\discretionary{PP-}{P}{PP}} + \installcompoundcharacter "RR {\discretionary{RR-}{R}{RR}} + \installcompoundcharacter "TT {\discretionary{TT-}{T}{TT}} + +\stoplanguagespecifics + +\startlanguagespecifics[\s!de] + + \installcompoundcharacter "` {\handlequotation\c!leftquotation} + \installcompoundcharacter "' {\handlequotation\c!rightquotation} + \installcompoundcharacter ". {\kern.1em\ignorespaces} + + \def\setupDElanguage% + {\setuplanguage + [\s!de] + [\c!leftsentence=\leftguillemot, + \c!rightsentence=\rightguillemot, + \c!leftsubsentence=\leftsubguillemot, + \c!rightsubsentence=\rightsubguillemot]} + + \installcompoundcharacter "< {{\setupDElanguage|<|}} + \installcompoundcharacter "> {{\setupDElanguage|>|}} + +\stoplanguagespecifics + +%D An experimental hack: + +\startencoding[pdfdoc] + \startlanguagespecifics[\s!de]% hm, a % is needed + \defineactivecharacter " {\"} % no {\simplifiedcompoundcharacter"} + \stoplanguagespecifics +\stopencoding + +\startencoding[ec] + \startlanguagespecifics[\s!de]% + \installcompoundcharacter "a {\"a} + \installcompoundcharacter "e {\"e} + \installcompoundcharacter "i {\"\i} + \installcompoundcharacter "o {\"o} + \installcompoundcharacter "u {\"u} + \installcompoundcharacter "A {\"A} + \installcompoundcharacter "E {\"E} + \installcompoundcharacter "I {\"I} + \installcompoundcharacter "O {\"O} + \installcompoundcharacter "U {\"U} + \stoplanguagespecifics +\stopencoding + +\startencoding[texnansi] + \startlanguagespecifics[\s!de]% + \installcompoundcharacter "a {\"a} + \installcompoundcharacter "e {\"e} + \installcompoundcharacter "i {\"\i} + \installcompoundcharacter "o {\"o} + \installcompoundcharacter "u {\"u} + \installcompoundcharacter "A {\"A} + \installcompoundcharacter "E {\"E} + \installcompoundcharacter "I {\"I} + \installcompoundcharacter "O {\"O} + \installcompoundcharacter "U {\"U} + \stoplanguagespecifics +\stopencoding + +\protect \endinput diff --git a/tex/context/base/enco-fpl.tex b/tex/context/base/enco-fpl.tex new file mode 100644 index 000000000..acf3caa50 --- /dev/null +++ b/tex/context/base/enco-fpl.tex @@ -0,0 +1,90 @@ +%D \module +%D [ file=enco-fpl, +%D version=2000.08.20, +%D title=\CONTEXT\ Encoding Macros, +%D subtitle=Polish Input Filter, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright=Hans Hagen] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D These definitions used to be part of lang-sla.tex. + +\unprotect + +\startlanguagespecifics[\s!pl] + + \installcompoundcharacter /a {\k a} + \installcompoundcharacter /c {\'c} + \installcompoundcharacter /e {\k e} + \installcompoundcharacter /l {\l} + \installcompoundcharacter /n {\'n} + \installcompoundcharacter /o {\'o} + \installcompoundcharacter /s {\'s} + \installcompoundcharacter /x {\'z} + \installcompoundcharacter /z {\.z} + \installcompoundcharacter /A {\k A} + \installcompoundcharacter /C {\'C} + \installcompoundcharacter /E {\k E} + \installcompoundcharacter /L {\L} + \installcompoundcharacter /N {\'N} + \installcompoundcharacter /O {\'O} + \installcompoundcharacter /S {\'S} + \installcompoundcharacter /X {\'Z} + \installcompoundcharacter /Z {\.Z} + +\stoplanguagespecifics + +\startlanguagespecifics[\s!pl] + + \installcompoundcharacter /, {\handlequotation\c!leftquotation} + \installcompoundcharacter /' {\handlequotation\c!rightquotation} + + \def\setupPLlanguage% + {\setuplanguage + [\s!pl] + [\c!leftsentence=\leftguillemot, + \c!rightsentence=\rightguillemot, + \c!leftsubsentence=\leftsubguillemot, + \c!rightsubsentence=\rightsubguillemot]} + + \installcompoundcharacter /< {{\setupPLlanguage|<|}} + \installcompoundcharacter /> {{\setupPLlanguage|>|}} + + \installcompoundcharacter /- {|-|} + +\stoplanguagespecifics + +\startlanguagespecifics[\s!pl] + + \definesortkey {/a}{a}{a}{\k a} + \definesortkey {/A}{a}{a}{\k a} + \definesortkey {/c}{c}{a}{\'c} + \definesortkey {/C}{c}{a}{\'c} + \definesortkey {/e}{e}{a}{\k e} + \definesortkey {/E}{e}{a}{\k e} + \definesortkey {/l}{l}{a}{\l } + \definesortkey {/L}{l}{a}{\l } + \definesortkey {/n}{n}{a}{\'n} + \definesortkey {/N}{n}{a}{\'n} + \definesortkey {/o}{o}{a}{\'o} + \definesortkey {/O}{o}{a}{\'o} + \definesortkey {/s}{s}{a}{\'s} + \definesortkey {/S}{s}{a}{\'s} + \definesortkey {/x}{z}{a}{\'x} + \definesortkey {/X}{z}{a}{\'x} + \definesortkey {/z}{z}{b}{\.z} + \definesortkey {/Z}{z}{b}{\.z} + +\stoplanguagespecifics + +\startencoding[pdfdoc] + \startlanguagespecifics[pl]% hm + \defineactivecharacter / {\simplifiedcompoundcharacter/} + \stoplanguagespecifics +\stopencoding + +\protect \endinput diff --git a/tex/context/base/enco-fro.tex b/tex/context/base/enco-fro.tex new file mode 100644 index 000000000..8b12dfefd --- /dev/null +++ b/tex/context/base/enco-fro.tex @@ -0,0 +1,33 @@ +%D \module +%D [ file=enco-fro, +%D version=2000.08.20, +%D title=\CONTEXT\ Encoding Macros, +%D subtitle=Romanian Input Filter, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright=Hans Hagen] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D These definitions used to be part of lang-ita.tex. + +\unprotect + +\startlanguagespecifics[\s!ro] + + \installcompoundcharacter "a {\u{a}} + \installcompoundcharacter "i {\^{\i}} + \installcompoundcharacter "s {\c{s}} + \installcompoundcharacter "t {\c{t}} + \installcompoundcharacter "A {\^{a}} + \installcompoundcharacter "I {\^{I}} + \installcompoundcharacter "S {\c{S}} + \installcompoundcharacter "T {\c{T}} + \installcompoundcharacter "` {\handlequotation\c!leftquotation} + \installcompoundcharacter "' {\handlequotation\c!rightquotation} + +\stoplanguagespecifics + +\protect \endinput diff --git a/tex/context/base/enco-ibm.tex b/tex/context/base/enco-ibm.tex index 382c87795..24c7cfb9d 100644 --- a/tex/context/base/enco-ibm.tex +++ b/tex/context/base/enco-ibm.tex @@ -57,7 +57,7 @@ \stopregime -\enableregime[windows] +\enableregime[ibm] %D The next section will be changed as soon as we get grip on %D the other encodings. diff --git a/tex/context/base/enco-il2.tex b/tex/context/base/enco-il2.tex index 25767ea4f..4230f04bc 100644 --- a/tex/context/base/enco-il2.tex +++ b/tex/context/base/enco-il2.tex @@ -3,9 +3,9 @@ %D version=1998.12.1, %D title=\CONTEXT\ Encoding Macros, %D subtitle=Czech and Slovak ISO Latin 2 Encoding, -%D author=J. Hagen, +%D author=Hans Hagen, %D date=\currentdate, -%D copyright=J. Hagen] +%D copyright=Hans Hagen] %C %C This module is part of the \CONTEXT\ macro||package and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for diff --git a/tex/context/base/enco-ini.tex b/tex/context/base/enco-ini.tex index 874114eb9..533852389 100644 --- a/tex/context/base/enco-ini.tex +++ b/tex/context/base/enco-ini.tex @@ -82,10 +82,25 @@ 3: nezname kodovani -- \stopmessages +\startmessages italian library: encodings + title: codifica + 1: codifica -- + 2: codifica -- caricata + 3: codifica sconosciuta -- +\stopmessages + +\startmessages norwegian library: encodings + title: koding + 1: koding -- + 2: koding -- er lest inn + 3: ukjent koding -- +\stopmessages + %D First we define a few local or not yet initialized constants. \def\@map@{@m@ap@} % mapping prefix \def\@reg@{@r@eg@} % regime prefix +\def\@fha@{@f@ha@} % font prefix \ifx\currentlanguage\undefined \let\currentlanguage\s!en \fi @@ -125,13 +140,13 @@ %D low level implementation may change. \def\startregime[#1]% - {\pushmacro\characterregime + {\localpushmacro\characterregime \edef\characterregime{@#1@}% \doifundefined{\@reg@\characterregime} {\expanded{\newtoks\csname\@reg@\characterregime\endcsname}}} \def\stopregime% - {\popmacro\characterregime} + {\localpopmacro\characterregime} %\long\def\startregime[#1]#2\stopregime{} @@ -800,6 +815,105 @@ \stoptextrule \egroup} +%D {\em The next section is experimental and implemnts font +%D specific features, like hanging punctuation.} + +\def\startfonthandling[#1]% + {\def\fonthandling{#1}% + \doifundefined{\@fha@\fonthandling} + {\expanded{\newtoks\csname\@fha@\fonthandling\endcsname}}} + +\def\stopfonthandling% + {\let\fonthandling\empty} + +\def\setfonttoks% + {\@EA\let\@EA\fonttoks\csname\@fha@\fonthandling\endcsname} + +\def\definefonthandling% + {\dotripleempty\dodefinefonthandling} + +\def\dodefinefonthandling[#1][#2][#3]% + {\setvalue{\@fha@\@fha@#1}{#2}% + \getparameters[\@fha@\@fha@#1][\c!links=1,\c!rechts=1,#3]} + +\def\setupfonthandling% + {\dodoubleempty\dosetupfonthandling} + +\def\dosetupfonthandling[#1][#2]% + {\getparameters[\@fha@\@fha@#1][#2]} + +\def\doenablehandling#1% + {\doifdefined{\@fha@#1}{\@EA\the\csname\@fha@#1\endcsname}} + +\def\enablehandling[#1]% + {\doifdefinedelse{\@fha@\@fha@#1}% + {\setprotrudingfactor + {\getvalue{\@fha@\@fha@#1\c!links}} + {\getvalue{\@fha@\@fha@#1\c!rechts}}% + \edef\fonthandling{\getvalue{\@fha@\@fha@#1}}% + \@EA\rawprocesscommalist\@EA[\fonthandling]\doenablehandling} + {\doenablehandling{#1}}} + +\ifx\undefined\pdfprotrudechars % we don't use pdftex + + \def\defineprotrudefactor#1 #2 #3 {} + \def\setprotrudingfactor #1#2{} + \def\enableprotruding {} + \def\disableprotruding {} + +\else + + \newdimen\lproddimen + \newdimen\rproddimen + \let\prodfont\font + + \def\enableprotruding {\pdfprotrudechars=2 } + \def\disableprotruding{\pdfprotrudechars=0 } + + \appendtoks \disableprotruding \to \everyforgetall % Here or not here? + + \def\setprotrudingfactor#1#2% + {\lproddimen=#1pt\multiply\lproddimen\!!thousand\divide\lproddimen \!!maxcard\relax + \rproddimen=#2pt\multiply\rproddimen\!!thousand\divide\rproddimen \!!maxcard\relax} + + \setprotrudingfactor{1}{1} + + \def\dodefineprotrudefactor#1 #2 #3 % + {\scratchdimen=#2\lproddimen\lpcode\prodfont#1=\number\scratchdimen + \scratchdimen=#3\rproddimen\rpcode\prodfont#1=\number\scratchdimen} + + \def\dodefinefonthandling[#1][#2][#3]% + {\setvalue{\@fha@\@fha@#1}{#2}% + \getparameters[\@fha@\@fha@#1][\c!links=1,\c!rechts=1,#3]} + + \def\defineprotrudefactor#1 #2 #3 % + {\setfonttoks + \doifnumberelse{\string#1} + {\appendtoks\dodefineprotrudefactor #1 #2 #3 \to\fonttoks} % + {\appendtoks\dodefineprotrudefactor`#1 #2 #3 \to\fonttoks}}% + + \def\defineprotrudefactor#1 #2 #3 % + {\setfonttoks + \doifnumberelse{\string#1} + {\appendtoks\dodefineprotrudefactor #1 #2 #3 \to\fonttoks} + {\doifcharactercodeelse{#1} + {\@EA\appendtoks\@EA\dodefineprotrudefactor\charactercode #2 #3 \to\fonttoks} + {\appendtoks\dodefineprotrudefactor`#1 #2 #3 \to\fonttoks}}} + +\fi + +%D {\em Another experiment: named glyphs. Incomplete yet.} + +\def\definecharactercode#1 #2 % + {\setvalue{\characterencoding-#1}{#2}} + +\def\doifcharactercodeelse#1#2#3% + {\doifdefinedelse{\characterencoding-\string#1} + {\edef\charactercode{\getvalue{\characterencoding-#1}\space}#2} + {#3}} + +%D {\em So far for the experiment.} + %D \macros %D {everyuppercase, EveryUppercase, %D everyuppercase, EveryUppercase} diff --git a/tex/context/base/enco-pdf.tex b/tex/context/base/enco-pdf.tex index a4fbfdac2..c8f03e3d0 100644 --- a/tex/context/base/enco-pdf.tex +++ b/tex/context/base/enco-pdf.tex @@ -3,9 +3,9 @@ %D version=1995.1.1, %D title=\CONTEXT\ Encoding Macros, %D subtitle=\YandY\ texnansi Encoding, -%D author=J. Hagen, +%D author=Hans Hagen, %D date=\currentdate, -%D copyright=J. Hagen] +%D copyright=Hans Hagen] %C %C This module is part of the \CONTEXT\ macro||package and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for diff --git a/tex/context/base/enco-pol.tex b/tex/context/base/enco-pol.tex index 40c9dfa86..283d074a8 100644 --- a/tex/context/base/enco-pol.tex +++ b/tex/context/base/enco-pol.tex @@ -3,7 +3,7 @@ %D version=1999.28.8, %D title=\CONTEXT\ Encoding Macros, %D subtitle=Polish Mixed Encoding, -%D author=Taco Hoekwater, +%D author={Taco Hoekwater \& Hans Hagen}, %D date=\currentdate, %D copyright=Hans Hagen] %C diff --git a/tex/context/base/enco-pro.tex b/tex/context/base/enco-pro.tex new file mode 100644 index 000000000..b245554e3 --- /dev/null +++ b/tex/context/base/enco-pro.tex @@ -0,0 +1,72 @@ +%D \module +%D [ file=enco-pro, +%D version=2000.29.9, +%D title=\CONTEXT\ Encoding Macros, +%D subtitle=Protruding Factors, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright=Hans Hagen] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D This is an experimental definition file. The protruding +%D values we use here are those found from \THANH's thesis. + +\unprotect + +\definecharactercode leftupperninequote 92 +\definecharactercode rightupperninequote 34 +\definecharactercode endash 123 +\definecharactercode emdash 124 + +\startfonthandling[defpunc] + + \defineprotrudefactor ! 0 .2 + \defineprotrudefactor ' 0 .7 + \defineprotrudefactor ` .7 0 + \defineprotrudefactor ( .05 0 + \defineprotrudefactor ) 0 .05 + \defineprotrudefactor , 0 .7 + \defineprotrudefactor - 0 .7 + \defineprotrudefactor . 0 .7 + \defineprotrudefactor : 0 .5 + \defineprotrudefactor ; 0 .5 + + \defineprotrudefactor rightupperninequote 0 .5 + \defineprotrudefactor leftupperninequote .5 0 + \defineprotrudefactor endash 0 .3 + \defineprotrudefactor emdash 0 .2 + +\stopfonthandling + +\startfonthandling[defalph] + + \defineprotrudefactor A .05 .05 + \defineprotrudefactor F 0 .05 + \defineprotrudefactor J .05 0 + \defineprotrudefactor K 0 .05 + \defineprotrudefactor L 0 .05 + \defineprotrudefactor T .05 .05 + \defineprotrudefactor V .05 .05 + \defineprotrudefactor W .05 .05 + \defineprotrudefactor X .05 .05 + \defineprotrudefactor Y .05 .05 + + \defineprotrudefactor k 0 .05 + \defineprotrudefactor r 0 .05 + \defineprotrudefactor t 0 .05 + \defineprotrudefactor v .05 .05 + \defineprotrudefactor w .05 .05 + \defineprotrudefactor x .05 .05 + \defineprotrudefactor y .05 .05 + +\stopfonthandling + +\definefonthandling [normal] [defpunc,defalph] +\definefonthandling [slanted] [defpunc] [\c!rechts=1.5] +\definefonthandling [bold] [defpunc,defalph] +\definefonthandling [boldslanted] [defpunc] [\c!links=1.5] + +\protect \endinput diff --git a/tex/context/base/enco-win.tex b/tex/context/base/enco-win.tex index e31fb311a..06f8ab41f 100644 --- a/tex/context/base/enco-win.tex +++ b/tex/context/base/enco-win.tex @@ -3,7 +3,7 @@ %D version=1997.08.29, %D title=\CONTEXT\ Encoding Macros, %D subtitle=Windows 1252 ANSI keys, -%D author=Hans Hagen / Tobias Burnus, +%D author={Tobias Burnus \& Hans Hagen}, %D date=\currentdate, %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C @@ -76,7 +76,7 @@ \defineactivecharacter Š {\v{S}} \defineactivecharacter š {\v{s}} -\defineactivecharacter ß {\SS{}} +\defineactivecharacter ß {\sz{}} \defineactivecharacter Ù {\`U} \defineactivecharacter Ú {\'U} @@ -102,7 +102,7 @@ \defineactivecharacter — {---} \defineactivecharacter … {\dots{}} \defineactivecharacter © {\copyright{}} -\defineactivecharacter £ {\pounds{}} +\defineactivecharacter £ {\sterling{}} \defineactivecharacter „ {\char44\kern-.1em\char44 } \defineactivecharacter “ {\char96\kern-.1em\char96 } diff --git a/tex/context/base/enco-x5.tex b/tex/context/base/enco-x5.tex index f654be0ec..910c7a35c 100644 --- a/tex/context/base/enco-x5.tex +++ b/tex/context/base/enco-x5.tex @@ -3,9 +3,9 @@ %D version=1999.12.12, %D title=\CONTEXT\ Encoding Macros, %D subtitle=Vietnamese Encoding, -%D author=J. Hagen, +%D author=Hans Hagen, %D date=\currentdate, -%D copyright=J. Hagen] +%D copyright=Hans Hagen] %C %C This module is part of the \CONTEXT\ macro||package and is %C therefore copyrighted by \PRAGMA. See mreadme.pdf for diff --git a/tex/context/base/font-aer.tex b/tex/context/base/font-aer.tex new file mode 100644 index 000000000..4e21fc1d8 --- /dev/null +++ b/tex/context/base/font-aer.tex @@ -0,0 +1,69 @@ +%D \module +%D [ file=font-aer, +%D version=2000.09.20, +%D title=\CONTEXT\ Font Macros, +%D subtitle=Computer Modern, +%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. + +%D This file remaps the default Computer Modern Font Files +%D onto the virtual EC ones, so that hyphenations work well. + +\resetfontdefinitionfile[cmr] + +\definefontsynonym [cmb10] [aeb10] [encoding=ec] +\definefontsynonym [cmcsc10] [aecsc10] [encoding=ec] +\definefontsynonym [cmsl10] [aesl10] [encoding=ec] +\definefontsynonym [cmssbx10] [aessbx10] [encoding=ec] +\definefontsynonym [cmti7] [aeti7] [encoding=ec] +\definefontsynonym [cmbx10] [aebx10] [encoding=ec] +\definefontsynonym [cmitt10] [aeitt10] [encoding=ec] +\definefontsynonym [cmsl12] [aesl12] [encoding=ec] +\definefontsynonym [cmssdc10] [aessdc10] [encoding=ec] +\definefontsynonym [cmti8] [aeti8] [encoding=ec] +\definefontsynonym [cmbx12] [aebx12] [encoding=ec] +\definefontsynonym [cmr10] [aer10] [encoding=ec] +\definefontsynonym [cmsl8] [aesl8] [encoding=ec] +\definefontsynonym [cmssi10] [aessi10] [encoding=ec] +\definefontsynonym [cmti9] [aeti9] [encoding=ec] +\definefontsynonym [cmbx5] [aebx5] [encoding=ec] +\definefontsynonym [cmr12] [aer12] [encoding=ec] +\definefontsynonym [cmsl9] [aesl9] [encoding=ec] +\definefontsynonym [cmssi12] [aessi12] [encoding=ec] +\definefontsynonym [cmtt10] [aett10] [encoding=ec] +\definefontsynonym [cmbx6] [aebx6] [encoding=ec] +\definefontsynonym [cmr17] [aer17] [encoding=ec] +\definefontsynonym [cmsltt10] [aesltt10] [encoding=ec] +\definefontsynonym [cmssi17] [aessi17] [encoding=ec] +\definefontsynonym [cmtt12] [aett12] [encoding=ec] +\definefontsynonym [cmbx7] [aebx7] [encoding=ec] +\definefontsynonym [cmr5] [aer5] [encoding=ec] +\definefontsynonym [cmss10] [aess10] [encoding=ec] +\definefontsynonym [cmssi8] [aessi8] [encoding=ec] +\definefontsynonym [cmtt8] [aett8] [encoding=ec] +\definefontsynonym [cmbx8] [aebx8] [encoding=ec] +\definefontsynonym [cmr6] [aer6] [encoding=ec] +\definefontsynonym [cmss12] [aess12] [encoding=ec] +\definefontsynonym [cmssi9] [aessi9] [encoding=ec] +\definefontsynonym [cmtt9] [aett9] [encoding=ec] +\definefontsynonym [cmbx9] [aebx9] [encoding=ec] +\definefontsynonym [cmr7] [aer7] [encoding=ec] +\definefontsynonym [cmss17] [aess17] [encoding=ec] +\definefontsynonym [cmtcsc10] [aetcsc10] [encoding=ec] +\definefontsynonym [cmbxsl10] [aebxsl10] [encoding=ec] +\definefontsynonym [cmr8] [aer8] [encoding=ec] +\definefontsynonym [cmss8] [aess8] [encoding=ec] +\definefontsynonym [cmti10] [aeti10] [encoding=ec] +\definefontsynonym [cmbxti10] [aebxti10] [encoding=ec] +\definefontsynonym [cmr9] [aer9] [encoding=ec] +\definefontsynonym [cmss9] [aess9] [encoding=ec] +\definefontsynonym [cmti12] [aeti12] [encoding=ec] + +\setupbodyfont[cmr] + +\endinput diff --git a/tex/context/base/font-ber.tex b/tex/context/base/font-ber.tex index e748305bd..3ad42a96e 100644 --- a/tex/context/base/font-ber.tex +++ b/tex/context/base/font-ber.tex @@ -37,12 +37,12 @@ \definefontsynonym [AntykwaTorunska-Italic] [zatri8t] [encoding=ec] \definefontsynonym [AntykwaTorunska-Bold] [zatb8t] [encoding=ec] -\definefontsynonym [Palatino-Roman] [uplr8r] [encoding=ec] -\definefontsynonym [Palatino-Italic] [uplri8r] [encoding=ec] -\definefontsynonym [Palatino-Slanted] [uplro8r] [encoding=ec] -\definefontsynonym [Palatino-Bold] [uplb8r] [encoding=ec] -\definefontsynonym [Palatino-BoldItalic] [uplbi8r] [encoding=ec] -\definefontsynonym [Palatino-BoldSlanted] [uplbo8r] [encoding=ec] +\definefontsynonym [Palatino-Roman] [uplr8t] [encoding=ec] +\definefontsynonym [Palatino-Italic] [uplri8t] [encoding=ec] +\definefontsynonym [Palatino-Slanted] [uplro8t] [encoding=ec] +\definefontsynonym [Palatino-Bold] [uplb8t] [encoding=ec] +\definefontsynonym [Palatino-BoldItalic] [uplbi8t] [encoding=ec] +\definefontsynonym [Palatino-BoldSlanted] [uplbo8t] [encoding=ec] \definefontsynonym [AvantGarde] [pag] \definefontsynonym [BookmanLight] [pbk] diff --git a/tex/context/base/font-chi.tex b/tex/context/base/font-chi.tex index 9c2d8d5ce..b8e332927 100644 --- a/tex/context/base/font-chi.tex +++ b/tex/context/base/font-chi.tex @@ -5,34 +5,36 @@ %D subtitle=Chinese, %D author=Hans Hagen, %D date=\currentdate, -%D suggestions=Wang Lei, +%D suggestions=Wang Lei, %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. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. \writestatus{loading}{Context Font Macros / Chinese} -%D Still to be implemented: +% much will to typo-chi.tex + +%D Still to be implemented: %D %D \startopsomming -%D \som columns left right touch +%D \som columns left right touch %D \som distance = (hsize-n*bodyfontsize)/(n-1) -%D \som char grids -%D \som char tables -%D \som all kind of rotated combinations +%D \som char grids +%D \som char tables +%D \som all kind of rotated combinations %D \som hanging puctuation %D \som a few more encodings -%D \som rotation list +%D \som rotation list %D \stopopsomming %M \stelkorpsin[chi] -%M +%M %M \def\WangLei% %M {\purechinese{\uchar{205}{245}\uchar{192}{218}}} -\useencoding[chi] +\useencoding[chi] %D When \WangLei\ sent me a mail asking if \CONTEXT\ was able %D to support Chinese, I wasn't sure if the answer could be @@ -55,7 +57,7 @@ %D character set. I wrote some macros that could process the %D small \type {Hello World} file \WangLei\ had send me, and %D after some bug fixes real Chinese came out. I started to -%D like the look and fel of Chinese glyphs, so on we went. +%D like the look and fel of Chinese glyphs, so on we went. %D %D The first comments concerned spacing. The mix of English %D and Chinese demands some rather deliberate handling of @@ -66,8 +68,8 @@ %D labels and texts, and implementing these was rather %D straightforward. But, there were still some issues to deal %D with: conversion of numbers, date handling and index -%D sorting. -%D +%D sorting. +%D %D I consider(ed) writing Chinese support to be a nice puzzle, %D since I have to act on chinese \CONTEXT\ code, where I only %D understand the \CONTEXT\ part. The drawings \WangLei\ made @@ -75,42 +77,42 @@ %D these modules from scratch, although I fall back on some %D basic encoding and font modules, I consider them to be %D rather clean. This cannot be said of all \CONTEXT\ font -%D modules \type {-)}. +%D modules \type {-)}. \unprotect -%D Because Chinese glyphs have more height than the average -%D Latin glyph, and at the same time don't have much depth, -%D we adapt the scale. +%D Because Chinese glyphs have more height than the average +%D Latin glyph, and at the same time don't have much depth, +%D we adapt the scale. %D -%D Before and after the glyph we have to deal with Chinese -%D spacing. Special attention is given to punctuation. +%D Before and after the glyph we have to deal with Chinese +%D spacing. Special attention is given to punctuation. %D -%D \starttypen +%D \starttypen %D [some short nice chinese text with () and english] -%D \stoptypen +%D \stoptypen %D -%D We insert a bit of stretch and introduce a signal to -%D keep track of previous characters. +%D We insert a bit of stretch and introduce a signal to +%D keep track of previous characters. %D \macros %D {chineseunicodescale, chineseinterglyphskip, %D chineseunicodeheight, chineseunicodedepth, chinesespace} %D -%D There are a few variables, that can be (re|)|set -%D depending on the current font. They default to: +%D There are a few variables, that can be (re|)|set +%D depending on the current font. They default to: -\def\chineseunicodescale {1.00} % not smaller than .85 +\def\chineseunicodescale {1.00} % not smaller than .85 \def\chineseunicodeheight {1.00} \def\chineseunicodedepth {1.00} -\def\chineseinterglyphskip{0pt plus .05em minus .01em} +\def\chineseinterglyphskip{0pt plus .05em minus .01em} \def\chinesesurroundskip {.25em plus .15em minus .05em} -%D We define a few signals. (Another examples of using -%D such signals can be found in the module \type {m-units}.) +%D We define a few signals. (Another examples of using +%D such signals can be found in the module \type {m-units}.) -\newsignal\chineseLsignal % left boundary character -\newsignal\chineseRsignal % right boundary character +\newsignal\chineseLsignal % left boundary character +\newsignal\chineseRsignal % right boundary character \newsignal\chineseSsignal % any other character (symbol) \chardef\chineseBstatus=0 % 0=unknown 1=left 2=right 3=chinese 4=nospace @@ -119,7 +121,7 @@ \sfcode`(=2000 % a temporary hack -\def\chinesenobreak% +\def\chinesenobreak% {\relax \iftracechinese \nobreak @@ -137,7 +139,7 @@ \def\insertchineseglyph% {\iftracechinese\tracedchineseglyph\else\insertunicodeglyph\fi} -\newif\ifverticalchinese +\newif\ifverticalchinese \def\handlechineseunicodeglyph% {\ifinpagebody @@ -148,16 +150,16 @@ \horizontalchineseunicodeglyph \fi\fi} -% This is a previous, very encoding specific, attempt. The -% current implementation is more versatile. +% This is a previous, very encoding specific, attempt. The +% current implementation is more versatile. % -% \starttypen +% \starttypen % \def\chineseleftglyph {\chardef\chineseSstatus=1 } % \def\chineserightglyph {\chardef\chineseSstatus=2 } % \def\chinesecenterglyph {\chardef\chineseSstatus=3 } % % \def\analyzechineseunicodeglyph% -% {% left +% {% left % \ifnum\unicodeposition=161174 \chineseleftglyph \else % \ifnum\unicodeposition=161176 \chineseleftglyph \else % \ifnum\unicodeposition=161178 \chineseleftglyph \else @@ -206,10 +208,10 @@ % \chardef\chineseSstatus=0 % \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi % \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi\fi\fi\fi\fi \fi} -% \stoptypen +% \stoptypen % % chinese classes: left=1|right=2|center=3 - + \def\analyzechineseunicodeglyph% {\chardef\chineseSstatus=0\getvalue{uc\the\unicodeposition}\relax} @@ -252,15 +254,19 @@ \fi \fi\fi\fi \fi\fi\fi} - -\def\horizontalchineseunicodeglyph + +\def\horizontalchineseunicodeglyph% {\relax + \ifhmode\else\dontleavehmode\fi % added + \setunicodescale\chineseunicodescale + \setunicodestrut\chineseunicodeheight\chineseunicodedepth \ifprocessingverbatim - \insertunicodeglyph + \iftracechinese + \ruledhbox{\insertunicodeglyph}% + \else + \insertunicodeglyph + \fi \else - \ifhmode\else\dontleavehmode\fi % added - \setunicodescale\chineseunicodescale - \setunicodestrut\chineseunicodeheight\chineseunicodedepth \analyzechineseunicodeglyph \analyzechineseunicodeenviroment \ifcase\chineseSstatus\relax @@ -271,7 +277,7 @@ \chineseunskip \chinesenobreak % left \or - \ifcorrectchineseboundarychars\else\chineseunskip\fi + \ifcorrectchineseboundarychars\else\chineseunskip\fi \hskip\chineseinterglyphskip % right \or \chineseunskip @@ -305,7 +311,7 @@ \hskip\chineseSsignal \fi \or % left - \ifcorrectchineseboundarychars + \ifcorrectchineseboundarychars \let\unicodecharcommand\chineseleftcharcommand \fi \chineseunskip @@ -313,7 +319,7 @@ \chinesenobreak \hskip\chineseLsignal \or % right - \ifcorrectchineseboundarychars + \ifcorrectchineseboundarychars \let\unicodecharcommand\chineserightcharcommand \fi \chineseunskip @@ -321,7 +327,7 @@ \insertchineseglyph \hskip\chineseRsignal \else % center - \chineseunskip + \chineseunskip \chinesenobreak \insertchineseglyph \hskip\chineseinterglyphskip @@ -332,8 +338,8 @@ \def\verticalchineseunicodeglyph% {\relax - \ifprocessingverbatim - \insertunicodeglyph + \ifprocessingverbatim % to do + \horizontalchineseunicodeglyph \else \setunicodescale\chineseunicodescale \setunicodestrut\chineseunicodeheight\chineseunicodedepth @@ -349,25 +355,27 @@ \hss}% \ht\scratchbox=\unicodeheight\ht\strutbox \dp\scratchbox=\unicodedepth \dp\strutbox - \nointerlineskip - \ifcase\prevchineseSstatus\relax - \ifnum\chineseSstatus=2\nobreak\else\allowbreak\fi - \or % left - \nobreak - \or % right - \ifnum\chineseSstatus=2\nobreak\else\allowbreak\fi + \ifvmode % catches \hbox{...}, actually \hbox should be \vbox -) + \nointerlineskip \fi - \global\chardef\prevchineseSstatus=\chineseSstatus % pagebody ... - \box\scratchbox + \ifcase\prevchineseSstatus\relax + \ifnum\chineseSstatus=2 \par\nobreak\else\allowbreak\fi + \or % left + \par\nobreak + \or % right + \ifnum\chineseSstatus=2 \par\nobreak\else\allowbreak\fi + \fi + \global\chardef\prevchineseSstatus=\chineseSstatus % pagebody ... + \box\scratchbox\par \aftergroup\ignorespaces % watch this \fi} %D \macros %D {setupchinese,startvertical,nochinese} %D -%D The previous macros implement horizontal as well as +%D The previous macros implement horizontal as well as %D vertical typesetting. Vertical typesetting is implemented -%D on top of the multi||column routines. +%D on top of the multi||column routines. \def\setupchinese% {\dodoubleargument\getparameters[\??vt]} @@ -379,14 +387,21 @@ {\bgroup \def\maxnofcolumns{25}% \verticalchinesetrue - \global\chardef\prevchineseSstatus=0 + \global\chardef\prevchineseSstatus=0 \let\nochinese=\nochineseinvertical + \doif{\@@vtn}{\v!passend} + {\dimen0=\textwidth + \advance\dimen0 by \@@vtafstand + \dimen2=\bodyfontsize + \advance\dimen2 by \@@vtafstand + \divide\dimen0 by \number\dimen2 + \edef\@@vtn{\number\dimen0}}% \startkolommen [\c!richting=\@@vtrichting, \c!balanceren=\@@vtbalanceren, \c!afstand=\@@vtafstand, \c!n=\@@vtn, - #1]} + #1]} \def\stopvertical% {\stopkolommen @@ -395,10 +410,10 @@ \setupchinese [\c!richting=\v!links, \c!balanceren=\v!nee, - \c!n=12, + \c!n=\v!passend, \c!afstand=1.5\bodyfontsize] -%D We can set up vertical typesetting with \type +%D We can set up vertical typesetting with \type %D {\setupchinese}. %D \macros @@ -423,14 +438,14 @@ %D \macros %D {correctchineseboundarychars} %D -%D Careful reading of the previous macro learns that we -%D treat left and right glyphs differently. When we say +%D Careful reading of the previous macro learns that we +%D treat left and right glyphs differently. When we say %D -%D \starttypen +%D \starttypen %D \correctchineseboundarycharstrue %D \stoptypen %D -%D For the moment correction in on by default. +%D For the moment correction in on by default. \correctchineseboundarycharstrue @@ -444,7 +459,7 @@ % \def\chineserightcharcommand#1% % {\setbox\scratchbox=\hbox{#1}% -% \scratchdimen=.5em +% \scratchdimen=.5em % \ifdim\wd\scratchbox>\scratchdimen % \iftracechinese\ruledhbox\else\hbox\fi \!!to \scratchdimen % {\box\scratchbox\hss}% @@ -455,9 +470,9 @@ % \def\chineseleftcharcommand#1% % {\setbox\scratchbox=\hbox{#1}% -% \scratchdimen=.5em +% \scratchdimen=.5em % \ifdim\wd\scratchbox>\scratchdimen -% \ifnum\chineseBstatus<4 +% \ifnum\chineseBstatus<4 % \hskip.5\scratchdimen\!!plus.5\scratchdimen\relax % \fi % \iftracechinese\ruledhbox\else\hbox\fi \!!to \scratchdimen @@ -466,40 +481,40 @@ % \box\scratchbox % \fi} -%D The long list of numbers in the previous macro identify the -%D characters where special care is needed for breaking lines. -%D A linebreak is not permitted before: -%D +%D The long list of numbers in the previous macro identify the +%D characters where special care is needed for breaking lines. +%D A linebreak is not permitted before: +%D %D \def\DoIt #1 #2 % %D {\hbox{\hbox to 2em{\uchar{#1}{#2}\hss}#1 #2}\par} -%D -%D \startkolommen[n=5] -%D \DoIt 161 162 \DoIt 161 163 \DoIt 161 164 \DoIt 161 167 \DoIt 161 173 -%D \DoIt 161 175 \DoIt 161 177 \DoIt 161 179 \DoIt 161 181 \DoIt 161 183 +%D +%D \startkolommen[n=5] +%D \DoIt 161 162 \DoIt 161 163 \DoIt 161 164 \DoIt 161 167 \DoIt 161 173 +%D \DoIt 161 175 \DoIt 161 177 \DoIt 161 179 \DoIt 161 181 \DoIt 161 183 %D \DoIt 161 185 \DoIt 161 187 \DoIt 161 189 \DoIt 161 191 \DoIt 161 227 -%D \DoIt 161 228 \DoIt 161 229 \DoIt 163 161 \DoIt 163 162 \DoIt 163 167 -%D \DoIt 163 169 \DoIt 163 172 \DoIt 163 174 \DoIt 163 186 \DoIt 163 187 +%D \DoIt 161 228 \DoIt 161 229 \DoIt 163 161 \DoIt 163 162 \DoIt 163 167 +%D \DoIt 163 169 \DoIt 163 172 \DoIt 163 174 \DoIt 163 186 \DoIt 163 187 %D \DoIt 163 190 \DoIt 163 191 \DoIt 163 221 \DoIt 163 253 %D \stopkolommen -%D -%D A linebreak is not permitted after the following glyphs: -%D +%D +%D A linebreak is not permitted after the following glyphs: +%D %D \startkolommen[n=5] -%D \DoIt 161 174 \DoIt 161 176 \DoIt 161 178 \DoIt 161 180 \DoIt 161 182 -%D \DoIt 161 184 \DoIt 161 186 \DoIt 161 188 \DoIt 161 190 \DoIt 163 168 +%D \DoIt 161 174 \DoIt 161 176 \DoIt 161 178 \DoIt 161 180 \DoIt 161 182 +%D \DoIt 161 184 \DoIt 161 186 \DoIt 161 188 \DoIt 161 190 \DoIt 163 168 %D \DoIt 163 219 \DoIt 163 224 \DoIt 163 251 %D \stopkolommen -%D \macros +%D \macros %D {tracechinesetrue, showchinesetracelegend} %D -%D When we say \type {\tracechinesetrue}, we get some -%D insight in the way \CONTEXT\ handles the Chinese glyphs. -%D The symbols and color used represent: -%D +%D When we say \type {\tracechinesetrue}, we get some +%D insight in the way \CONTEXT\ handles the Chinese glyphs. +%D The symbols and color used represent: +%D %D \showchinesetracelegend -\newif\iftracechinese +\newif\iftracechinese \def\showchinesetracelegend% {\definetabulate[\s!dummy][|c|l|l|l|]% @@ -509,7 +524,7 @@ \NC l \NC left boundary character \NC \color[red]{previous} \NC u l r c n \NC\NR \NC r \NC right boundary character \NC \color[blue]{next} \NC u l r s \NC\NR \NC c \NC chinese character \NC \NC \NC\NR - \NC s \NC following space \NC \NC \NC\NR + \NC s \NC following space \NC \NC \NC\NR \NC n \NC no preceding space \NC \NC \NC\NR \HL \stopdummy} @@ -537,59 +552,59 @@ {\ifcase\chineseAstatus\relax u\or l\or r\or s\fi}% \hss}}}} -%D The following example shows how tracing works. -%D +%D The following example shows how tracing works. +%D %D \start \tracechinesetrue %D ÔÚÕâÒ»´Î¸üÐÂÖÐÎÒÃǽ«½éÉܶÔÖÐÎĵÄÖ§³Ö¡£µ±±¾ÎĵÄÖÐÎÄÒëÕßÍõÀÚ %D ѯÎÊÎÒ \nochinese{\CONTEXT} ÊÇ·ñÄÜ´¦ÀíººÓïʱ£¬ËûÒѾ³¢ÊÔ¹ý %D ÔËÐÐÏÖÓеĺ꼯£¬µ«ÊÇûÓеõ½½á¹û¡£ÕâÒâζ×ŶÔÖÐÎĵÄÖ§³Ö»¹Ã» %D ÓÐʵÏÖ¡£ -%D +%D %D ÔÚÕâÒ»(´Î¸üÐÂ)ÖÐÎÒÃÇ (½«½é) ÉܶÔÖÐÎĵÄÖ§³Ö¡£µ±±¾ÎĵÄÖÐÎÄÒë, %D ÕßÍõÀÚѯÎÊÎÒ\nochinese{\CONTEXT}ÊÇ·ñÄÜ´¦ÀíººÓïʱ£¬ËûÒѾ³¢ %D ÊÔ¹ýÔËÐÐÏÖÓеĺ꼯£¬µ«ÊÇûÓеõ½½á¹û¡£ÕâÒâζ×ŶÔÖÐÎĵÄÖ§³Ö %D »¹Ã»ÓÐʵÏÖ¡£. %D \stop -%D Because fonts are defined each time a \UNICODE\ is -%D encountered |<|which is less inefficient than one would -%D imagine, because \TEX\ is optimized quite well in this -%D repect|>| we can define macros like this to take care of -%D font switches. When available, one can add definitions -%D for italic, slanted, bold fonts and combinations of these. +%D Because fonts are defined each time a \UNICODE\ is +%D encountered |<|which is less inefficient than one would +%D imagine, because \TEX\ is optimized quite well in this +%D repect|>| we can define macros like this to take care of +%D font switches. When available, one can add definitions +%D for italic, slanted, bold fonts and combinations of these. -%D \macros +%D \macros %D {chinesenumber} %D -%D The chinese numbering systems rather straightforward. First -%D there are the digits: -%D +%D The chinese numbering systems rather straightforward. First +%D there are the digits: +%D %D \starttabulatie[|c|c|c|c|c|c|c|c|c|c|] %D \NC 0 \NC 1 \NC 2 \NC 3 \NC 4 \NC 5 \NC 6 \NC 7 \NC 8 \NC 9 \NC\NR -%D \NC \chinesenumber{0} \NC \chinesenumber{1} \NC \chinesenumber{2} -%D \NC \chinesenumber{3} \NC \chinesenumber{4} \NC \chinesenumber{5} -%D \NC \chinesenumber{6} \NC \chinesenumber{7} \NC \chinesenumber{8} +%D \NC \chinesenumber{0} \NC \chinesenumber{1} \NC \chinesenumber{2} +%D \NC \chinesenumber{3} \NC \chinesenumber{4} \NC \chinesenumber{5} +%D \NC \chinesenumber{6} \NC \chinesenumber{7} \NC \chinesenumber{8} %D \NC \chinesenumber{9} \NC\NR %D \stoptabulatie -%D -%D Apart from these numbers, we have dedicated representations +%D +%D Apart from these numbers, we have dedicated representations %D of some powers of~$10$. -%D +%D %D \starttabulatie[|c|c|c|c|c|] -%D \NC 10 \NC 100 \NC 1000 \NC 10000 \NC 100000000 \NC\NR -%D \NC \chinesenumber{10} \NC \chinesenumber{100} -%D \NC \chinesenumber{1000} \NC \chinesenumber{10000} +%D \NC 10 \NC 100 \NC 1000 \NC 10000 \NC 100000000 \NC\NR +%D \NC \chinesenumber{10} \NC \chinesenumber{100} +%D \NC \chinesenumber{1000} \NC \chinesenumber{10000} %D \NC \chinesenumber{100000000} \NC\NR %D \stoptabulatie -%D +%D %D The number~12 is a combination of $1\times10+2$, or: %D \chinesenumber {12}, while~22 becomes \chinesenumber {22}. -%D The numbers below 20 are treated a bit different, just like -%D numbers with series of $0$'s. So $2\times10$ comes out as -%D two glyphs, but $1\times10$ as one, because in the latter -%D case the~$1$ is redundant. The same is true for the powers -%D of~10. -%D +%D The numbers below 20 are treated a bit different, just like +%D numbers with series of $0$'s. So $2\times10$ comes out as +%D two glyphs, but $1\times10$ as one, because in the latter +%D case the~$1$ is redundant. The same is true for the powers +%D of~10. +%D %D \starttabulatie[|r|r|r|r|r|r|] %D \NC 1 \NC \chinesenumber {1} \NC %D 9 \NC \chinesenumber {9} \NC @@ -604,23 +619,23 @@ %D 9999 \NC \chinesenumber {9999} \NC %D 65536 \NC \chinesenumber {65536} \NC\NR %D \stoptabulatie -%D +%D %D The implementation is rather simple. For internal purposes, %D we let zero expand to~0. The digits $0-9$ and numbers $10$, -%D $100$, $1000$, $10000$ and $100000000$ are hard coded. +%D $100$, $1000$, $10000$ and $100000000$ are hard coded. -% This was the first implementation, before \WangLei\ asked -% me to look into Big Five encoding, so, like everthing in -% \TEX, things become a bit more complicated, but also more -% versatile. +% This was the first implementation, before \WangLei\ asked +% me to look into Big Five encoding, so, like everthing in +% \TEX, things become a bit more complicated, but also more +% versatile. % -% \starttypen +% \starttypen % \def\chinesedigit#1% % {\ifnum #1=100000000 \uchar{210}{218}% 100000000 % \else\ifnum #1=10000 \uchar{205}{242}% 10000 % \else\ifnum #1=1000 \uchar{199}{167}% 1000 % \else\ifnum #1=100 \uchar{176}{217}% 100 -% \else\ifnum #1=10 \uchar{202}{174}% 10 +% \else\ifnum #1=10 \uchar{202}{174}% 10 % \else\ifcase#1 \uchar{193}{227}% 0 % \or \uchar{210}{187}% 1 % \or \uchar{182}{254}% 2 @@ -632,110 +647,163 @@ % \or \uchar{176}{203}% 8 % \or \uchar{190}{197}% 9 % \fi\fi\fi\fi\fi\fi} -% \stoptypen +% \stoptypen +%D We will implement four methods, the one described earlier, +%D a derived one with capitalized characters, an extended +%D version of the first method, and a rather Arabic method. +%D +%D \starttabulate[|l|l|] +%D \HL +%D \NC \bf command \NC \bf number 39 \NC\NR +%D \HL +%D \NC \type{\normalchinesenumber} \NC \normalchinesenumber {39} \NC\NR +%D \NC \type{\capitalizedchinesenumber} \NC \capitalizedchinesenumber{39} \NC\NR +%D \NC \type{\arabicchinesenumber} \NC \arabicchinesenumber {39} \NC\NR +%D \NC \type{\extendedchinesenumber} \NC \extendedchinesenumber {39} \NC\NR +%D \HL +%D \stoptabulate +%D %D We use a dirty trick to enable Chinese Capital Digits. In -%D the encoding vectors, we define these by appending a suffix -%D \type {*} to the digit. For the moment this method works ok. -%D With \type {\capstyle} one can switch to those capitalized -%D digits. +%D the encoding vectors, we define these by appending a suffix +%D \type {*} to the digit, which in the following macro is +%D appended or not (by passing \type {\empty}). -\def\enablechinesecapdigits% - {\def\chinesedigitsuffix{*}} +\def\chinesedigit#1#2% #2: suffix, here * or \empty + {\udigit{\chineseencoding}{\number#1#2}} -\def\disablechinesecapdigits% - {\let\chinesedigitsuffix\empty} +% Normal Chinese Number -\disablechinesecapdigits +\def\normalchinesenumber#1% + {\expandafter\dochinesenumber\number#1\relax\empty} -\let\capstyle\enablechinesecapdigits - -\def\chinesedigit#1% - {\udigit{\chineseencoding}{\number#1\chinesedigitsuffix}} - -\def\chinesenumber#1% - {\expandafter\dochinesenumber\number#1\relax} - -\def\dochinesenumber#1#2\relax +\def\dochinesenumber#1#2\relax#3% {\ifnum#1#2<10 % 1-10 - \chinesedigit{#1}% + \chinesedigit{#1}#3% \else\ifnum#1#2<20 % 11-99 - \chinesedigit{10}% - \dodochinesenumberA#2\relax + \chinesedigit{10}#3% + \dodochinesenumberA#2\relax#3% \else - \dodochinesenumber#1#2\relax + \dodochinesenumber#1#2\relax#3% \fi\fi} -\def\dodochinesenumber#1#2\relax +\def\dodochinesenumber#1#2\relax#3% {\ifnum#1=0 - \chinesedigit{0}% - \dododochinesenumber0#2\relax + \chinesedigit{0}#3% + \dododochinesenumber0#2\relax#3% \else\ifnum#1#2<10 % 1-10 - \chinesedigit{#1#2}% - \dodochinesenumberA#2\relax + \chinesedigit{#1#2}#3% + \dodochinesenumberA#2\relax#3% \else\ifnum#1#2<100 % 11-99 - \dodochinesenumber#1\relax - \chinesedigit{10}% - \dodochinesenumberA#2\relax + \dodochinesenumber#1\relax#3% + \chinesedigit{10}#3% + \dodochinesenumberA#2\relax#3% \else\ifnum#1#2<1000 % 100-999 - \dodochinesenumber#1\relax - \chinesedigit{100}% - \dodochinesenumberA#2\relax + \dodochinesenumber#1\relax#3% + \chinesedigit{100}#3% + \dodochinesenumberA#2\relax#3% \else\ifnum#1#2<10000 % 1000-9999 - \dodochinesenumber#1\relax - \chinesedigit{1000}% - \dodochinesenumberA#2\relax + \dodochinesenumber#1\relax#3% + \chinesedigit{1000}#3% + \dodochinesenumberA#2\relax#3% \else\ifnum#1#2<100000 % 10000-99999 - \dodochinesenumber#1\relax - \chinesedigit{10000}% - \dodochinesenumberA#2\relax + \dodochinesenumber#1\relax#3% + \chinesedigit{10000}#3% + \dodochinesenumberA#2\relax#3% \else\ifnum#1#2<1000000 % 100000-999999 - \dodochinesenumberB#1#2\relax + \dodochinesenumberB#1#2\relax#3% \else\ifnum#1#2<10000000 % 1000000-9999999 - \dodochinesenumberC#1#2\relax + \dodochinesenumberC#1#2\relax#3% \else\ifnum#1#2<100000000 % 10000000-99999999 - \dodochinesenumberD#1#2\relax + \dodochinesenumberD#1#2\relax#3% \else\ifnum#1#2<1000000000 % 10000000-99999999 - \dochinesenumber#1\relax - \chinesedigit{100000000}% - \dododochinesenumber#2\relax + \dochinesenumber#1\relax#3% + \chinesedigit{100000000}#3% + \dododochinesenumber#2\relax#3% \else - \dodochinesenumberE#1#2\relax + \dodochinesenumberE#1#2\relax#3% \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} -\def\dododochinesenumber#1#2\relax +\def\dododochinesenumber#1#2\relax#3% {\ifnum#1=0 - \ifnum0#2>0 \dododochinesenumber#2\relax \fi + \ifnum0#2>0 \dododochinesenumber#2\relax#3\fi \else - \dodochinesenumber#1#2\relax + \dodochinesenumber#1#2\relax#3% \fi} -\def\dodochinesenumberA#1\relax - {\ifcase0#1 \else\dodochinesenumber#1\relax\fi} +\def\dodochinesenumberA#1\relax#2% + {\ifcase0#1 \else\dodochinesenumber#1\relax#2\fi} -\def\dodochinesenumberB#1#2#3\relax - {\dochinesenumber#1#2\relax - \chinesedigit{10000}% - \dododochinesenumber#3\relax} +\def\dodochinesenumberB#1#2#3\relax#4% + {\dochinesenumber#1#2\relax#4% + \chinesedigit{10000}#4% + \dododochinesenumber#3\relax#4} -\def\dodochinesenumberC#1#2#3#4\relax - {\dochinesenumber#1#2#3\relax - \chinesedigit{10000}% - \dododochinesenumber#4\relax} +\def\dodochinesenumberC#1#2#3#4\relax#5% + {\dochinesenumber#1#2#3\relax#5% + \chinesedigit{10000}#5% + \dododochinesenumber#4\relax#5} -\def\dodochinesenumberD#1#2#3#4#5\relax - {\dochinesenumber#1#2#3#4\relax - \chinesedigit{10000}% - \dododochinesenumber#5\relax} +\def\dodochinesenumberD#1#2#3#4#5\relax#6% + {\dochinesenumber#1#2#3#4\relax#6% + \chinesedigit{10000}#6% + \dododochinesenumber#5\relax#6} -\def\dodochinesenumberE#1#2#3\relax - {\dochinesenumber#1#2\relax - \chinesedigit{100000000}% - \dododochinesenumber#3\relax} +\def\dodochinesenumberE#1#2#3\relax#4% + {\dochinesenumber#1#2\relax#4% + \chinesedigit{100000000}#4% + \dododochinesenumber#3\relax#4} -%D The next table demonstates the correctness of the -%D conversion macro. -%D +% Capitalized Chinese Number + +\def\capitalizedchinesenumber#1% + {\expandafter\dochinesenumber\number#1\relax*} + +% Extended Chinese Number + +\def\extendedchinesenumber#1% + {\expandafter\doextendedchinesenumber\number#1\relax} + +\def\doextendedchinesenumber#1#2\relax% + {\ifnum #1#2<20 % 0-19 + \dochinesenumber#1#2\relax\empty + \else\ifnum#1#2<30 % 20-29 + \chinesedigit{20}\empty + \ifcase#2\else\chinesedigit{2#2}\fi + \else\ifnum#1#2<40 % 30-39 + \chinesedigit{30}\empty + \ifcase#2\else\chinesedigit{3#2}\fi + \else + \dochinesenumber#1#2\relax\empty + \fi\fi\fi} + +% Arabic Chinese Number + +\def\arabicchinesenumber#1% + {\expandafter\doarabicchinesenumber\number#1@\relax} + +\def\doarabicchinesenumber#1#2\relax% + {\if#1@\else + \chinesedigit{#1}\empty + \doarabicchinesenumber#2\relax + \fi} + +% The short call: + +\def\chinesenumber{\normalchinesenumber} + +% \dorecurse{40} +% {\hbox +% {\processingverbatimtrue +% \hbox to 1cm{\hss\recurselevel}\quad +% \hbox to 3cm{\hss\strut\normalchinesenumber {\recurselevel}}\quad +% \hbox to 3cm{\hss\strut\capitalizedchinesenumber{\recurselevel}}\quad +% \hbox to 3cm{\hss\strut\arabicchinesenumber {\recurselevel}}\quad +% \hbox to 3cm{\hss\strut\extendedchinesenumber {\recurselevel}}\crlf}} + +%D The next table demonstates the correctness of the +%D conversion macro. +%D %D \startbuffer %D \starttabel[|l|l|l|l|l|l|] %D \HL @@ -779,72 +847,77 @@ %D that deal with numbers |<|those familiar with \TEX\ macro %D programming will notice that the macro if fully %D expandable|>| in many cases Chinese documents use western -%D digits. So, in practice, the change that the next example -%D shows up, is minimal. -%D +%D digits. So, in practice, the change that the next example +%D shows up, is minimal. +%D %D \starttabulatie[|r|r|c|] -%D \NC 2546 \NC \chinesenumber {2546} \NC \NC\NR -%D \NC 9258 \NC \chinesenumber {9258} \NC $+$ \NC\NR -%D \HL +%D \NC 2546 \NC \chinesenumber {2546} \NC \NC\NR +%D \NC 9258 \NC \chinesenumber {9258} \NC $+$ \NC\NR +%D \HL %D \NC 11804 \NC \chinesenumber {11804} \NC \NC\NR %D \stoptabulatie -%D +%D %D While in arabic arithmics addition leads to more digits, in %D Chinese the number of glyphs can (temporary) decrease. %D Given that the number of people dealing with Chinese is %D considerably larger than the number of latin speaking %D people, a successor of \TEX\ definitely must provide a -%D \type {\chinesenumeral} primitive. - -\defineconversion[c] [\chinesenumber] -\defineconversion[chinese][\chinesenumber] +%D \type {\chinesenumeral} primitive. + +\defineconversion [c] [\normalchinesenumber] +\defineconversion [chinese] [\normalchinesenumber] +\defineconversion [nc] [\normalchinesenumber] +\defineconversion [normalchinese] [\normalchinesenumber] +\defineconversion [cc] [\capitalizedchinesenumber] +\defineconversion [capitalizedchinese] [\capitalizedchinesenumber] +\defineconversion [ec] [\extendedchinesenumber] +\defineconversion [extendedchinese] [\extendedchinesenumber] +\defineconversion [ac] [\arabicchinesenumber] +\defineconversion [arabicchinese] [\arabicchinesenumber] %D \macros %D {SimChi, TraChi} %D %D These components enable us to construct dedicated Chinese -%D font switches, like: +%D font switches, like: \setupunicodefont [chinese] - [ \c!schaal=\chineseunicodescale, - \c!hoogte=\chineseunicodeheight, - \c!diepte=\chineseunicodedepth, + [ \c!schaal=\chineseunicodescale, + \c!hoogte=\chineseunicodeheight, + \c!diepte=\chineseunicodedepth, \c!conversie=\chinesenumber, - \c!commandos=\setchineseencoding, % needed for digits + \c!commandos=\setchineseencoding, % needed for digits \c!commando=\handlechineseunicodeglyph] -\defineunicodefont [SimChi] [SimplifiedChinese] [chinese] -\defineunicodefont [TraChi] [TraditionalChinese] [chinese] - -%D For the moment, this encoding is implemented rather ugly. The -%D trick is to move the encoding value from the current font -%D definition to the \type {\chineseencoding} macro. +%D For the moment, this encoding is implemented rather ugly. The +%D trick is to move the encoding value from the current font +%D definition to the \type {\chineseencoding} macro. \let\chineseencoding\empty -\def\setchineseencoding% normally SomeChineseRegular +\def\setchineseencoding% normally SomeChineseRegular {\getfontfileparameters\unicodestyle \ifx\currentfontfileencoding\undefined \else \let\chineseencoding\currentfontfileencoding \fi} -%D We could have said: -%D +%D We could have said: +%D %D \starttypen -%D \defineunicodefont -%D [SimChi] +%D \defineunicodefont +%D [SimChi] %D [SimplifiedChinese] -%D [ \c!schaal=\chineseunicodescale, -%D \c!hoogte=\chineseunicodeheight, -%D \c!diepte=\chineseunicodedepth, +%D [ \c!schaal=\chineseunicodescale, +%D \c!hoogte=\chineseunicodeheight, +%D \c!diepte=\chineseunicodedepth, %D \c!conversie=\chinesenumber, -%D \c!commandos=\setchineseencoding, % needed for digits +%D \c!commandos=\setchineseencoding, % needed for digits %D \c!commando=\handlechineseunicodeglyph] %D \stoptypen -%D -%D However, the former definitions is more general. Next we -%D map a few fonts: +%D +%D However, the former definitions is more general. Next we +%D map a few fonts: \definefontsynonym [SimplifiedChineseRegular] [gbsong] [encoding=gbk] \definefontsynonym [SimplifiedChineseSlanted] [gbsongsl] [encoding=gbk] @@ -853,44 +926,118 @@ \definefontsynonym [SimplifiedChineseBoldSlanted] [gbheisl] [encoding=gbk] \definefontsynonym [SimplifiedChineseBoldItalic] [gbheisl] [encoding=gbk] -% Yet to be defined: - -\definefontsynonym [TraditionalChineseRegular] [b5ming] [encoding=big5] -\definefontsynonym [TraditionalChineseSlanted] [b5mingsl] [encoding=big5] -\definefontsynonym [TraditionalChineseItalic] [b5mingsl] [encoding=big5] +\definefontsynonym [TraditionalChineseRegular] [b5song] [encoding=big5] +\definefontsynonym [TraditionalChineseSlanted] [b5songsl] [encoding=big5] +\definefontsynonym [TraditionalChineseItalic] [b5songsl] [encoding=big5] \definefontsynonym [TraditionalChineseBold] [b5hei] [encoding=big5] \definefontsynonym [TraditionalChineseBoldSlanted] [b5heisl] [encoding=big5] \definefontsynonym [TraditionalChineseBoldItalic] [b5heisl] [encoding=big5] -%D We default to these so called Simplified Chinese fonts. +\defineunicodefont [SimChi] [SimplifiedChinese] [chinese] +\defineunicodefont [TraChi] [TraditionalChinese] [chinese] + +%D We default to these so called Simplified Chinese fonts. \SimChi +%D In addition to these fonts, we (pre|)|define some commonly +%D used fonts: + +\definefontsynonym [SimSongTiRegular] [gbsong] [encoding=gbk] +\definefontsynonym [SimSongTiSlanted] [gbsongsl] [encoding=gbk] +\definefontsynonym [SimSongTiBold] [gbsong] [encoding=gbk] +\definefontsynonym [SimSongTiBoldSlanted] [gbsongsl] [encoding=gbk] + +\definefontsynonym [TraSongTiRegular] [b5song] [encoding=big5] +\definefontsynonym [TraSongTiSlanted] [b5songsl] [encoding=big5] +\definefontsynonym [TraSongTiBold] [b5song] [encoding=big5] +\definefontsynonym [TraSongTiBoldSlanted] [b5songsl] [encoding=big5] + +\definefontsynonym [SimHeiTiRegular] [gbhei] [encoding=gbk] +\definefontsynonym [SimHeiTiSlanted] [gbheisl] [encoding=gbk] +\definefontsynonym [SimHeiTiBold] [gbhei] [encoding=gbk] +\definefontsynonym [SimHeiTiBoldSlanted] [gbheisl] [encoding=gbk] + +\definefontsynonym [TraHeiTiRegular] [b5hei] [encoding=big5] +\definefontsynonym [TraHeiTiSlanted] [b5heisl] [encoding=big5] +\definefontsynonym [TraHeiTiBold] [b5hei] [encoding=big5] +\definefontsynonym [TraHeiTiBoldSlanted] [b5heisl] [encoding=big5] + +\definefontsynonym [SimKaiTiRegular] [gbkai] [encoding=gbk] +\definefontsynonym [SimKaiTiSlanted] [gbkaisl] [encoding=gbk] +\definefontsynonym [SimKaiTiBold] [gbkai] [encoding=gbk] +\definefontsynonym [SimKaiTiBoldSlanted] [gbkaisl] [encoding=gbk] + +\definefontsynonym [TraKaiTiRegular] [b5kai] [encoding=big5] +\definefontsynonym [TraKaiTiSlanted] [b5kaisl] [encoding=big5] +\definefontsynonym [TraKaiTiBold] [b5kai] [encoding=big5] +\definefontsynonym [TraKaiTiBoldSlanted] [b5kaisl] [encoding=big5] + +\definefontsynonym [SimFangSongRegular] [gbfs] [encoding=gbk] +\definefontsynonym [SimFangSongSlanted] [gbfssl] [encoding=gbk] +\definefontsynonym [SimFangSongBold] [gbfs] [encoding=gbk] +\definefontsynonym [SimFangSongBoldSlanted] [gbfssl] [encoding=gbk] + +\definefontsynonym [TraFangSongRegular] [b5fs] [encoding=big5] +\definefontsynonym [TraFangSongSlanted] [b5fssl] [encoding=big5] +\definefontsynonym [TraFangSongBold] [b5fs] [encoding=big5] +\definefontsynonym [TraFangSongBoldSlanted] [b5fssl] [encoding=big5] + +\definefontsynonym [SimLiShuRegular] [gbfs] [encoding=gbk] +\definefontsynonym [SimLiShuSlanted] [gbfssl] [encoding=gbk] +\definefontsynonym [SimLiShuBold] [gbfs] [encoding=gbk] +\definefontsynonym [SimLiShuBoldSlanted] [gbfssl] [encoding=gbk] + +\definefontsynonym [TraLiShuRegular] [b5fs] [encoding=big5] +\definefontsynonym [TraLiShuSlanted] [b5fssl] [encoding=big5] +\definefontsynonym [TraLiShuBold] [b5fs] [encoding=big5] +\definefontsynonym [TraLiShuBoldSlanted] [b5fssl] [encoding=big5] + +%D The following definitions provide us the commands to switch +%D to these fonts. + +\defineunicodefont [SimSongTi] [SimplifiedChinese] [chinese] +\defineunicodefont [TraSongTi] [TraditionalChinese] [chinese] + +\defineunicodefont [SimHeiTi] [SimplifiedChinese] [chinese] +\defineunicodefont [TraHeiTi] [TraditionalChinese] [chinese] + +\defineunicodefont [SimKaiTi] [SimplifiedChinese] [chinese] +\defineunicodefont [TraKaiTi] [TraditionalChinese] [chinese] + +\defineunicodefont [SimFangSong] [SimplifiedChinese] [chinese] +\defineunicodefont [TraFangSong] [TraditionalChinese] [chinese] + +\defineunicodefont [SimLiShu] [SimplifiedChinese] [chinese] +\defineunicodefont [TraLiShu] [TraditionalChinese] [chinese] + +% \definealternativestyle [ChineseTitleFont] [\bfd\SimKaiTi] [] + %D \macros %D {purechinese} -%D -%D Use this macro to suppress spacing around Chinese text. +%D +%D Use this macro to suppress spacing around Chinese text. -\def\purechinese#1% evt geen rek +\def\purechinese#1% evt geen rek {\hskip\chineseSsignal\relax #1\unskip\unskip\unskip \hskip\chineseSsignal\relax} %D \macros %D {stillchinese} -%D -%D Use the next macro when you want the next item to be put +%D +%D Use the next macro when you want the next item to be put %D tight to the previous chinese character. \def\stillchinese% {\hskip\chineseSsignal\relax} -%D \macros +%D \macros %D {nochinese} %D -%D When we want to be sure of non||Chinese inline text, -%D we can package the for instance english text in \type -%D {\nochinese}. +%D When we want to be sure of non||Chinese inline text, +%D we can package the for instance english text in \type +%D {\nochinese}. \def\nochinese#1% {\unskip\unskip\unskip @@ -901,41 +1048,79 @@ \hskip\chinesesurroundskip \ignorespaces} -%D Now it's time for some real Chinese. This example -%D also shows that font switching is supported. -%D +%D \macros +%D {chisize} +%D +%D Chinese font sizes are specified in a different way, +%D using positive and negative numbers: + +\def\chisize#1% + {\ifnum#11<0 % a trick to catch -0 + \ifcase#1\space36\or24\or18\or15\or12\or9\or\else6.5\fi + \else + \ifcase#1\space42\or26\or22\or16\or14\or10.5\or7.5\or5.5\else5\fi + \fi pt} + +%D So: +%D +%D \startbuffer +%D [\chisize{-1}] [\chisize{7}] [\chisize{+4}] +%D \stopbuffer +%D +%D \typebuffer +%D +%D gives: +%D +%D \getbuffer +%D +%D The full range of sizes is: +%D +%D \starttabulatie[|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|] +%D \NC 8 \NC 7 \NC -6 \NC 6 \NC +%D -5 \NC 5 \NC -4 \NC 4 \NC +%D -3 \NC 3 \NC -2 \NC 2 \NC +%D -1 \NC 1 \NC -0 \NC 0 \NC\NR +%D \NC\chisize {8}\NC\chisize{7}\NC\chisize{-6}\NC\chisize{6}\NC +%D \chisize{-5}\NC\chisize{5}\NC\chisize{-4}\NC\chisize{4}\NC +%D \chisize{-3}\NC\chisize{3}\NC\chisize{-2}\NC\chisize{2}\NC +%D \chisize{-1}\NC\chisize{1}\NC\chisize{-0}\NC\chisize{0}\NC\NR +%D \stoptabulatie + +%D Now it's time for some real Chinese. This example +%D also shows that font switching is supported. +%D %D \startsmaller -%D \regelmidden{\tfd Ë®µ÷¸èÍ·} +%D \regelmidden{\tfd Ë®µ÷¸èÍ·} %D \blanko -%D \regelmidden{\tfb ±û³½ÖÐÇ»¶Òû´ïµ©£¬´ó×í×÷´Ëƪ£¬¼æ»³×ÓÓÉ¡£} +%D \regelmidden{\tfb ±û³½ÖÐÇ»¶Òû´ïµ©£¬´ó×í×÷´Ëƪ£¬¼æ»³×ÓÓÉ¡£} %D \blanko -%D \regelmidden{\tfb ËÕéø} +%D \regelmidden{\tfb ËÕéø} %D \blanko %D Ã÷Ô¼¸Ê±ÓУ¿°Ñ¾ÆÎÊÇàÌì¡£²»ÖªÌìÉϹ¬ãÚ£¬½ñϦÊǺÎÄꣿÎÒÓû³Ë·ç¹éÈ¥ -%D £¬ÓÖ¿ÖÇíÂ¥ÓñÓ¸ß´¦²»Ê¤º®¡£ÆðÎèŪÇåÓ°£¬ºÎËÆÔÚÈ˼䣿 +%D £¬ÓÖ¿ÖÇíÂ¥ÓñÓ¸ß´¦²»Ê¤º®¡£ÆðÎèŪÇåÓ°£¬ºÎËÆÔÚÈ˼䣿 %D \blanko %D תÖì¸ó£¬µÍ»§£¬ÕÕÎÞÃß¡£²»Ó¦Óкޣ¬ºÎÊÂÆ«Ïò±ðʱԲ£¿ÈËÓб¯»¶ÀëºÏ£¬ %D ÔÂÓÐÒõÇçԲȱ£¬´ËʹÅÄÑÈ«¡£µ«Ô¸È˳¤¾Ã£¬Ç§Àﹲ濾ꡣ %D \stopsmaller -%D -%D The english translation is: -%D +%D +%D The english translation is: +%D %D \startsmaller -%D \regelmidden{\tfd Tune: Prelude to the Melody of Water} -%D \blanko +%D \regelmidden{\tfd Tune: Prelude to the Melody of Water} +%D \blanko %D \regelmidden{\tfb On the night of the Mid||Autumn Festival of %D 1076, I drank happily till dawn and wrote this in my cups -%D while thinking of Zi||you.} -%D \blanko -%D \regelmidden{\tfb Su Shi} +%D while thinking of Zi||you.} +%D \blanko +%D \regelmidden{\tfb Su Shi} %D \blanko %D How long will the bright moon appear? Wine||cup in hand, I %D ask the sky. I do not know waht time of year it would be %D tonight in the palace on high. Riding the wind, there I %D would fly, yet I fear the crystal palace would be far too %D high and cold for me. I rise and dance, with my shadow I -%D play. On high as on earth, would it be as gay? -%D \blanko +%D play. On high as on earth, would it be as gay? +%D \blanko %D The moon goes round the mansion red though gauze||draped %D windows soft to shed her light upon the sleepless bed. %D Against man she should have no spite. Why then when people @@ -944,7 +1129,7 @@ %D may wax or wane. There has been nothing perfect since the %D olden days. So let us wish that man will live long as he %D can! Though miles apart, we'll share the beauty she -%D displays. +%D displays. %D \stopsmaller %D This package is written in the city of Hasselt, a pretty @@ -955,6 +1140,10 @@ %D be the same, since now I can at least pretend to know the %D glyphs all around the place. The numbers should pose me no %D problems, but I fear I will never manage to recognize those -%D scribles they draw on their pads when thay take your order. +%D scribles they draw on their pads when thay take your order. + +%D To make our lives more easy, we put it here (too): + +\setuptyping[\c!tab=\v!nee] \protect \endinput diff --git a/tex/context/base/font-fil.tex b/tex/context/base/font-fil.tex index 9daebf9fc..7c0b656e6 100644 --- a/tex/context/base/font-fil.tex +++ b/tex/context/base/font-fil.tex @@ -55,6 +55,11 @@ \definefontsynonym [Times-Bold] [tib] [encoding=texnansi] \definefontsynonym [Times-BoldItalic] [tibi] [encoding=texnansi] +\definefontsynonym [Times-MathRoman] [tir] [encoding=texnansi] +\definefontsynonym [Times-MathExtension] [mtex] +\definefontsynonym [Times-MathItalic] [mtmi] +\definefontsynonym [Times-MathSymbol] [mtsy] + \definefontsynonym [LucidaBlackletter] [lbl] [encoding=texnansi] \definefontsynonym [LucidaBright] [lbr] [encoding=texnansi] \definefontsynonym [LucidaBright-Demi] [lbd] [encoding=texnansi] diff --git a/tex/context/base/font-ini.tex b/tex/context/base/font-ini.tex index 258c60125..e00701367 100644 --- a/tex/context/base/font-ini.tex +++ b/tex/context/base/font-ini.tex @@ -71,6 +71,34 @@ 10: neznamy font -- \stopmessages +\startmessages italian library: fonts + title: font del corpo + 1: codifica -- + 2: variante -- caricata + 3: variante sconosciuta -- + 4: corpo del testo -- non definito + 5: stile -- non definito + 6: -- caricato + 7: formato sconosciuto -- + 8: stile -- definito + 9: mappatura -- caricata + 10: file di font sconosciuto -- +\stopmessages + +\startmessages norwegian library: fonts + title: hovedfont + 1: koding -- + 2: variant -- er lest inn + 3: ukjent variant -- + 4: hovedfont -- er ikke definert + 5: stil -- er ikke definert + 6: -- er lest inn + 7: ukjent format -- + 8: stil -- definert + 9: avbildning -- er lest inn + 10: ukjent fontfil -- +\stopmessages + %D This module is one of the oldest modules of \CONTEXT. The %D macros below evolved out of the \PLAIN\ \TEX\ macros and %D therefore use a similar naming scheme (\type{\rm}, @@ -535,16 +563,16 @@ %D families for {\ss sans serif} and \type{teletype} we use the %D more general \type{\tffam}, which stands for typeface. -\newfam\bsfam % 8 (ConTeXt) BoldSlanted -\newfam\bifam % 9 (ConTeXt) BoldItalic -\newfam\scfam % A (ConTeXt) SmallCaps -\newfam\tffam % B (ConTeXt) TypeFace +\chardef\bsfam=8 % \newfam\bsfam % 8 (ConTeXt) BoldSlanted +\chardef\bifam=9 % \newfam\bifam % 9 (ConTeXt) BoldItalic +\chardef\scfam=10 % \newfam\scfam % A (ConTeXt) SmallCaps +\chardef\tffam=11 % \newfam\tffam % B (ConTeXt) TypeFace %D Because Taco needs a few more math families, we reuse %D family~7 for all those typefaces that have no related %D family, and therefore are grouped into one. -\let\nnfam\ttfam % 7 (ReUsed) NoName +\chardef\nnfam=7 % \let\nnfam\ttfam % 7 (ReUsed) NoName %D Normally \type{\mrfam} equals \type{\tffam}, but a more %D distinctive alternatives are possible, for instance the @@ -555,13 +583,21 @@ %D needed for the \AMS\ Symbol Fonts and Extended Lucida %D Bright. -\newfam\mafam % C (ConTeXt) Math A Fam (AmsTeX A) -\newfam\mbfam % D (ConTeXt) Math B Fam (AmsTeX B) -\newfam\mcfam % E (ConTeXt) Math C Fam +\chardef\mafam=12 % \newfam\mafam % C (ConTeXt) Math A Fam (AmsTeX A) +\chardef\mbfam=13 % \newfam\mbfam % D (ConTeXt) Math B Fam (AmsTeX B) +\chardef\mcfam=14 % \newfam\mcfam % E (ConTeXt) Math C Fam +\chardef\mdfam=15 % \newfam\mdfam % F (ConTeXt) Math D Fam (MathTime) %D Because there are 16~families and because \type{\ttfam} -%D is reused, at the moment we have one families left:~F. -%D +%D is reused, at the moment we have no so many families +%D left. By default, we map any newly defined family on the +%D last one (F). + +\def\newfam#1{\chardef#1=15 } + +%D This hack is also needed because in \ETEX\ we are going +%D to reuse the \type {\newfam} allocation counter. + %D To ease the support of font packages, we als define %D shortcuts to these familynames. This is necessary because %D the family names are in fact \type{\chardef}'s, which means @@ -572,7 +608,7 @@ \def\hexnumber#1% {\ifcase#1 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or - 8\or 9\or A\or B\or C\or D\or E\or F\fi} + 8\or 9\or A\or B\or C\or D\or E\or F\else 0\fi} \edef\hexmrfam {\hexnumber\mrfam} \edef\hexbsfam {\hexnumber\bsfam} \edef\hexmifam {\hexnumber\mifam} \edef\hexbifam {\hexnumber\bifam} @@ -581,8 +617,7 @@ \edef\hexitfam {\hexnumber\itfam} \edef\hexmafam {\hexnumber\mafam} \edef\hexslfam {\hexnumber\slfam} \edef\hexmbfam {\hexnumber\mbfam} \edef\hexbffam {\hexnumber\bffam} \edef\hexmcfam {\hexnumber\mcfam} - -\edef\hexnnfam {\hexnumber\nnfam} +\edef\hexnnfam {\hexnumber\nnfam} \edef\hexmdfam {\hexnumber\mdfam} %D \macros %D {lchexnumber,uchexnumber,lchexnumbers} @@ -593,7 +628,7 @@ \def\lchexnumber#1% {\ifcase#1 0\or 1\or 2\or 3\or 4\or 5\or 6\or 7\or - 8\or 9\or a\or b\or c\or d\or e\or f\fi} + 8\or 9\or a\or b\or c\or d\or e\or f\else 0\fi} \let\uchexnumber=\hexnumber @@ -705,73 +740,135 @@ %D These macros enable the use of definitions like \type{sa %D \magfactor3} which saves us both (mis|)|calculations and %D potential mistypings. -%D -%D Because \type{sa} is not a \TEX\ supported alternative, we -%D have to test for it ourselves. In doing so, we need an -%D auxiliary \DIMENSION. We cannot use \type{\scratchdimen} -%D because font loading can happen at any moment due to -%D postponed loading. We could instead have used dirty grouping -%D tricks, but this one works too. +%D +%D Because \type {sa} (scaled at) and \type {mo} (mapped on) +%D are not low level \TEX\ supported alternatives, we have to +%D test for it ourselves. In doing so, we need an auxiliary +%D \DIMENSION. We cannot use \type{\scratchdimen} because font +%D loading can happen at any moment due to postponed loading. +%D We could instead have used dirty grouping tricks, but this +%D one works too. + +%%% \newdimen\scaledfont +%%% +%%% REPLACED +%%% +%%% % \def\docalculatefont#1 sa #2sa#3*#4*#5*% The spaces are needed! +%%% % {\edef\fontscale{#2}% +%%% % \ifx\fontscale\empty +%%% % \expandafter\font\csname#4#5\endcsname=#1\relax +%%% % \else +%%% % \scaledfont=#4\relax +%%% % \expandafter\font\csname#4#5\endcsname=#1 at \fontscale\scaledfont\relax +%%% % \fi} +%%% +%%% \def\splitfontdefinition#1 #2 #3 #4\end% +%%% {\def\somefontname{#1}% +%%% \doifelse{#2}{*} +%%% {\let\somefontspec=\empty} +%%% {\def\somefontspec{ #2 #3}}} +%%% +%%% % \def\docalculatefont#1 sa #2sa#3*#4*#5*% The spaces are needed! +%%% % {\edef\fontscale{#2}% +%%% % \expandafter\splitfontdefinition#1 * * \end +%%% % \ifx\fontscale\empty \else +%%% % \scaledfont=#4\relax +%%% % \def\somefontspec{ at \fontscale\scaledfont}% +%%% % \fi +%%% % \expandafter\font\csname#4#5\endcsname= +%%% % \truefilename{\somefontname}\somefontspec\relax} +%%% +%%% %D We also accept \type{sa a}||\type{sa d} as specification. +%%% +%%% \def\checkfontscale#1#2\end% should be optimized +%%% {\doifnumberelse{#1}{} +%%% {\doifdefinedelse{\??ft\s!default#1} +%%% {\edef\fontscale{\getvalue{\??ft\s!default#1}}} +%%% {\edef\fontscale{1}}}} +%%% +%%% % \def\docalculatefont#1 sa #2sa#3*#4*#5*% The spaces are needed! +%%% % {\edef\fontscale{#2}% +%%% % \expandafter\splitfontdefinition#1 * * \end +%%% % \ifx\fontscale\empty \else +%%% % \expandafter\checkfontscale#2 \end % #2 can be "a " (space!) +%%% % \scaledfont=#4\relax +%%% % \def\somefontspec{ at \fontscale\scaledfont}% +%%% % \fi +%%% % \expandafter\font\csname#4#5\endcsname= +%%% % \truefilename{\somefontname}\somefontspec\relax} +%%% +%%% \def\defaultfontfile{cmtt10} +%%% \edef\nullfontname {\fontname\nullfont} +%%% \edef\dummyfontname {font\strippedcsname\\} +%%% +%%% \def\docalculatefont#1 sa #2sa#3*#4*#5*% The spaces are needed! +%%% {\edef\fontscale{#2}% +%%% \expandafter\splitfontdefinition#1 * * \end +%%% \ifx\fontscale\empty \else +%%% \expandafter\checkfontscale#2 \end % #2 can be "a " (space!) +%%% \scaledfont=#4\relax +%%% \def\somefontspec{ at \fontscale\scaledfont}% +%%% \fi +%%% \edef\fontfile{\truefontname\somefontname}% +%%% \ifx\fontfile\s!unknown +%%% \let\fontfile\defaultfontfile +%%% \else +%%% \edef\fontdata{\truefontdata\somefontname}% +%%% \ifx\fontdata\empty \else +%%% %\@EA\getparameters\@EA[\@EA\fontfile\@EA]\@EA[\fontdata]% +%%% \@EA\rawgetparameters\@EA[\@EA\fontfile\@EA]\@EA[\fontdata]% +%%% \fi +%%% \fi +%%% % faster +%%% %\expandafter\font\csname#4#5\endcsname\fontfile\somefontspec\relax +%%% % nicer +%%% \edef\lastfontname{\fontfile\somefontspec}% +%%% \expandafter\font\csname#4#5\endcsname\lastfontname +%%% \expandafter\font\csname\dummyfontname\endcsname\lastfontname\relax} +%%% % safer but sometimes introducing newlines in the log +%%% %\batchmode +%%% %\font\lastloadedfont\fontfile\somefontspec\relax +%%% %\errorstopmode +%%% %\edef\lastfontname{\fontname\lastloadedfont}% +%%% %\ifx\lastfontname\nullfontname +%%% % \showmessage{\m!fonts}{10}{\fontfile}% +%%% % \expandafter\font\csname#4#5\endcsname=\defaultfontfile\somefontspec\relax +%%% %\else +%%% % \expandafter\let\csname#4#5\endcsname\lastloadedfont +%%% %\fi} \newdimen\scaledfont -% \def\docalculatefont#1 sa #2sa#3*#4*#5*% The spaces are needed! -% {\edef\fontscale{#2}% -% \ifx\fontscale\empty -% \expandafter\font\csname#4#5\endcsname=#1\relax -% \else -% \scaledfont=#4\relax -% \expandafter\font\csname#4#5\endcsname=#1 at \fontscale\scaledfont\relax -% \fi} - -\def\splitfontdefinition#1 #2 #3 #4\end% - {\def\somefontname{#1}% - \doifelse{#2}{*} - {\let\somefontspec=\empty} - {\def\somefontspec{ #2 #3}}} - -% \def\docalculatefont#1 sa #2sa#3*#4*#5*% The spaces are needed! -% {\edef\fontscale{#2}% -% \expandafter\splitfontdefinition#1 * * \end -% \ifx\fontscale\empty \else -% \scaledfont=#4\relax -% \def\somefontspec{ at \fontscale\scaledfont}% -% \fi -% \expandafter\font\csname#4#5\endcsname= -% \truefilename{\somefontname}\somefontspec\relax} +\def\parsefontspec[#1]% + {\edef\somefontspec{#1}% + \@EA\@EA\@EA\doparsefontspec\@EA\somefontspec\space\relax]} -%D We also accept \type{sa a}||\type{sa d} as specification. - -\def\checkfontscale#1#2\end% - {\doifnumberelse{#1}{} - {\doifdefinedelse{\??ft\s!default#1} - {\edef\fontscale{\getvalue{\??ft\s!default#1}}} - {\edef\fontscale{1}}}} - -% \def\docalculatefont#1 sa #2sa#3*#4*#5*% The spaces are needed! -% {\edef\fontscale{#2}% -% \expandafter\splitfontdefinition#1 * * \end -% \ifx\fontscale\empty \else -% \expandafter\checkfontscale#2 \end % #2 can be "a " (space!) -% \scaledfont=#4\relax -% \def\somefontspec{ at \fontscale\scaledfont}% -% \fi -% \expandafter\font\csname#4#5\endcsname= -% \truefilename{\somefontname}\somefontspec\relax} - -\def\defaultfontfile{cmtt10} -\edef\nullfontname {\fontname\nullfont} -\edef\dummyfontname {font\strippedcsname\\} - -\def\docalculatefont#1 sa #2sa#3*#4*#5*% The spaces are needed! - {\edef\fontscale{#2}% - \expandafter\splitfontdefinition#1 * * \end - \ifx\fontscale\empty \else - \expandafter\checkfontscale#2 \end % #2 can be "a " (space!) - \scaledfont=#4\relax +\def\doparsefontspec#1 #2#3]#4#5% + {\ifx#2\relax + \let\somefontname\somefontspec + \let\somefontspec\empty + \donoparsefontspec{#5}% + \else + \@EA\dodoparsefontspec\@EA[\somefontspec]{#4}{#5}% + \fi} + +\def\dodoparsefontspec[#1 #2#3#4]#5#6% [spec]{sa/mo size}{name} + {\edef\somefontname{#1}% + \edef\fontscale% + {\ifx#2s\ifx#3a#4\fi\else % sa = scaled at + \ifx#2m\ifx#3o#4\fi\fi\fi}% mo = mapped on + \ifx\fontscale\empty + \edef\somefontspec{ #2#3#4}% + \else + \expandafter\checkfontscale\fontscale\end + \scaledfont=#5\relax + \ifx#2m\setmappedfontsize\scaledfont\fi \def\somefontspec{ at \fontscale\scaledfont}% \fi - \edef\fontfile{\truefontname\somefontname}% + \donoparsefontspec{#6}} + +\def\donoparsefontspec#1% + {\edef\fontfile{\truefontname\somefontname}% \ifx\fontfile\s!unknown \let\fontfile\defaultfontfile \else @@ -781,23 +878,37 @@ \@EA\rawgetparameters\@EA[\@EA\fontfile\@EA]\@EA[\fontdata]% \fi \fi - % faster - %\expandafter\font\csname#4#5\endcsname\fontfile\somefontspec\relax - % nicer - \edef\lastfontname{\fontfile\somefontspec}% - \expandafter\font\csname#4#5\endcsname\lastfontname - \expandafter\font\csname\dummyfontname\endcsname\lastfontname\relax} - % safer but sometimes introducing newlines in the log - %\batchmode - %\font\lastloadedfont\fontfile\somefontspec\relax - %\errorstopmode - %\edef\lastfontname{\fontname\lastloadedfont}% - %\ifx\lastfontname\nullfontname - % \showmessage{\m!fonts}{10}{\fontfile}% - % \expandafter\font\csname#4#5\endcsname=\defaultfontfile\somefontspec\relax - %\else - % \expandafter\let\csname#4#5\endcsname\lastloadedfont - %\fi} + \edef\lastfontname{\fontfile\somefontspec}% not really needed + \expandafter\font\csname#1\endcsname\lastfontname + % the second \font definition prevents fuzzy font refs + % \expandafter\font\csname\dummyfontname\endcsname\lastfontname + % but somehow they changed tex so that it does not matter any more + \relax} + +\def\defaultfontfile{cmtt10} +\edef\nullfontname {\fontname\nullfont} +\edef\dummyfontname {font\strippedcsname\\} + +% safer but sometimes introducing newlines in the log +% +% \batchmode +% \font\lastloadedfont\fontfile\somefontspec\relax +% \errorstopmode +% \edef\lastfontname{\fontname\lastloadedfont}% +% \ifx\lastfontname\nullfontname +% \showmessage{\m!fonts}{10}{\fontfile}% +% \expandafter\font\csname#1\endcsname=\defaultfontfile\somefontspec\relax +% \else +% \expandafter\let\csname#1\endcsname\lastloadedfont +% \fi + +%D We also accept \type{sa a}||\type{sa d} as specification. + +\def\checkfontscale#1#2\end% should be optimized + {\doifnumberelse{#1}{} + {\doifdefinedelse{\??ft\s!default#1} + {\edef\fontscale{\getvalue{\??ft\s!default#1}}} + {\edef\fontscale{1}}}} %D The duplicate font definition, using the ever the same dummy %D font name, results in less fuzzy error messages. In the log @@ -878,9 +989,10 @@ %D one for local use: %D %D \starttypen -%D \definefont[Some][LucidaBright at 100pt] \Some some text -%D \definefont[More][LucidaBright scaled 3000] \More more text -%D \definefont[Last][LucidaBright sa 5.4] \Last last text +%D \definefont[Some][LucidaBright at 100pt] \Some some +%D \definefont[More][LucidaBright scaled 3000] \More more +%D \definefont[Nice][LucidaBright mp 2] \Nice nice +%D \definefont[Text][LucidaBright sa 5.4] \Text last %D \stoptypen %D %D The implementation one looks familiar: @@ -888,26 +1000,40 @@ \def\definefont% {\dodoubleargument\dodefinefont} -% \def\dodefinefont[#1][#2]% -% {\unexpanded\setvalue{#1}{\dododefinefont{#1}#2 sa sa*}} -% -% A more friendly version, which defaults to \type {sa 1} is: +%%% REPLACED +%%% +%%% \def\dodefinefont[#1][#2]% +%%% {\doifinstringelse{ }{#2} +%%% {\unexpanded\setvalue{#1}{\dododefinefont{#1}#2 sa sa*}} +%%% {\dodefinefont[#1][#2 sa 1]}} +%%% +%%% \def\dododefinefont#1#2sa #3sa#4*% +%%% {\edef\fontscale{#3}% +%%% \expandafter\splitfontdefinition#2 * * \end +%%% \ifx\fontscale\empty\else % new 2000/8/31 +%%% \expandafter\checkfontscale#3 \end +%%% \fi +%%% \expandafter\font\csname#1\endcsname=\truefontname\somefontname +%%% \ifx\fontscale\empty +%%% \somefontspec +%%% \else +%%% \space at \fontscale\bodyfontsize +%%% \fi +%%% \getvalue{#1}} \def\dodefinefont[#1][#2]% {\doifinstringelse{ }{#2} - {\unexpanded\setvalue{#1}{\dododefinefont{#1}#2 sa sa*}} + {\unexpanded\setvalue{#1}{\dododefinefont{#1}{#2}}} {\dodefinefont[#1][#2 sa 1]}} -\def\dododefinefont#1#2sa #3sa#4*% - {\edef\fontscale{#3}% - \expandafter\splitfontdefinition#2 * * \end - \expandafter\font\csname#1\endcsname=\truefontname\somefontname - \ifx\fontscale\empty - \somefontspec - \else - \space at \fontscale\bodyfontsize - \fi - \getvalue{#1}} +%D The * makes the switch local, so that we can redefine a +%D logical name and/or change the size in between. + +% \def\dododefinefont#1#2% +% {\parsefontspec[#2]{\bodyfontsize}{#1}\getvalue{#1}} + +\def\dododefinefont#1#2% + {\parsefontspec[#2]{\bodyfontsize}{*#1*}\getvalue{*#1*}} %D I considered checking for mistakenly use of \PLAIN's %D \type{\magstep}'s but although it would take only a few @@ -919,11 +1045,54 @@ %D \definebodyfont [12pt] [rm] [hyphenchar=45] %D \stoptypen +%%% REPLACED +%%% +%%% \beginTEX +%%% +%%% \def\dodoloadfont#1#2#3#4% +%%% {\edef\calculatedfont{\csname\??ft#1#2#3\endcsname\space}% +%%% \expandafter\docalculatefont\calculatedfont sa sa*#1*#2#3*% +%%% \@EA\hyphenchar\csname#1#2#3\endcsname= +%%% \@EA\ifx\csname\??ft#1#2\s!hyphenchar\endcsname\relax +%%% #4% +%%% \else +%%% \csname\??ft#1#2\s!hyphenchar\endcsname +%%% \fi\relax +%%% \csname#1#2#3\endcsname} +%%% +%%% \endTEX +%%% +%%% \beginETEX \ifcsname +%%% +%%% \def\dodoloadfont#1#2#3#4% +%%% {\edef\calculatedfont{\csname\??ft#1#2#3\endcsname\space}% +%%% \expandafter\docalculatefont\calculatedfont sa sa*#1*#2#3*% +%%% \@EA\hyphenchar\csname#1#2#3\endcsname= +%%% \ifcsname\??ft#1#2\s!hyphenchar\endcsname +%%% \csname\??ft#1#2\s!hyphenchar\endcsname +%%% \else +%%% #4% +%%% \fi\relax +%%% \csname#1#2#3\endcsname} +%%% +%%% \endETEX + +%D The loading macro is used in two macros. One of them takes +%D care of fixed width teletype fonts. + +\def\doloadfont#1#2#3% + {%\debuggerinfo{\m!fonts}{loaded #1#2#3}% + \dodoloadfont{#1}{#2}{#3}{45}} + +\def\doloadttfont#1#2#3% + {%\debuggerinfo{\m!fonts}{loaded fixed #1#2#3}% + \dodoloadfont{#1}{#2}{#3}{-1}} + \beginTEX \def\dodoloadfont#1#2#3#4% - {\edef\calculatedfont{\csname\??ft#1#2#3\endcsname\space}% - \expandafter\docalculatefont\calculatedfont sa sa*#1*#2#3*% + {\edef\calculatedfont{[\csname\??ft#1#2#3\endcsname]}% + \@EA\parsefontspec\calculatedfont{#1}{#1#2#3}% \@EA\hyphenchar\csname#1#2#3\endcsname= \@EA\ifx\csname\??ft#1#2\s!hyphenchar\endcsname\relax #4% @@ -937,8 +1106,8 @@ \beginETEX \ifcsname \def\dodoloadfont#1#2#3#4% - {\edef\calculatedfont{\csname\??ft#1#2#3\endcsname\space}% - \expandafter\docalculatefont\calculatedfont sa sa*#1*#2#3*% + {\edef\calculatedfont{[\csname\??ft#1#2#3\endcsname]}% + \@EA\parsefontspec\calculatedfont{#1}{#1#2#3}% \@EA\hyphenchar\csname#1#2#3\endcsname= \ifcsname\??ft#1#2\s!hyphenchar\endcsname \csname\??ft#1#2\s!hyphenchar\endcsname @@ -949,16 +1118,58 @@ \endETEX -%D The loading macro is used in two macros. One of them takes -%D care of fixed width teletype fonts. +%D \macros +%D {mapfontsize} +%D +%D For special purposes, like in math, you may want to use +%D slightly different sizes than the ones given. This happens +%D for instance with the Math Times fonts. Mapped font sizes +%D can be specified by using the \type {mo} key instead of +%D \type {sa} in font definitions. +%D +%D \startbuffer +%D \mapfontsize[10pt][11pt] +%D \mapfontsize[11pt][12pt] +%D \mapfontsize[12pt][13pt] +%D +%D \definefont[test][Serif]\test TEST \par +%D \definefont[test][Serif sa 5]\test TEST \par +%D \definefont[test][Serif mo 5]\test TEST \par +%D \definefont[test][Serif sa d]\test TEST \par +%D \definefont[test][Serif at 60pt]\test TEST \par +%D \definefont[test][Serif scaled 6000]\test TEST \par +%D \stopbuffer +%D +%D \typebuffer +%D +%D \startopelkaar +%D \haalbuffer +%D \stopopelkaar -\def\doloadfont#1#2#3% - {%\debuggerinfo{\m!fonts}{loaded #1#2#3}% - \dodoloadfont{#1}{#2}{#3}{45}} +\def\mapfontsize% + {\dodoubleargument\domapfontsize} -\def\doloadttfont#1#2#3% - {%\debuggerinfo{\m!fonts}{loaded fixed #1#2#3}% - \dodoloadfont{#1}{#2}{#3}{-1}} +\def\domapfontsize[#1][#2]% + {\scratchdimen#1\relax % \relax is really needed here + \setvalue{\??ft*\the\scratchdimen}{#2}} + +\beginTEX + +\def\setmappedfontsize#1% + {\expandafter\ifx\csname\??ft*\the#1\endcsname\relax\else + #1=\csname\??ft*\the#1\endcsname + \fi} + +\endTEX + +\beginETEX \ifcsname + +\def\setmappedfontsize#1% + {\ifcsname\??ft*\the#1\endcsname + #1=\csname\??ft*\the#1\endcsname + \fi} + +\endETEX %D \macros %D {getfontname} @@ -1340,7 +1551,6 @@ %D These macros show that quite some definitions take place. %D Fonts are not loaded yet! This means that at format %D generation time, no font files are preloaded. -%D % %D We could have use \type{\unexpanded\setvalue} instead of % %D the \type{\donottest} prefixes. However, this would lead to @@ -1479,7 +1689,7 @@ %D All things related to fonts are grouped into files with %D names like \type{font-cmr}. These files are loaded by: -\def\resetfontdefinitionfile#1% +\def\resetfontdefinitionfile[#1]% {\letbeundefined{\c!file\f!fontprefix#1}} \def\doreadfontdefinitionfile#1% @@ -2140,7 +2350,6 @@ \def\dosettypeface#1#2% {\doifdefinedelse{@\normalizedbodyfontsize#1#2@} % the definition bound one -% {\edef\characterencoding{\getvalue{@\normalizedbodyfontsize#1#2@}}} {\enablecoding[\getvalue{@\normalizedbodyfontsize#1#2@}]} {\enablecoding[\s!default]}% \edef\fontalternative{#2}% @@ -2153,6 +2362,8 @@ {\expandafter\fam\getvalue{\c!nn\s!fam}}% \getvalue{#1#2}% \ifcase\currentxfontsize\or\tx\or\txx\fi + \doifdefined{\purefontname\font\s!handling} % the file bound one + {\enablehandling[\getvalue{\purefontname\font\s!handling}]}% \doifdefined{\purefontname\font\s!encoding} % the file bound one {\enablecoding[\getvalue{\purefontname\font\s!encoding}]}% \doifdefinedelse{\purefontname\font\s!mapping} % the file bound one @@ -2723,8 +2934,90 @@ % \fi % \font\temp=\truefontname{#1} at \bodyfontsize \temp#2\relax}} -\def\getglyph#1#2% - {{\definefont[\s!dummy][#1 sa \currentfontscale]\dummy#2}} +% \def\getglyph#1#2% +% {{\definefont[\s!dummy][#1 sa \currentfontscale]\dummy#2}} + +\def\fontstringA% + {\ifx\fontstyle\c!rm \s!Serif \else + \ifx\fontstyle\c!ss \s!Sans \else + \ifx\fontstyle\c!tt \s!Mono \else + \s!Serif \fi\fi\fi} + +\def\fontstringB% + {\ifx\fontstyle\c!rm \s!Regular \else + \ifx\fontstyle\c!ss \s!Support \else + \ifx\fontstyle\c!tt \s!Type \else + \s!Serif \fi\fi\fi} + +\def\fontstringC% + {\ifnum\fam=\bffam \s!Bold \else + \ifnum\fam=\slfam \s!Slanted \else + \ifnum\fam=\itfam \s!Italic \else + \ifnum\fam=\bsfam \s!BoldSlanted \else + \ifnum\fam=\bifam \s!BoldItalic \s!Regular \fi\fi\fi\fi\fi} + +\beginETEX \ifcsname + +\def\glyphfontfile#1% + {#1% + \ifcsname\??ff#1\fontstringA\fontstringC\endcsname + \fontstringA\fontstringC + \else\ifcsname\??ff#1\fontstringB\fontstringC\endcsname + \fontstringB\fontstringC + \else\ifcsname\??ff#1\fontstringA\endcsname + \fontstringA + \else\ifcsname\??ff#1\fontstringB\endcsname + \fontstringB + \else\ifcsname\??ff#1\fontstringC\endcsname + \fontstringC + \fi\fi\fi\fi\fi} + +\endETEX + +\beginTEX \ifcsname + +\def\glyphfontfile#1% + {#1% + \expandafter\ifx\csname\??ff#1\fontstringA\fontstringC\endcsname\relax + \expandafter\ifx\csname\??ff#1\fontstringB\fontstringC\endcsname\relax + \expandafter\ifx\csname\??ff#1\fontstringA\endcsname\relax + \expandafter\ifx\csname\??ff#1\fontstringB\endcsname\relax + \expandafter\ifx\csname\??ff#1\fontstringC\endcsname\relax + \else \fontstringC \fi + \else \fontstringB \fi + \else \fontstringA \fi + \else \fontstringB\fontstringC \fi + \else \fontstringA\fontstringC \fi} + +\endTEX + +\def\getglyph#1#2% + {{\definefont[\s!dummy][\glyphfontfile{#1} sa \currentfontscale]\dummy#2}} + +%D The last implementation of \type {\getglyph} permits +%D definitions like: +%D +%D \starttypen +%D \definefontsynonym [EuroSans] [eurose] +%D \definefontsynonym [EuroSansBold] [euroseb] +%D \definefontsynonym [EuroSansItalic] [eurosei] +%D \definefontsynonym [EuroSansSlanted] [eurosei] +%D \definefontsynonym [EuroSansBoldItalic] [eurosebi] +%D \definefontsynonym [EuroSansBoldSlanted] [eurosebi] +%D +%D \definesymbol [euro] [\getglyph{Euro}{\char160}] +%D +%D \def\euro{\symbol[euro]} +%D \stoptypen +%D +%D These definitions guarantee that the next calls work okay: +%D +%D \starttypen +%D \ss \tf\euro \bf\euro \sla\euro \itd\euro \bs\euro \bic\euro +%D \stoptypen +%D +%D The shape as well as the size is adapted to the current +%D environment. %D Fonts can only be used when loaded. In \CONTEXT\ we %D postpone the loading of fonts, even when we load \PLAIN. @@ -2774,7 +3067,7 @@ %D %D We are going to redefine \type{\ss} but for those wo still %D want to have access to the german \SS, we save it's value in -%D \type{\SS}. Ok, I should have used \type{\sf} insead of +%D \type{\SS}. Ok, I should have used \type{\sf} instead of %D \type{\ss} in the first place. \ifx\undefined\SS \let\SS=\ss \fi diff --git a/tex/context/base/font-uni.tex b/tex/context/base/font-uni.tex index 800a45235..2c0e2a690 100644 --- a/tex/context/base/font-uni.tex +++ b/tex/context/base/font-uni.tex @@ -37,6 +37,14 @@ 21: Verwenden von (pdf)eTeX ist sicherer \stopmessages +\startmessages italian library: fonts + 21: l'uso di (pdf)eTeX è più sicuro +\stopmessages + +\startmessages norwegian library: fonts + 21: å bruke (pdf)eTeX er tryggere +\stopmessages + \unprotect %D \macros @@ -391,7 +399,7 @@ \definefontsynonym[#2\s!Italic] [#2\s!Regular]% \definefontsynonym[#2\s!BoldSlanted][#2\s!Slanted]% \definefontsynonym[#2\s!BoldItalic] [#2\s!Italic]}% - \setvalue{#1}{\enableunicodefont{#1}}}} + \unexpanded\setvalue{#1}{\enableunicodefont{#1}}}} \def\setupunicodefont% {\dodoubleempty\dosetupunicodefont} diff --git a/tex/context/base/java-fld.tex b/tex/context/base/java-fld.tex index d349392e8..0ce30f8fc 100644 --- a/tex/context/base/java-fld.tex +++ b/tex/context/base/java-fld.tex @@ -11,6 +11,8 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +% will be simplified, since we now parse functions + % nu nog alles geladen, moet dus anders \startJSpreamble {Sanitize_TeX_Input} used later @@ -125,7 +127,9 @@ event.value = Sanitized_TeX_String(event.value) ; \stopJScode -\startJSpreamble {Do_With_Field} used now +%\startJSpreamble {Do_With_Field} used now + +\startJSpreamble {Field} used now var visible_field = new Array() ; % no garbage collection ! var visible_fields = 0 ; @@ -188,19 +192,22 @@ function Flip_Fields ( Name ) { v.hidden = !v.hidden ; v.value = "On" } } } -\stopJSpreamble +function Forget_Changes () + { this.dirty = false } -\startJScode{Hide_When_Down} Hide_When_Down() \stopJScode -\startJScode{Hide_Field} Hide_Field(JS_S_1) \stopJScode -\startJScode{Vide_Field} Vide_Field(JS_S_1) \stopJScode -\startJScode{Toggle_Hide} Toggle_Hide(JS_S_1) \stopJScode -\startJScode{Field_On} Field_On(JS_S_1) \stopJScode -\startJScode{Field_Off} Field_Off(JS_S_1) \stopJScode -\startJScode{Toggle_Value} Toggle_Value(JS_S_1) \stopJScode -\startJScode{Toggle_Read} Toggle_Read(JS_S_1) \stopJScode -\startJScode{Flip_Fields} Flip_Fields(JS_S_1) \stopJScode +\stopJSpreamble -\startJScode{Forget_Changes} this.dirty = false \stopJScode +%\startJScode{Hide_When_Down} Hide_When_Down() \stopJScode +%\startJScode{Hide_Field} Hide_Field(JS_S_1) \stopJScode +%\startJScode{Vide_Field} Vide_Field(JS_S_1) \stopJScode +%\startJScode{Toggle_Hide} Toggle_Hide(JS_S_1) \stopJScode +%\startJScode{Field_On} Field_On(JS_S_1) \stopJScode +%\startJScode{Field_Off} Field_Off(JS_S_1) \stopJScode +%\startJScode{Toggle_Value} Toggle_Value(JS_S_1) \stopJScode +%\startJScode{Toggle_Read} Toggle_Read(JS_S_1) \stopJScode +%\startJScode{Flip_Fields} Flip_Fields(JS_S_1) \stopJScode +% +%\startJScode{Forget_Changes} this.dirty = false \stopJScode \definereference[ForgetChanges][JS(Forget_Changes)] @@ -219,7 +226,7 @@ function Flip_Fields ( Name ) % { v = this.getField(FieldSet+":"+1) } % if (v) % { v.value = "On" } -% break } +% break } % i++ } % else % { break } } } @@ -229,8 +236,58 @@ function Flip_Fields ( Name ) % \startJScode {Walk_Field} uses {Walk_Field} % Walk_Field (JS_S_1) ; % \stopJScode +% +% \startJSpreamble {Set_Field} used later +% +% function Set_Field ( FieldSet, FieldName ) +% { var i = 1 ; +% while (true) +% { v = this.getField(FieldSet+":"+i) ; +% if (!v) +% { break } +% else if (i==FieldName) +% { v.value = "On" } +% else +% { v.value = "Off" } +% i++ } } +% +% \stopJSpreamble +% +% \startJScode {Set_Field} uses {Set_Field} +% Set_Field (JS_S_1,JS_S_2) ; +% \stopJScode -\startJSpreamble {Walk_Field} used later +\startJSpreamble {FieldStack} used later + +function Reset_Fields ( FieldSet ) + { var i = 1 ; + while (true) + { v = this.getField(FieldSet+":"+i) ; + if (!v) + { break } + else + { v.value = "Off" } + i++ } } + +function Set_Fields ( FieldSet ) + { var i = 1 ; + while (true) + { v = this.getField(FieldSet+":"+i) ; + if (!v) + { break } + else + { v.value = "On" } + i++ } } + +function Set_Field ( FieldSet, FieldName ) + { Reset_Fields(FieldSet) ; + v = this.getField(FieldSet+":"+FieldName) ; + if (v) { v.value = "On" } } + +function Reset_Field ( FieldSet, FieldName ) + { Set_Fields(FieldSet) ; + v = this.getField(FieldSet+":"+FieldName) ; + if (v) { v.value = "Off" } } function Walk_Field ( FieldSet ) { var i = 1 ; @@ -252,28 +309,4 @@ function Walk_Field ( FieldSet ) \stopJSpreamble -\startJScode {Walk_Field} uses {Walk_Field} - Walk_Field (JS_S_1) ; -\stopJScode - -\startJSpreamble {Set_Field} used later - -function Set_Field ( FieldSet, FieldName ) - { var i = 1 ; - while (true) - { v = this.getField(FieldSet+":"+i) ; - if (!v) - { break } - else if (i==FieldName) - { v.value = "On" } - else - { v.value = "Off" } - i++ } } - -\stopJSpreamble - -\startJScode {Set_Field} uses {Set_Field} - Set_Field (JS_S_1,JS_S_2) ; -\stopJScode - \endinput diff --git a/tex/context/base/java-ini.tex b/tex/context/base/java-ini.tex index d3c4aff0b..301834a01 100644 --- a/tex/context/base/java-ini.tex +++ b/tex/context/base/java-ini.tex @@ -57,6 +57,18 @@ 2: neznama preambule -- \stopmessages +\startmessages italian library: javascript + title: javascript + 1: caricamento dello script set -- + 2: preambolo sconosciuto -- +\stopmessages + +\startmessages norwegian library: javascript + title: javascript + 1: leser inn scriptsett -- + 2: ukjent 'preamble' -- +\stopmessages + %D \TEX\ is not the right tool to check the \JAVA\ code; the %D most we can do is reporting some passed variables: @@ -643,8 +655,8 @@ %D \stoptypen %D %D The not so complicated implementation of this macro is: - -\def\douseJSscripts#1% + +\def\dodouseJSscripts#1% {\doifelse{#1}{\v!reset} {\let\allJSpreambles=\empty} {\doifundefined{\c!file\f!javascriptprefix#1} @@ -658,8 +670,12 @@ \stopreadingfile}% \egroup}}} -\def\useJSscripts[#1]% - {\processcommalist[#1]\douseJSscripts} +\def\douseJSscripts[#1][#2]% + {\processcommalist[#1]\dodouseJSscripts + \processcommalist[#2]\useJSpreamblenow} + +\def\useJSscripts% + {\dodoubleempty\douseJSscripts} \protect diff --git a/tex/context/base/lang-alt.tex b/tex/context/base/lang-alt.tex index e721219ae..815fa570c 100644 --- a/tex/context/base/lang-alt.tex +++ b/tex/context/base/lang-alt.tex @@ -11,13 +11,19 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +\writestatus{loading}{Altaic Languages} + +%D The framework of this module is set up by Hans Hagen while +%D many of the first translations were done by Tobias. Later +%D on, corrections were made by users. If you have suggestions, +%D or feel that your name missing here, don't hesitate to send +%D us an email. + % Uigur, Uzbek % Azeri/Azerbaijani, Chuvash, Turkish, Turkmen % Kazakh, Kazar, Kireghiz, Noghay, Talar % Buryat, Kalmuck, Khalkha -\writestatus{loading}{Altaic Languages} - \unprotect \installlanguage diff --git a/tex/context/base/lang-ana.tex b/tex/context/base/lang-ana.tex index 19fecb0c9..8f14082c4 100644 --- a/tex/context/base/lang-ana.tex +++ b/tex/context/base/lang-ana.tex @@ -13,6 +13,12 @@ \writestatus{loading}{Anatolian Languages} +%D The framework of this module is set up by Hans Hagen while +%D many of the first translations were done by Tobias. Later +%D on, corrections were made by users. If you have suggestions, +%D or feel that your name missing here, don't hesitate to send +%D us an email. + \unprotect \protect diff --git a/tex/context/base/lang-art.tex b/tex/context/base/lang-art.tex index 87d243a62..0c1c775b2 100644 --- a/tex/context/base/lang-art.tex +++ b/tex/context/base/lang-art.tex @@ -11,10 +11,16 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -% Esperanto - \writestatus{loading}{Artificial Languages} +%D The framework of this module is set up by Hans Hagen while +%D many of the first translations were done by Tobias. Later +%D on, corrections were made by users. If you have suggestions, +%D or feel that your name missing here, don't hesitate to send +%D us an email. + +% Esperanto + \unprotect \protect diff --git a/tex/context/base/lang-bal.tex b/tex/context/base/lang-bal.tex index 7ef8e8e49..4c5907320 100644 --- a/tex/context/base/lang-bal.tex +++ b/tex/context/base/lang-bal.tex @@ -11,10 +11,16 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -% Lettish/Latvian, Lithuanian - \writestatus{loading}{Baltic Languages} +%D The framework of this module is set up by Hans Hagen while +%D many of the first translations were done by Tobias. Later +%D on, corrections were made by users. If you have suggestions, +%D or feel that your name missing here, don't hesitate to send +%D us an email. + +% Lettish/Latvian, Lithuanian + \unprotect \protect diff --git a/tex/context/base/lang-cel.tex b/tex/context/base/lang-cel.tex index b4eae8b52..d22705804 100644 --- a/tex/context/base/lang-cel.tex +++ b/tex/context/base/lang-cel.tex @@ -11,10 +11,16 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -% Breton, Welsh, Irish, Manx, Scottish Gaelic - \writestatus{loading}{Celtic Languages} +%D The framework of this module is set up by Hans Hagen while +%D many of the first translations were done by Tobias. Later +%D on, corrections were made by users. If you have suggestions, +%D or feel that your name missing here, don't hesitate to send +%D us an email. + +% Breton, Welsh, Irish, Manx, Scottish Gaelic + \unprotect \protect diff --git a/tex/context/base/lang-ger.tex b/tex/context/base/lang-ger.tex index e539bdc70..006265a55 100644 --- a/tex/context/base/lang-ger.tex +++ b/tex/context/base/lang-ger.tex @@ -11,11 +11,23 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +\writestatus{loading}{Germanic Languages} + +%D The framework of this module is set up by Hans Hagen while +%D many of the first translations were done by Tobias. Later +%D on, corrections were made by users. If you have suggestions, +%D or feel that your name missing here, don't hesitate to send +%D us an email. +%D +%D \starttabulate[|lB|l|] +%D \NC Norwegian \NC Hans Fredrik Nordhaug \NC \NR +%D \NC Danish \NC Arne Jorgensen \NC \NR % check the o +%D \NC Afrikaans \NC \NC \NR +%D \stoptabulate + % Danish, Faeroese, Icelandic, Norwegian, Swedish, German, Yiddish % Afrikaans, Dutch, English, Flemush, Frisian, Plattdeutsch -\writestatus{loading}{Germanic Languages} - \unprotect \installlanguage @@ -63,16 +75,15 @@ \installlanguage [\s!da] [\c!spatiering=\v!opelkaar, - \c!leftsentence=---, - \c!rightsentence=---, - \c!leftsubsentence=---, - \c!rightsubsentence=---, - \c!leftquote=\upperleftsinglesixquote, - \c!rightquote=\upperrightsingleninequote, - \c!leftquotation=\upperleftdoublesixquote, - \c!rightquotation=\upperrightdoubleninequote, - \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag}, - \c!status=\v!stop] + \c!leftsentence={\hbox{--\hskip.5em}}, + \c!rightsentence={\hbox{\hskip.5em--}}, + \c!leftsubsentence={--}, + \c!rightsubsentence={--}, + \c!leftquote=\lowerleftsingleninequote, + \c!rightquote=\upperrightsinglesixquote, + \c!leftquotation=\lowerleftdoubleninequote, + \c!rightquotation=\upperrightdoublesixquote, + \c!datum={\v!dag,{.},\ ,\v!maand,\ ,\v!jaar}] \installlanguage [\s!sv] @@ -113,7 +124,7 @@ \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\upperleftdoublesixquote, \c!rightquotation=\upperrightdoubleninequote, - \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag}, + \c!datum={\v!dag,{.},\ ,\v!maand,\ ,\v!jaar}, \c!status=\v!stop] %D Hey look, some experiment: @@ -145,6 +156,7 @@ %D For compatibility reasons we also define: \installlanguage [du] [\s!de] % old times context +\installlanguage [sp] [\s!es] % old times context \installlanguage [usenglish] [\s!us] \installlanguage [ukenglish] [\s!uk] @@ -155,109 +167,145 @@ \installlanguage [swedish] [\s!sv] \installlanguage [afrikaans] [\s!af] \installlanguage [norwegian] [\s!no] - -%D The next section is dedicated to Tobias Burnus. - -\startlanguagespecifics[\s!de] - - \installcompoundcharacter "a {\moveaccent{-.1ex}\"a\midworddiscretionary} - \installcompoundcharacter "e {\moveaccent{-.1ex}\"e\midworddiscretionary} - \installcompoundcharacter "i {\moveaccent{-.1ex}\"\i\midworddiscretionary} - \installcompoundcharacter "o {\moveaccent{-.1ex}\"o\midworddiscretionary} - \installcompoundcharacter "u {\moveaccent{-.1ex}\"u\midworddiscretionary} - \installcompoundcharacter "s {\SS} - \installcompoundcharacter "z {\SS} - - \installcompoundcharacter "A {\smashaccent\"A} - \installcompoundcharacter "E {\smashaccent\"E} - \installcompoundcharacter "I {\smashaccent\"I} - \installcompoundcharacter "O {\smashaccent\"O} - \installcompoundcharacter "U {\smashaccent\"U} - \installcompoundcharacter "Z {SZ} - \installcompoundcharacter "S {SS} - -\stoplanguagespecifics - -\startlanguagespecifics[\s!de] - - \installcompoundcharacter "ck {\discretionary {k-}{k}{ck}} - \installcompoundcharacter "ff {\discretionary{ff-}{f}{ff}} - \installcompoundcharacter "ll {\discretionary{ll-}{l}{ll}} - \installcompoundcharacter "mm {\discretionary{mm-}{m}{mm}} - \installcompoundcharacter "nn {\discretionary{nn-}{n}{nn}} - \installcompoundcharacter "pp {\discretionary{pp-}{p}{pp}} - \installcompoundcharacter "rr {\discretionary{rr-}{r}{rr}} - \installcompoundcharacter "tt {\discretionary{tt-}{t}{tt}} - - \installcompoundcharacter "CK {\discretionary {K-}{K}{CK}} - \installcompoundcharacter "FF {\discretionary{FF-}{F}{FF}} - \installcompoundcharacter "LL {\discretionary{LL-}{L}{LL}} - \installcompoundcharacter "MM {\discretionary{MM-}{M}{MM}} - \installcompoundcharacter "NN {\discretionary{NN-}{N}{NN}} - \installcompoundcharacter "PP {\discretionary{PP-}{P}{PP}} - \installcompoundcharacter "RR {\discretionary{RR-}{R}{RR}} - \installcompoundcharacter "TT {\discretionary{TT-}{T}{TT}} - -\stoplanguagespecifics - -\startlanguagespecifics[\s!de] - - \installcompoundcharacter "` {\handlequotation\c!leftquotation} - \installcompoundcharacter "' {\handlequotation\c!rightquotation} - \installcompoundcharacter ". {\kern.1em\ignorespaces} - - \def\setupDElanguage% - {\setuplanguage - [\s!de] - [\c!leftsentence=\leftguillemot, - \c!rightsentence=\rightguillemot, - \c!leftsubsentence=\leftsubguillemot, - \c!rightsubsentence=\rightsubguillemot]} - - \installcompoundcharacter "< {{\setupDElanguage|<|}} - \installcompoundcharacter "> {{\setupDElanguage|>|}} - -\stoplanguagespecifics - -%D An experimental hack: - -\startencoding[pdfdoc] - \startlanguagespecifics[\s!de]% hm, a % is needed - \defineactivecharacter " {\"} % no {\simplifiedcompoundcharacter"} - \stoplanguagespecifics -\stopencoding - -\startencoding[ec] - \startlanguagespecifics[\s!de]% - \installcompoundcharacter "a {\"a} - \installcompoundcharacter "e {\"e} - \installcompoundcharacter "i {\"\i} - \installcompoundcharacter "o {\"o} - \installcompoundcharacter "u {\"u} - \installcompoundcharacter "A {\"A} - \installcompoundcharacter "E {\"E} - \installcompoundcharacter "I {\"I} - \installcompoundcharacter "O {\"O} - \installcompoundcharacter "U {\"U} - \stoplanguagespecifics -\stopencoding - -\startencoding[texnansi] - \startlanguagespecifics[\s!de]% - \installcompoundcharacter "a {\"a} - \installcompoundcharacter "e {\"e} - \installcompoundcharacter "i {\"\i} - \installcompoundcharacter "o {\"o} - \installcompoundcharacter "u {\"u} - \installcompoundcharacter "A {\"A} - \installcompoundcharacter "E {\"E} - \installcompoundcharacter "I {\"I} - \installcompoundcharacter "O {\"O} - \installcompoundcharacter "U {\"U} - \stoplanguagespecifics -\stopencoding - -%D This hack should be perfected. +\installlanguage [norsk] [\s!no] % bonus switch + +% GERMAN +% +% %D The next section is dedicated to Tobias Burnus. +% +% \startlanguagespecifics[\s!de] +% +% \installcompoundcharacter "a {\moveaccent{-.1ex}\"a\midworddiscretionary} +% \installcompoundcharacter "e {\moveaccent{-.1ex}\"e\midworddiscretionary} +% \installcompoundcharacter "i {\moveaccent{-.1ex}\"\i\midworddiscretionary} +% \installcompoundcharacter "o {\moveaccent{-.1ex}\"o\midworddiscretionary} +% \installcompoundcharacter "u {\moveaccent{-.1ex}\"u\midworddiscretionary} +% \installcompoundcharacter "s {\SS} +% \installcompoundcharacter "z {\SS} +% +% \installcompoundcharacter "A {\smashaccent\"A} +% \installcompoundcharacter "E {\smashaccent\"E} +% \installcompoundcharacter "I {\smashaccent\"I} +% \installcompoundcharacter "O {\smashaccent\"O} +% \installcompoundcharacter "U {\smashaccent\"U} +% \installcompoundcharacter "Z {SZ} +% \installcompoundcharacter "S {SS} +% +% \stoplanguagespecifics +% +% \startlanguagespecifics[\s!de] +% +% \installcompoundcharacter "ck {\discretionary {k-}{k}{ck}} +% \installcompoundcharacter "ff {\discretionary{ff-}{f}{ff}} +% \installcompoundcharacter "ll {\discretionary{ll-}{l}{ll}} +% \installcompoundcharacter "mm {\discretionary{mm-}{m}{mm}} +% \installcompoundcharacter "nn {\discretionary{nn-}{n}{nn}} +% \installcompoundcharacter "pp {\discretionary{pp-}{p}{pp}} +% \installcompoundcharacter "rr {\discretionary{rr-}{r}{rr}} +% \installcompoundcharacter "tt {\discretionary{tt-}{t}{tt}} +% +% \installcompoundcharacter "CK {\discretionary {K-}{K}{CK}} +% \installcompoundcharacter "FF {\discretionary{FF-}{F}{FF}} +% \installcompoundcharacter "LL {\discretionary{LL-}{L}{LL}} +% \installcompoundcharacter "MM {\discretionary{MM-}{M}{MM}} +% \installcompoundcharacter "NN {\discretionary{NN-}{N}{NN}} +% \installcompoundcharacter "PP {\discretionary{PP-}{P}{PP}} +% \installcompoundcharacter "RR {\discretionary{RR-}{R}{RR}} +% \installcompoundcharacter "TT {\discretionary{TT-}{T}{TT}} +% +% \stoplanguagespecifics +% +% \startlanguagespecifics[\s!de] +% +% \installcompoundcharacter "` {\handlequotation\c!leftquotation} +% \installcompoundcharacter "' {\handlequotation\c!rightquotation} +% \installcompoundcharacter ". {\kern.1em\ignorespaces} +% +% \def\setupDElanguage% +% {\setuplanguage +% [\s!de] +% [\c!leftsentence=\leftguillemot, +% \c!rightsentence=\rightguillemot, +% \c!leftsubsentence=\leftsubguillemot, +% \c!rightsubsentence=\rightsubguillemot]} +% +% \installcompoundcharacter "< {{\setupDElanguage|<|}} +% \installcompoundcharacter "> {{\setupDElanguage|>|}} +% +% \stoplanguagespecifics +% +% %D An experimental hack: +% +% \startencoding[pdfdoc] +% \startlanguagespecifics[\s!de]% hm, a % is needed +% \defineactivecharacter " {\"} % no {\simplifiedcompoundcharacter"} +% \stoplanguagespecifics +% \stopencoding +% +% \startencoding[ec] +% \startlanguagespecifics[\s!de]% +% \installcompoundcharacter "a {\"a} +% \installcompoundcharacter "e {\"e} +% \installcompoundcharacter "i {\"\i} +% \installcompoundcharacter "o {\"o} +% \installcompoundcharacter "u {\"u} +% \installcompoundcharacter "A {\"A} +% \installcompoundcharacter "E {\"E} +% \installcompoundcharacter "I {\"I} +% \installcompoundcharacter "O {\"O} +% \installcompoundcharacter "U {\"U} +% \stoplanguagespecifics +% \stopencoding +% +% \startencoding[texnansi] +% \startlanguagespecifics[\s!de]% +% \installcompoundcharacter "a {\"a} +% \installcompoundcharacter "e {\"e} +% \installcompoundcharacter "i {\"\i} +% \installcompoundcharacter "o {\"o} +% \installcompoundcharacter "u {\"u} +% \installcompoundcharacter "A {\"A} +% \installcompoundcharacter "E {\"E} +% \installcompoundcharacter "I {\"I} +% \installcompoundcharacter "O {\"O} +% \installcompoundcharacter "U {\"U} +% \stoplanguagespecifics +% \stopencoding +% +% %D This hack should be perfected. + +%% NORWEGIAN +% +% These three letters (in this order) are the +% last in the norwegian alphabet (and hence should +% come after z in the latin alphabet). +% I'm not sure about the syntax for +% \definesortkey so I left some of it open ... +% +% \startlanguagespecifics[\s!no] +% +% \definesortkey {\ae}{z}{b}{\ae} +% \definesortkey {\AE}{z}{b}{\AE} +% \definesortkey {\o}{z} {c}{\o} +% \definesortkey {\O}{z} {c}{\O} +% \definesortkey {\aa}{z}{d}{\aa} +% \definesortkey {\AA}{z}{d}{\AA} +% +% \stoplanguagespecifics +% +% Active characters - just for texnansi encoding now. +% Will the other encodings be the same? +% +% \startencoding[texnansi] +% \startlanguagespecifics[\s!no]% +% \defineactivecharacter æ {\ae{}} +% \defineactivecharacter Æ {\AE{}} +% \defineactivecharacter ø {\o{}} +% \defineactivecharacter Ø {\O{}} +% \defineactivecharacter å {\aa{}} +% \defineactivecharacter Å {\AA{}} +% \stoplanguagespecifics +% \stopencoding \setupheadtext [\s!en] [\v!inhoud=Contents] \setupheadtext [\s!nl] [\v!inhoud=Inhoud] @@ -270,34 +318,34 @@ \setupheadtext [\s!en] [\v!tabellen=Tables] \setupheadtext [\s!nl] [\v!tabellen=Tabellen] \setupheadtext [\s!de] [\v!tabellen=Tabellen] -\setupheadtext [\s!da] [\v!tabellen=Tablen] +\setupheadtext [\s!da] [\v!tabellen=Tabeller] \setupheadtext [\s!sv] [\v!tabellen=Tabellen] \setupheadtext [\s!af] [\v!tabellen=Tabelle] -\setupheadtext [\s!no] [\v!tabellen=Tabellen] +\setupheadtext [\s!no] [\v!tabellen=Tabeller] \setupheadtext [\s!en] [\v!figuren=Figures] \setupheadtext [\s!nl] [\v!figuren=Figuren] \setupheadtext [\s!de] [\v!figuren=Abbildungen] -\setupheadtext [\s!da] [\v!figuren=Figuren] +\setupheadtext [\s!da] [\v!figuren=Figurer] \setupheadtext [\s!sv] [\v!figuren=Figuren] \setupheadtext [\s!af] [\v!figuren=Figure] -\setupheadtext [\s!no] [\v!figuren=Avbildningen] +\setupheadtext [\s!no] [\v!figuren=Figurer] \setupheadtext [\s!en] [\v!grafieken=Graphics] \setupheadtext [\s!nl] [\v!grafieken=Grafieken] \setupheadtext [\s!de] [\v!grafieken=Graphiken] -\setupheadtext [\s!da] [\v!grafieken=Grafiken] +\setupheadtext [\s!da] [\v!grafieken=Grafik] \setupheadtext [\s!sv] [\v!grafieken=Grafiskt] \setupheadtext [\s!af] [\v!grafieken=Grafieke] -\setupheadtext [\s!no] [\v!grafieken=Grafikken] +\setupheadtext [\s!no] [\v!grafieken=Grafikk] \setupheadtext [\s!en] [\v!intermezzos=Intermezzos] \setupheadtext [\s!nl] [\v!intermezzos=Intermezzo's] \setupheadtext [\s!de] [\v!intermezzos=Intermezzi] -\setupheadtext [\s!da] [\v!intermezzos=Intermezzos] +\setupheadtext [\s!da] [\v!intermezzos=Intermezzoer] \setupheadtext [\s!sv] [\v!intermezzos=Intermezzot] \setupheadtext [\s!af] [\v!intermezzos=Intermezzos] -\setupheadtext [\s!no] [\v!intermezzos=Intermezzos] +\setupheadtext [\s!no] [\v!intermezzos=Intermesso] \setupheadtext [\s!en] [\v!index=Index] \setupheadtext [\s!nl] [\v!index=Index] @@ -310,26 +358,26 @@ \setupheadtext [\s!en] [\v!afkortingen=Abbreviations] \setupheadtext [\s!nl] [\v!afkortingen=Afkortingen] \setupheadtext [\s!de] [\v!afkortingen=Abk\"urzungen] -\setupheadtext [\s!da] [\v!afkortingen=Abbreviations] +\setupheadtext [\s!da] [\v!afkortingen=Forkortelser] \setupheadtext [\s!sv] [\v!afkortingen=F\"orkortningen] \setupheadtext [\s!af] [\v!afkortingen=Afkortings] -\setupheadtext [\s!no] [\v!afkortingen=Forkortelsen] +\setupheadtext [\s!no] [\v!afkortingen=Forkortelser] \setupheadtext [\s!en] [\v!logos=Logos] \setupheadtext [\s!nl] [\v!logos=Logo's] \setupheadtext [\s!de] [\v!logos=Logos] -\setupheadtext [\s!da] [\v!logos=Logos] +\setupheadtext [\s!da] [\v!logos=Logoer] \setupheadtext [\s!sv] [\v!logos=Logo] \setupheadtext [\s!af] [\v!logos=Logos] -\setupheadtext [\s!no] [\v!logos=Logos] +\setupheadtext [\s!no] [\v!logos=Logoer] \setupheadtext [\s!en] [\v!eenheden=Units] \setupheadtext [\s!nl] [\v!eenheden=Eenheden] \setupheadtext [\s!de] [\v!eenheden=Einheiten] -\setupheadtext [\s!da] [\v!eenheden=Enheden] +\setupheadtext [\s!da] [\v!eenheden=Enheder] \setupheadtext [\s!sv] [\v!eenheden=Enheten] \setupheadtext [\s!af] [\v!eenheden=Eenhede] -\setupheadtext [\s!no] [\v!eenheden=Enheten] +\setupheadtext [\s!no] [\v!eenheden=Enheter] \setuplabeltext [\s!en] [\v!tabel=Table ] \setuplabeltext [\s!nl] [\v!tabel=Tabel ] @@ -345,7 +393,7 @@ \setuplabeltext [\s!da] [\v!figuur=Figur ] \setuplabeltext [\s!sv] [\v!figuur=Figur ] \setuplabeltext [\s!af] [\v!figuur=Figuur ] -\setuplabeltext [\s!no] [\v!figuur=Avbildning ] +\setuplabeltext [\s!no] [\v!figuur=Figur ] \setuplabeltext [\s!en] [\v!intermezzo=Intermezzo ] \setuplabeltext [\s!nl] [\v!intermezzo=Intermezzo ] @@ -353,7 +401,7 @@ \setuplabeltext [\s!da] [\v!intermezzo=Intermezzo ] \setuplabeltext [\s!sv] [\v!intermezzo=Intermezzo ] \setuplabeltext [\s!af] [\v!intermezzo=Intermezzo ] -\setuplabeltext [\s!no] [\v!intermezzo=Intermezzo ] +\setuplabeltext [\s!no] [\v!intermezzo=Intermesso ] \setuplabeltext [\s!en] [\v!grafiek=Graphic ] \setuplabeltext [\s!nl] [\v!grafiek=Grafiek ] @@ -406,7 +454,7 @@ \setuplabeltext [\s!en] [\v!bijlage=] \setuplabeltext [\s!nl] [\v!bijlage=] \setuplabeltext [\s!de] [\v!bijlage=] -\setuplabeltext [\s!da] [\v!bijlage=] +\setuplabeltext [\s!da] [\v!bijlage=] % [\v!bijlage=bilag] \setuplabeltext [\s!sv] [\v!bijlage=] \setuplabeltext [\s!af] [\v!bijlage=] % [\v!bijlage=bylae] \setuplabeltext [\s!no] [\v!bijlage=] @@ -422,7 +470,7 @@ \setuplabeltext [\s!en] [\v!regel=line ] \setuplabeltext [\s!nl] [\v!regel=regel ] \setuplabeltext [\s!de] [\v!regel=Zeile ] -\setuplabeltext [\s!da] [\v!regel=linie ] +\setuplabeltext [\s!da] [\v!regel=linie ] % or linje \setuplabeltext [\s!sv] [\v!regel=rad ] \setuplabeltext [\s!af] [\v!regel=re\"el ] \setuplabeltext [\s!no] [\v!regel=linje ] @@ -430,10 +478,10 @@ \setuplabeltext [\s!en] [\v!regels=lines ] \setuplabeltext [\s!nl] [\v!regels=regels ] \setuplabeltext [\s!de] [\v!regels=Zeilen ] -\setuplabeltext [\s!da] [\v!regels=linien ] +\setuplabeltext [\s!da] [\v!regels=linier ] % or linjer \setuplabeltext [\s!sv] [\v!regels=raden ] \setuplabeltext [\s!af] [\v!regels=re\"els ] -\setuplabeltext [\s!no] [\v!regels=linjen ] +\setuplabeltext [\s!no] [\v!regels=linjer ] \setuplabeltext [\s!en] [\v!january=January] \setuplabeltext [\s!en] [\v!february=February] @@ -514,7 +562,7 @@ \setuplabeltext [\s!af] [\v!december=desember] \setuplabeltext [\s!no] [\v!january=januar] -\setuplabeltext [\s!no] [\v!february=februae] +\setuplabeltext [\s!no] [\v!february=februar] \setuplabeltext [\s!no] [\v!march=mars] \setuplabeltext [\s!no] [\v!april=april] \setuplabeltext [\s!no] [\v!may=mai] @@ -600,7 +648,19 @@ \setuplabeltext [\s!de] [\v!oppagina=auf Seite ] \setuplabeltext [\s!de] [\v!hierboven=siehe oben] \setuplabeltext [\s!de] [\v!hieronder=siehe unten] -\setuplabeltext [\s!de] [\v!zie=sieh ] +\setuplabeltext [\s!de] [\v!zie=siehe ] + +\setuplabeltext [\s!da] [\v!pagina=Side ] +\setuplabeltext [\s!da] [\v!oppagina=p\aa\ side ] +\setuplabeltext [\s!da] [\v!hierboven=se foroven] +\setuplabeltext [\s!da] [\v!hieronder=se forneden] +\setuplabeltext [\s!da] [\v!zie=se ] + +\setuplabeltext [\s!no] [\v!pagina=Side ] +\setuplabeltext [\s!no] [\v!oppagina=p\aa\ side ] +\setuplabeltext [\s!no] [\v!hierboven=se foroven] +\setuplabeltext [\s!no] [\v!hieronder=se forneden] +\setuplabeltext [\s!no] [\v!zie=se ] %D ... and to be completed! diff --git a/tex/context/base/lang-grk.tex b/tex/context/base/lang-grk.tex index 4ecfdd95c..4cda4f3c1 100644 --- a/tex/context/base/lang-grk.tex +++ b/tex/context/base/lang-grk.tex @@ -11,10 +11,16 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -% Modern Greek - \writestatus{loading}{Greek Languages} +%D The framework of this module is set up by Hans Hagen while +%D many of the first translations were done by Tobias. Later +%D on, corrections were made by users. If you have suggestions, +%D or feel that your name missing here, don't hesitate to send +%D us an email. + +% Modern Greek + \unprotect \protect diff --git a/tex/context/base/lang-ind.tex b/tex/context/base/lang-ind.tex index f00e6ab19..1a92b355e 100644 --- a/tex/context/base/lang-ind.tex +++ b/tex/context/base/lang-ind.tex @@ -11,10 +11,16 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -% 34 languages - \writestatus{loading}{Indo-Iranian Languages} +%D The framework of this module is set up by Hans Hagen while +%D many of the first translations were done by Tobias. Later +%D on, corrections were made by users. If you have suggestions, +%D or feel that your name missing here, don't hesitate to send +%D us an email. + +% 34 languages + \unprotect \protect diff --git a/tex/context/base/lang-ini.tex b/tex/context/base/lang-ini.tex index 53b4f6e88..6ae98221a 100644 --- a/tex/context/base/lang-ini.tex +++ b/tex/context/base/lang-ini.tex @@ -78,6 +78,34 @@ 10: vzory --nacteny \stopmessages +\startmessages italian library: linguals + title: lingua + 1: schemi -- per -- caricati (n=--) + 2: niente schemi -- per -- (n=--) + 3: sillabazione -- per -- caricata (n=--) + 4: niente sillabazione -- per -- (n=--) + 5: schemi per -- non caricati + 6: lingua -- non definita + 7: opzioni specifiche per la lingua [--] introducono un salto -- + 8: opzioni specifiche per la lingua [--] aggiunte trasparentemente + 9: lingua -- attiva + 10: schemi -- caricati +\stopmessages + +\startmessages norwegian library: linguals + title: språk + 1: orddelingsmønster -- for -- er lest inn (n=--) + 2: ingen orddelingsmønster -- for -- (n=--) + 3: orddelingsdefinisjon -- for -- er lest inn (n=--) + 4: ingen orddelingsdefinisjon -- for -- (n=--) + 5: orddelingsmønster for -- er ikke lest inn + 6: språk -- er udefinert + 7: språk spesifikk opsjon [--] introduserer et -- hopp + 8: språk spesifikk opsjon [--] problemfritt tilføyd + 9: språk -- er aktivt + 10: orddelingsmønster -- er lest inn +\stopmessages + % dutch : \lccode`\'=`\' % english : \lccode`\'=0 % german : \lccode`\'=`\' @@ -618,7 +646,7 @@ %D \NC \bf mnemonic \NC \bf language \NC \bf group \NC\SR %D \HL %D \NC \s!fr \NC french \NC italic \NC\FR -%D \NC \s!sp \NC spanish \NC italic \NC\MR +%D \NC \s!es \NC spanish \NC italic \NC\MR %D \NC \s!it \NC italian \NC italic \NC\MR %D \NC \s!la \NC latin \NC italic \NC\MR %D \NC \s!pt \NC portuguese \NC italic \NC\LR diff --git a/tex/context/base/lang-ita.tex b/tex/context/base/lang-ita.tex index af1f93d94..3be8fc5c2 100644 --- a/tex/context/base/lang-ita.tex +++ b/tex/context/base/lang-ita.tex @@ -3,7 +3,7 @@ %D version=1997.09.03, %D title=\CONTEXT\ Language Macros, %D subtitle=Italic Languages, -%D author=Hans Hagen / Tobias Burnus, +%D author=Hans Hagen / Tobias Burnus, %D date=\currentdate, %D copyright={PRAGMA / Hans Hagen \& Ton Otten}] %C @@ -11,11 +11,22 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +\writestatus{loading}{Italic Languages} + +%D The framework of this module is set up by Hans Hagen while +%D many of the first translations were done by Tobias. Later +%D on, corrections were made by users. If you have suggestions, +%D or feel that your name missing here, don't hesitate to send +%D us an email. +%D +%D \starttabulate[|lB|l|] +%D \NC Italian \NC Giuseppe Bilotta \NC \NR +%D \NC Rumanian \NC Dan Seracu \NC \NR +%D \stoptabulate + % Latin, Italian, Rhaeto-Romanic, Rumanian, Sardian % Catalan, French, Ladino, Portuguese, Proven\c{c}al, Spanish -\writestatus{loading}{Italic Languages} - \unprotect \installlanguage @@ -33,7 +44,7 @@ \c!status=\v!stop] \installlanguage - [\s!sp] + [\s!es] [\c!spatiering=\v!opelkaar, \c!leftsentence=---, \c!rightsentence=---, @@ -49,14 +60,14 @@ \installlanguage [\s!it] [\c!spatiering=\v!opelkaar, - \c!leftsentence=---, - \c!rightsentence=---, - \c!leftsubsentence=---, - \c!rightsubsentence=---, + \c!leftsentence=\leftguillemot, + \c!rightsentence=\rightguillemot, + \c!leftsubsentence=\leftsubguillemot, + \c!rightsubsentence=\rightsubguillemot, \c!leftquote=\upperleftsinglesixquote, - \c!rightquote=\lowerrightsingleninequote, + \c!rightquote=\upperrightsingleninequote, \c!leftquotation=\upperleftdoublesixquote, - \c!rightquotation=\lowerrightdoubleninequote, + \c!rightquotation=\upperrightdoubleninequote, \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar}, \c!status=\v!stop] @@ -88,149 +99,186 @@ \c!datum={\v!jaar,\ ,\v!maand,\ ,\v!dag}, \c!status=\v!stop] +\installlanguage + [\s!ro] + [\c!spatiering=\v!opelkaar, + \c!leftsentence=---, + \c!rightsentence=---, + \c!leftsubsentence=---, + \c!rightsubsentence=---, + \c!leftquote=\leftguillemot, + \c!rightquote=\rightguillemot, + \c!leftquotation=\lowerrightdoubleninequote, + \c!rightquotation=\upperleftdoublesixquote, + \c!datum={\v!dag,\ ,\v!maand,\ ,\v!jaar}, + \c!status=\v!stop] + %D For compatibility reasons we also define: -\installlanguage [fa] [\s!fr] +\installlanguage [fa] [\s!fr] % for dutchies only \installlanguage [french] [\s!fr] -\installlanguage [spanish] [\s!sp] +\installlanguage [spanish] [\s!es] \installlanguage [italian] [\s!it] \installlanguage [latin] [\s!la] \installlanguage [portuguese] [\s!pt] +\installlanguage [romanian] [\s!ro] %D Labels and header texts. \setupheadtext [\s!fr] [\v!inhoud=Table des mati\`eres] -\setupheadtext [\s!sp] [\v!inhoud=\'Indice] +\setupheadtext [\s!es] [\v!inhoud=\'Indice] \setupheadtext [\s!it] [\v!inhoud=Indice] \setupheadtext [\s!la] [\v!inhoud=Quod in libro continetur] %Argumentum \setupheadtext [\s!pt] [\v!inhoud=Conte\'ud] +\setupheadtext [\s!ro] [\v!inhoud=Cuprins] \setupheadtext [\s!fr] [\v!tabellen=Tables] -\setupheadtext [\s!sp] [\v!tabellen=Tablas] +\setupheadtext [\s!es] [\v!tabellen=Tablas] \setupheadtext [\s!it] [\v!tabellen=Tabelle] \setupheadtext [\s!la] [\v!tabellen=Tabulae] \setupheadtext [\s!pt] [\v!tabellen=Tabelas] +\setupheadtext [\s!ro] [\v!tabellen=Tabele] \setupheadtext [\s!fr] [\v!figuren=Figures] -\setupheadtext [\s!sp] [\v!figuren=Ilustraci\'ons] -\setupheadtext [\s!it] [\v!figuren=Illustrazioni] +\setupheadtext [\s!es] [\v!figuren=Ilustraci\'ons] +\setupheadtext [\s!it] [\v!figuren=Figure] \setupheadtext [\s!la] [\v!figuren=Imagines] \setupheadtext [\s!pt] [\v!figuren=Figuras] +\setupheadtext [\s!ro] [\v!figuren=Figuri] \setupheadtext [\s!fr] [\v!grafieken=Graphiques] -\setupheadtext [\s!sp] [\v!grafieken=Gr\'aficos] -\setupheadtext [\s!it] [\v!grafieken=Grafice] +\setupheadtext [\s!es] [\v!grafieken=Gr\'aficos] +\setupheadtext [\s!it] [\v!grafieken=Grafici] \setupheadtext [\s!la] [\v!grafieken=Typi] \setupheadtext [\s!pt] [\v!grafieken=Gr\'aficos] +\setupheadtext [\s!ro] [\v!grafieken=Grafice] \setupheadtext [\s!fr] [\v!intermezzos=Interm\`edes] -\setupheadtext [\s!sp] [\v!intermezzos=intermedios] +\setupheadtext [\s!es] [\v!intermezzos=intermedios] \setupheadtext [\s!it] [\v!intermezzos=Intermezzi] \setupheadtext [\s!la] [\v!intermezzos=Intermissa] \setupheadtext [\s!pt] [\v!intermezzos=Intermezzi] +\setupheadtext [\s!ro] [\v!intermezzos=Intermzzo] \setupheadtext [\s!fr] [\v!index=Index] -\setupheadtext [\s!sp] [\v!index=\'Indice] +\setupheadtext [\s!es] [\v!index=\'Indice] \setupheadtext [\s!it] [\v!index=Indice] \setupheadtext [\s!la] [\v!index=Indices] \setupheadtext [\s!pt] [\v!index=\'Indice] +\setupheadtext [\s!ro] [\v!index=Index] \setupheadtext [\s!fr] [\v!afkortingen=Abr\'eviations] -\setupheadtext [\s!sp] [\v!afkortingen=Abreviaci\'ons] +\setupheadtext [\s!es] [\v!afkortingen=Abreviaci\'ons] \setupheadtext [\s!it] [\v!afkortingen=Abbreviazioni] \setupheadtext [\s!la] [\v!afkortingen=Notae] \setupheadtext [\s!pt] [\v!afkortingen=Abreviaturas] +\setupheadtext [\s!ro] [\v!afkortingen=Abrevieri] \setupheadtext [\s!fr] [\v!logos=Logos] -\setupheadtext [\s!sp] [\v!logos=Logotipos] +\setupheadtext [\s!es] [\v!logos=Logotipos] \setupheadtext [\s!it] [\v!logos=Logotipi] \setupheadtext [\s!la] [\v!logos=Typi negotiales] \setupheadtext [\s!pt] [\v!logos=Logotipos] +\setupheadtext [\s!ro] [\v!logos=Logo-uri] \setupheadtext [\s!fr] [\v!eenheden=Unit\'es] -\setupheadtext [\s!sp] [\v!eenheden=Unidads] +\setupheadtext [\s!es] [\v!eenheden=Unidads] \setupheadtext [\s!it] [\v!eenheden=Unit\`a] \setupheadtext [\s!la] [\v!eenheden=Modi] \setupheadtext [\s!pt] [\v!eenheden=Unidades] +\setupheadtext [\s!ro] [\v!eenheden=Unit\u{a}\c{t}i] \setuplabeltext [\s!fr] [\v!tabel=Table ] -\setuplabeltext [\s!sp] [\v!tabel=Tablas ] +\setuplabeltext [\s!es] [\v!tabel=Tablas ] \setuplabeltext [\s!it] [\v!tabel=Tabella ] \setuplabeltext [\s!la] [\v!tabel=Tabula ] \setuplabeltext [\s!pt] [\v!tabel=Tabela ] +\setuplabeltext [\s!ro] [\v!tabel=Tabelul ] \setuplabeltext [\s!fr] [\v!figuur=Figure ] -\setuplabeltext [\s!sp] [\v!figuur=Ilustraci\'on ] -\setuplabeltext [\s!it] [\v!figuur=Illustrazione ] +\setuplabeltext [\s!es] [\v!figuur=Ilustraci\'on ] +\setuplabeltext [\s!it] [\v!figuur=Fig. ] \setuplabeltext [\s!la] [\v!figuur=Imago ] \setuplabeltext [\s!pt] [\v!figuur=Figura ] +\setuplabeltext [\s!ro] [\v!figuur=Figura ] \setuplabeltext [\s!fr] [\v!intermezzo=Interm\`ede ] -\setuplabeltext [\s!sp] [\v!intermezzo=intermedio ] +\setuplabeltext [\s!es] [\v!intermezzo=intermedio ] \setuplabeltext [\s!it] [\v!intermezzo=Intermezzo ] \setuplabeltext [\s!la] [\v!intermezzo=Intermissum ] \setuplabeltext [\s!pt] [\v!intermezzo=Intermezzo ] +\setuplabeltext [\s!ro] [\v!intermezzo=Intermezzo ] \setuplabeltext [\s!fr] [\v!grafiek=Illustration ] -\setuplabeltext [\s!sp] [\v!grafiek=Gr\'afico ] -\setuplabeltext [\s!it] [\v!grafiek=Grafica ] +\setuplabeltext [\s!es] [\v!grafiek=Gr\'afico ] +\setuplabeltext [\s!it] [\v!grafiek=Grafico ] \setuplabeltext [\s!la] [\v!grafiek=Typus ] \setuplabeltext [\s!pt] [\v!grafiek=Gr\'afico ] +\setuplabeltext [\s!ro] [\v!grafiek=Graficul ] \setuplabeltext [\s!fr] [\v!hoofdstuk=] -\setuplabeltext [\s!sp] [\v!hoofdstuk=] +\setuplabeltext [\s!es] [\v!hoofdstuk=] \setuplabeltext [\s!it] [\v!hoofdstuk=] \setuplabeltext [\s!la] [\v!hoofdstuk=] \setuplabeltext [\s!pt] [\v!hoofdstuk=] +\setuplabeltext [\s!ro] [\v!hoofdstuk=] \setuplabeltext [\s!fr] [\v!paragraaf=] -\setuplabeltext [\s!sp] [\v!paragraaf=] +\setuplabeltext [\s!es] [\v!paragraaf=] \setuplabeltext [\s!it] [\v!paragraaf=] \setuplabeltext [\s!la] [\v!paragraaf=] \setuplabeltext [\s!pt] [\v!paragraaf=] +\setuplabeltext [\s!ro] [\v!paragraaf=] \setuplabeltext [\s!fr] [\v!sub\v!paragraaf=] -\setuplabeltext [\s!sp] [\v!sub\v!paragraaf=] +\setuplabeltext [\s!es] [\v!sub\v!paragraaf=] \setuplabeltext [\s!it] [\v!sub\v!paragraaf=] \setuplabeltext [\s!la] [\v!sub\v!paragraaf=] \setuplabeltext [\s!pt] [\v!sub\v!paragraaf=] +\setuplabeltext [\s!ro] [\v!sub\v!paragraaf=] \setuplabeltext [\s!fr] [\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!sp] [\v!sub\v!sub\v!paragraaf=] +\setuplabeltext [\s!es] [\v!sub\v!sub\v!paragraaf=] \setuplabeltext [\s!it] [\v!sub\v!sub\v!paragraaf=] \setuplabeltext [\s!la] [\v!sub\v!sub\v!paragraaf=] \setuplabeltext [\s!pt] [\v!sub\v!sub\v!paragraaf=] +\setuplabeltext [\s!ro] [\v!sub\v!sub\v!paragraaf=] \setuplabeltext [\s!fr] [\v!sub\v!sub\v!sub\v!paragraaf=] -\setuplabeltext [\s!sp] [\v!sub\v!sub\v!sub\v!paragraaf=] +\setuplabeltext [\s!es] [\v!sub\v!sub\v!sub\v!paragraaf=] \setuplabeltext [\s!it] [\v!sub\v!sub\v!sub\v!paragraaf=] \setuplabeltext [\s!la] [\v!sub\v!sub\v!sub\v!paragraaf=] \setuplabeltext [\s!pt] [\v!sub\v!sub\v!sub\v!paragraaf=] +\setuplabeltext [\s!ro] [\v!sub\v!sub\v!sub\v!paragraaf=] \setuplabeltext [\s!fr] [\v!bijlage=] -\setuplabeltext [\s!sp] [\v!bijlage=] +\setuplabeltext [\s!es] [\v!bijlage=] \setuplabeltext [\s!it] [\v!bijlage=] \setuplabeltext [\s!la] [\v!bijlage=] \setuplabeltext [\s!pt] [\v!bijlage=] +\setuplabeltext [\s!ro] [\v!bijlage=] \setuplabeltext [\s!fr] [\v!deel=Section ] -\setuplabeltext [\s!sp] [\v!deel=Parte ] +\setuplabeltext [\s!es] [\v!deel=Parte ] \setuplabeltext [\s!it] [\v!deel=Parte ] \setuplabeltext [\s!la] [\v!deel=Pars ] \setuplabeltext [\s!pt] [\v!deel=Parte ] +\setuplabeltext [\s!ro] [\v!deel=Partea ] \setuplabeltext [\s!fr] [\v!regel=ligne ] -\setuplabeltext [\s!sp] [\v!regel=l\'\i nea ] +\setuplabeltext [\s!es] [\v!regel=l\'\i nea ] \setuplabeltext [\s!it] [\v!regel=riga ] \setuplabeltext [\s!la] [\v!regel=versus ] \setuplabeltext [\s!pt] [\v!regel=linha ] +\setuplabeltext [\s!ro] [\v!regel=linia ] \setuplabeltext [\s!fr] [\v!regels=lignes ] -\setuplabeltext [\s!sp] [\v!regels=l\'\i neas ] -\setuplabeltext [\s!it] [\v!regels=rige ] +\setuplabeltext [\s!es] [\v!regels=l\'\i neas ] +\setuplabeltext [\s!it] [\v!regels=righe ] \setuplabeltext [\s!la] [\v!regels=versus ] \setuplabeltext [\s!pt] [\v!regels=linhas ] +\setuplabeltext [\s!ro] [\v!regels=liniile ] \setuplabeltext [\s!fr] [\v!january=janvier] \setuplabeltext [\s!fr] [\v!february=f\'evrier] @@ -245,18 +293,18 @@ \setuplabeltext [\s!fr] [\v!november=novembre] \setuplabeltext [\s!fr] [\v!december=d\'ecembre] -\setuplabeltext [\s!sp] [\v!january=jenero] -\setuplabeltext [\s!sp] [\v!february=febrero] -\setuplabeltext [\s!sp] [\v!march=marzo] -\setuplabeltext [\s!sp] [\v!april=abril] -\setuplabeltext [\s!sp] [\v!may=mayo] -\setuplabeltext [\s!sp] [\v!june=junio] -\setuplabeltext [\s!sp] [\v!july=julio] -\setuplabeltext [\s!sp] [\v!august=agosto] -\setuplabeltext [\s!sp] [\v!september=septimbre] -\setuplabeltext [\s!sp] [\v!october=octubre] -\setuplabeltext [\s!sp] [\v!november=noviembre] -\setuplabeltext [\s!sp] [\v!december=deciembre] +\setuplabeltext [\s!es] [\v!january=jenero] +\setuplabeltext [\s!es] [\v!february=febrero] +\setuplabeltext [\s!es] [\v!march=marzo] +\setuplabeltext [\s!es] [\v!april=abril] +\setuplabeltext [\s!es] [\v!may=mayo] +\setuplabeltext [\s!es] [\v!june=junio] +\setuplabeltext [\s!es] [\v!july=julio] +\setuplabeltext [\s!es] [\v!august=agosto] +\setuplabeltext [\s!es] [\v!september=septimbre] +\setuplabeltext [\s!es] [\v!october=octubre] +\setuplabeltext [\s!es] [\v!november=noviembre] +\setuplabeltext [\s!es] [\v!december=deciembre] \setuplabeltext [\s!it] [\v!january=gennaio] \setuplabeltext [\s!it] [\v!february=febbraio] @@ -297,6 +345,19 @@ \setuplabeltext [\s!pt] [\v!november=novembro] \setuplabeltext [\s!pt] [\v!december=dezembro] +\setuplabeltext [\s!ro] [\v!january=ianuarie] +\setuplabeltext [\s!ro] [\v!february=februarie] +\setuplabeltext [\s!ro] [\v!march=martie] +\setuplabeltext [\s!ro] [\v!april=aprilie] +\setuplabeltext [\s!ro] [\v!may=mai] +\setuplabeltext [\s!ro] [\v!june=iunie] +\setuplabeltext [\s!ro] [\v!july=iulie] +\setuplabeltext [\s!ro] [\v!august=august] +\setuplabeltext [\s!ro] [\v!september=septembrie] +\setuplabeltext [\s!ro] [\v!october=octombrie] +\setuplabeltext [\s!ro] [\v!november=noiembrie] +\setuplabeltext [\s!ro] [\v!december=decembrie] + \setuplabeltext [\s!fr] [\v!sunday=dimanche] \setuplabeltext [\s!fr] [\v!monday=lundi] \setuplabeltext [\s!fr] [\v!tuesday=mardi] @@ -305,13 +366,13 @@ \setuplabeltext [\s!fr] [\v!friday=vendredi] \setuplabeltext [\s!fr] [\v!saturday=samedi] -\setuplabeltext [\s!sp] [\v!sunday=domingo] -\setuplabeltext [\s!sp] [\v!monday=lunes] -\setuplabeltext [\s!sp] [\v!tuesday=martes] -\setuplabeltext [\s!sp] [\v!wednesday=mi\'ercoles] -\setuplabeltext [\s!sp] [\v!thursday=jueves] -\setuplabeltext [\s!sp] [\v!friday=viernes] -\setuplabeltext [\s!sp] [\v!saturday=s\'abado] +\setuplabeltext [\s!es] [\v!sunday=domingo] +\setuplabeltext [\s!es] [\v!monday=lunes] +\setuplabeltext [\s!es] [\v!tuesday=martes] +\setuplabeltext [\s!es] [\v!wednesday=mi\'ercoles] +\setuplabeltext [\s!es] [\v!thursday=jueves] +\setuplabeltext [\s!es] [\v!friday=viernes] +\setuplabeltext [\s!es] [\v!saturday=s\'abado] \setuplabeltext [\s!it] [\v!sunday=domenica] \setuplabeltext [\s!it] [\v!monday=luned\`\i] @@ -337,11 +398,35 @@ \setuplabeltext [\s!pt] [\v!friday=sexta-feira] \setuplabeltext [\s!pt] [\v!saturday=s\'abado] +\setuplabeltext [\s!ro] [\v!sunday=duminic\u{a}] +\setuplabeltext [\s!ro] [\v!monday=luni] +\setuplabeltext [\s!ro] [\v!tuesday=mar\c{t}i] +\setuplabeltext [\s!ro] [\v!wednesday=miercuri] +\setuplabeltext [\s!ro] [\v!thursday=joi] +\setuplabeltext [\s!ro] [\v!friday=vineri] +\setuplabeltext [\s!ro] [\v!saturday=s\^{a}mb\u{a}t\u{a}] + +% \startlanguagespecifics[\s!ro] +% +% \installcompoundcharacter "a {\u{a}} +% \installcompoundcharacter "i {\^{\i}} +% \installcompoundcharacter "s {\c{s}} +% \installcompoundcharacter "t {\c{t}} +% \installcompoundcharacter "A {\^{a}} +% \installcompoundcharacter "I {\^{I}} +% \installcompoundcharacter "S {\c{S}} +% \installcompoundcharacter "T {\c{T}} +% \installcompoundcharacter "` {\handlequotation\c!leftquotation} +% \installcompoundcharacter "' {\handlequotation\c!rightquotation} +% +% \stoplanguagespecifics + %D \ShowAllLanguageValues [\s!fr] [french] franse slag -%D \ShowAllLanguageValues [\s!sp] [spanish] spaans benauwd +%D \ShowAllLanguageValues [\s!es] [spanish] spaans benauwd %D \ShowAllLanguageValues [\s!it] [italian] italiaanse ... %D \ShowAllLanguageValues [\s!la] [latin] latijnse missen %D \ShowAllLanguageValues [\s!pt] [portuguese] portugese ... +%D \ShowAllLanguageValues [\s!ro] [romanian] romanian ... \protect diff --git a/tex/context/base/lang-lab.tex b/tex/context/base/lang-lab.tex index 714188dab..eb42fee76 100644 --- a/tex/context/base/lang-lab.tex +++ b/tex/context/base/lang-lab.tex @@ -136,6 +136,7 @@ {#4}}} \newif\iflabeltextdone % needs to be reset elsewhere +\newif\iftracinglabels % shows missing labels \unexpanded\def\dogetupsometextprefix#1#2#3% {\global\labeltextdonetrue @@ -143,7 +144,7 @@ {\dodogetupsometextprefix{\defaultlanguage{#1}}{#2}{#3} {\dodogetupsometextprefix{\s!en}{#2}{#3} {\dodogetupsometextprefix{\s!nl}{#2}{#3} - {{\tttf[#2:~#3/#1]~}}}}}} + {\iftracinglabels{\tttf[#2:~#3/#1]~}\fi}}}}} %D \macros %D {presetheadtext,presetlabeltext} diff --git a/tex/context/base/lang-sla.tex b/tex/context/base/lang-sla.tex index 8df66aa90..cd9fbef84 100644 --- a/tex/context/base/lang-sla.tex +++ b/tex/context/base/lang-sla.tex @@ -11,8 +11,17 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. -%D Thanks to Grzegorz Sapijaszko for fine||tuning the Polish -%D section and Zeljko Vrba for the Croation translations. +%D The framework of this module is set up by Hans Hagen while +%D many of the first translations were done by Tobias. Later +%D on, corrections were made by users. If you have suggestions, +%D or feel that your name missing here, don't hesitate to send +%D us an email. +%D +%D \starttabulate[|lB|l|] +%D \NC Czech \NC Tom Hidec, Petr Sojka \NC \NR +%D \NC Polish \NC Grzegorz Sapijaszko \NC \NR +%D \NC Croatian \NC Zeljko Vrba \NC \NR +%D \stoptabulate % Belarussian, Russian, Ukrainian, Bulgarian, Macedonian, % Serbo-Croatian, Slovenian, Czech, Kushubian, @@ -85,79 +94,79 @@ \installlanguage [croatian] [\s!hr] % specifics - -\startlanguagespecifics[\s!pl] - - \installcompoundcharacter /a {\k a} - \installcompoundcharacter /c {\'c} - \installcompoundcharacter /e {\k e} - \installcompoundcharacter /l {\l} - \installcompoundcharacter /n {\'n} - \installcompoundcharacter /o {\'o} - \installcompoundcharacter /s {\'s} - \installcompoundcharacter /x {\'z} - \installcompoundcharacter /z {\.z} - \installcompoundcharacter /A {\k A} - \installcompoundcharacter /C {\'C} - \installcompoundcharacter /E {\k E} - \installcompoundcharacter /L {\L} - \installcompoundcharacter /N {\'N} - \installcompoundcharacter /O {\'O} - \installcompoundcharacter /S {\'S} - \installcompoundcharacter /X {\'Z} - \installcompoundcharacter /Z {\.Z} - -\stoplanguagespecifics - -\startlanguagespecifics[\s!pl] - - \installcompoundcharacter /, {\handlequotation\c!leftquotation} - \installcompoundcharacter /' {\handlequotation\c!rightquotation} - - \def\setupPLlanguage% - {\setuplanguage - [\s!pl] - [\c!leftsentence=\leftguillemot, - \c!rightsentence=\rightguillemot, - \c!leftsubsentence=\leftsubguillemot, - \c!rightsubsentence=\rightsubguillemot]} - - \installcompoundcharacter /< {{\setupPLlanguage|<|}} - \installcompoundcharacter /> {{\setupPLlanguage|>|}} - - \installcompoundcharacter /- {|-|} - -\stoplanguagespecifics - -\startlanguagespecifics[\s!pl] - - \definesortkey {/a}{a}{a}{\k a} - \definesortkey {/A}{a}{a}{\k a} - \definesortkey {/c}{c}{a}{\'c} - \definesortkey {/C}{c}{a}{\'c} - \definesortkey {/e}{e}{a}{\k e} - \definesortkey {/E}{e}{a}{\k e} - \definesortkey {/l}{l}{a}{\l } - \definesortkey {/L}{l}{a}{\l } - \definesortkey {/n}{n}{a}{\'n} - \definesortkey {/N}{n}{a}{\'n} - \definesortkey {/o}{o}{a}{\'o} - \definesortkey {/O}{o}{a}{\'o} - \definesortkey {/s}{s}{a}{\'s} - \definesortkey {/S}{s}{a}{\'s} - \definesortkey {/x}{z}{a}{\'x} - \definesortkey {/X}{z}{a}{\'x} - \definesortkey {/z}{z}{b}{\.z} - \definesortkey {/Z}{z}{b}{\.z} - -\stoplanguagespecifics - -\startencoding[pdfdoc] - \startlanguagespecifics[pl]% hm - \defineactivecharacter / {\simplifiedcompoundcharacter/} - \stoplanguagespecifics -\stopencoding - +% +% \startlanguagespecifics[\s!pl] +% +% \installcompoundcharacter /a {\k a} +% \installcompoundcharacter /c {\'c} +% \installcompoundcharacter /e {\k e} +% \installcompoundcharacter /l {\l} +% \installcompoundcharacter /n {\'n} +% \installcompoundcharacter /o {\'o} +% \installcompoundcharacter /s {\'s} +% \installcompoundcharacter /x {\'z} +% \installcompoundcharacter /z {\.z} +% \installcompoundcharacter /A {\k A} +% \installcompoundcharacter /C {\'C} +% \installcompoundcharacter /E {\k E} +% \installcompoundcharacter /L {\L} +% \installcompoundcharacter /N {\'N} +% \installcompoundcharacter /O {\'O} +% \installcompoundcharacter /S {\'S} +% \installcompoundcharacter /X {\'Z} +% \installcompoundcharacter /Z {\.Z} +% +% \stoplanguagespecifics +% +% \startlanguagespecifics[\s!pl] +% +% \installcompoundcharacter /, {\handlequotation\c!leftquotation} +% \installcompoundcharacter /' {\handlequotation\c!rightquotation} +% +% \def\setupPLlanguage% +% {\setuplanguage +% [\s!pl] +% [\c!leftsentence=\leftguillemot, +% \c!rightsentence=\rightguillemot, +% \c!leftsubsentence=\leftsubguillemot, +% \c!rightsubsentence=\rightsubguillemot]} +% +% \installcompoundcharacter /< {{\setupPLlanguage|<|}} +% \installcompoundcharacter /> {{\setupPLlanguage|>|}} +% +% \installcompoundcharacter /- {|-|} +% +% \stoplanguagespecifics +% +% \startlanguagespecifics[\s!pl] +% +% \definesortkey {/a}{a}{a}{\k a} +% \definesortkey {/A}{a}{a}{\k a} +% \definesortkey {/c}{c}{a}{\'c} +% \definesortkey {/C}{c}{a}{\'c} +% \definesortkey {/e}{e}{a}{\k e} +% \definesortkey {/E}{e}{a}{\k e} +% \definesortkey {/l}{l}{a}{\l } +% \definesortkey {/L}{l}{a}{\l } +% \definesortkey {/n}{n}{a}{\'n} +% \definesortkey {/N}{n}{a}{\'n} +% \definesortkey {/o}{o}{a}{\'o} +% \definesortkey {/O}{o}{a}{\'o} +% \definesortkey {/s}{s}{a}{\'s} +% \definesortkey {/S}{s}{a}{\'s} +% \definesortkey {/x}{z}{a}{\'x} +% \definesortkey {/X}{z}{a}{\'x} +% \definesortkey {/z}{z}{b}{\.z} +% \definesortkey {/Z}{z}{b}{\.z} +% +% \stoplanguagespecifics +% +% \startencoding[pdfdoc] +% \startlanguagespecifics[pl]% hm +% \defineactivecharacter / {\simplifiedcompoundcharacter/} +% \stoplanguagespecifics +% \stopencoding +% % this can best be handled by \quotation and || % % \startlanguagespecifics[\s!hr] diff --git a/tex/context/base/lang-ura.tex b/tex/context/base/lang-ura.tex index 8ec95b5e3..f80bf6189 100644 --- a/tex/context/base/lang-ura.tex +++ b/tex/context/base/lang-ura.tex @@ -11,11 +11,17 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +\writestatus{loading}{Uralic Languages} + +%D The framework of this module is set up by Hans Hagen while +%D many of the first translations were done by Tobias. Later +%D on, corrections were made by users. If you have suggestions, +%D or feel that your name missing here, don't hesitate to send +%D us an email. + % Cheremiss, Estonian, Finnish, Karelian, Laap, Mordvinian, % Permian tongues, Hungarianm Ostyak, Vogul, Samoyed -\writestatus{loading}{Uralic Languages} - \unprotect \installlanguage diff --git a/tex/context/base/lang-vn.tex b/tex/context/base/lang-vn.tex index 78866750e..d249bfff9 100644 --- a/tex/context/base/lang-vn.tex +++ b/tex/context/base/lang-vn.tex @@ -11,6 +11,18 @@ %C therefore copyrighted by \PRAGMA. See mreadme.pdf for %C details. +\writestatus{loading}{Vietnamese Language} + +%D The framework of this module is set up by Hans Hagen while +%D many of the first translations were done by Tobias. Later +%D on, corrections were made by users. If you have suggestions, +%D or feel that your name missing here, don't hesitate to send +%D us an email. +%D +%D \starttabulate[|lB|l|] +%D \NC Vietnamese \NC \THANH\ \NC \NR +%D \stoptabulate + \unprotect \definesystemconstant {vietnamese} \definesystemconstant {vn} diff --git a/tex/context/base/m-chart.tex b/tex/context/base/m-chart.tex index 7598da088..e4b84abc1 100644 --- a/tex/context/base/m-chart.tex +++ b/tex/context/base/m-chart.tex @@ -8,21 +8,21 @@ %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. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% to do: \localpushmacro/\localpopmacro (dosetflowchart etc) %D This is an experimental module. Pieces of code will be moved -%D to other modules. More features are possible but will be +%D to other modules. More features are possible but will be %D interfaces later. %D -%D When finished this module will be documented. The main macro -%D is a rather big one. I'm not sure if splitting it up is wise. - -% The 1pt offset is due to 'error' in pdftex form placement, -% version 14a+ will be ok. This needs checking. +%D When finished this module will be documented. The main macro +%D is still a rather big one and there is some redundant and +%D slow code that needs a clean up. % arrow, dash -% crossing +% crossing % \goto -> \normalgoto % class -> class:name (ref prefix) % c, automatisch geen overlap zoeken @@ -46,7 +46,9 @@ % y : y offset (clipping) % nx : minimaal aantal cellen horizontaal % ny : minimaal aantal cellen vertikaal - +% +% shape none en geen equivalent maken +% % kaderkleur achtergrondkleur % lijnkleur lijndikte % focus focuskaderkleur focusachtergrondkleur @@ -56,83 +58,159 @@ \unprotect -\def\setFLOWname#1#2% - {\bgroup +\definieersorteren [flowchart] [flowcharts] [\v!geen] % no access +\stelsorterenin [flowchart] [\c!status=\v!stop] % off by default + +\def\@FLOW@{@FLOW@} +\def\@FLOC@{@FLOC@} +\def\@FLOX@{@FLOX@} + +\def\@@FLOW{@@FLOW} +\def\@@FLOL{@@FLOL} +\def\@@FLOS{@@FLOS} +\def\@@FLOF{@@FLOF} +\def\@@FLOT{@@FLOT} +\def\@@FLOX{@@FLOX} + +\def\@@MPx {@@MPx} +\def\@@MPy {@@MPy} + +\def\FLOWbufferprefix{flw-} + +\def\setFLOWname#1#2% funny hack that makes sure that we get + {\bgroup % names that are acceptable for METAPOST \lccode`0=`a\lccode`1=`b\lccode`2=`c\lccode`3=`d\lccode`4=`e% \lccode`5=`f\lccode`6=`g\lccode`7=`h\lccode`8=`i\lccode`9=`j% \lccode` =`\_\lccode`-=`\_\lccode`_=`\_% \lowercase{\gdef#1{#2}}% \egroup} +% een gobble als default is sneller, en dan alleen setten als +% nodig + \def\resetFLOWcell% - {\global\let\FLOWname \empty + {% variables + \global\let\FLOWname \empty \global\let\FLOWalign \empty \global\let\FLOWshape \empty \global\let\FLOWlocation \empty - \global\let\FLOWtext \empty + \global\let\FLOWtext \empty \global\let\FLOWhelp \empty \global\let\FLOWdestination\empty \global\let\FLOWoverlay \empty \global\let\FLOWfocus \empty \global\let\tFLOWlabel \empty \global\let\bFLOWlabel \empty - \global\let\bcFLOWlabel \empty \global\let\lFLOWlabel \empty \global\let\rFLOWlabel \empty - \def\name ##1{\def\FLOWcell{##1}\setFLOWname\FLOWname{name_##1}\ignorespaces}% - \def\shape ##1{\gdef\FLOWshape{##1}\ignorespaces}% - \def\destination ##1{\gdef\FLOWdestination{##1}\ignorespaces}% - \def\location ##1{\setFLOWlocation##1\end\ignorespaces}% - \def\focus ##1{\gdef\FLOWfocus{##1}\ignorespaces}% - \def\overlay ##1{\gdef\FLOWoverlay{##1}\ignorespaces}% - \def\figure ##1{\defineoverlay - [dummy] - [{\externalfigure - [##1] - [\c!breedte=\overlaywidth, - \c!hoogte=\overlayheight]}]% - \overlay{dummy}}% - \def\dotext [##1]##2{\gdef\FLOWalign{##1}\gdef\FLOWtext{##2}}% - \def\text {\dosingleempty\dotext}% - \def\comment [##1]##2{\ignorespaces\dogobblesingleempty}% - \def\label [##1]##2{\setgvalue{##1FLOWlabel}{##2}\ignorespaces}% - \def\help ##1{\gdef\FLOWhelp{##1}\ignorespaces}% - \def\connection[##1]##2{\ignorespaces}% - \def\connect {\connection}% - \def\locate {\location}} + \global\let\bcFLOWlabel \empty + \global\let\tcFLOWlabel \empty + \global\let\lcFLOWlabel \empty + \global\let\rcFLOWlabel \empty + \global\let\tFLOWexit \empty + \global\let\bFLOWexit \empty + \global\let\lFLOWexit \empty + \global\let\rFLOWexit \empty + % commands + \let\name \doFLOWname + \let\shape \doFLOWshape + \let\destination\doFLOWdestination + \let\location \doFLOWlocation + \let\focus \doFLOWfocus + \let\overlay \doFLOWoverlay + \let\figure \doFLOWfigure + \let\text \doFLOWtext + \let\comment \doFLOWcomment + \let\label \doFLOWlabel + \let\help \doFLOWhelp + \let\connection \doFLOWconnection + \let\exit \doFLOWexit + % convenience commands + \let\locate \doFLOWlocate + \let\connect \doFLOWconnect} + +\def\doFLOWname#1% + {\def\FLOWcell{#1}\setFLOWname\FLOWname{name_#1}\ignorespaces} + +\def\doFLOWshape#1% + {\gdef\FLOWshape{#1}\ignorespaces} + +\def\doFLOWdestination#1% + {\gdef\FLOWdestination{#1}\ignorespaces} + +\def\doFLOWlocation#1% + {\setFLOWlocation#1\end\ignorespaces} + +\def\doFLOWfocus#1% + {\gdef\FLOWfocus{#1}\ignorespaces} + +\def\doFLOWoverlay#1% + {\gdef\FLOWoverlay{#1}\ignorespaces} + +\def\doFLOWfigure#1% + {\defineoverlay + [\s!dummy] + [{\externalfigure + [#1] + [\c!breedte=\overlaywidth, + \c!hoogte=\overlayheight]}]% + \overlay{\s!dummy}} + +\def\doFLOWtext% + {\dosingleempty\dodoFLOWtext} + +\def\dodoFLOWtext[#1]#2% + {\gdef\FLOWalign{#1}\gdef\FLOWtext{#2}} + +\def\doFLOWcomment[#1]#2% + {\ignorespaces\dogobblesingleempty} + +\def\doFLOWlabel[#1]#2% wordt dit gebruikt ? + {\setgvalue{#1FLOWlabel}{#2}\ignorespaces} + +\def\doFLOWhelp#1% + {\gdef\FLOWhelp{#1}\ignorespaces} + +\def\doFLOWconnection[#1]#2% + {\ignorespaces} + +\def\doFLOWconnect% + {\connection} + +\def\doFLOWlocate% + {\location} + +\def\doFLOWexit[#1]#2% + {\setgvalue{#1FLOWexit}{#2}\ignorespaces} \def\startFLOWchart% {\bgroup \let\stopFLOWchart\egroup - \obeylines % lelijk, buffers nog eens fatsoeneren + \obeylines % lelijk, buffers nog eens fatsoeneren \dodoubleempty\dostartFLOWchart} \def\dostartFLOWchart[#1][#2]% {\doglobal\increment\nofFLOWcharts - \setxvalue{FLOW-#1}% + \flowchart{#1}% + \setxvalue{\@FLOW@-#1}% {\noexpand\dosetFLOWchart[\nofFLOWcharts][#2]}% - \dostartbuffer[flw-\nofFLOWcharts][startFLOWchart][stopFLOWchart]} - -\def\setupFLOWcharts% - {\dodoubleargument\getparameters[@@FLOW]} - -\def\setupFLOWlines% - {\dodoubleargument\getparameters[@@FLOL]} + \dostartbuffer[\FLOWbufferprefix\nofFLOWcharts][startFLOWchart][stopFLOWchart]} -\def\setupFLOWshapes% - {\dodoubleargument\getparameters[@@FLOS]} - -\def\setupFLOWfocus% - {\dodoubleargument\getparameters[@@FLOF]} +\def\setupFLOWcharts{\dodoubleargument\getparameters[\@@FLOW]} +\def\setupFLOWlines {\dodoubleargument\getparameters[\@@FLOL]} +\def\setupFLOWshapes{\dodoubleargument\getparameters[\@@FLOS]} +\def\setupFLOWfocus {\dodoubleargument\getparameters[\@@FLOF]} +\def\setupFLOWsets {\dodoubleargument\getparameters[\@@FLOX]} \setupFLOWcharts [\c!optie=, + \c!korps=, \c!punt=, % private option \c!breedte=12\bodyfontsize, \c!hoogte=7\bodyfontsize, \c!maxbreedte=, \c!maxhoogte=, - \c!offset=0pt, % auto offset: .5\bodyfontsize, + \c!offset=\v!standaard, % == auto offset \c!dx=2\bodyfontsize, \c!dy=2\bodyfontsize, \c!nx=0, % 1, @@ -173,10 +251,10 @@ \c!lijndikte=\@@FLOSlijndikte, \c!offset=\@@FLOSoffset] -\definecolor[FLOWfocuscolor] [s=.2] -\definecolor[FLOWlinecolor] [s=.5] -\definecolor[FLOWframecolor] [s=.7] -\definecolor[FLOWbackgroundcolor] [s=.9] +\definecolor [FLOWfocuscolor] [s=.2] +\definecolor [FLOWlinecolor] [s=.5] +\definecolor [FLOWframecolor] [s=.7] +\definecolor [FLOWbackgroundcolor] [s=.9] \newcounter\includeFLOWx \newcounter\includeFLOWy @@ -188,17 +266,15 @@ {\pushmacro\includeFLOWx \pushmacro\includeFLOWy \getparameters[FLOWi][x=1,y=1,#2]% - \increment(\includeFLOWx,0\FLOWix)% - \decrement(\includeFLOWx,1)% - \increment(\includeFLOWy,0\FLOWiy)% - \decrement(\includeFLOWy,1)% + \increment(\includeFLOWx,0\FLOWix)\decrement\includeFLOWx + \increment(\includeFLOWy,0\FLOWiy)\decrement\includeFLOWy \def\dodoincludeFLOWchart##1% - {\doifdefined{FLOW-##1} + {\doifdefined{\@FLOW@-##1} {\pushmacro\dosetFLOWchart - \def\dosetFLOWchart[####1][####2]% + \gdef\dosetFLOWchart[####1][####2]% {\popmacro\dosetFLOWchart - \haalbuffer[flw-####1]}% - \getvalue{FLOW-##1}}}% + \haalbuffer[\FLOWbufferprefix####1]}% + \getvalue{\@FLOW@-##1}}}% \processcommalist[#1]\dodoincludeFLOWchart \popmacro\includeFLOWx \popmacro\includeFLOWy} @@ -216,7 +292,7 @@ left, right} \def\FLOWlines% - {up, down, left, right} + {up, down, left, right} \def\FLOWsetconnect#1% {\donefalse @@ -248,93 +324,44 @@ \newif\ifFLOWscaling \FLOWscalingtrue +\def\@@FLOW@@offset{\@@FLOWoffset} + \def\getFLOWchart% {\dodoubleempty\dogetFLOWchart} \def\dogetFLOWchart[#1][#2]% - {\doifundefinedelse{FLOW-#1} + {\doifundefinedelse{\@FLOW@-#1} {\writestatus{FLOW}{unknown chart #1}% \framed [\c!breedte=12\bodyfontsize,\c!hoogte=8\bodyfontsize] {\tttf [chart #1]}} {\dodogetFLOWchart[#1][#2]}} -\def\dodogetFLOWchart[#1][#2]% - {\bgroup -\forgetall -\offinterlineskip +\def\dodogetFLOWchart[#1][#2]% to be split a bit more + {\vbox\bgroup + \forgetall + \dontcomplain + \offinterlineskip \def\dosetFLOWchart[##1][##2]% {\def\currentFLOWnumber{##1}% - \getparameters[@@FLOW][##2]}% - \getvalue{FLOW-#1}% - \getparameters[@@FLOW][#2]% dubbelop ? + \getparameters[\@@FLOW][##2]}% + \getvalue{\@FLOW@-#1}% + \getparameters[\@@FLOW][#2]% dubbelop ? \doifsomething{\@@FLOWautofocus} - {\def\@@FLOWminx{100}\let\@@FLOWminy\@@FLOWminx - \def\@@FLOWmaxx {0}\let\@@FLOWmaxy\@@FLOWmaxx - \def\@@FLOWabsx {0}\let\@@FLOWabsy\@@FLOWabsx - \def\startFLOWcell% - {\resetFLOWcell}% - \def\dodolocation##1##2##3##4% - {\ifnum##1##2##4\relax - \!!counta=##1\advance\!!counta by ##31\relax - \edef##4{\ifnum\!!counta<1 1\else\the\!!counta\fi}% - \fi}% - \def\dolocation##1,##2\end% - {\ifnum##1>\@@FLOWabsx\def\@@FLOWabsx{##1}\fi - \ifnum##2>\@@FLOWabsy\def\@@FLOWabsy{##2}\fi - \ExpandBothAfter\doifinset{\FLOWcell}{\@@FLOWautofocus} - {\dodolocation{##1}<-\@@FLOWminx - \dodolocation{##1}>+\@@FLOWmaxx - \dodolocation{##2}<-\@@FLOWminy - \dodolocation{##2}>+\@@FLOWmaxy}}% - \def\stopFLOWcell% - {\expandafter\dolocation\FLOWlocation\end}% - \haalbuffer[flw-\currentFLOWnumber]% - %\message{AUTOSHAPE 1: (\@@FLOWminx,\@@FLOWminy)->(\@@FLOWmaxx,\@@FLOWmaxy)}% - \ifnum\@@FLOWabsx<\@@FLOWmaxx\let\@@FLOWmaxx\@@FLOWabsx\fi - \ifnum\@@FLOWabsy<\@@FLOWmaxy\let\@@FLOWmaxy\@@FLOWabsy\fi - %\message{AUTOSHAPE 2: (\@@FLOWminx,\@@FLOWminy)->(\@@FLOWmaxx,\@@FLOWmaxy)}% - \donetrue - \ifnum\@@FLOWminx=100 \donefalse\fi - \ifnum\@@FLOWminy=100 \donefalse\fi - \ifnum\@@FLOWmaxx=0 \donefalse\fi - \ifnum\@@FLOWmaxy=0 \donefalse\fi - \def\do##1##2##3##4% - {\ifdone - \let##1=##2% - \!!counta=##3% - \advance\!!counta 1\advance\!!counta -##2\relax - \ifnum\!!counta<1 \!!counta=1 \fi - \edef##4{\the\!!counta}% - \else - \def##1{1}\def##4{0}% {1}% - \fi}% - \do\@@FLOWx\@@FLOWminx\@@FLOWmaxx\@@FLOWnx - \do\@@FLOWy\@@FLOWminy\@@FLOWmaxy\@@FLOWny}% + {\checkFLOWautofocus}% %\message{AUTOSHAPE 3: (\@@FLOWx,\@@FLOWy)->(\@@FLOWnx,\@@FLOWny)}\wait \let\FLOWwidth \@@FLOWnx \let\FLOWheight\@@FLOWny - \def\getFLOWlocation##1,##2\end% - {\ifnum0##1>\FLOWwidth \edef\FLOWwidth {##1}\fi - \ifnum0##2>\FLOWheight\edef\FLOWheight{##2}\fi}% - \long\def\startFLOWcell##1\stopFLOWcell% - {\resetFLOWcell - \ignorespaces##1\unskip - \expandafter\getFLOWlocation\FLOWlocation\end - \ignorespaces}% - \haalbuffer[flw-\currentFLOWnumber]% - \ifcase\@@FLOWnx\relax - \let\@@FLOWnx\FLOWwidth - \fi - \ifcase\@@FLOWny\relax - \let\@@FLOWny\FLOWheight - \fi + \let\startFLOWcell\startFLOWcellA + \haalbuffer[\FLOWbufferprefix\currentFLOWnumber]% + \ifcase\@@FLOWnx\relax \let\@@FLOWnx\FLOWwidth \fi + \ifcase\@@FLOWny\relax \let\@@FLOWny\FLOWheight \fi \doifnothing{\@@FLOWmaxbreedte\@@FLOWmaxhoogte}{\FLOWscalingfalse}% - \ifFLOWscaling + \ifFLOWscaling \doifnothing{\@@FLOWmaxbreedte}{\let\@@FLOWmaxbreedte\maxdimen}% \doifnothing{\@@FLOWmaxhoogte} {\let\@@FLOWmaxhoogte \maxdimen}% \scratchcounter=\bodyfontpoints - \doloop % NOG FONTSWITCH OM EX EN EM TE LATEN WERKEN + \doloop % NOG FONTSWITCH OM EX EN EM TE LATEN WERKEN {\ifnum\scratchcounter>1 % NU DIMENSIONS IN TERMS OF BODYFONTSIZE \bodyfontsize=\the\scratchcounter pt \dimen0=\@@FLOWmaxbreedte @@ -364,7 +391,9 @@ \expanded{\switchtobodyfont[\the\scratchcounter pt]}% \forgetall \offinterlineskip - \fi + \else\ifx\@@FLOWkorps\empty\else + \expanded{\switchtobodyfont[\@@FLOWkorps]}% \expanded ? + \fi\fi \global\let\FLOWcells\empty \dimen0=\@@FLOWbreedte \edef\FLOWshapewidth{\the\dimen0}% @@ -397,44 +426,47 @@ \scratchdimen=\@@FLOLstraal \edef\@@FLOLstraal{\the\scratchdimen}% \fi - \ifdim\@@FLOWoffset=\!!zeropoint - \edef\@@FLOWoffset{\the\scratchdimen}% - \else - \scratchdimen=\@@FLOWoffset - \edef\@@FLOWoffset{\the\scratchdimen}% - \fi + \processaction % magic 2.5 + [\@@FLOWoffset] + [ \v!geen=>\scratchdimen=-2.5\scratchdimen, + \v!overlay=>\scratchdimen=-2.5\scratchdimen, + \v!standaard=>\scratchdimen=\scratchdimen, + \s!unknown=>\scratchdimen=\@@FLOWoffset, + \s!default=>\scratchdimen=-2.5\scratchdimen]% + \edef\@@FLOW@@offset{\the\scratchdimen}% \forgetall \offinterlineskip \resetMPdrawing \doglobal\newcounter\FLOWcomment \startMPdrawing - input mp-chart.mp ; + input mp-char.mp ; grid_width := \FLOWgridwidth ; grid_height := \FLOWgridheight ; shape_width := \FLOWshapewidth ; shape_height := \FLOWshapeheight ; connection_line_width := \@@FLOLlijndikte ; - connection_smooth_size := \@@FLOLstraal ; % 2.5connection_line_width ; - connection_arrow_size := \@@FLOLstraal ; % 2.5connection_line_width ; - connection_dash_size := \@@FLOLstraal ; % 2.5connection_line_width ; - \stopMPdrawing -% \def\getFLOWlocation##1,##2\end% -% {\ifnum0##1>\FLOWwidth \edef\FLOWwidth {##1}\fi -% \ifnum0##2>\FLOWheight\edef\FLOWheight{##2}\fi}% -% \long\def\startFLOWcell##1\stopFLOWcell% -% {\resetFLOWcell -% \ignorespaces##1\unskip -% \expandafter\getFLOWlocation\FLOWlocation\end -% \ignorespaces}% -% \haalbuffer[flw-\currentFLOWnumber]% -% \ifnum\@@FLOWnx\@@FLOWny=11 % listig -% \let\@@FLOWnx\FLOWwidth -% \let\@@FLOWny\FLOWheight -% \fi - \startMPdrawing + connection_smooth_size := \@@FLOLstraal ; + connection_arrow_size := \@@FLOLstraal ; + connection_dash_size := \@@FLOLstraal ; +% \stopMPdrawing +% \def\getFLOWlocationX##1,##2\end% +% {\ifnum0##1>\FLOWwidth \edef\FLOWwidth {##1}\fi +% \ifnum0##2>\FLOWheight\edef\FLOWheight{##2}\fi}% +% \long\def\startFLOWcellX##1\stopFLOWcell% +% {\resetFLOWcell +% \ignorespaces##1\unskip +% \expandafter\getFLOWlocationX\FLOWlocation\end +% \ignorespaces}% +% \let\startFLOWcell\startFLOWcellX +% \haalbuffer[\FLOWbufferprefix\currentFLOWnumber]% +% \ifnum\@@FLOWnx\@@FLOWny=11 % listig +% \let\@@FLOWnx\FLOWwidth +% \let\@@FLOWny\FLOWheight +% \fi +% \startMPdrawing begin_chart(0,\FLOWwidth,\FLOWheight); reverse_y := true ; - chart_offset := \@@FLOWoffset ; + chart_offset := \@@FLOW@@offset ; \stopMPdrawing \doifelsenothing{\@@FLOWachtergrondkleur} {\startMPdrawing @@ -448,7 +480,7 @@ show_con_points := true ; show_mid_points := true ; show_all_points := true ; - \stopMPdrawing} + \stopMPdrawing}% \processaction % private [\@@FLOWpunt] [ \v!ja=>\startMPdrawing @@ -459,86 +491,10 @@ \s!unknown=>\startMPdrawing show_\@@FLOWpunt_points := true ; \stopMPdrawing]% - \long\def\startFLOWcell##1\stopFLOWcell% - {\resetFLOWcell - \ignorespaces##1\unskip - \setxvalue{FLOW-loc-\FLOWname}{\FLOWlocation}% - \ifx\FLOWshape\empty - \global\let\FLOWshape\@@FLOSdefault - \fi - \doifnot{\FLOWshape}{\v!geen} - {\ExpandBothAfter\doifinsetelse{\FLOWshape}{\FLOWshapes} - {\edef\FLOWshapetag{shape_\FLOWshape}% - \@EA\setFLOWname\@EA\FLOWshapetag\@EA{\FLOWshapetag}} - {\doifnumberelse{\FLOWshape} - {\let\FLOWshapetag\FLOWshape} - {\let\FLOWshapetag\empty}}% - \ifx\FLOWshapetag\empty \else - \ExpandBothAfter\doifinsetelse{\FLOWshape}{\FLOWlines} - {\chardef\FLOWstate=0 } - {\ExpandBothAfter\doifcommonelse{\FLOWcell,\FLOWfocus}{\@@FLOWfocus} - {\chardef\FLOWstate=1 } - {\chardef\FLOWstate=2 }}% - \startMPdrawing - begin_sub_chart ; - \ifcase\FLOWstate - shape_line_color := \MPcolor{\@@FLOLkleur} ; - shape_fill_color := \MPcolor{\@@FLOLkleur} ; - shape_line_width := \@@FLOLlijndikte ; - \or - shape_line_color := \MPcolor{\@@FLOFkaderkleur} ; - shape_fill_color := \MPcolor{\@@FLOFachtergrondkleur} ; - shape_line_width := \@@FLOFlijndikte ; - \or - shape_line_color := \MPcolor{\@@FLOSkaderkleur} ; - shape_fill_color := \MPcolor{\@@FLOSachtergrondkleur} ; - shape_line_width := \@@FLOSlijndikte ; - \fi - \ifx\FLOWoverlay\empty - peepshape := false ; - \else - peepshape := true ; - \fi - new_shape(\FLOWlocation,\FLOWshapetag) ; - end_sub_chart ; - \stopMPdrawing - \fi}% - \ignorespaces}% - \haalbuffer[flw-\currentFLOWnumber]% - \long\def\startFLOWcell##1\stopFLOWcell% - {\resetFLOWcell - \def\connection[####1]####2% - {\doglobal\increment\FLOWcomment - \setFLOWname\otherFLOWname{name_####2}% - \doifdefinedelse{FLOW-loc-\FLOWname} - {\edef\FLOWfrom{\getvalue{FLOW-loc-\FLOWname}}} - {\edef\FLOWfrom{0,0}}% - \doifdefinedelse{FLOW-loc-\otherFLOWname} - {\edef\FLOWto {\getvalue{FLOW-loc-\otherFLOWname}}} - {\edef\FLOWto {0,0}}% - \FLOWsetconnect{####1}% - \ifx\cFLOWfrom\empty\else - \doifelse{\@@FLOLhoek}{\v!rond} - {\startMPdrawing smooth := true ; \stopMPdrawing} - {\startMPdrawing smooth := false ; \stopMPdrawing}% - \doifelse{\@@FLOLstreep}{\v!ja} - {\startMPdrawing dashline := true ; \stopMPdrawing} - {\startMPdrawing dashline := false ; \stopMPdrawing}% - \doifelse{\@@FLOLpijl}{\v!ja} - {\startMPdrawing arrowtip := true ; \stopMPdrawing} - {\startMPdrawing arrowtip := false ; \stopMPdrawing}% - \doifelse{\@@FLOLoffset}{\v!geen} - {\startMPdrawing touchshape := true ; \stopMPdrawing} - {\startMPdrawing touchshape := false ; \stopMPdrawing}% - \startMPdrawing - connection_line_color := \MPcolor{\@@FLOLkleur} ; - connection_line_width := \@@FLOLlijndikte ; - connect_\cFLOWfrom_\cFLOWto (\FLOWfrom,\zFLOWfrom) (\FLOWto,\zFLOWto) ; - \stopMPdrawing - \fi - \ignorespaces}% - \ignorespaces##1\unskip}% - \haalbuffer[flw-\currentFLOWnumber]% + \let\startFLOWcell\startFLOWcellB + \haalbuffer[\FLOWbufferprefix\currentFLOWnumber]% + \let\startFLOWcell\startFLOWcellC + \haalbuffer[\FLOWbufferprefix\currentFLOWnumber]% \startMPdrawing clip_chart(\@@FLOWx,\@@FLOWy,\@@FLOWnx,\@@FLOWny) ; end_chart ; @@ -548,213 +504,34 @@ \def\MPmessage##1% {\writestatus{MP charts}{##1}}% \def\MPposition##1##2##3% - {\setvalue{MPx##1}{##2}\setvalue{MPy##1}{##3}}% + {\setvalue{\@@MPx##1}{##2}\setvalue{\@@MPy##1}{##3}}% \def\MPclippath##1##2##3##4% {\def\clipMPllx{##1bp}\def\clipMPlly{##2bp}% \def\clipMPurx{##3bp}\def\clipMPury{##4bp}}% \def\MPareapath##1##2##3##4% {\def\areaMPllx{##1bp}\def\areaMPlly{##2bp}% \def\areaMPurx{##3bp}\def\areaMPury{##4bp}}% - \readfile{\MPdatafile}{}{}% + \getMPdata \doglobal\newcounter\FLOWcomment - \long\def\startFLOWcell##1\stopFLOWcell% - {\resetFLOWcell - \ignorespaces##1\unskip - \def\doprocessFLOWcell####1,####2\end % kan ook met area - {\!!counta=####1\relax - \!!countb=####2\relax - \!!countc=\@@FLOWx - \!!countd=\@@FLOWy - \advance\!!countc \@@FLOWnx - \advance\!!countd \@@FLOWny - \advance\!!countc -1 - \advance\!!countd -1 - \ifnum\!!counta<\@@FLOWx\relax - \donefalse - \else\ifnum\!!counta>\!!countc - \donefalse - \else\ifnum\!!countb<\@@FLOWy\relax - \donefalse - \else\ifnum\!!countb>\!!countd - \donefalse - \else - \donetrue - \doglobal\addtocommalist\FLOWcell\FLOWcells - \advance\!!counta by -\@@FLOWx\advance\!!counta by 1 - \advance\!!countb by -\@@FLOWy\advance\!!countb by 1 - \dimen0=\FLOWgridwidth\dimen0=\!!counta\dimen0 - \advance\dimen0 by -\FLOWgridwidth - \dimen4=\FLOWgridwidth\advance\dimen4 by -\FLOWshapewidth - \advance\dimen0 by .5\dimen4 - \dimen2=\FLOWgridheight\dimen2=\!!countb\dimen2 - \dimen4=\FLOWgridheight\advance\dimen4 by -\FLOWshapeheight - \advance\dimen2 by -.5\dimen4 - \setbox0=\hbox - {\ifx\FLOWalign\empty\else - \setupframed - [\c!uitlijnen=\v!normaal,\c!onder=\vfill,\c!boven=\vfill]% - \@EA\processallactionsinset\@EA - [\FLOWalign] - [t=>{\setupframed[\c!onder=\vfill,\c!boven=]}, - b=>{\setupframed[\c!onder=,\c!boven=\vfill]}, - l=>{\setupframed[\c!uitlijnen=\v!rechts]}, - r=>{\setupframed[\c!uitlijnen=\v!links]}, - m=>{\setupframed[\c!uitlijnen=\v!midden]}, - c=>{\setupframed[\c!uitlijnen=\v!midden]}]% - \fi - \doifelse{\FLOWshape}{\v!geen} - {\setupframed[\c!offset=\v!overlay]} - {\setupframed[\c!offset=.5\bodyfontsize]}% - \framed - [\c!kader=\v!uit,\c!breedte=\FLOWshapewidth,\c!hoogte=\FLOWshapeheight] - {\FLOWtext}}% - \showFLOWhelp0 - \ifx\FLOWdestination\empty\else - \setbox0=\hbox - {\setupinteraction[\c!kleur=,\c!contrastkleur=]% - \naarbox{\box0}[\FLOWdestination]}% - \fi - \edef\FLOWdx{\the\dimen0}% - \edef\FLOWdy{\the\dimen2}% - \def\positionFLOWzero% - {\setbox0=\hbox{\hskip\FLOWdx\lower\FLOWdy\box0}% - \smashbox0 - \box0} % - \positionFLOWzero - \dimen0=\FLOWshapewidth \dimen2=.5\dimen0 - \dimen4=\FLOWshapeheight\dimen6=.5\dimen4 - \boxoffset=.5\bodyfontsize - \setbox0=\hbox{\hskip\dimen2\raise\dimen4 - \hbox{\righttopbox{\strut\tFLOWlabel}}}% - \positionFLOWzero - \setbox0=\hbox{\hskip\dimen2 - \hbox{\rightbottombox{\strut\bFLOWlabel}}}% - \positionFLOWzero - \setbox0=\hbox{\raise\dimen6 - \hbox{\lefttopbox {\strut\lFLOWlabel}}}% - \positionFLOWzero - \setbox0=\hbox{\hskip\dimen0\raise\dimen6 - \hbox{\righttopbox{\strut\rFLOWlabel}}}% - \positionFLOWzero - \setbox0=\hbox{\hskip\dimen2 % for me only - \hbox{\bottombox{\strut\bcFLOWlabel}}}% - \positionFLOWzero - \fi\fi\fi\fi}% - \expandafter\doprocessFLOWcell\FLOWlocation\end - \def\connection[####1]####2% - {\doglobal\increment\FLOWcomment - \ignorespaces}% - \def\comment[####1]####2% - {\bgroup - \let\FLOW \middlebox - \let\FLOWb \bottombox - \let\FLOWbl\bottomleftbox - \let\FLOWbr\bottomrightbox - \let\FLOWt \topbox - \let\FLOWtl\topleftbox - \let\FLOWtr\toprightbox - \let\FLOWl \leftbox - \let\FLOWlt\lefttopbox - \let\FLOWlb\leftbottombox - \let\FLOWr \rightbox - \let\FLOWrt\righttopbox - \let\FLOWrb\rightbottombox - \let\FLOWc \middlebox - \ifcase0\getvalue{MPx\FLOWcomment}\getvalue{MPy\FLOWcomment}\relax - \else - \ifdim\getvalue{MPx\FLOWcomment}bp<\areaMPllx\relax\else - \ifdim\getvalue{MPx\FLOWcomment}bp>\areaMPurx\relax\else - \ifdim\getvalue{MPy\FLOWcomment}bp<\areaMPlly\relax\else - \ifdim\getvalue{MPy\FLOWcomment}bp>\areaMPury\relax\else - \dimen0=\getvalue{MPx\FLOWcomment}bp - \advance\dimen0 by -\@@FLOWoffset - \advance\dimen0 by -\clipMPllx - \dimen2=\clipMPury - \advance\dimen2 by -\@@FLOWoffset - \advance\dimen2 by -\getvalue{MPy\FLOWcomment}bp - \setbox0=\hbox{\strut####2}% - \boxoffset=.5\bodyfontsize - \setbox0=\hbox - {\hskip\dimen0\lower\dimen2\getvalue{FLOW####1}{\box0}}% - \wd0=\!!zeropoint\ht0=\!!zeropoint\dp0=\!!zeropoint - \box0 - \fi - \fi - \fi - \fi - \fi - \egroup - \ignorespaces}% - \ignorespaces##1\unskip - \ignorespaces}% + \let\startFLOWcell\startFLOWcellD \setbox2=\vbox to \ht0 {\forgetall%%%\offinterlineskip - \haalbuffer[flw-\currentFLOWnumber]\vss}% + \haalbuffer[\FLOWbufferprefix\currentFLOWnumber]\vss}% \setbox2=\hbox - {\hskip\@@FLOWoffset\lower\@@FLOWoffset\box2}% + {\hskip\@@FLOW@@offset\lower\@@FLOW@@offset\box2}% \wd2=\wd0\ht2=\ht0\dp2=\dp0 - %%%%%%%% - \long\def\startFLOWcell##1\stopFLOWcell% - {\resetFLOWcell - \ignorespaces##1\unskip - \def\doprocessFLOWcell####1,####2\end % redundant - {\ifx\FLOWoverlay\empty \else - \!!counta=####1\relax - \!!countb=####2\relax - \!!countc=\@@FLOWx - \!!countd=\@@FLOWy - \advance\!!countc \@@FLOWnx - \advance\!!countd \@@FLOWny - \advance\!!countc -1 - \advance\!!countd -1 - \ifnum\!!counta<\@@FLOWx\relax - \donefalse - \else\ifnum\!!counta>\!!countc - \donefalse - \else\ifnum\!!countb<\@@FLOWy\relax - \donefalse - \else\ifnum\!!countb>\!!countd - \donefalse - \else - \donetrue - \fi\fi\fi\fi - \ifdone - \advance\!!counta by -\@@FLOWx\advance\!!counta by 1 - \advance\!!countb by -\@@FLOWy\advance\!!countb by 1 - \dimen0=\FLOWgridwidth\dimen0=\!!counta\dimen0 - \advance\dimen0 by -\FLOWgridwidth - \dimen4=\FLOWgridwidth\advance\dimen4 by -\FLOWshapewidth - \advance\dimen0 by .5\dimen4 - \dimen2=\FLOWgridheight\dimen2=\!!countb\dimen2 - \dimen4=\FLOWgridheight\advance\dimen4 by -\FLOWshapeheight - \advance\dimen2 by -.5\dimen4 - \edef\FLOWdx{\the\dimen0}% - \edef\FLOWdy{\the\dimen2}% - \setbox0=\hbox - {\framed - [\c!kader=\v!uit, - \c!achtergrond={\@@FLOWachtergrond,\FLOWoverlay}, - \c!achtergrondkleur=\@@FLOSachtergrondkleur, - \c!breedte=\FLOWshapewidth,\c!hoogte=\FLOWshapeheight] - {}}% - \setbox0=\hbox{\hskip\FLOWdx\lower\FLOWdy\box0}% - \smashbox0 - \box0 - \fi - \fi}% - \expandafter\doprocessFLOWcell\FLOWlocation\end}% + \let\startFLOWcell\startFLOWcellE \setbox4=\vbox to \ht0 {\forgetall%%%\offinterlineskip - \haalbuffer[flw-\currentFLOWnumber]\vss}% + \haalbuffer[\FLOWbufferprefix\currentFLOWnumber]\vss}% \setbox4=\hbox - {\hskip\@@FLOWoffset\lower\@@FLOWoffset\box4}% + {\hskip\@@FLOW@@offset\lower\@@FLOW@@offset\box4}% \wd4=\wd0\ht4=\ht0\dp4=\dp0 - %%%%%%%% \doifelse{\@@FLOWoptie}{\v!test} {\setbox6=\vbox {\forgetall - \vskip\@@FLOWoffset - \hskip\@@FLOWoffset + \vskip\@@FLOW@@offset + \hskip\@@FLOW@@offset \rooster [\c!x=\@@FLOWx,\c!nx=\@@FLOWnx,\c!dx=\withoutpt\FLOWgridwidth, \c!y=\@@FLOWy,\c!ny=\@@FLOWny,\c!dy=\withoutpt\FLOWgridheight, @@ -763,11 +540,11 @@ \wd6=\wd0\ht6=\ht0\dp6=\dp0 \setbox8=\vbox {\forgetall\offinterlineskip - \vskip\@@FLOWoffset + \vskip\@@FLOW@@offset \dostepwiserecurse{\@@FLOWy}{\@@FLOWny}{1} {\vbox to \FLOWgridheight {\vfill - \hskip\@@FLOWoffset + \hskip\@@FLOW@@offset \hbox {\dostepwiserecurse{\@@FLOWx}{\@@FLOWnx}{1} {\hbox to \FLOWgridwidth @@ -780,13 +557,13 @@ \hfill}}} \vfill}}}% \wd8=\wd0\ht8=\ht0\dp8=\dp0 - \framed + \framed [\c!offset=\v!overlay,\c!kaderkleur=green] {\hbox{\box4\hskip-\wd0\box0\hskip-\wd2\box2\hskip-\wd6\box6\hskip-\wd8\box8}}} {\framed [\c!offset=\v!overlay, \c!kader=\@@FLOWkader, -\c!lijndikte=\@@FLOWlijndikte, + \c!lijndikte=\@@FLOWlijndikte, \c!kaderkleur=\@@FLOWkaderkleur, \c!achtergrond=\@@FLOWachtergrond, \c!achtergrondkleur=\@@FLOWachtergrondkleur] @@ -794,41 +571,408 @@ %\message{[\FLOWcells]}\wait \egroup} +% Pass A + +\long\def\startFLOWcellA#1\stopFLOWcell% + {\resetFLOWcell + \ignorespaces#1\unskip + \expandafter\getFLOWlocationA\FLOWlocation\end + \ignorespaces} + +\def\getFLOWlocationA#1,#2\end% + {\ifnum0#1>\FLOWwidth \edef\FLOWwidth {#1}\fi + \ifnum0#2>\FLOWheight\edef\FLOWheight{#2}\fi} + +% Pass B +% +% beware: the - after \@FLOC@ is needed since name can be +% empty and we don't want to redefine \@FLOC@ itself by +% mistake + +\long\def\startFLOWcellB#1\stopFLOWcell% + {\resetFLOWcell\ignorespaces#1\unskip% + \setxvalue{\@FLOC@-\FLOWname}{\FLOWlocation}% kost veel cs's + \ifx\FLOWshape\empty + \global\let\FLOWshape\@@FLOSdefault + \fi + \doifnot{\FLOWshape}{none} % {\v!geen} + {\ExpandBothAfter\doifinsetelse{\FLOWshape}{\FLOWshapes} + {\edef\FLOWshapetag{shape_\FLOWshape}% beter \expanded + \@EA\setFLOWname\@EA\FLOWshapetag\@EA{\FLOWshapetag}} + {\doifnumberelse{\FLOWshape} + {\let\FLOWshapetag\FLOWshape} + {\let\FLOWshapetag\empty}}% + \ifx\FLOWshapetag\empty \else + \ExpandBothAfter\doifinsetelse{\FLOWshape}{\FLOWlines} + {\chardef\FLOWstate=0 } + {\ExpandBothAfter\doifcommonelse{\FLOWcell,\FLOWfocus}{\@@FLOWfocus} + {\chardef\FLOWstate=1 } + {\chardef\FLOWstate=2 }}% + \startMPdrawing + begin_sub_chart ; + \ifcase\FLOWstate + shape_line_color := \MPcolor{\@@FLOLkleur} ; + shape_fill_color := \MPcolor{\@@FLOLkleur} ; + shape_line_width := \@@FLOLlijndikte ; + \or + shape_line_color := \MPcolor{\@@FLOFkaderkleur} ; + shape_fill_color := \MPcolor{\@@FLOFachtergrondkleur} ; + shape_line_width := \@@FLOFlijndikte ; + \or + shape_line_color := \MPcolor{\@@FLOSkaderkleur} ; + shape_fill_color := \MPcolor{\@@FLOSachtergrondkleur} ; + shape_line_width := \@@FLOSlijndikte ; + \fi + %\ifx\FLOWoverlay\empty + % peepshape := false ; + %\else + % peepshape := true ; + %\fi + peepshape := \ifx\FLOWoverlay\empty false \else true \fi ; + new_shape(\FLOWlocation,\FLOWshapetag) ; + end_sub_chart ; + \stopMPdrawing + \fi}% + \ignorespaces} + +% Pass C + +\long\def\startFLOWcellC#1\stopFLOWcell% + {\resetFLOWcell + \ignorespaces#1\unskip % makes sure that vars are set + \let\connection\doFLOWconnectionC + \ignorespaces#1\unskip} + +\def\FLOWorigin{0,0} + +\def\doFLOWconnectionC[#1]#2% + {\doglobal\increment\FLOWcomment + \setFLOWname\otherFLOWname{name_#2}% + \doifdefinedelse{\@FLOC@-\FLOWname} + {\edef\FLOWfrom{\getvalue{\@FLOC@-\FLOWname}}} + {\let \FLOWfrom \FLOWorigin}% + \ifx\FLOWfrom\FLOWorigin \else + \doifdefinedelse{\@FLOC@-\otherFLOWname} + {\edef\FLOWto {\getvalue{\@FLOC@-\otherFLOWname}}} + {\let \FLOWto \FLOWorigin}% + \ifx\FLOWto\FLOWorigin \else + \FLOWsetconnect{#1}% + \ifx\cFLOWfrom\empty \else + \doifelse{\@@FLOLhoek}{\v!rond} + {\startMPdrawing smooth := true ; \stopMPdrawing} + {\startMPdrawing smooth := false ; \stopMPdrawing}% + \doifelse{\@@FLOLstreep}{\v!ja} + {\startMPdrawing dashline := true ; \stopMPdrawing} + {\startMPdrawing dashline := false ; \stopMPdrawing}% + \doifelse{\@@FLOLpijl}{\v!ja} + {\startMPdrawing arrowtip := true ; \stopMPdrawing} + {\startMPdrawing arrowtip := false ; \stopMPdrawing}% + \doifelse{\@@FLOLoffset}{none} % {\v!geen} + {\startMPdrawing touchshape := true ; \stopMPdrawing} + {\startMPdrawing touchshape := false ; \stopMPdrawing}% + \startMPdrawing + connection_line_color := \MPcolor{\@@FLOLkleur} ; + connection_line_width := \@@FLOLlijndikte ; + connect_\cFLOWfrom_\cFLOWto (\FLOWfrom,\zFLOWfrom) (\FLOWto,\zFLOWto) ; + \stopMPdrawing + \fi + \fi + \fi + \ignorespaces} + +% Pass D + +\long\def\startFLOWcellD#1\stopFLOWcell% + {\resetFLOWcell + \ignorespaces#1\unskip % presets vars + \let\doprocessFLOWcell\doprocessFLOWcellD + \expandafter\doprocessFLOWcellD\FLOWlocation\end + \let\connection\doFLOWconnectionD + \let\comment\doFLOWcommentD + \ignorespaces#1\unskip\ignorespaces} + +\def\doFLOWconnectionD[#1]#2% + {\doglobal\increment\FLOWcomment + \ignorespaces} + +\def\doFLOWcommentD[#1]#2% + {\bgroup + \let\FLOW \middlebox + \let\FLOWb \bottombox + \let\FLOWbl\bottomleftbox + \let\FLOWbr\bottomrightbox + \let\FLOWt \topbox + \let\FLOWtl\topleftbox + \let\FLOWtr\toprightbox + \let\FLOWl \leftbox + \let\FLOWlt\lefttopbox + \let\FLOWlb\leftbottombox + \let\FLOWr \rightbox + \let\FLOWrt\righttopbox + \let\FLOWrb\rightbottombox + \let\FLOWc \middlebox +%\ifdefined{FLOW#1}% + \ifcase0\getvalue{\@@MPx\FLOWcomment}\getvalue{\@@MPy\FLOWcomment}\relax + \else + \ifdim\getvalue{\@@MPx\FLOWcomment}bp<\areaMPllx\relax\else + \ifdim\getvalue{\@@MPx\FLOWcomment}bp>\areaMPurx\relax\else + \ifdim\getvalue{\@@MPy\FLOWcomment}bp<\areaMPlly\relax\else + \ifdim\getvalue{\@@MPy\FLOWcomment}bp>\areaMPury\relax\else + \dimen0=\getvalue{\@@MPx\FLOWcomment}bp + \advance\dimen0 by -\@@FLOW@@offset + \advance\dimen0 by -\clipMPllx + \dimen2=\clipMPury + \advance\dimen2 by -\@@FLOW@@offset + \advance\dimen2 by -\getvalue{\@@MPy\FLOWcomment}bp + \setbox0=\hbox{\strut#2}% + \boxoffset=.5\bodyfontsize + \setbox0=\hbox + {\hskip\dimen0\lower\dimen2\getvalue{FLOW#1}{\box0}}% + \wd0=\!!zeropoint\ht0=\!!zeropoint\dp0=\!!zeropoint + \box0 + \fi + \fi + \fi + \fi + \fi +%\fi + \egroup + \ignorespaces} + +\def\doprocessFLOWcellD#1,#2\end % kan ook met area + {\!!counta=#1\relax + \!!countb=#2\relax + \!!countc=\@@FLOWx + \!!countd=\@@FLOWy + \advance\!!countc \@@FLOWnx + \advance\!!countd \@@FLOWny + \advance\!!countc -1 + \advance\!!countd -1 + \ifnum\!!counta<\@@FLOWx\relax \donefalse + \else\ifnum\!!counta>\!!countc \donefalse + \else\ifnum\!!countb<\@@FLOWy\relax \donefalse + \else\ifnum\!!countb>\!!countd \donefalse + \else \donetrue + \doglobal\addtocommalist\FLOWcell\FLOWcells + \advance\!!counta by -\@@FLOWx\advance\!!counta by 1 + \advance\!!countb by -\@@FLOWy\advance\!!countb by 1 + \dimen0=\FLOWgridwidth\dimen0=\!!counta\dimen0 + \advance\dimen0 by -\FLOWgridwidth + \dimen4=\FLOWgridwidth\advance\dimen4 by -\FLOWshapewidth + \advance\dimen0 by .5\dimen4 + \dimen2=\FLOWgridheight\dimen2=\!!countb\dimen2 + \dimen4=\FLOWgridheight\advance\dimen4 by -\FLOWshapeheight + \advance\dimen2 by -.5\dimen4 + \setbox0=\hbox + {\ifx\FLOWalign\empty\else + \setupframed + [\c!uitlijnen=\v!normaal,\c!onder=\vfill,\c!boven=\vfill]% + \@EA\processallactionsinset\@EA + [\FLOWalign] + [t=>{\setupframed[\c!onder=\vfill,\c!boven=]}, + b=>{\setupframed[\c!onder=,\c!boven=\vfill]}, + l=>{\setupframed[\c!uitlijnen=\v!rechts]}, + r=>{\setupframed[\c!uitlijnen=\v!links]}, + m=>{\setupframed[\c!uitlijnen=\v!midden]}, + c=>{\setupframed[\c!uitlijnen=\v!midden]}]% + \fi + \doifelse{\FLOWshape}{none} % {\v!geen} + {\setupframed[\c!offset=\v!overlay]} + {\setupframed[\c!offset=.5\bodyfontsize]}% + \framed + [\c!kader=\v!uit,\c!breedte=\FLOWshapewidth,\c!hoogte=\FLOWshapeheight] + {\FLOWtext}}% + \showFLOWhelp0 + \ifx\FLOWdestination\empty\else + \setbox0=\hbox + {\setupinteraction[\c!kleur=,\c!contrastkleur=]% + \naarbox{\box0}[\FLOWdestination]}% + \fi + \edef\FLOWdx{\the\dimen0}% + \edef\FLOWdy{\the\dimen2}% + \def\positionFLOWzero% assumes \FLOWdx and \FLOWdy are set + {\setbox0=\hbox{\hskip\FLOWdx\lower\FLOWdy\box0}% + \smashbox0\box0}% + \def\doFLOWtlabel##1##2##3% + {\scratchdimen=\ifcase##2 \!!zeropoint\else\@@FLOWdy\fi + \setbox0=\hbox{\hskip\dimen2\raise\scratchdimen + \hbox{\raise\dimen4\hbox{##1{\strut##3}}}}% + \positionFLOWzero}% + \def\doFLOWblabel##1##2##3% + {\scratchdimen=\ifcase##2 \!!zeropoint\else\@@FLOWdy\fi + \setbox0=\hbox{\hskip\dimen2\raise-\scratchdimen + \hbox{##1{\strut##3}}}% + \positionFLOWzero}% + \def\doFLOWllabel##1##2##3% + {\scratchdimen=\ifcase##2 \!!zeropoint\else\@@FLOWdx\fi + \setbox0=\hbox{\hskip-\scratchdimen\raise\dimen6 + \hbox{##1{\strut##3}}}% + \positionFLOWzero}% + \def\doFLOWrlabel##1##2##3% + {\scratchdimen=\ifcase##2 \!!zeropoint\else\@@FLOWdx\fi + \setbox0=\hbox{\hskip\dimen0\hskip\scratchdimen + \hbox{\raise\dimen6\hbox{##1{\strut##3}}}}% + \positionFLOWzero}% + \positionFLOWzero + \dimen0=\FLOWshapewidth \dimen2=.5\dimen0 + \dimen4=\FLOWshapeheight\dimen6=.5\dimen4 + \boxoffset=.5\bodyfontsize + \doFLOWtlabel \righttopbox0\tFLOWlabel + \doFLOWblabel\rightbottombox0\bFLOWlabel + \doFLOWllabel \lefttopbox0\lFLOWlabel + \doFLOWrlabel \righttopbox0\rFLOWlabel + \doFLOWtlabel \topbox0\tcFLOWlabel % for me only + \doFLOWblabel \bottombox0\bcFLOWlabel % for me only + \doFLOWllabel \leftbox0\lcFLOWlabel % for me only + \doFLOWrlabel \rightbox0\rcFLOWlabel % for me only + \ifnum#1=\@@FLOWx\relax \doFLOWllabel \leftbox1\lFLOWexit \fi + \ifnum#1=\!!countc \doFLOWrlabel \rightbox1\rFLOWexit \fi + \ifnum#2=\@@FLOWy\relax \doFLOWtlabel \topbox1\tFLOWexit \fi + \ifnum#2=\!!countd \doFLOWblabel \bottombox1\bFLOWexit \fi + \fi\fi\fi\fi} + +% Pass E + +\long\def\startFLOWcellE#1\stopFLOWcell% + {\resetFLOWcell + \ignorespaces#1\unskip + \let\doprocessFLOWcell\doprocessFLOWcellE + \expandafter\doprocessFLOWcell\FLOWlocation\end} + +\def\doprocessFLOWcellE#1,#2\end % redundant + {\ifx\FLOWoverlay\empty \else + \!!counta=#1\relax + \!!countb=#2\relax + \!!countc=\@@FLOWx + \!!countd=\@@FLOWy + \advance\!!countc \@@FLOWnx + \advance\!!countd \@@FLOWny + \advance\!!countc -1 + \advance\!!countd -1 + \ifnum\!!counta<\@@FLOWx\relax + \donefalse + \else\ifnum\!!counta>\!!countc + \donefalse + \else\ifnum\!!countb<\@@FLOWy\relax + \donefalse + \else\ifnum\!!countb>\!!countd + \donefalse + \else + \donetrue + \fi\fi\fi\fi + \ifdone + \advance\!!counta by -\@@FLOWx\advance\!!counta by 1 + \advance\!!countb by -\@@FLOWy\advance\!!countb by 1 + \dimen0=\FLOWgridwidth\dimen0=\!!counta\dimen0 + \advance\dimen0 by -\FLOWgridwidth + \dimen4=\FLOWgridwidth\advance\dimen4 by -\FLOWshapewidth + \advance\dimen0 by .5\dimen4 + \dimen2=\FLOWgridheight\dimen2=\!!countb\dimen2 + \dimen4=\FLOWgridheight\advance\dimen4 by -\FLOWshapeheight + \advance\dimen2 by -.5\dimen4 + \edef\FLOWdx{\the\dimen0}% + \edef\FLOWdy{\the\dimen2}% + \setbox0=\hbox + {\framed + [\c!kader=\v!uit, + \c!achtergrond={\@@FLOWachtergrond,\FLOWoverlay}, + \c!achtergrondkleur=\@@FLOSachtergrondkleur, + \c!breedte=\FLOWshapewidth,\c!hoogte=\FLOWshapeheight] + {}}% + \setbox0=\hbox{\hskip\FLOWdx\lower\FLOWdy\box0}% + \smashbox0 + \box0 + \fi + \fi} + +% Pass F + +\def\checkFLOWautofocus% + {\def\@@FLOWminx{100}\let\@@FLOWminy\@@FLOWminx + \def\@@FLOWmaxx {0}\let\@@FLOWmaxy\@@FLOWmaxx + \def\@@FLOWabsx {0}\let\@@FLOWabsy\@@FLOWabsx + \let\startFLOWcell\startFLOWcellF + \haalbuffer[\FLOWbufferprefix\currentFLOWnumber]% + %\message{AUTOSHAPE 1: (\@@FLOWminx,\@@FLOWminy)->(\@@FLOWmaxx,\@@FLOWmaxy)}% + \ifnum\@@FLOWabsx<\@@FLOWmaxx\let\@@FLOWmaxx\@@FLOWabsx\fi + \ifnum\@@FLOWabsy<\@@FLOWmaxy\let\@@FLOWmaxy\@@FLOWabsy\fi + %\message{AUTOSHAPE 2: (\@@FLOWminx,\@@FLOWminy)->(\@@FLOWmaxx,\@@FLOWmaxy)}% + \donetrue + \ifnum\@@FLOWminx=100 \donefalse\fi + \ifnum\@@FLOWminy=100 \donefalse\fi + \ifnum\@@FLOWmaxx=0 \donefalse\fi + \ifnum\@@FLOWmaxy=0 \donefalse\fi + \doFLOWcheckF\@@FLOWx\@@FLOWminx\@@FLOWmaxx\@@FLOWnx + \doFLOWcheckF\@@FLOWy\@@FLOWminy\@@FLOWmaxy\@@FLOWny} + +\def\startFLOWcellF#1\stopFLOWcell% + {\resetFLOWcell + \ignorespaces#1\unskip + \expandafter\doFLOWlocationF\FLOWlocation\end}% + +\def\doFLOWlocationF#1,#2\end% + {\ifnum#1>\@@FLOWabsx\def\@@FLOWabsx{#1}\fi + \ifnum#2>\@@FLOWabsy\def\@@FLOWabsy{#2}\fi + \ExpandBothAfter\doifinset{\FLOWcell}{\@@FLOWautofocus} + {\dodoFLOWlocationF{#1}<-\@@FLOWminx + \dodoFLOWlocationF{#1}>+\@@FLOWmaxx + \dodoFLOWlocationF{#2}<-\@@FLOWminy + \dodoFLOWlocationF{#2}>+\@@FLOWmaxy}} + +\def\dodoFLOWlocationF#1#2#3#4% + {\ifnum#1#2#4\relax + \!!counta=#1\advance\!!counta by #31\relax + \edef#4{\ifnum\!!counta<1 1\else\the\!!counta\fi}% + \fi} + +\def\doFLOWcheckF#1#2#3#4% + {\ifdone + \let#1=#2% + \!!counta=#3% + \advance\!!counta 1\advance\!!counta -#2\relax + \ifnum\!!counta<1 \!!counta=1 \fi + \edef#4{\the\!!counta}% + \else + \def#1{1}\def#4{0}% no {1} + \fi} + % \useFLOWchart[name][parent][setting,setting][additional settings] % \useFLOWchart[name][parent][additional settings] +\let\currentFLOWchart\empty + \def\useFLOWchart {\doquadrupleempty\douseFLOWchart} \def\douseFLOWchart[#1][#2][#3][#4]% name parent sets mainsettings {\iffourthargument - \setvalue{FLOW--#1}[##1]{\setgetFLOWchart[#2][#3][#4,##1]}% + \setvalue{\@FLOW@--#1}[##1]{\setgetFLOWchart[#2][#3][#4,##1]}% \else \checkparameters[#3]% \ifparameters - \setvalue{FLOW--#1}[##1]{\setgetFLOWchart[#2][][#3,##1]}% + \setvalue{\@FLOW@--#1}[##1]{\setgetFLOWchart[#2][][#3,##1]}% \else - \setvalue{FLOW--#1}[##1]{\setgetFLOWchart[#2][#3][##1]}% + \setvalue{\@FLOW@--#1}[##1]{\setgetFLOWchart[#2][#3][##1]}% \fi \fi} \def\setgetFLOWchart[#1][#2][#3]% - {\def\docommando##1% - {}% cell line focus + {\def\docommando##1{}% cell line focus ? \processcommalist[#2]\docommando \getFLOWchart[#1][#3]} \def\doFLOWchart[#1][#2]% {\hbox\bgroup\vbox\bgroup % vmode suppresses spaces - \doifundefinedelse{FLOW--#1} +\def\currentFLOWchart{#1}% + \doifundefinedelse{\@FLOW@--#1} {\getFLOWchart[#1][#2]} - {\getvalue{FLOW--#1}[#2]}% + {\getvalue{\@FLOW@--#1}[#2]}% \egroup\egroup} \def\FLOWchart% {\dodoubleempty\doFLOWchart} -%D A hook into the help system. +%D A hook into the help system. \def\showFLOWhelp#1% {\doifhelpinfo{\FLOWhelp} @@ -842,7 +986,7 @@ {\forgetall\offinterlineskip\box#1\box\scratchbox}% \box#1}}} -%D The next section is dedicated to splitting up charts. +%D The next section is dedicated to splitting up charts. \def\getFLOWsize[#1]% {\bgroup\let\dodogetFLOWchart\dogetFLOWsize\FLOWchart[#1]\egroup} @@ -854,14 +998,15 @@ \def\getFLOWlocation##1,##2\end% {\ifnum0##1>\FLOWmaxwidth \xdef\FLOWmaxwidth {##1}\fi \ifnum0##2>\FLOWmaxheight\xdef\FLOWmaxheight{##2}\fi}% + \resetFLOWcell \long\def\startFLOWcell##1\stopFLOWcell% - {\resetFLOWcell##1\expandafter\getFLOWlocation\FLOWlocation\end}% + {{##1\expandafter\getFLOWlocation\FLOWlocation\end}}% \def\dosetFLOWchart[##1][##2]% - {\haalbuffer[flw-##1]}% - \getvalue{FLOW-#1}}} + {\haalbuffer[\FLOWbufferprefix##1]}% + \getvalue{\@FLOW@-#1}}} \def\setupFLOWsplit% - {\dodoubleargument\getparameters[@@FLOT]} + {\dodoubleargument\getparameters[\@@FLOT]} \setupFLOWsplit% [\c!nx=3,\c!ny=3, @@ -870,68 +1015,181 @@ \c!markering=\v!aan, \c!voor=,\c!na=] +\def\FLOWsplitx {1} +\def\FLOWsplity {1} +\def\FLOWsplitnx{1} +\def\FLOWsplitny{1} + \def\FLOWcharts% {\dodoubleempty\doFLOWcharts} +%D While splitting, the following variables are available: +%D +%D \starttypen +%D \FLOWsplitnx \FLOWsplitny \FLOWsplitx \FLOWsplity +%D \stoptypen + \def\doFLOWcharts[#1][#2]% {\bgroup \getFLOWsize[#1]% - \def\@@FLOTx{1}% - \doloop - {\def\@@FLOTy{1}% - \doloop + \dodoFLOWcharts\relax + \global\let\FLOWsplitnx\FLOWsplitx + \global\let\FLOWsplitny\FLOWsplity + \dodoFLOWcharts{\dododoFLOWcharts[#1][#2]}% + \egroup} + +\def\dodoFLOWcharts#1% + {\def\@@FLOTx{1}% + \global\let\FLOWsplitx\@@FLOTx + \doloop + {\def\@@FLOTy{1}% + \global\let\FLOWsplity\@@FLOTy + \doloop {\bgroup - \scratchcounter=\FLOWmaxwidth + \scratchcounter=\FLOWmaxwidth \advance\scratchcounter by -\@@FLOTx \advance\scratchcounter by 1 \ifnum\scratchcounter<\@@FLOTnx\edef\@@FLOTnx{\the\scratchcounter}\fi - \scratchcounter=\FLOWmaxheight + \scratchcounter=\FLOWmaxheight \advance\scratchcounter by -\@@FLOTy \advance\scratchcounter by 1 \ifnum\scratchcounter<\@@FLOTny\edef\@@FLOTny{\the\scratchcounter}\fi - \doifnot{\@@FLOTmarkering}{\v!aan}{\let\cuthbox\relax}% - \@@FLOTvoor - \cuthbox - {\@@FLOTcommando - {\FLOWchart[#1][#2, - \c!x=\@@FLOTx,\c!nx=\@@FLOTnx, - \c!y=\@@FLOTy,\c!ny=\@@FLOTny]}}% - \@@FLOTna + #1% does something with the float, or not \egroup \increment(\@@FLOTy,\@@FLOTny)% \ifnum\@@FLOTy>\FLOWmaxheight \exitloop - \else + \else + \doglobal\increment\FLOWsplity \decrement(\@@FLOTy,\@@FLOTdy)% \fi}% \increment(\@@FLOTx,\@@FLOTnx)% - \ifnum\@@FLOTx>\FLOWmaxwidth + \ifnum\@@FLOTx>\FLOWmaxwidth \exitloop - \else + \else + \doglobal\increment\FLOWsplitx \decrement(\@@FLOTx,\@@FLOTdx)% - \fi}% + \fi}} + +\def\dododoFLOWcharts[#1][#2]% + {\bgroup + \@@FLOTvoor + \doifnot{\@@FLOTmarkering}{\v!aan}{\let\cuthbox\hbox}% + \cuthbox + {\@@FLOTcommando + {\FLOWchart[#1][#2, + \c!x=\@@FLOTx,\c!nx=\@@FLOTnx, + \c!y=\@@FLOTy,\c!ny=\@@FLOTny]}}% + \@@FLOTna \egroup} -%D An example of splitting is given below: -%D -%D \starttypen +%D An example of splitting is given below: +%D +%D \starttypen %D \setupFLOWsplit %D [nx=5,ny=10, %D dx=0,dy=0, %D before=, %D after=\pagina] -%D +%D %D \FLOWcharts[mybigflow] -%D \stoptypen +%D \stoptypen %D -%D Or, one can say: +%D Or, one can say: %D -%D \starttypen +%D \starttypen %D \splitsplaatsblok %D {\plaatsfiguur{What a big flowchart this is!}} %D {\FLOWcharts[mybigflow]} +%D \stoptypen + +%D \macros +%D {typeFLOWchart} +%D +%D For documentation purposes the following macro is +%D provided. Watch the use of the first and last line hooks, +%D which is needed because the start and stop commands are +%D not part of the buffer. + +\def\typeFLOWchart[#1]% + {\bgroup + \def\dosetFLOWchart[##1][##2]{\typebuffer[\FLOWbufferprefix##1]}% + \convertargument\startFLOWchart[#1]\to\firstverbatimfileline + \convertargument \stopFLOWchart\to\lastverbatimfileline + \getvalue{\@FLOW@-#1} + \egroup} + +%D New: +%D +%D \starttypen +%D \setupFLOWcharts[command=\Whow] +%D +%D \startFLOWset[convert-en] % [tag][convert-en] +%D \subFLOWchart[a][x=1,y=1,nx=3,ny=3] +%D \subFLOWchart[b][x=1,y=2,nx=3,ny=3] +%D \subFLOWchart[c][x=2,y=1,nx=3,ny=3] +%D \stopFLOWset +%D +%D \def\Whow#1% +%D {\ifnum\currentFLOWset=1 \framed{Some Chart}\fi} +%D +%D \handleFLOWset[convert-en] % [tag] +%D +%D \def\Whow#1% +%D {\stelhoofdin[status=hoog] +%D \startstandardmakeup +%D \centerbox{#1} +%D \stopstandardmakeup} +%D +%D \handleFLOWset[convert-en] % [tag] %D \stoptypen +\def\startFLOWset% + {\dodoubleempty\dostartFLOWset} + +\def\dostartFLOWset[#1][#2]#3\stopFLOWset% tag name data + {\ifsecondargument + \long\setvalue{\@FLOX@#1}{\dohandleFLOWset{#1}{#2}{#3}}% + \else + \long\setvalue{\@FLOX@#1}{\dohandleFLOWset{#1}{#1}{#3}}% + \fi} + +\long\def\dohandleFLOWset#1#2#3% tag name data + {\bgroup + \def\subFLOWchart% + {\dodoubleempty\dosubFLOWchart}% + \def\dosubFLOWchart[##1][##2]% subtag settings + {\ifsecondargument + \dodohandleFLOWset{#1}{##1}{#2}{##2}% + \else + \subFLOWchart[][##1]% + \fi}% + #3% + \egroup} + +\def\dodohandleFLOWset#1#2#3#4% tag subtag name settings + {\increment\currentFLOWset + \bgroup + \@@FLOXcommando + {\ifnum\currentFLOWset=1 \pagereference[#1]\fi + \doifsomething{#2} + {\setupreferencing[\c!prefix=]% + \pagereference[#1:#2]% -:#1:#2 + \setupreferencing[\c!prefix=#1:#2]}% + \FLOWchart[#3][#4]}% + \egroup} + +\def\FLOWset[#1]% + {\newcounter\currentFLOWset + \doifdefinedelse{\@FLOX@#1} + {\getvalue{\@FLOX@#1}} + {\dodohandleFLOWset{#1}{}{#1}{}}} + +\newcounter\currentFLOWset + +\setupFLOWsets + [\c!commando=] + \protect \endinput diff --git a/tex/context/base/m-cweb.tex b/tex/context/base/m-cweb.tex new file mode 100644 index 000000000..57b1ab8b9 --- /dev/null +++ b/tex/context/base/m-cweb.tex @@ -0,0 +1,1371 @@ +%D \module +%D [ file=m-cweb, +%D version=1997.01.15, +%D title=\CONTEXT\ Extra Modules, +%D subtitle=\CWEB\ Pretty Printing Macros, +%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. + +%D First some auxiliary stuff, to be moved to system module. + +\def\dodofindfirstcharacter#1% + {\ifx#1\relax + \let\next=\egroup + \else + \handlecase + {\expandafter\ifnum\expandafter\catcode\expandafter`#1=11 + \def\next##1\relax{\egroup\def\firstcharacter{#1}}% + \fi}% + \fi + \next} + +\def\dofindfirstcharacter#1#2% + {\def\firstcharacter{}% + \bgroup + \convertargument#2\to\ascii + \let\next=\dodofindfirstcharacter + \let\handlecase=#1 + \expandafter\next\ascii\relax} + +\def\normalcase#1% + {#1} + +\def\findfirstcharacter% + {\dofindfirstcharacter\lowercase} + +\def\FindFirstCharacter% + {\dofindfirstcharacter\normalcase} + +\def\FINDFIRSTCHARACTER% + {\dofindfirstcharacter\uppercase} + +% nog doen: +% +% \deactivateCWEB in output routine +% status info +% gelinkte entries +% parskip en parindent + +%D \gdef\CWEBquote#1.{{\em Quote :}\ #1.} % checks the . + +%D This module (re)implements the \CWEB\ macros as defined in +%D the file \type{cwebmac.tex}. +%D +%D \CWEB\ uses short, often one character long, names for +%D macros. This is no real problem because no one is supposed +%D to read and understand the files generated by \CWEB. The +%D standard macros are meant for \PLAIN\ \TEX\ users. In +%D \CONTEXT\ and other macro packages however, there is a +%D potential conflict with format specific or user defined +%D commands. Furthermore, the \CWEB\ macros implement their own +%D output routines. When integrating \CWEB\ documents in +%D another environment, the \CWEB\ specific macros have to be +%D made local. The first part of this module is dedicated to +%D this feature. +%D +%D Instead of using \type{\def} and \type{\let} for defining +%D macros, we use: +%D +%D \starttypen +%D \defCEBmacro arguments {meaning} +%D \letCEBmacro arguments {meaning} +%D \stoptypen +%D +%D \CWEB files contain implicit calls to macros that generate +%D the table of contents, the lists of sections and the index. +%D Because we want to be much more flexible, we implemented our +%D own alternatives, and therefore have to bypass the original +%D ones. The next macro is used for defining these obsolete +%D \CWEB\ macros. The dummies take care of arguments. +%D +%D \starttypen +%D \defCEBdummy arguments {meaning} +%D \stoptypen +%D +%D The list of \CWEB\ specific macro names is saved in a +%D \TOKENLIST. This serves two purposes. First it enables us to +%D activate the \CWEB\ macros, which are saved under a +%D different name, second it can be used to temporary restore +%D the meanings, for instance when the output routine builds +%D the page. + +\newtoks\CWEBmacros + +%D Activating and deactivating is done by means of: +%D +%D \starttypen +%D \activateCWEB +%D \deactivateCWEB +%D \stoptypen +%D +%D Which are implemented as: + +\def\activateCWEB% + {\let\doCWEB=\activateCWEBmacro + \the\CWEBmacros} + +\def\deactivateCWEB% + {\let\doCWEB=\deactivateCWEBmacro + \the\CWEBmacros} + +%D The three definition macros append the name of the macro to +%D the list. The first two macros save the meaning, the last one +%D assigns \type{{}} to the macro and gobbles original meaning. + +\long\def\defCWEBmacro#1% + {\appendtoks\doCWEB#1\to\CWEBmacros + \setvalue{newCWEB\string#1}} + +\long\def\letCWEBmacro#1% + {\appendtoks\doCWEB#1\to\CWEBmacros + \letvalue{newCWEB\string#1}} + +\long\def\defCWEBdummy#1#2#% + {\appendtoks\doCWEB#1\to\CWEBmacros + \setvalue{newCWEB\string#1}#2{}% + \gobbleoneargument} + +%D The macro \type{\defCWEBdummy} of course takes care of the +%D argument. This leaves the two (de|)|activating macros: + +\def\CWEBmacro#1% + {\getvalue{newCWEB\string#1}} + +\def\activateCWEBmacro#1% + {\letvalue{oldCWEB\string#1}=#1% + \def#1{\CWEBmacro#1}} + +\def\deactivateCWEBmacro#1% + {\expandafter\let\expandafter#1\expandafter=\csname oldCWEB\string#1\endcsname} + +%D I did consider loading the \CWEB\ macros using temporary +%D substitutes of \type{\def}, \type{\font}, \type{\newbox} etc. +%D The main problem is that the file contains more than +%D definitions and taking all kind of assignments into account +%D too would not make things easier. So I decided to stick to +%D the method as just described. + +%D Now we're ready for the real job. What follows is a partial +%D adaption of the file \type{cwebmac.tex}, version 3.1, dated +%D September 1994 and written by Levy and Knuth. When possible +%D we kept the original meaning, but we've granted ourselves +%D the freedom to reformat the macro's for readibility. +%D +%D We'll only present the macros we actually use. The source +%D however contains the original implementation. + +% standard macros for CWEB listings (in addition to plain.tex) +% Version 3.1 --- September 1994. +% +% \ifx\documentstyle\undefined\else\endinput\fi % LaTeX will use other macros +% +% \xdef\fmtversion{\fmtversion+CWEB3.1} + +%D \macros{.}{} +%D +%D \CWEBquote preserve a way to get the dot accent (all +%D other accents will still work as usual). + +\letCWEBmacro\: = \. + +% \parskip = 0pt % no stretch between paragraphs +% \parindent = 1em % for paragraphs and for the first line of C text + +% \font\ninerm = cmr9 +% \let\mc = \ninerm % medium caps +% \font\eightrm = cmr8 +% \let\sc = \eightrm % small caps (NOT a caps-and-small-caps font) +% \let\mainfont = \tenrm +% \let\cmntfont = \tenrm +% \font\tenss = cmss10 +% \let\cmntfont = \tenss % alternative comment font +% \font\titlefont = cmr7 scaled \magstep4 % title on the contents page +% \font\ttitlefont = cmtt10 scaled \magstep2 % typewriter type in title +% \font\tentex = cmtex10 % TeX extended character set (used in strings) +% \fontdimen7\tentex = 0pt % no double space after sentences + +%D \macros{mc,sc,cmntfont,eightrm}{} +%D +%D The naming of the fonts in in line with those in \PLAIN\ +%D \TEX. Although \CONTEXT\ implements its own scheme, there is +%D still support for the \PLAIN\ ones. We keep the original +%D names, but change their meaning. That way the macros obey +%D switching to other sizes or styles. + +\defCWEBmacro\mc {\tx} +\defCWEBmacro\sc {\txx} +\defCWEBmacro\cmntfont {\ss} +\defCWEBmacro\eightrm {\tx} + +%D \macros{tentex,sevenrm,sevensy,teni}{} +%D +%D The next one uses a temporary solution. The \type{cmtex10} +%D font is not part of the default mechanism. We make use of +%D the \CONTEXT\ variables \type{\textface}, \type{\scriptface} +%D and \type{\scriptscriptface}, which hold the current +%D sizes. + +\defCWEBmacro\tentex% + {\font\next=cmtex10 at \textface + \fontdimen7\next=0pt + \next} + +\defCWEBmacro\sevenrm {\getvalue{\scriptface rmtf}} +\defCWEBmacro\sevensy {\getvalue{\scriptface mmsy}} +\defCWEBmacro\teni {\getvalue{\textface mmmi}} + +%D \macros{CWEBpt}{} +%D +%D The original macros are based on a 10~point bodyfont size. We +%D therefore have to specify dimension in points a bit +%D different. Specifications like .6pt are changed to +%D \type{.06} times \type{\korpsgrootte}. + +\defCWEBmacro\CWEBpt {\korpsgrootte} % still dutch + +%D \macros{CEE,UNIX,TEX,CPLUSPLUS}{} +%D +%D Next come some logo's. It does not make much sense to use +%D the \CONTEXT\ logo mechanism here, so we simply say: + +\defCWEBmacro \CEE/{{\mc C\spacefactor1000}} +\defCWEBmacro \UNIX/{{\mc U\kern-.05emNIX\spacefactor1000}} +\defCWEBmacro \TEX/{\TeX} +\defCWEBmacro\CPLUSPLUS/{{\mc C\PP\spacefactor1000}} +\defCWEBmacro \Cee{\CEE/} % for backward compatibility + +%D \macros{\ }{} +%D +%D Now we come to the real work: the short commands that make +%D up the typography. +%D +%D \CWEBquote italic type for identifiers. + +\defCWEBmacro\\#1% + {\leavevmode\hbox{\it#1\/\kern.05em}} + +%D \macros{\string|}{} +%D +%D \CWEBquote one letter identifiers look better this way. + +\defCWEBmacro\|#1% + {\leavevmode\hbox{$#1$}} + +%D \macros{\string&}{} +%D +%D \CWEBquote boldface type for reserved words. + +\defCWEBmacro\% + {\leavevmode + \hbox + {\def\_% + {\kern.04em + \vbox{\hrule width.3em height .06\CWEBpt}% .6pt}% + \kern.08em}% + \bf#1\/\kern.05em}} + +%D \macros{.}{} +%D +%D Here we use the previously saved period. This macro +%D takes care of special characters in strings. + +\defCWEBmacro\.#1% + {\leavevmode + \hbox + {\tentex % typewriter type for strings + \let\\=\BS % backslash in a string + \let\{=\LB % left brace in a string + \let\}=\RB % right brace in a string + \let\~=\TL % tilde in a string + \let\ =\SP % space in a string + \let\_=\UL % underline in a string + \let\&=\AM % ampersand in a string + \let\^=\CF % circumflex in a string + #1\kern.05em}} + +%D \macros{)}{} +%D +%D Some discretionary hack. + +\defCWEBmacro\)% + {\discretionary{\hbox{\tentex\BS}}{}{}} + +%D \macros{AT}{} +%D +%D \CWEBquote at sign for control text (not needed in versions +%D $>=$ 2.9). + +\defCWEBmacro\AT{@} + +%D \macros{ATL,postATL,NOATL}{} +%D +%D A two step macro that handles whatever. + +\defCWEBmacro\ATL% + {\par + \noindent + \bgroup + \catcode`\_=12 + \postATL} + +\defCWEBmacro\postATL#1 #2 % + {\bf letter \\{\uppercase{\char"#1}} tangles as \tentex "#2"% + \egroup + \par} + +\defCWEBmacro\noATL#1 #2 % + {} + +%D \macros{noatl}{} +%D +%D \CWEBquote suppress output from \type{@l}. + +\defCWEBmacro\noatl% + {\let\ATL=\noATL} + +% \defCWEBmacro\ATH% +% {\X\kern-.5em:Preprocessor definitions\X} + +%D \macros{PB} +%D +%D \CWEBquote hook for program brackets {\tttf\string|...\string|} +%D in TeX part or section name. + +\defCWEBmacro\PB% + {\relax} + +% \chardef\AM = `\& % ampersand character in a string +% \chardef\BS = `\\ % backslash in a string +% \chardef\LB = `\{ % left brace in a string +% \chardef\RB = `\} % right brace in a string +% \chardef\TL = `\~ % tilde in a string +% \chardef\UL = `\_ % underline character in a string +% \chardef\CF = `\^ % circumflex character in a string + +\defCWEBmacro\AM {\char`\&} % ampersand character in a string +\defCWEBmacro\BS {\char`\\} % backslash in a string +\defCWEBmacro\LB {\char`\{} % left brace in a string +\defCWEBmacro\RB {\char`\}} % right brace in a string +\defCWEBmacro\TL {\char`\~} % tilde in a string +\defCWEBmacro\UL {\char`\_} % underline character in a string +\defCWEBmacro\CF {\char`\^} % circumflex character in a string + +\defCWEBmacro\SP {{\tt\char`\ }} % (visible) space in a string + +% \newbox\PPbox \setbox\PPbox=\hbox +% {\kern.5pt\raise1pt\hbox{\sevenrm+\kern-1pt+}\kern.5pt} +% \newbox\MMbox \setbox\MMbox=\hbox +% {\kern.5pt\raise1pt\hbox{\sevensy\char0\kern-1pt\char0}\kern.5pt} +% \newbox\MGbox \setbox\MGbox=\hbox % symbol for -> +% {\kern-2pt\lower3pt\hbox{\teni\char'176}\kern1pt} +% \newbox\MODbox \setbox\MODbox=\hbox +% {\eightrm\%} +% +% \def\PP {\copy\PPbox} +% \def\MM {\copy\MMbox} +% \def\MG {\copy\MGbox} +% \def\MOD {\mathbin{\copy\MODbox}} + +\defCWEBmacro\PP% symbol for ++ + {\kern.05\CWEBpt + \raise.1\CWEBpt\hbox{\sevenrm+\kern-.1\CWEBpt+}% + \kern.05\CWEBpt} + +\defCWEBmacro\MM% + {\kern.05\CWEBpt + \raise.1\CWEBpt\hbox{\sevensy\char0\kern-.1\CWEBpt\char0}% + \kern.05\CWEBpt} + +\defCWEBmacro\MG% + {\kern-.2\CWEBpt + \lower.3\CWEBpt\hbox{\teni\char'176}% + \kern .1\CWEBpt} + +\defCWEBmacro\MRL#1% + {\mathrel{\let\K==#1}} + +% \def\MRL#1% +% {\KK#1} +% \def\KK#1#2% +% {\buildrel\;#1\over{#2}} + +\letCWEBmacro\GG = \gg +\letCWEBmacro\LL = \ll +\letCWEBmacro\NULL = \Lambda + +% \mathchardef\AND = "2026 % bitwise and; also \& (unary operator) + +\defCWEBmacro\AND% redefines itself (funny) + {\mathchardef\AND="2026 \AND} % bitwise and; also \& (unary operator) + +\letCWEBmacro\OR = \mid % bitwise or +\letCWEBmacro\XOR = \oplus % bitwise exclusive or +\defCWEBmacro\CM {{\sim}} % bitwise complement +\defCWEBmacro\MOD {\mathbin{\eightrm\%}} +\defCWEBmacro\DC {\kern.1em{::}\kern.1em} % symbol for :: +\defCWEBmacro\PA {\mathbin{.*}} % symbol for .* +\defCWEBmacro\MGA {\mathbin{\MG*}} % symbol for ->* +\defCWEBmacro\this {\&{this}} + +% \newbox \bak % backspace one em +% \newbox \bakk % backspace two ems +% +% \setbox\bak =\hbox to -1em{} +% \setbox\bakk=\hbox to -2em{} + +\newcount\CWEBind % current indentation in ems + +\defCWEBmacro\1% indent one more notch + {\global\advance\CWEBind by 1 + \hangindent\CWEBind em} + +\defCWEBmacro\2% indent one less notch + {\global\advance\CWEBind by -1 } + +\defCWEBmacro\3#1% optional break within a statement + {\hfil + \penalty#10 + \hfilneg} + +\defCWEBmacro\4% backspace one notch + {\hbox to -1em{}} + +\defCWEBmacro\5% optional break + {\hfil + \penalty-1 + \hfilneg + \kern2.5em + \hbox to -2em{}% + \ignorespaces} + +\defCWEBmacro\6% forced break + {\ifmmode + \else + \par + \hangindent\CWEBind em + \noindent + \kern\CWEBind em + \hbox to -2em{}% + \ignorespaces + \fi} + +\defCWEBmacro\7% forced break and a little extra space + {\Y + \6} + +\defCWEBmacro\8% no indentation + {\hskip-\CWEBind em + \hskip 2em} + +\defCWEBmacro\9#1% + {} + +\newcount\gdepth % depth of current major group, plus one +\newcount\secpagedepth +\secpagedepth=3 % page breaks will occur for depths -1, 0, and 1 + +% \newtoks\gtitle % title of current major group +% \newskip\intersecskip +% \intersecskip=12pt minus 3pt % space between sections + +% \let\yskip=\smallskip + +\defCWEBmacro\?% + {\mathrel?} + +% \def\note#1#2.% +% {\Y\noindent +% {\hangindent2em\baselineskip10pt\eightrm#1~#2.\par}} + +\defCWEBmacro\lapstar% + {\rlap{*}} + +% \def\stsec% +% {\rightskip=0pt % get out of C mode (cf. \B) +% \sfcode`;=1500 +% \pretolerance 200 +% \hyphenpenalty 50 +% \exhyphenpenalty 50 +% \noindent{\let\*=\lapstar\bf\secstar.\quad}} +% +% \let\startsection=\stsec + +\defCWEBmacro\defin#1% + {\global\advance\CWEBind by 2 \1\&{#1 } } % begin `define' or `format' + +% \def\A% xref for doubly defined section name +% {\note{See also section}} +% +% \def\As% xref for multiply defined section name +% {\note{See also sections}} + +\defCWEBmacro\B% + {\rightskip=0pt plus 100pt minus 10pt % go into C mode + \sfcode`;=3000 + \pretolerance 10000 + \hyphenpenalty 1000 % so strings can be broken (discretionary \ is inserted) + \exhyphenpenalty 10000 + \global\CWEBind=2 \1\ \unskip} + +\defCWEBmacro\C#1% + {\5\5\quad$/\ast\,${\cmntfont #1}$\,\ast/$} + +% \let\SHC\C % "// short comments" treated like "/* ordinary comments */" + +\defCWEBmacro\SHC#1% + {\5\5\quad$//\,${\cmntfont#1}} + +% \def\C#1{\5\5\quad$\triangleright\,${\cmntfont#1}$\,\triangleleft$} +% \def\SHC#1{\5\5\quad$\diamond\,${\cmntfont#1}} + +\defCWEBmacro\D% macro definition + {\defin{\#define}} + +\letCWEBmacro\E=\equiv % equivalence sign + +% \def\ET% conjunction between two section numbers +% { and~} +% +% \def\ETs% conjunction between the last two of several section numbers +% {, and~} + +\defCWEBmacro\F% format definition + {\defin{format}} + +\letCWEBmacro\G = \ge % greater than or equal sign + +% \H is long Hungarian umlaut accent + +\letCWEBmacro\I = \ne % unequal sign + +\defCWEBmacro\J% TANGLE's join operation + {\.{@\&}} + +% \let\K== % assignment operator + +\letCWEBmacro\K = \leftarrow % "honest" alternative to standard assignment operator + +% \L is Polish letter suppressed-L + +% \outer\def\M#1% +% {\MN{#1}% +% \ifon +% \vfil +% \penalty-100 +% \vfilneg % beginning of section +% \vskip\intersecskip +% \startsection +% \ignorespaces} +% +% \outer\def\N#1#2#3.% +% {\gdepth=#1% +% \gtitle={#3}% +% \MN{#2}% beginning of starred section +% \ifon +% \ifnum#1<\secpagedepth +% \vfil +% \eject % force page break if depth is small +% \else +% \vfil +% \penalty-100 +% \vfilneg +% \vskip\intersecskip +% \fi +% \fi +% \message{*\secno}% progress report +% \edef\next% +% {\write\cont % write to contents file +% {\ZZ{#3}{#1}{\secno}{\noexpand\the\pageno}}}% +% \next % \ZZ{title}{depth}{sec}{page} +% \ifon +% \startsection +% {\bf#3.\quad}% +% \ignorespaces} +% +% \def\MN#1% +% {\par % common code for \M, \N +% {\xdef\secstar{#1}% +% \let\*=\empty +% \xdef\secno{#1}}% remove \* from section name +% \ifx\secno\secstar +% \onmaybe +% \else +% \ontrue +% \fi +% \mark{{{\tensy x}\secno}{\the\gdepth}{\the\gtitle}}} +% +% each \mark is {section reference or null}{depth plus 1}{group title} + +% \O is Scandinavian letter O-with-slash +% \P is paragraph sign + +\defCWEBmacro\Q {\note{This code is cited in section}} % xref for mention of a section +\defCWEBmacro\Qs {\note{This code is cited in sections}} % xref for mentions of a section + +% \S is section sign + +\defCWEBmacro\T#1% + {\leavevmode % octal, hex or decimal constant + \hbox + {$\def\?{\kern.2em}% + \def\$##1{\egroup_{\,\rm##1}\bgroup}% suffix to constant + \def\_{\cdot 10^{\aftergroup}}% power of ten (via dirty trick) + \let\~=\oct + \let\^=\hex + {#1}$}} + +\defCWEBmacro\U {\note{This code is used in section}} % xref for use of a section +\defCWEBmacro\Us {\note{This code is used in sections}} % xref for uses of a section + +\letCWEBmacro\R = \lnot % logical not +\letCWEBmacro\V = \lor % logical or +\letCWEBmacro\W = \land % logical and + +% defined later on +% +% \def\X#1:#2\X% +% {\ifmmode +% \gdef\XX{\null$\null}% +% \else +% \gdef\XX{}% +% \fi % section name +% \XX$\langle\,${#2\eightrm\kern.5em#1}$\,\rangle$\XX} + +\unprotect + +\def\theCWEByskip {\blanko[\v!klein]} +\def\theCWEBvskip {\blanko[\v!groot]} + +\protect + +\defCWEBmacro\Y% + {\par + \yskip} + +\defCWEBmacro\yskip% + {\theCWEByskip} + +\letCWEBmacro\Z = \le +% \letCWEBmacro\ZZ = \let % now you can \write the control sequence \ZZ +\letCWEBmacro\* = * + +\defCWEBmacro\oct% + {\hbox{$^\circ$\kern-.1em\it\aftergroup\?\aftergroup}} + +\defCWEBmacro\hex% + {\hbox{$^{\scriptscriptstyle\#}$\tt\aftergroup}} + +\defCWEBmacro\vb#1% + {\leavevmode + \hbox + {\kern.2\CWEBpt + \vrule + \vtop + {\vbox + {\hrule + \hbox{\strut\kern.2\CWEBpt\.{#1}\kern.2\CWEBpt}} + \hrule}% + \vrule + \kern.2\CWEBpt}} % verbatim string + +\def\onmaybe% + {\let\ifon=\maybe} + +\let\maybe=\iftrue + +\newif\ifon + +% \newif\iftitle +% \newif\ifpagesaved +% +% \def\lheader% +% {\mainfont +% \the\pageno +% \eightrm +% \qquad +% \grouptitle +% \hfill +% \title +% \qquad +% \mainfont +% \topsecno} % top line on left-hand pages +% +% \def\rheader% +% {\mainfont +% \topsecno +% \eightrm +% \qquad +% \title +% \hfill +% \grouptitle +% \qquad +% \mainfont +% \the\pageno} % top line on right-hand pages +% +% \def\grouptitle +% {\let\i=I +% \let\j=J +% \uppercase\expandafter{\expandafter\takethree\topmark}} +% +% \def\topsecno% +% {\expandafter\takeone\topmark} +% +% \def\takeone #1#2#3{#1} +% \def\taketwo #1#2#3{#2} +% \def\takethree #1#2#3{#3} +% +% \def\nullsec% +% {\eightrm +% \kern-2em} % the \kern-2em cancels \qquad in headers +% +% \let\page=\pagebody % \def\page {\box255 } +% \raggedbottom % \normalbottom % faster, but loses plain TeX footnotes +% +% \def\normaloutput#1#2#3% +% {\shipout\vbox +% {\ifodd +% \pageno +% \hoffset=\pageshift +% \fi +% \vbox to \fullpageheight +% {\iftitle +% \global\titlefalse +% \else +% \hbox to \pagewidth +% {\vbox to 10pt{}% +% \ifodd\pageno #3\else#2\fi} +% \fi +% \vfill#1}} % parameter #1 is the page itself +% \global\advance\pageno by 1} +% +% \gtitle={\.{CWEB} output} % this running head is reset by starred sections +% +% \mark{\noexpand\nullsec0{\the\gtitle}} +% +% \def\title% +% {\expandafter\uppercase\expandafter{\jobname}} +% +% \def\topofcontents% +% {\centerline{\titlefont\title} +% \vskip.7in +% \vfill} % this material will start the table of contents page + +\def\botofcontents% + {\vfill + \centerline{\covernote}} % this material will end the table of contents page + +\def\covernote% + {} + +% some leftover + +\defCWEBmacro\contentspagenumber{0} % default page number for table of contents + +% \newdimen\pagewidth \pagewidth = 158mm % the width of each page +% \newdimen\pageheight \pageheight = 223mm % the height of each page +% \newdimen\fullpageheight \fullpageheight = 240mm % page height including headlines +% \newdimen\pageshift \pageshift = 0in % shift righthand pages wrt lefthand ones +% +% \def\magnify#1% +% {\mag=#1 +% \pagewidth=6.5truein +% \pageheight=8.7truein +% \fullpageheight=9truein +% \setpage} +% +% \def\setpage% +% {\hsize\pagewidth +% \vsize\pageheight} % use after changing page size +% +% \def\contentsfile {\jobname.toc} % file that gets table of contents info +% \def\readcontents {\input \contentsfile} +% \def\readindex {\input \jobname.idx} +% \def\readsections {\input \jobname.scn} +% +% \newwrite\cont +% \output{\setbox0=\page % the first page is garbage +% \openout\cont=\contentsfile +% \write\cont{\catcode `\noexpand\@=11\relax} % \makeatletter +% \global\output{\normaloutput\page\lheader\rheader}} +% \setpage +% \vbox to \vsize{} % the first \topmark won't be null + +\defCWEBdummy\magnify#1% magnify the page + {} + +\defCWEBmacro\ch% + {\note{The following sections were changed by the change file:} + \let\*=\relax} + +% \newbox\sbox % saved box preceding the index +% \newbox\lbox % lefthand column in the index +% +% \def\inx% +% {\par\vskip6pt plus 1fil % we are beginning the index +% \def\page{\box255 } +% \normalbottom +% \write\cont{} % ensure that the contents file isn't empty +% \write\cont{\catcode `\noexpand\@=12\relax} % \makeatother +% \closeout\cont % the contents information has been fully gathered +% \output +% {\ifpagesaved +% \normaloutput{\box\sbox}\lheader\rheader +% \fi +% \global\setbox\sbox=\page +% \global\pagesavedtrue} +% \pagesavedfalse +% \eject % eject the page-so-far and predecessors +% \setbox\sbox\vbox{\unvbox\sbox} % take it out of its box +% \vsize=\pageheight +% \advance\vsize by -\ht\sbox % the remaining height +% \hsize=.5\pagewidth +% \advance\hsize by -10pt +% % column width for the index (20pt between cols) +% \parfillskip 0pt plus .6\hsize % try to avoid almost empty lines +% \def\lr{L} % this tells whether the left or right column is next +% \output +% {\if L\lr +% \global\setbox\lbox=\page +% \gdef\lr{R} +% \else +% \normaloutput +% {\vbox to\pageheight +% {\box\sbox +% \vss +% \hbox to\pagewidth{\box\lbox\hfil\page}}} +% \lheader +% \rheader +% \global\vsize\pageheight\gdef\lr{L}\global\pagesavedfalse\fi} +% \message{Index:} +% \parskip 0pt plus .5pt +% \outer\def\I##1, {\par\hangindent2em\noindent##1:\kern1em} % index entry +% \def\[##1]{$\underline{##1}$} % underlined index item +% \rm +% \rightskip0pt plus 2.5em +% \tolerance 10000 +% \let\*=\lapstar +% \hyphenpenalty 10000 +% \parindent0pt +% \readindex} +% +% \def\fin% +% {\par\vfill\eject % this is done when we are ending the index +% \ifpagesaved\null\vfill\eject\fi % output a null index column +% \if L\lr\else\null\vfill\eject\fi % finish the current page +% \parfillskip 0pt plus 1fil +% \def\grouptitle{NAMES OF THE SECTIONS} +% \let\topsecno=\nullsec +% \message{Section names:} +% \output={\normaloutput\page\lheader\rheader} +% \setpage +% \def\note##1##2.{\quad{\eightrm##1~##2.}} +% \def\Q{\note{Cited in section}} % crossref for mention of a section +% \def\Qs{\note{Cited in sections}} % crossref for mentions of a section +% \def\U{\note{Used in section}} % crossref for use of a section +% \def\Us{\note{Used in sections}} % crossref for uses of a section +% \def\I{\par\hangindent 2em}\let\*=* +% \readsections} +% +% \def\con% +% {\par\vfill\eject % finish the section names +% %\ifodd\pageno\else\titletrue\null\vfill\eject\fi % for duplex printers +% \rightskip = 0pt +% \hyphenpenalty = 50 +% \tolerance = 200 +% \setpage +% \output={\normaloutput\page\lheader\rheader} +% \titletrue % prepare to output the table of contents +% \pageno=\contentspagenumber +% \def\grouptitle{TABLE OF CONTENTS} +% \message{Table of contents:} +% \topofcontents +% \line{\hfil Section\hbox to3em{\hss Page}} +% \let\ZZ=\contentsline +% \readcontents\relax % read the contents info +% \botofcontents +% \end} % print the contents page(s) and terminate +% +% \def\contentsline#1#2#3#4% +% {\ifnum#2=0 +% \smallbreak +% \fi +% \line{\consetup{#2}#1 +% \rm\leaders\hbox to .5em{.\hfil}\hfil\ #3\hbox to3em{\hss#4}}} +% + +\defCWEBmacro\consetup#1% + {\ifcase#1 \bf % depth -1 (@**) + \or % depth 0 (@*) + \or \hskip2em % depth 1 (@*1) + \or \hskip4em % depth 2 (@*2) + \or \hskip6em % depth 3 (@*3) + \or \hskip8em % depth 4 (@*4) + \or \hskip10em % depth 5 (@*5) + \else \hskip12em + \fi} % depth 6 or more + +\defCWEBdummy \inx {} % index +\defCWEBdummy \fin {} % finish +\defCWEBdummy \con {} % table of contents and finish + +\defCWEBdummy \noinx {} % no indexes or table of contents +\defCWEBdummy \nosecs {} % no index of section names or table of contents +\defCWEBdummy \nocon {} % no table of contents + +\defCWEBmacro\,% + {\relax + \ifmmode + \mskip\thinmuskip + \else + \thinspace + \fi} + +% \def\noinx% +% {\let\inx=\end} +% +% \def\nosecs% +% {\let\FIN=\fin +% \def\fin% +% {\let\parfillskip=\end +% \FIN}} +% +% \def\nocon% +% {\let\con=\end} +% +% \newcount\twodigits +% +% \def\hours% +% {\twodigits=\time +% \divide\twodigits by 60 +% \printtwodigits +% \multiply\twodigits by -60 +% \advance\twodigits by \time +% :\printtwodigits} +% +% \def\gobbleone1{} +% +% \def\printtwodigits% +% {\advance\twodigits by 100 +% \expandafter\gobbleone\number\twodigits +% \advance\twodigits by -100 } +% +% \def\today% +% {\ifcase\month +% \or January\or February\or March\or April\or May\or June% +% \or July\or August\or September\or October\or November\or December% +% \fi +% \space +% \number\day, \number\year} +% +% \def\datethis% +% {\def\startsection% +% {\leftline{\sc\today\ at \hours} +% \bigskip +% \let\startsection=\stsec +% \stsec}} +% +% \def\datecontentspage% +% {\def\topofcontents% +% {\leftline{\sc\today\ at \hours} +% \bigskip +% \centerline{\titlefont\title} +% \vfill}} + +\defCWEBdummy\datethis {} % say `\datethis' in limbo, to get your listing timestamped before section 1 +\defCWEBdummy\datecontentspage {} % timestamps the contents page + +\defCWEBmacro\TeX% + {{\ifmmode\it\fi + \leavevmode + \hbox{T\kern-.1667em\lower.424ex\hbox{E}\hskip-.125em X}}} + +% alternative implementation + +\newif\ifCWEBnotes + +\defCWEBmacro\Q {\CWEBnotesfalse \note{This code is cited in section}} % xref for mention of a section +\defCWEBmacro\Qs {\CWEBnotestrue \note{This code is cited in sections}} % xref for mentions of a section + +\defCWEBmacro\U {\CWEBnotesfalse \note{This code is used in section}} % xref for use of a section +\defCWEBmacro\Us {\CWEBnotestrue \note{This code is used in sections}} % xref for uses of a section + +\defCWEBmacro\A {\CWEBnotesfalse \note{See also section}} % xref for doubly defined section name +\defCWEBmacro\As {\CWEBnotestrue \note{See also sections}} % xref for multiply defined section name + +\defCWEBmacro\ET% conjunction between two section numbers + { and~} + +\defCWEBmacro\ETs% conjunction between the last two of several section numbers + {, and~} + +%\def\processCWEBsectionnumbers[#1]% +% {\bgroup +% \def\CWEBcomma% +% {\def\CWEBcomma{, }}% +% \def\docommando##1% +% {\bgroup +% \def\[####1]{####1}% +% \xdef\CWEBreference{##1}% +% \egroup +% \CWEBcomma{\naar{\donottest{##1}}[web:\CWEBreference]}}% +% \processcommalist[{#1}]\docommando +% \egroup} + +% \def\processCWEBsectionnumbers[#1]% +% {\bgroup +% \def\CWEBcomma% +% {\def\CWEBcomma{, }}% +% \def\docommando##1% +% {\bgroup +% \def\(####1){####1}% +% \xdef\CWEBreference{##1}% +% \egroup +% \CWEBcomma +% {\localcolortrue\naar{\donottest{##1}}[web:\CWEBreference]}}% +% \bgroup +% \def\[##1]{\(##1)}\let\(=\relax\xdef\CWEBreferences{#1}% +% \egroup +% \unexpanded\def\(##1){\[##1]}% +% \processcommacommand[\CWEBreferences]\docommando +% \egroup} + +\def\processCWEBsectionnumbers[#1]% + {\bgroup + \def\CWEBcomma% + {\def\CWEBcomma{, }}% + \def\docommando##1% + {\bgroup + \def\[####1]{####1}% + \xdef\CWEBreference{##1}% + \egroup + \CWEBcomma{\localcolortrue\naar{\donottest{##1}}[web:\CWEBreference]}}% + \processlist{(}{)}{,}\docommando(#1) + \egroup} + +\def\processCWEBsectionnotes% + {\catcode`\s=12 + \doprocessCWEBsectionnotes} + +\def\doprocessCWEBsectionnotes#1.% + {\ifCWEBnotes + \def\next##1\ET##2##3.% + {\processCWEBsectionnumbers[##1]% + \if##2s% + {, and~\naar{##3}[web:##3]}% + \else + { and~\naar{##2##3}[web:##2##3]}% + \fi}% + \next#1.% + \else + \naar{#1}[web:#1]% + \fi + \afterCWEBnote % inside group! + \egroup} + +\let\afterCWEBnote=\relax + +\defCWEBmacro\note#1% + {\bgroup + \Y\noindent + \def\afterCWEBnote{\par}% + \hangindent2em + %\baselineskip10pt + \eightrm#1~\processCWEBsectionnotes} + +\def\oldCWEBmacroX#1:#2\X% original + {\ifmmode + \gdef\XX{\null$\null}% + \else + \gdef\XX{}% + \fi % section name + \XX$\langle\,${#2\eightrm\kern.5em#1}$\,\rangle$\XX} + +\defCWEBmacro\ATH% + {\oldCWEBmacroX\kern-.5em:Preprocessor definitions\X} + +\def\newCWEBmacroX#1:#2\X% original + {\ifmmode + \gdef\XX{\null$\null}% + \else + \gdef\XX{}% + \fi % section name + \XX$\langle\,$% + {#2\eightrm\kern.5em\processCWEBsectionnumbers[{#1}]}% + $\,\rangle$\XX} + +\defCWEBmacro\X#1:#2\X% + {\newCWEBmacroX#1:#2\X} + +\definieermarkering[CWEBfilename] +\definieermarkering[CWEBsectiontitle] +\definieermarkering[CWEBsectionnumber] +\definieermarkering[CWEBsectiondepth] + +\defCWEBmacro\M#1% + {\MN{#1}% + \ifon + \vfil + \penalty-100 + \vfilneg % beginning of section + \theCWEBvskip + \startsection + \pagereference[web:#1]% + \expanded{\marking[CWEBsectionnumber]{\secno}}% + \expanded{\marking[CWEBsectiondepth]{\the\gdepth}}% + \ignorespaces} + +\defCWEBmacro\N#1#2#3.% + {\gdepth=#1% + \MN{#2}% beginning of starred section + \ifon + \ifnum#1<\secpagedepth + \vfil + \eject % force page break if depth is small + \else + \vfil + \penalty-100 + \vfilneg + \theCWEBvskip + \fi + \fi + \message{*\secno}% progress report + \makesectionformat % context + \convertargument#3\to\ascii + \edef\next% + {\write\CWEBcont % write to contents file + {\string\ZZ{\ascii}{#1}{\secno}% + {\sectionformat::\noexpand\userfolio}{\noexpand\realfolio}}}% + \next % \ZZ{title}{depth}{sec}{page} + \ifon + \startsection + \pagereference[web:#2]% + \marking[CWEBsectiontitle] {#3}% + \expanded{\marking[CWEBsectionnumber]{\secno}}% + \expanded{\marking[CWEBsectiondepth]{\the\gdepth}}% + {\bf#3.\quad}% + \ignorespaces} + +\defCWEBmacro\MN#1% + {\par % common code for \M, \N + {\xdef\secstar{#1}% + \let\*=\empty + \xdef\secno{#1}}% remove \* from section name + \ifx\secno\secstar + \onmaybe + \else + \ontrue + \fi} + +\newif\iflinktoCWEBfile + +\def\setCWEBlinkfile#1% + {\linktoCWEBfiletrue + \def\otherCWEBfile{#1}} + +\unprotect + +\def\gotoCWEBsection#1[#2]% + {\iflinktoCWEBfile + \bgroup + \setupinteraction[\c!kleur=,\c!letter=]% + \let\savedreferenceprefix=\referenceprefix + \localcolortrue + \naar{#1}[\otherCWEBfile::\savedreferenceprefix web:#2]% + \egroup + \else + #1% + \fi} + +\protect + +\defCWEBmacro\startsection% + {\rightskip=0pt % get out of C mode (cf. \B) + \sfcode`;=1500 + \pretolerance 200 + \hyphenpenalty 50 + \exhyphenpenalty 50 + \noindent + \bgroup + \let\*=\lapstar + \gotoCWEBsection{\bf\secstar.\quad}[\secno]% + \egroup} + +\def\ignoreCWEBinput% + {\let\normalinput=\input + \def\input ##1 % + {\let\input=\normalinput}} + +\def\loadCWEBmacros#1% + {\let\oldN=\N + \def\N{\bgroup\setbox0=\vbox\bgroup\endinput}% + \ignoreCWEBinput + \ReadFile{#1.tex}% + \egroup\egroup + \let\N=\oldN} + +\def\resetCWEBcontext% + {\catcode`\|=12 % used in context discretionaries + \everypar{} % used for context indentation and floats + \parskip=0pt % no stretch between cweb paragraphs + \parindent=1em} % is related to cweb backspace etc + +\newwrite\CWEBcont + +\def\processCWEBsource #1 % + {\bgroup + \resetCWEBcontext + \activateCWEB + \ignoreCWEBinput + \immediate\openout\CWEBcont=#1.toc + \write\CWEBcont{\noexpand\unprotect} + \message{Source:} + \marking[CWEBfilename]{#1} + \ReadFile{#1.tex}\relax + \write\CWEBcont{\noexpand\protect} + \closeout\CWEBcont + \par + \egroup} + +\def\resetCWEBindexentry% + {\xdef\currentCWEBindexentry{}} + +\def\showCWEBindexentry#1% can be redefined + {\theCWEBvskip + \vskip3\lineheight + \goodbreak + \vskip-3\lineheight + {\pagereference[web:#1]\bf#1}% + \theCWEBvskip} + +\def\checkCWEBindexentry#1% + {\bgroup + \def\\##1{##1}% a dummy that also removes the {} + \def\|##1{##1}% another dummy + \def\.##1{*##1}% and another (the typewriter one) + \def\&##1{##1}% and a last one + \def\9##1{##1}% hold this one + \catcode`*=11 + \expandafter\def\expandafter\entry\expandafter{#1}% + \convertcommand\entry\to\ascii + \expanded{\FINDFIRSTCHARACTER{\ascii}}% + \doifnot{\currentCWEBindexentry}{\firstcharacter} + {\doifnot{\firstcharacter}{*} % signal for \firstbunch + {\global\let\currentCWEBindexentry=\firstcharacter + \showCWEBindexentry{\currentCWEBindexentry}}}% + \egroup} + +\def\theCWEBbeforeindex {\startkolommen} +\def\theCWEBafterindex {\stopkolommen} + +\def\processCWEBindex #1 % + {\bgroup + \resetCWEBcontext + \activateCWEB + \resetCWEBindexentry + \def\I##1, % + {\par + \checkCWEBindexentry{##1}% + \hangindent2em + \noindent##1:\kern1em% + \def\next####1.% + {\processCWEBsectionnumbers[{####1}]}% + \next}% + \def\[##1]% + {$\underline{##1}$}% + \let\*=\lapstar + \parfillskip 0pt plus .6\hsize % try to avoid almost empty lines +% \parskip 0pt plus .5pt + \rightskip0pt plus 2.5em + \tolerance 10000 + \hyphenpenalty 10000 + \parindent0pt + \message{Index:} + \marking[CWEBfilename] {#1} + \marking[CWEBsectiontitle] {index} + \marking[CWEBsectionnumber]{} + \marking[CWEBsectiondepth]{} + \loadCWEBmacros{#1} + \theCWEBbeforeindex + \ReadFile{#1.idx}\relax + \theCWEBafterindex + \par + \egroup} + +\def\processCWEBsections #1 % + {\bgroup + \resetCWEBcontext + \activateCWEB + \loadCWEBmacros{#1} + \parfillskip = 0pt plus 1fil + \parindent = 0pt + \let\topsecno=\nullsec + \def\note##1% + {\quad + \bgroup + \eightrm + ##1~\processCWEBsectionnotes} + \def\Q {\CWEBnotesfalse \note{Cited in section}} % crossref for mention of a section + \def\Qs{\CWEBnotestrue \note{Cited in sections}} % crossref for mentions of a section + \def\U {\CWEBnotesfalse \note{Used in section}} % crossref for use of a section + \def\Us{\CWEBnotestrue \note{Used in sections}} % crossref for uses of a section + \def\I {\par\hangindent 2em}% + \let\*=* + \message{Section names:} + \marking[CWEBfilename] {#1} + \marking[CWEBsectiontitle] {sections} + \marking[CWEBsectionnumber]{} + \marking[CWEBsectiondepth]{} + \loadCWEBmacros{#1} + \ReadFile{#1.scn}\relax + \par + \botofcontents + \par + \egroup} + +\def\processCWEBcontents #1 % + {\bgroup + \resetCWEBcontext + \activateCWEB + \loadCWEBmacros{#1} + \rightskip = 0pt + \hyphenpenalty = 50 + \tolerance = 200 + \parindent = 0pt + \line{\hfil Section\hbox to3em{\hss Page}} + \let\ZZ=\contentsline + \message{Table of contents:} + \marking[CWEBfilename] {#1} + \marking[CWEBsectiontitle] {table of contents} + \marking[CWEBsectionnumber]{} + \marking[CWEBsectiondepth]{} + \loadCWEBmacros{#1} + \ReadFile{#1.toc}\relax + \par + \egroup} + +\defCWEBmacro\contentsline#1#2#3#4#5% + {\ifnum#2=0 + \smallbreak + \fi + \line{\consetup{#2}#1 + \rm + \leaders\hbox to .5em{.\hfil}\hfil\ + {\localcolortrue\naar{#3}[web:#3]}% below: \gotorealpage ? should be changed + \hbox to3em{\localcolortrue\hss\gotorealpage{}{}{#5}{\translatednumber[#4]\presetgoto}}}} + +%D A last hack, needed because a file can overload of the +%D above. (Some day: a check like \ifx#1\CWEBdefined.) + +\def\outer#1#2% + {\ifx#2\undefined + \expandafter#1\expandafter#2% + \else + \expandafter#1\expandafter\ThrowAway + \fi} + +\endinput diff --git a/tex/context/base/m-pictex.tex b/tex/context/base/m-pictex.tex index ac74c1d6b..408105581 100644 --- a/tex/context/base/m-pictex.tex +++ b/tex/context/base/m-pictex.tex @@ -239,7 +239,7 @@ %D Now we can load \PICTEX: -\loadpictec +\loadpictex %D Finally we restore the old definitions of \type{\newdimen} %D and \type{\newskip}: diff --git a/tex/context/base/m-units.tex b/tex/context/base/m-units.tex index f0f13c48f..fd82b1499 100644 --- a/tex/context/base/m-units.tex +++ b/tex/context/base/m-units.tex @@ -44,6 +44,16 @@ 1: Verwende \string\Degrees\space\string\Celsius\space statt \string\Celsius ! \stopmessages +\startmessages italian library: units + title: unità + 1: usare \string\Degrees\space\string\Celsius\space invece di \string\Celsius ! +\stopmessages + +\startmessages norwegian library: units + title: enheter + 1: bruk \string\Degrees\space\string\Celsius\space istedenfor \string\Celsius ! +\stopmessages + \unprotect %D This runtime loadable module implements a way of defining @@ -593,12 +603,12 @@ %D Some more, thanks to Tobias: -\getvalue{\v!eenheid} [Gray] {Gr} {Gray} -\getvalue{\v!eenheid} [Weber] {Wb} {Weber} -\getvalue{\v!eenheid} [Henry] {H} {Henry} -\getvalue{\v!eenheid} [Sterant] {sr} {Sterant} -\getvalue{\v!eenheid} [Angstom] {\AA} {\AA ngstr\"om} -\getvalue{\v!eenheid} [Gauss] {G} {Gauss} +\getvalue{\v!eenheid} [Gray] {Gr} {Gray} +\getvalue{\v!eenheid} [Weber] {Wb} {Weber} +\getvalue{\v!eenheid} [Henry] {H} {Henry} +\getvalue{\v!eenheid} [Sterant] {sr} {Sterant} +\getvalue{\v!eenheid} [Angstrom] {\AA} {\AA ngstr\"om} +\getvalue{\v!eenheid} [Gauss] {G} {Gauss} \setuplabeltext [\s!nl] diff --git a/tex/context/base/main-001.tex b/tex/context/base/main-001.tex index db1a16b4a..5a1e0758d 100644 --- a/tex/context/base/main-001.tex +++ b/tex/context/base/main-001.tex @@ -13,12 +13,6 @@ %D This module is still to be split and documented. -% nog oplossen: voetnoot setten ivm later veranderde -% witruimte; probleem: als lijn graphic - -% The %I etc thing will be replaced by documentation. Some -% years ago they served as helpinfo blocks for our editor. - \writestatus{loading}{Context Core Macros (1)} \newevery \everybodyfont \Everybodyfont % just to be sure @@ -51,7 +45,6 @@ \protect - \unprotect \startmessages dutch library: systems @@ -178,6 +171,68 @@ 27: verze \stopmessages +\startmessages italian library: systems + title: sistema + 1: caricamento dei file supplementari posticipato (typemode) + 2: -- caricato + 3: provare LaTeX + 4: comando -- già definito + 5: macro del modulo -- caricate + 6: nessuna macro trovata nel modulo -- + 7: macro del modulo -- già caricate + 8: nuova versione del file supplementare, seconda passata necessaria + 9: -- non trovato/elaborato + 10: non usare em in -- + 11: costruzione di un semplice supplemento + 12: file di supplemento non ordinato, usare texutil + 13: marcatura -- definita -- + 14: nuova pagina obbligata in lista a -- + 15: salvataggio del buffer -- + 16: composizione del buffer -- + 17: composizione verbatim del buffer -- + 18: sinonimo -- -- non esistente + 19: significato (sinonimi) di -- caricato + 20: significato (specie) di -- caricato + 21: nessuna informazione supplementare caricata + 22: usare un file supplementare valido + 23: -- sistemato a -- + 24: Oggetti mobili + 25: Riferimenti + 26: Registri + 27: Versione +\stopmessages + +\startmessages norwegian library: systems + title: system + 1: innlesning av hjelpefila utsatt (typemode) + 2: -- er lest inn + 3: forsøker LaTeX + 4: kommando -- er allerede definert + 5: makroene i modul -- er lest inn + 6: ingen makroer funnet i modul --- + 7: makroene i modul -- er allerede lest inn + 8: ny versjon av hjelpefil, andre gjennomkjøring nødvendig + 9: -- ikke funnet/behandlet + 10: ikke bruk em i -- + 11: lager enkel hjelpefil + 12: hjelpefila er ikke sortert, bruk texutil + 13: markering -- definert -- + 14: tvunget sideskift i liste ved -- + 15: lagrer Buffer -- + 16: tegnsetter buffer -- + 17: tegnsetter verbatim-buffer -- + 18: synonym -- -- eksisterer ikke + 19: betydning (synonymer) av -- er lest inn + 20: betydning (sorterer) av -- er lest inn + 21: hjelpefila er ikke lest inn + 22: bruk en gyldig hjelpefil + 23: -- arrangert på -- + 24: Flytblokker + 25: Referanser + 26: Registere + 27: Versjon +\stopmessages + \startmessages dutch library: floatblocks title: plaatsblokken 1: -- hernummerd / -- => -- @@ -242,6 +297,38 @@ 12: nedefinovano \stopmessages +\startmessages italian library: floatblocks + title: oggetti mobili + 1: -- rinumerato / -- => -- + 2: -- salavto + 3: -- mosso + 4: -- sistemato + 5: ordine aggiustato + 6: n di top floats limitato a -- + 7: n di bottom floats limitato a -- + 8: meno di -- righe + 9: ordine disturbato + 10: -- limitato + 11: nessun oggetto specificato + 12: non definito +\stopmessages + +\startmessages norwegian library: floatblocks + title: flytblokker + 1: -- renummerert / -- => -- + 2: -- lagret + 3: -- flyttet + 4: -- plassert + 5: rekkefølge tilpasset + 6: maksimalt -- flytblokker øverst + 7: maksimalt -- flytblokker nederst + 8: mindre enn -- linjer + 9: rekkefølge endret + 10: -- begrenset + 11: ingen blokk oppgitt + 12: udefinert +\stopmessages + \startmessages dutch library: layouts title: layout 1: teksthoogte aangepast met -- op pagina -- @@ -297,6 +384,34 @@ 10: -- a -- nedava dohromady 1.0 11: svisla mezera -- neni povolena v pevnem radkovem rejstriku \stopmessages + +\startmessages italian library: layouts + title: layout + 1: altezza del testo adattata con -- a pagina -- + 2: posizionato testo posticipato -- volte + 3: testo posticipato -- volte + 4: blocchi in margine attivi + 5: blocchi in margine inattivi + 6: gruppo di sottopagine -- elaborato (dimensione --) + 7: calcolo dello spazio per logo + 8: calcolo dello sfondo + 10: -- e -- non sommano a 1.0 + 11: spaziatura -- non permessa in modo griglia +\stopmessages + +\startmessages norwegian library: layouts + title: layout + 1: teksthøyde tilpasset med -- på side -- + 2: -- ganger forskjøvet tekst plassert + 3: -- ganger tekst forskjøvet + 4: margblokker aktive + 5: margblokker inaktive + 6: delside sett -- behandlet (størrelse --) + 7: beregner plass for logo + 8: beregner bakgrunn + 10: -- og -- er ikke 1.0 til sammen + 11: mellomrom -- ikke tillatt i gridmodus +\stopmessages % \CONTEXTtrue % Now we know that we can use ConTeXt commands. @@ -466,13 +581,15 @@ {\emergencystretch\!!zeropoint\relax} \def\forgetall% - {\let\par=\endgraf % i.v.m. getpar etc - \notragged - \forgetparskip - \forgetparindent - \forgetbothskips - \forgetspacing % i.v.m. funny spacing in pagebody - \everypar{}} % indeed! + {\the\everyforgetall} + +\appendtoks \let\par=\endgraf \to \everyforgetall % i.v.m. getpar etc +\appendtoks \notragged \to \everyforgetall +\appendtoks \forgetparskip \to \everyforgetall +\appendtoks \forgetparindent \to \everyforgetall +\appendtoks \forgetbothskips \to \everyforgetall +\appendtoks \forgetspacing \to \everyforgetall % i.v.m. funny spacing in pagebody +\appendtoks \everypar\emptytoks \to \everyforgetall % indeed! \def\localvbox#1#% {\vbox#1\bgroup @@ -509,6 +626,10 @@ \newskip\leftskipadaption \def\doadaptleftskip#1% + {\dosetleftskipadaption{#1}% + \advance\leftskip by \leftskipadaption} + +\def\dosetleftskipadaption#1% {\leftskipadaption\!!zeropoint \processaction[#1] % \ExpandFirstAfter [\v!standaard=>\leftskipadaption= @@ -516,8 +637,7 @@ \v!ja=>\leftskipadaption= \ifdim\voorwit=\!!zeropoint\@@sllinks\else\voorwit\fi, \v!nee=>, - \s!unknown=>\leftskipadaption=#1]% - \advance\leftskip by \leftskipadaption} + \s!unknown=>\leftskipadaption=#1]} \def\herhaal {\dorepeat} \def\herhaler {\repeater} @@ -609,18 +729,6 @@ \catcode`\^^L=\@@endofline -%I n=Struts -%I c=\strut,\setnostrut,\setstrut,\toonstruts,\pseudostrut -%I -%I Struts zijn onzichtbare 'karakters' met alleen een hoogte -%I en diepte. De volgende commando's hebben betrekking op -%I struts -%I -%I \strut -%I \setstrut -%I \setnostrut -%I \toonstruts - \def\toonstruts% {\setteststrut} @@ -674,6 +782,7 @@ \def\baselinegluefactor {0} \def\normallineheight {\baselinefactor ex} +\def\minimallinedistance {\lineskip} \def\strutheight {0pt} \def\strutdepth {0pt} @@ -736,7 +845,7 @@ \openlineheight \!!plus\baselinegluefactor\openlineheight \!!minus\baselinegluefactor\openlineheight - \normallineskip\!!onepoint\relax + \normallineskip\minimallinedistance\relax % \!!onepoint\relax \normallineskiplimit\!!zeropoint\relax \normalbaselines} @@ -776,18 +885,66 @@ % The double \hbox construction enables us to \backtrack % boxes. +% \def\setstrut% +% {\setstrutdimen\strutheight\strutheightfactor\spacingfactor +% \setstrutdimen\strutdepth \strutdepthfactor \spacingfactor +% \let\strut=\normalstrut +% \setbox\strutbox=\normalhbox +% {\normalhbox +% {\vrule +% \!!width \strutwidth +% \!!height \strutheight +% \!!depth \strutdepth +% \normalkern-\strutwidth}}} + \def\setstrut% {\setstrutdimen\strutheight\strutheightfactor\spacingfactor \setstrutdimen\strutdepth \strutdepthfactor \spacingfactor - \let\strut=\normalstrut - \setbox\strutbox=\normalhbox - {\normalhbox - {\vrule - \!!width \strutwidth - \!!height \strutheight - \!!depth \strutdepth - \normalkern-\strutwidth}}} + \dosetstrut} + +\def\setcharstrut#1% + {\setbox\strutbox=\hbox{#1}% + \edef\strutheight{\the\ht\strutbox}% + \edef\strutdepth {\the\dp\strutbox}% + \dosetstrut} + +\def\setcapstrut% could be M, but Q has descender + {\setcharstrut{Q}} +%D Centered looks nicer: + +\def\dosetstrut% + {\let\strut=\normalstrut + \setbox\strutbox=\normalhbox + {\normalhbox to \!!zeropoint + {% \hss % new, will be option + \vrule + \!!width \strutwidth + \!!height\strutheight + \!!depth \strutdepth + \hss}}} +%D Sometimes a capstrut comes in handy +%D +%D \starttabulatie[|Tl|l|l|] +%D \NC yes \NC normal strut \NC {\toonstruts\setupstrut[ja]\strut} \NC \NR +%D \NC no \NC no strut \NC {\toonstruts\setupstrut[nee]\strut} \NC \NR +%D \NC kap \NC a capital strut (i.e. Q) \NC {\toonstruts\setupstrut[kap]\strut} \NC \NR +%D \NC A B \unknown \NC a character strut (e.g. A) \NC {\toonstruts\setupstrut[A]\strut} \NC \NR +%D \NC \NC a normal strut \NC {\toonstruts\setupstrut\strut} \NC \NR +%D \stoptabulatie + +\def\setupstrut% + {\dosingleempty\dosetupstrut} + +\def\dosetupstrut[#1]% yet undocumented + {\processaction + [#1] + [ \v!ja=>\setstrut, + \v!nee=>\setnostrut, + \v!kap=>\setcapstrut, + \s!default=>\setstrut, + \s!unknown=>\setcharstrut{\commalistelement}]} + \def\setteststrut% {\def\strutwidth{.8pt}% \setstrut} @@ -845,6 +1002,10 @@ \def\setfontparameters% {\the\everybodyfont} +%D Handy: + +\def\baselinedistance{\the\lineheight} + %D We need \type{\normaloffinterlineskip} because the new %D definition contains an assignment, and |<|don't ask me %D why|>| this assignment gives troubles in for instance the @@ -1180,110 +1341,6 @@ \def\startglobal {\dostartglobaldefs<+} \def\stopglobal {\dostopglobaldefs} -%I n=Zetspiegel -%I c=\stellayoutin,\definieerpapierformaat,\stelpapierformaatin -%I c=\paslayoutaan -%I -%I De zetspiegel is het door de tekst gevormde vlak. -%I Hiertoe behoren ¢¢k de hoofd- en voetmarge. De zetspiegel -%I wordt ingesteld met: -%I -%I \stellayoutin[breedte=,hoogte=,rugwit=,kopwit=] -%I -%I Er dienen maten te worden ingevuld, waarbij de eenheid -%I direkt achter het getal staat: 10pt, 100mm, 5cm, 3.5in. -%I -%I De parameters hebben de volgende betekenis: -%I -%I breedte breedte van het tekstvlak, inclusief marges -%I hoogte hoogte van het tekstvlak, inclusief marges -%I rugwit witruimte aan de binnenzijde, zonder marge -%I kopwit witruimte aan de bovenzijde, zonder marge -%P -%I Rond de zetspiegel vinden we marges, randen, het hoofd en -%I de voet. Ook deze worden ingesteld met: -%I -%I \stellayoutin[breedte=,hoogte=,rugwit=,kopwit=] -%I -%I hoofd hoogte van de bovenmarge binnen de zetspiegel -%I voet hoogte van de ondermarge binnen de zetspiegel -%I marge breedte van de marge naast de zetspiegel -%I -%I en -%I -%I rand breedte van de rand naast de marge -%I boven hoogte van de rand boven het hoofd -%I onder hoogte van de rand onder de voet -%I -%I Alleen het hoofd en de voet hangen dus samen met de -%I zetspiegel. -%P -%I Eventueel kunnen de linker- en rechtermarge en apart -%I worden ingesteld: -%I -%I \stellayoutin[linkermarge=,rechtermarge=] -%I -%I Het zelfde geldt voor de randen. In dat geval wordt bij -%I dubbelzijdig zetten gespiegeld. Oppassen dus! -%I -%I De afstanden tussen marges, randen enz. kunnen worden -%I ingesteld met: -%I -%I bovenafstand, onderafstand -%I hoofdafstand,voetafstand -%I linkermargeafstand,rechtermargeafstand, -%I linkerrandafstand,rechterrandafstand -%P -%I De zetspiegel kan (tijdelijk) worden aangepast met het -%I commando: -%I -%I \paslayoutaan[hoogte=] -%I -%I Men dient een positieve (+) of negatieve (-) maat op te -%I geven. De zethoogte blijft gelijk, maar de teksthoogte -%I wordt aangepast ten koste van de voethoogte. Eventueel -%I kan 'max' worden opgegeven. -%I -%I Er kan een reeks aanpassingen worden opgegeven: -%I -%I \paslayoutaan[nr,nr,nr,...][hoogte=] -%I -%I Hierbij is staat nr voor het paginanummer, dat wil -%I zeggen: het volgnummer in de tekst. -%I -%I Bij voorlopige versies wordt onderaan de pagina de -%I aanpassing weergegeven. -%P -%I Beeldmerken en achtergronden worden uit oogpunt van -%I verwerkingssnelheid niet vaker berekend dan nodig. Mocht -%I om een of andere reden een beeldmerk of achtergrond niet -%I overeenkomen komen met de wensen, dan kan herberekenen -%I worden geforceerd met: -%I -%I \stellayoutin[reset] -%P -%I Het papierformaat is in te stellen met het commando -%I -%I \stelpapierformaatin[DIN-formaat] -%I -%I Mogelijke DIN-formaten zijn A4 tot en met A9. De -%I afmetingen van een A4 zijn: -%I -%I breedte : 21.0cm = 8.18in = 589pt -%I hoogte : 29.7cm = 11.58in = 834pt -%I -%I Optioneel kan men het printer papierformaat instellen door -%I een tweede argument mee te geven. Standaard wordt -%I uitgegaan van A4. -%I -%I \stelpapierformaatin[A5][A4] -%I -%P Men kan zelf een papierformaat definieren met -%I -%I \definieerpapierformaat [naam] [hoogte=,breedte=] -%I -%I waarbij de offset betrekking heeft op dubbelzijdig zetten. - \ifx\stelpapierformaatin\undefined \let\stelpapierformaatin\relax \fi @@ -1352,6 +1409,8 @@ \def\dodostelpapierformaatin[#1][#2]% {\ifsecondargument + \xdef\herstelpapierformaat% + {\noexpand\stelpapierformaatin[#1][#2]}% \dostelpapierrichtingin{#1}\paperlandscape\paperrotation\paperreverse\papermirror \dostelpapierrichtingin{#2}\printlandscape\printrotation\printreverse\printmirror \def\docommando##1% @@ -1360,7 +1419,7 @@ \global\papierhoogte=\getvalue{\??pp##1\c!hoogte}% \calculatepaperoffsets{##1}% \xdef\papierformaat{##1}}}}% - \processcommalist[#1]\docommando + \processcommacommand[#1]\docommando \doifdefinedelse{\??pp#1\c!schaal} {\edef\papierschaal{\getvalue{\??pp#1\c!schaal}}} {\edef\papierschaal{1}}% @@ -1369,7 +1428,7 @@ {\global\printpapierbreedte=\getvalue{\??pp##1\c!breedte}% \global\printpapierhoogte=\getvalue{\??pp##1\c!hoogte}% \xdef\printpapierformaat{##1}}}}% - \processcommalist[#2]\docommando + \processcommacommand[#2]\docommando \ifnum\paperlandscape>0 \doglobal\swapdimens\papierbreedte\papierhoogte \fi @@ -1390,9 +1449,11 @@ \else\iffirstargument \stelpapierformaatin[#1][#2]% \else\ifx\papierformaat\undefined\else - \stelpapierformaatin[\papierformaat][\printpapierformaat]% + \herstelpapierformaat \fi\fi\fi} +\let\herstelpapierformaat\relax + \def\stelpapierformaatin% {\dodoubleempty\dostelpapierformaatin} @@ -1431,9 +1492,11 @@ \doifelse{\@@lybreedte}{\v!midden} {\global\zetbreedte=\papierbreedte \global\advance\zetbreedte by -\rugwit - \doifelsenothing{\@@lysnijwit} - {\global\advance\zetbreedte by -\rugwit} - {\global\advance\zetbreedte by -\@@lysnijwit}} + \scratchdimen=\@@lysnijwit\relax + \ifdim\scratchdimen=\!!zeropoint + \scratchdimen=\rugwit + \fi + \global\advance\zetbreedte by -\scratchdimen} {\doifelse{\@@lybreedte}{\v!passend} {\global\zetbreedte=\papierbreedte \global\advance\zetbreedte by -\rugwit @@ -1457,16 +1520,18 @@ {\doifelse{\@@lyhoogte}{\v!midden} {\global\zethoogte=\papierhoogte \global\advance\zethoogte by -\kopwit - \doifelsenothing{\@@lybodemwit} - {\global\advance\zethoogte by -\kopwit} - {\global\advance\zethoogte by -\@@lybodemwit}} + \scratchdimen=\@@lybodemwit\relax + \ifdim\scratchdimen=\!!zeropoint + \scratchdimen=\kopwit + \fi + \global\advance\zethoogte by -\scratchdimen} {\doifelse{\@@lyhoogte}{\v!passend} {\global\zethoogte=\papierhoogte \global\advance\zethoogte by -\kopwit \scratchdimen=\kopwit \advance\scratchdimen by -\bovenhoogte \advance\scratchdimen by -\bovenafstand - \ifdim\scratchdimen<\!!zeropoint + \ifdim\scratchdimen<\!!zeropoint \scratchdimen=\!!zeropoint \fi \global\advance\zethoogte by -\onderafstand @@ -1481,10 +1546,7 @@ \calculatehsizes \calculatevsizes \global\newlogostrue - \global\newbackgroundtrue - \setMPpagedata} - -\ifx\setMPpagedata\undefined \let\setMPpagedata\relax \fi + \global\newbackgroundtrue} \def\checklayout% {\doifsomething{\@@lyregels} @@ -1590,23 +1652,6 @@ \def\paslayoutaan% {\dodoubleempty\dopaslayoutaan} -%I n=Margeblokken -%I c=\startmargeblok,\stelmargeblokkenin -%I -%I voorlopig: -%I -%I \stelmargeblokkenin -%I [plaats=,breedte,letter=,uitlijnen=, -%I voor=,na=,links=,rechts=,boven=,onder=,tussen=] -%I -%I plaats = inmarge, links, rechts, midden -%I links, rechts, voor, na = rule -%I boven, onder, tussen = skip -%I status= -%I -%I \startmargeblok -%I \stopmargeblok - \newif\ifmargeblokken \def\dostelmargeblokkenin[#1]% @@ -1632,10 +1677,8 @@ \def\dosomenextfloat[#1]% {\global\setbox\marginbox=\vbox {\hsize\@@mbbreedte - \unvbox\marginbox - \ifvoid\marginbox\else - \@@mbtussen - \fi + \unvcopy\marginbox + \ifvoid\marginbox\else\expandafter\@@mbtussen\fi \box\floatbox\filbreak}% \ifdim\ht\marginbox>\teksthoogte \dosavefloatinfo @@ -1735,42 +1778,6 @@ \egroup \@@mbna} -%I n=Uitstellen -%I c=\startuitstellen -%I -%I Zetcommando's kunnen in een wachtrij worden gezet en na -%I een pagina worden uitgevoerd. Dit gebeurt met het commando: -%I -%I \startuitstellen -%I ... -%I \stopuitstellen -%I -%I Dit kan handig zijn bij bijvoorbeeld grote tussen te voegen -%I figuren, tabellen, formulieren enz. -%I -%I \startuitstellen -%I \plaatsfiguur[pagina][]{...}{...} -%I \stopuitstellen -%I -%I Er kunnen meerdere commando's in de wachtrij worden -%I geplaatst. -%P -%I Het mechanisme werkt nog niet vlekkeloos. Zo wordt -%I nog gerekend met waarden van de vorige pagina. Dit heeft -%I bijvoorbeeld als gevolg dat figuren kunnen worden -%I opgespaard. -%I -%I Het kan gebeuren dat een (te) groot figuur er voor zorgt -%I dat ook andere figuren worden verplaatst. De volgorde -%I blijft immers gehandhaafd. In dat geval kan zo'n groot -%I figuur worden verplaatst naar de eerstvolgende voor de -%I handliggende pagina: -%I -%I \startuitstellen -%I \plaatsfiguur[pagina][]{...}{...} -%I \pagina -%I \stopuitstellen - \newcounter\nofpostponedblocks \newif\ifinuitstellen @@ -1825,7 +1832,7 @@ \def\dostelsubpaginanummerin[#1]% {\doifelse{#1}{\v!reset} - {\resetnummer[\s!subpage]} + {\resetsubpaginanummer} % \resetnummer[\s!subpage] {\getparameters[\??sn][#1]% \processaction [\@@snstatus] @@ -2052,7 +2059,7 @@ \fi} \def\myshipout#1% - {\voorpagina + {\voorpagina % voor de pagebody dus ! \dontshowcomposition \ifarrangingpages \actualarrange @@ -2280,8 +2287,10 @@ \ifbottomnotes \ht0=\!!zeropoint \fi +%% \setbox0= % todo, there must be a faster way to kill funny depths \vbox to \teksthoogte {\box0\box2\ifbottomnotes\else\vfill\fi}% +%% \dp0=\!!zeropoint \box0 % new \egroup} \def\dodummypageskip#1% @@ -2347,6 +2356,7 @@ \hss}% new \ht0=\teksthoogte \wd0=\zetbreedte +\dp0=\!!zeropoint % new, maybe a reason for small shifts \ifshowgrid \setgridbox2\zetbreedte\teksthoogte \hbox{\color[red]{\box2}\hskip-\zetbreedte\box0}% @@ -2662,8 +2672,8 @@ {\getallmarks \the\everypagebody \startcolorpage - \gotonextsubpage - \dontshowboxes + \gotonextsubpage % nog eens: als in pagina (tbv standaard opmaak) + \dontshowboxes % dan hier blokkeren en verderop resetten \naastpagina \checkreferences \checkmargeblokken @@ -2763,31 +2773,10 @@ \def\dooutput% {\finaloutput\unvbox\normalpagebox} +\maxdeadcycles=1000 + \output={\dooutput} -%I n=Beeldmerken -%I c=\definieerbeeldmerk,\plaatsbeeldmerken -%I -%I In het hoofd of in de voet kan een logo worden gezet met -%I het commando: -%I -%I \plaatsbeeldmerken[naam] -%I -%I Plaatsen kan dan ook pas nadat een beeldmerk is gedefinieerd: -%I -%I \definieerbeeldmerk[naam][lokatie][plaats][commando=,status=] -%I -%I waarbij status 'start' of 'stop' kan zijn. In geval van -%I 'start' wordt op elke bladzijde het logo geplaatst. -%I -%I Mogelijke lokaties zijn 'boven', 'hoofd', 'voet' en 'onder' en -%I als plaats kan worden opgegeven 'linkerrand', 'linkermarge', -%I 'links', 'midden', 'rechts', 'rechtermarge' en 'rechterrand'. -%I -%I Logo's worden boven, onder of in de hoofd- of voetregel gezet, -%I zo hoog of laag mogelijk. Verdere positionering zal dus in -%I het commando moeten plaatsvinden! - \newbox\leftlogos \newbox\rightlogos @@ -2930,38 +2919,6 @@ {\copy\rightlogos}% \fi} -%I n=Spatiering -%I c=\stelspatieringin -%I c=\omlaag,\opelkaar,\spatie,\vastespaties -%I -%I De ruimte na interpunctie worden ingesteld met: -%I -%I \stelspatieringin[instelling] -%I -%I waarbij de volgende instellingen mogelijk zijn: -%I -%I ruim flexibele ruimte na interpunctie -%I opelkaar een spatie na interpunctie -%I -%I Bij een smalle layout levert de instelling 'ruim' minder -%I in de marge uitstekende (niet af te breken) woorden op. -%I -%P -%I Andere commando's zijn: -%I -%I \omlaag[afstand] een vaste afstand omlaag -%I \opelkaar ruimte tussen regels weghalen -%I -%I \spatie een (harde) spatie -%I \geenspatie geen vorige/volgende spatie -%I -%I \hfil \hfill \hfilll opvullen met horizontaal wit -%I \vfil \vfill \vfilll opvullen met vertikaal wit -%I -%I \strut karakter-box zonder breedte -%I -%I \vastespaties geeft ~ de breedte van een cijfer - % \frenchspacing leidt soms tot afbreken tussen -, vandaar % de variant \newfrenchspacing. @@ -3010,51 +2967,6 @@ {\nointerlineskip \vskip#1 } -%I n=Witruimte -%I c=\stelwitruimtein,\witruimte,\geenwitruimte -%I c=\startopelkaar,\startvanelkaar -%I c=\startregelcorrectie,\corrigeerwitruimte -%I -%I De afstand tussen paragrafen is in te stellen met: -%I -%I \stelwitruimtein[maat] -%I -%I In te vullen op de plaats van 'maat' (12pt, 1cm) of een -%I van de aanduidingen klein, middel of groot. Als niets -%I wordt meegegeven, dus alleen \stelwitruimtein, dan -%I wordt de ingestelde witruimte aangepast aan het formaat -%I letter. -%I -%I Voor elke lege regel in de ASCII-file voegt TEX de -%I ingestelde witruimte tussen. -%I -%I Het commando \witruimte dwingt witruimte af en het -%I commando \geenwitruimte maakt witruimte ongedaan. -%I -%I Behalve met de hier beschreven witruimte-commando's is de -%I witruimte tussen paragrafen te be‹nvloeden met behulp van -%I de elders beschreven blanko-commando's. -%P -%I Een stuk tekst kan zonder witruimte worden gezet door het -%I tussen de volgende commando's op te nemen: -%I -%I \startopelkaar -%I \stopopelkaar -%I -%I Waarbij een optioneel argument [blanko] mogelijk is. De -%I tegenhanger hiervan is: -%I -%I \startvanelkaar -%I \stopvanelkaar -%P -%I TeX handelt de interlinie van een (omlijnde) box of een -%I rule anders af dan van een regel tekst. In dergelijke -%I gevallen kan de volgende constructie worden gebruikt: -%I -%I \startregelcorrectie -%I \omlijnd{tekst} -%I \stopregelcorrectie - \newskip\tussenwit \tussenwit=\!!zeropoint @@ -3246,27 +3158,6 @@ \stopbaselinecorrection}% \vbox} -%I n=Regelafstand -%I c=\stelinterliniein -%I -%I De regelafstand is in te stellen met het commando: -%I -%I \stelinterliniein[factor] -%I -%I Invulmogelijkheden voor 'factor' zijn: klein (1.00), -%I middel (1.25), groot (1.50) of een getal. OOk kan -%I aan of uit worden opgegeven. -%I -%I Als het commando zonder [factor] wordt gegeven, dan -%I worden de interlinie aangepast aan het formaat van het -%I actuele letterformaat. Een aan het formaat aangepaste -%I interlinie kan ook worden ingesteld met: -%I -%I \stelinterliniein[reset,factor] -%I -%I In z'n eenvoudigste vorm \stelinterliniein wordt de -%I interlinie aangepast aan het formaat letter. - %D There are two ways to influence the interline spacing. The %D most general and often most consistent way is using %D @@ -3323,11 +3214,12 @@ \let\@@itdiepte=\strutdepthfactor \else \let\strutheightfactor=\@@ithoogte - \let\strutdepthfactor =\@@itdiepte + \let\strutdepthfactor=\@@itdiepte \fi - \let\normallineheight=\@@itregel - \let\topskipfactor =\@@itboven - \let\maxdepthfactor =\@@itonder + \let\minimallinedistance=\@@itafstand + \let\normallineheight=\@@itregel % let ! ! ! ! ! ivm ex + \let\topskipfactor=\@@itboven + \let\maxdepthfactor=\@@itonder \setfontparameters % redundant \setstrut \updateraggedskips} % yes indeed {\processallactionsinset % \regelwit = dummy ! @@ -3346,65 +3238,6 @@ \definecomplexorsimple\stelinterliniein -%I n=Blanko -%I c=\blanko,\geenblanko,\stelblankoin -%I c=\startregelcorrectie -%I -%I Behalve met de hier beschreven blanko-commando's is de -%I witruimte tussen paragrafen te be‹nvloeden met behulp van -%I de elders beschreven witruimte-commando's. -%I -%I Het commando -%I -%I \blanko[sprong] -%I -%I voegt witruimte tussen paragrafen toe. -%I -%I Mogelijke instellingen voor 'sprong' zijn: terug, klein, -%I middel, groot. Per blanko is elke combinatie van -%I instellingen toegestaan. Ook een veelvoud van een instelling -%I is mogelijk. Enkele voorbeelden: -%I -%I \blanko[terug,3*groot] -%I \blanko[klein,middel] -%P -%I Naast de genoemde instellingen zijn enkele bijzondere -%I instellingen mogelijk: -%I -%I wit tussenvoegen van \witruimte -%I geenwit terugspringen van \witruimte -%I blokkeer overslaan van de volgende \blanko -%I reset opheffen van \blanko[blokkeer] -%I forceer afdwingen van een blanko (bovenaan) -%I -%I Ook deze instellingen zijn in combinatie met andere te -%I gebruiken. Een voorbeeld: \blanko[forceer,wit,2*middel]. -%I -%I Het commando \blanko (zonder instelling) is gelijk aan -%I \blanko[groot]. -%I -%I Het commando \geenblanko maakt het commando \blanko -%I ongedaan. -%P -%I Met het commando's -%I -%I \stelblankoin[maat] -%I -%I is het mogelijk de spronggrootte in te stellen. De maat -%I kan worden opgegeven in getallen en eenheden (12pt, 1cm). -%I De standaard instellingen krijgt met met 'normaal', -%I regelafstanden met 'regel'. -%I -%I Het commando \stelblankoin (zonder argument) past de sprong -%I aan het formaat letter aan. -%P -%I Rond omlijnde tekst, of algemener: rond lijnen, wordt -%I geen witruimte gegenereerd. Wil men dit wel, dan dient men -%I de betreffende tekst te omringen met: -%I -%I \startregelcorrectie -%I \stopregelcorrectie - % In earlier versions \type{\bigskipamount} was % \type{\ht\strutbox} and the stretch was plus or minus % \type{.4\dp\strutbox}. Don't ask me why. The most recent @@ -3528,6 +3361,7 @@ \par \ifvmode \ifblankoforceer\ifdim\prevdepth>\!!zeropoint\else + % -1000pt signals top of page or column (\ejectcolumn) \vbox{\strut}\kern-\lineheight \fi\fi \ifblankoblokkeer @@ -3763,34 +3597,15 @@ \noexpand\blankoflexibelfalse \fi}} +\def\inhibitblank% the fast, local way + {\endgraf\ifvmode\prevdepth\newprevdepth\fi} + %D Now. \definieerblanko [\s!default] [\v!wit] -%I n=Inspringen -%I c=\inspringen,\nietinspringen,\welinspringen -%I c=\stelinspringenin -%I -%I Het inspringen van de eerste regel van een paragraaf -%I wordt ingesteld met het commando: -%I -%I \inspringen[parameter] -%I -%I waarbij als parameter kan worden meegegeven: -%I -%I niet de volgende paragraaf niet inspringen -%I nooit de volgende paragrafen niet inspringen -%I altijd de volgende paragrafen inspringen -%I -%I De mate van inspringen wordt ingesteld met: -%I -%I \stelinspringenin[maat] -%I -%I waarbij maat staat voor een TeX-maat of het woord klein, -%I middel, groot of geen. - \let\currentvoorwit=\empty \newdimen\voorwit @@ -3834,37 +3649,6 @@ \def\nietinspringen{\inspringen[\v!nee,\v!volgende]} \def\welinspringen {\inspringen[\v!ja,\v!eerste]} -%I n=Positioneren -%I c=\startpositioneren,\stelpositionerenin -%I -%I Er kan (binnen zekere grenzen) gepositioneerd worden met -%I de commando's: -%I -%I \startpositioneren -%I \stoppositioneren -%I -%I met daartussen -%I -%I \positioneer(x,y){...} -%I -%I waarbij x en y alleen getallen worden ingevuld. Ongewenste -%I spaties moeten zonodig met worden voorkomen met een %-teken. -%P -%I Een en ander kan worden ingesteld met: -%I -%I \stelpositionerenin[eenheid=,factor=,schaal=,xstap=, -%I ystap=,xoffset=,yoffset=,offset=] -%I -%I Standaard is de eenheid cm en de factor 1. Mogelijke -%I stapaanduidingen zijn 'absoluut' en 'relatief'. Deze -%I instellingen kunnen \resetpositioneren worden hersteld. -%I -%I Als men negatieve coordinaten (of een negatieve offset) -%I gebruikt, dan kan het soms wenselijk zijn het nulpunt te -%I laten samenvallen met de linkerbovenhoek van de omringende -%I box. In dat geval kan met offset=nee instellen. De negatieve -%I posities vallen in dat geval buiten de box. - % Het gebruik van \skip's spaart \dimen's. \newskip\xpositie @@ -3924,7 +3708,7 @@ \resetpositioneren \def\stelpositionerenin% - {\resetpositioneren% + {\resetpositioneren \dodoubleargument\getparameters[\??ps]}% % \def\positioneer(#1,#2)#3% \nextbox @@ -3981,50 +3765,32 @@ \def\dopositioneer[#1]#2(#3,#4)% {\dowithnextbox {\bgroup - \stelpositionerenin[#1]% + \getparameters[\??ps][#1]% \dontcomplain \berekenpositioneren{#3}{\@@psxstap}{\xpositie} {\@@psxoffset}{\wd\nextbox}{\xafmeting}{\xoffset} {\@@psxschaal}{\@@psxfactor}% - \scratchdimen=\ht\nextbox \advance\scratchdimen \dp\nextbox + \scratchdimen=\ht\nextbox \advance\scratchdimen by \dp\nextbox \berekenpositioneren{#4}{\@@psystap}{\ypositie} {\@@psyoffset}{\scratchdimen}{\yafmeting}{\yoffset} {\@@psyschaal}{\@@psyfactor}% - \setbox\nextbox=\hbox - {\hskip\xpositie\lower\ypositie\box\nextbox}% - \smashbox\nextbox - \box\nextbox + \vbox to \!!zeropoint % kan beter. + {\vskip\ypositie + \hbox to \!!zeropoint + {\hskip\xpositie + \box\nextbox + \hskip-\xpositie}% + \vskip-\ypositie}% + \xdef\dopoppositioneer% + {\xpositie=\the\xpositie + \ypositie=\the\ypositie + \noexpand\def\noexpand\@@psxoffset{\@@psxoffset}% + \noexpand\def\noexpand\@@psyoffset{\@@psyoffset}}% \egroup + \dopoppositioneer \ignorespaces} \hbox} -%I n=Kolommen -%I c=\stelkolommenin,\startkolommen,\kolom -%I -%I Tekst kan in kolommen worden gezet. Het aantal kolommen -%I en het al dan niet opnemen van een vertikale lijn kan -%I worden ingesteld. -%I -%I \stelkolommenin[n=,lijn=,tolerantie=,afstand=, -%I balanceren=,uitlijnen=,hoogte=] -%I -%I Hierin staat n voor het aantal kolommen. Aan lijn -%I kan aan of uit worden toegekend. Aan voor en na kan -%I een commando worden toegekend, bijvoorbeeld ~~. -%I -%I Mogelijke waarden voor de tolerantie zijn: zeerstreng, -%I streng, soepel en zeersoepel. -%P -%I De in kolommen te zetten tekst moet worden opgenomen -%I tussen de commando's: -%I -%I \startkolommen -%I \stopkolommen -%I -%I Er wordt naar een nieuwe kolom gesprongen met: -%I -%I \kolom - \newif\ifbinnenkolommen \newif\if@@klbalanceren \newif\if@@kluitlijnen @@ -4143,30 +3909,60 @@ \definecomplexorsimpleempty\startkolommen +%\def\kolom% +% {\ifbinnenkolommen +% \ejectcolumn +% \fi} + +\def\preferredejectcolumn% + {\goodbreak} + +% \def\forcedejectcolumn% +% {\vfil +% \penalty-200 +% \prevdepth=-1000pt % signals top of column to \blanko +% \vfilneg} + +\def\forcedejectcolumn% + {\par % todo: since + {\testrulewidth\!!zeropoint\ruledvskip\teksthoogte} % we misuse a + \penalty-200 % side effect + \vskip-\teksthoogte + \prevdepth=-1000pt} % signals top of column to \blanko + \def\kolom% + {\dosingleempty\dokolom} + +\def\dokolom[#1]% {\ifbinnenkolommen - \ejectcolumn + \iffirstargument + \processaction + [#1] + [ \v!ja=>\forcedejectcolumn, + \v!voorkeur=>\preferredejectcolumn]% + \else + \preferredejectcolumn + \fi \fi} -%I n=Kader -%I c=\toonkader,\tooninstellingen,\toonlayout -%I -%I Met behulp van de drie commando's: -%I -%I \toonkader -%I \tooninstellingen -%I -%I kan de zetspiegel zichtbaar worden gemaakt, of eventueel -%I met: -%I -%I \toonkader [rand,tekst,marge] -%I -%I Het commando: -%I -%I \toonlayout -%I -%I genereert enkele (linker en rechter) pagina's. +%D Undocumented and still under development. + +\def\startsimplecolumns% + {\dosingleempty\dostartsimplecolumns} + +\def\dostartsimplecolumns[#1]% + {\bgroup + \getparameters[\??kl][\c!breedte=\hsize,\c!afstand=1em,\c!n=2,#1]% + \setrigidcolumnhsize\@@klbreedte\@@klafstand\@@kln + \setbox\scratchbox=\vbox\bgroup + \forgetall} % \blanko[\v!blokkeer] +\def\stopsimplecolumns% + {\removebottomthings + \egroup + \rigidcolumnbalance\scratchbox + \egroup} + \def\dotoonkader[#1][#2]% {\ifsecondargument \stelachtergrondenin @@ -4410,58 +4206,6 @@ \herhaal[4*\tooninstellingen\pagina] \egroup} -%I n=Uitlijnen -%I c=\startuitlijnen,\steluitlijnenin,\steltolerantiein -%I c=\regellinks,\regelrechts,\regelmidden, -%I c=\woordrechts -%I -%I De regelval kan worden ingesteld met: -%I -%I \steluitlijnenin[instelling] -%I -%I waarbij de volgende instellingen mogelijk zijn: -%I -%I links links niet uitvullen -%I midden links/rechts niet uitvullen = centreren -%I rechts rechts niet uitvullen -%I breedte uitvullen over breedte (default) -%I beide wisselend (afhankelijk bladzijde) -%I onder onderkant niet uitgelijnd (default) -%I hoogte uitvullen over hoogte (op baseline) -%I regel uitvullen over hoogte (binnen kader) -%I reset uitvullen over breedte en hoogte -%I -%I In combinatie met links, midden en rechts kan 'ruim' -%I worden opgegeven. -%P -%I Aanvullend zijn de volgende commando's beschikbaar: -%I -%I \startuitlijnen[instelling] -%I \stopuitlijnen -%I -%I Een regel kan op verschillende manieren worden uitgelijnd -%I met behulp van de commando's: -%I -%I \regellinks{tekst} -%I \regelrechts{tekst} -%I \regelmidden{tekst} -%I -%I Aan het eind van een paragraaf kan een stukje tekst -%I worden geplaatst met: \woordrechts{ziezo} -%P -%I De tolerantie waarbinnen het uitlijnen plaatsvindt kan -%I worden ingesteld met: -%I -%I \steltolerantiein[instelling] -%I -%I Mogelijke waarden zijn: zeerstreng, streng, soepel en -%I zeersoepel. -%I -%I Standaard heeft de tolerantie betrekking op horizontaal -%I uitlijnen. Vertikaal kan het uitlijnen worden beinvloed -%I door het trefwoord 'vertikaal' mee te geven. Standaard -%I geldt [vertikaal,streng] en [horizontaal,zeerstreng]. - \definetwopasslist{\s!paragraph} \newcounter\nofraggedparagraphs @@ -4493,6 +4237,8 @@ #2\relax \fi} +% \let\doifrightpageelse\setraggedparagraphmode + % De onderstaande macro's zijn opgenomen in Plain TeX. % % \def\raggedright% @@ -4511,28 +4257,52 @@ % % en worden hieronder wat aangepast. +% the three boolean will become obsolete some day in favour +% of \bottomraggedness + +\chardef\bottomraggedness=0 % 0=ragged 1=normal/align 2=baseline + +\def\bottomalignlimit{3\lineheight} + \newif\ifn@rmalbottom \newif\ifr@ggedbottom \newif\ifb@selinebottom -\def\normalbottom% - {\n@rmalbottomtrue - \r@ggedbottomfalse +\def\raggedbottom% + {\chardef\bottomraggedness=0 + \n@rmalbottomfalse + \r@ggedbottomtrue \b@selinebottomfalse \settopskip} -\def\raggedbottom% - {\n@rmalbottomfalse - \r@ggedbottomtrue +\def\alignbottom% + {\chardef\bottomraggedness=1 + \n@rmalbottomtrue + \r@ggedbottomfalse \b@selinebottomfalse \settopskip} \def\baselinebottom% - {\n@rmalbottomfalse + {\chardef\bottomraggedness=2 + \n@rmalbottomfalse \r@ggedbottomfalse \b@selinebottomtrue \settopskip} +\let\normalbottom=\alignbottom % downward compatible + +% so, the new one will be +% +% \chardef\bottomraggedness=0 % 0=ragged 1=normal/align 2=baseline +% +% \def\bottomalignlimit{3\lineheight} % will be settable +% +% \def\raggedbottom {\chardef\bottomraggedness=0 \settopskip} +% \def\alignbottom {\chardef\bottomraggedness=1 \settopskip} +% \def\baselinebottom{\chardef\bottomraggedness=2 \settopskip} +% +% \let\normalbottom =\alignbottom + % \hyphenpenalty = ( 2.5 * \hsize ) / \raggedness % \tolerance >= 1500 % was 200 % \raggedness = 2 .. 6\korpsgrootte @@ -4543,14 +4313,33 @@ \def\rightraggedness {2\bodyfontsize} \def\middleraggedness {6\bodyfontsize} +%D More hyphenation control, will be combined with align +%D setup. + +\def\nohyphens% + {\ifx\dohyphens\relax + \edef\dohyphens% + {\hyphenpenalty\the\hyphenpenalty + \exhyphenpenalty\the\exhyphenpenalty\relax}% + \fi + \hyphenpenalty\@M + \exhyphenpenalty\@M} + +\let\dohyphens\relax + +%D To prevent unwanted side effects, we also have to check +%D for hyphens here: + \def\setraggedness#1% {\ifnum\tolerance<1500\relax % small values have \tolerance=1500\relax % unwanted side effects - \fi % - \spaceskip=2.5\hsize % we misuse these - \xspaceskip=#1\relax % registers for temporary - \divide\spaceskip by \xspaceskip % storage; they are - \hyphenpenalty=\spaceskip} % changed anyway + \fi + \spaceskip=2.5\hsize % we misuse these registers + \xspaceskip=#1\relax % for temporary storage; + \divide\spaceskip by \xspaceskip % they are changed anyway + \ifx\dohyphens\relax + \hyphenpenalty=\spaceskip % \else no hyphens is active + \fi} \let\updateraggedskips\relax @@ -4639,6 +4428,10 @@ \v!rechts=>\if!!donea\veryraggedright \else\raggedright \fi, \v!midden=>\if!!doneb\raggedwidecenter\else \if!!donea\veryraggedcenter\else\raggedcenter\fi\fi, + \v!hangend=>\enableprotruding, + \v!niethangend=>\disableprotruding, + \v!afgebroken=>\dohyphens, +\v!nietafgebroken=>\nohyphens, \v!reset=>\notragged\normalbottom]} \def\dosteluitlijnenin[#1]% @@ -4726,90 +4519,6 @@ \def\woordrechts% {\groupedcommand{\hfill\hbox}{\parfillskip\!!zeropoint}} -%I n=Margeteksten -%I c=\inmarge,\inlinker,\inrechter,\stelinmargein -%I c=\margetitel,\figuurinmarge -%I c=\oplinker -%I -%I Een paragraaf kan worden ingeluid met een tekst in -%I de marge: -%I -%I \inmarge{tekst} -%I \inlinker{tekst} -%I \inrechter{tekst} -%I -%I Met \\ kan binnen een margetekst naar een volgende regel -%I worden gesprongen. -%P -%I Het onderstaande commando kan gebruikt worden om een -%I paragraafaanduiding in de marge te plaatsen. Het commando -%I moet aan het begin van de paragraaf staan. Er wordt -%I gecontroleerd of een en ander nog op de bladzijde past. -%I -%I \margetitel{tekst} -%I -%I Tussen \margetitel{tekst} en de volgende alinea mag, -%I omwille van de overzichtelijkheid, een lege regels staan. -%I Als dit commando wordt gebruikt na een commando als -%I \paragraaf, kan het controlemechanisme leiden tot een -%I ongewenste overgang naar een nieuwe bladzijde. In dat -%I geval kan beter het volgende commando worden gebruikt. -%I -%I \margewoord{tekst} -%I -%I Dit commando komt overeen met \inmarge, alleen is bij -%I \margewoord de lege regel toegestaan. -%P -%I Er kan eventueel voor {tekst} een [referentie] worden -%I meegegeven. In dat geval kan worden verwezen naar het -%I paginanummer waarop het margewoord staat. -%I -%I Als TeX twijfelt in welke marge het woord moet staan, is -%I een tweede verwerkingsslag nodig. Als een margewoord bij -%I herhaling verkeerd wordt geplaatst, dan kan het -%I automatisme worden verstoord door [+] mee te geven. Een -%I margewoord kan lager worden gezet met [laag]. Combinaties -%I kunnen ook: -%I -%I \margewoord[+,laag][referentie]{woord} -%P -%I De wijze van weergeven kan worden ingesteld met het -%I commando: -%I -%I \stelinmargein[letter=,plaats=,voor=,na=,uitlijnen=] -%I -%I Als plaats kan links, rechts of beide worden meegegeven. In -%I het laatste geval hangt de plaats af van het -%I enkel/dubbelzijdig zetten. -%I -%I Uitlijnen kent twee instellingen: 'ja' en 'nee'. Inhet -%I eerste geval (default) worden de margewoorden tegen de -%I kantlijn geplaatst. -%P -%I Vooruitlopend op meer commando's is er al vast het -%I commando: -%I -%I \oplinker{tekst} -%I -%I Dit commando kan bijvoorbeeld worden gebruikt binnen -%I een midden-uitgelijnde tekst. Het commando is nog niet -%I definitief en robuust. - -% %P -% %I Aanvullend zijn commando's beschikbaar om figuren in -% %I de marge te plaatsen: -% %I -% %I \figuurinmarge{figuur} -% %I \figuurinlinker{figuur} -% %I \figuurinrechter{figuur} - -%T n=margetitel -%T m=mar -%T a=m -%T -%T \margetitel{?} -%T - \newif\iflowinmargin \def\stelinmargein% @@ -4856,6 +4565,11 @@ \ifnum\margetekstnummer=0 \def\margetekstnummer{#2}% \fi +\doifnumberelse{\margetekstnummer} + {\ifnum\margetekstnummer>25 % to be translated + \writestatus{\m!systems}{potential margin stack overflow (\margetekstnummer)}% + \fi} + {}% \processaction [\getvalue{\??im\margetekstnummer\c!uitlijnen}] [ \v!ja=>\setvalue{\??im\margetekstnummer\c!uitlijnen}{#2}, @@ -4925,7 +4639,16 @@ \ht0=\!!zeropoint \dp0=\!!zeropoint \gdef\margestrutheight{\the\ht\strutbox}% - \vadjust{\box0}} + %\vadjust{\box0}} % fails in high math lines, let it be + %\hbox{\lower\dp\strutbox\box0}} % alas, wrong lapping, therefore useless + \dopositionmarginbox0} + +%D This approach permits us to implement a better mechanism +%D later. + +\ifx\dopositionmarginbox\undefined + \def\dopositionmarginbox#1{\vadjust{\box#1}} +\fi \def\doinlinker#1% {\doplacemargintext @@ -5037,6 +4760,41 @@ \expandafter\doflushmargincontents % speed up the \fi scan by \fi} % using a \do.. +% \def\doflushmargincontents% % links + rechts +% {\bgroup +% \forgetall +% \global\marginheight\!!zeropoint +% \dorecurse{\margincontent} +% {\bgroup +% \edef\margetekstafstand {\getvalue{\??im\recurselevel\c!afstand}}% +% \edef\margetekstregels {\getvalue{\??im\recurselevel\c!regel}}% +% \edef\margetekstscheider{\getvalue{\??im\recurselevel\c!scheider}}% +% \let\margetekstnummer=\recurselevel +% \getvalue{\??im\recurselevel}% +% \global\setvalue{\??im\recurselevel}{}% +% \egroup}% +% \ifdim\marginheight>\lineheight % This is something real dirty! +% \advance\marginheight by \pagetotal +% \advance\marginheight by \lineheight % a sort of bonus +% \ifdim\marginheight>\pagegoal +% \xdef\restoreinterlinepenalty% +% {\global\let\restoreinterlinepenalty\relax +% \global\interlinepenalty=\the\interlinepenalty}% +% \global\interlinepenalty=10000 +% \fi +% \else % We need the above because interlinepenalties overrule vadjusted \nobreaks. +% %\vadjust +% % {\forgetall +% % \global\advance\marginheight by \lineheight +% % \global\divide\marginheight by \lineheight +% % \dorecurse{\number\marginheight} +% % {\nobreak\vskip\lineheight}% +% % \kern-\number\marginheight\lineheight}% +% \vadjust{\nobreak}% +% \fi +% \doglobal\newcounter\margincontent +% \egroup} + \def\doflushmargincontents% % links + rechts {\bgroup \forgetall @@ -5050,7 +4808,14 @@ \getvalue{\??im\recurselevel}% \global\setvalue{\??im\recurselevel}{}% \egroup}% - \ifdim\marginheight>\lineheight % This is something real dirty! +\ifbinnenkolommen + \donetrue % how fuzzy +\else\ifdim\marginheight>\lineheight\relax + \donetrue % how dirty +\else + \donefalse % how needed +\fi\fi +\ifdone \advance\marginheight by \pagetotal \advance\marginheight by \lineheight % a sort of bonus \ifdim\marginheight>\pagegoal @@ -5072,6 +4837,8 @@ \doglobal\newcounter\margincontent \egroup} +% Some day: \definieermarkering[\v!margetitel] + \def\docomplexmargewoord#1#2#3% {\@EA\setgvalue\@EA{\@EA\??im\@EA\margincontent\@EA}\@EA {\@EA\stelinmargein\@EA[\margincontent][]% see next macro @@ -5247,40 +5014,6 @@ {\doquintupleempty\doinmarge [\@@implaats][\woordinlinker][\woordinrechter]} -%I n=Paginanummer -%I c=\stelpaginanummerin,\stelsubpaginanummerin -%I -%I Het paginanummer kan worden ingesteld met het commando: -%I -%I \stelpaginanummerin[nummer=,status=] -%I -%I Het nummeren kan gedurende een of meerdere pagina's worden -%I stilgezet door in plaats van een nummer start, stop of -%I handhaaf mee te geven. -%I -%I Het paginanummer is oproepbaar met: -%I -%I \paginanummer -%I -%I en het totaal aantal paginanummers met: -%I -%I \totaalaantalpaginas -%P -%I Er zijn subnummers beschikbaar. De wijze van nummeren -%I wordt ingesteld met: -%I -%I \stelsubpaginanummerin[wijze=,status=] -%I -%I De status kan 'stop', 'start' of 'geen' zijn. In het -%I laatste geval wordt gewoon doorgenummerd, maar wordt het -%I nummer niet geplaatst. -%I -%I Standaard wordt 'perdeel' genummerd. De subnummers zijn -%I oproepbaar met: -%I -%I \subpaginanummer -%I \aantalsubpaginas - % Standaard is \count0 in Plain TeX de paginateller. Omwille % van de afhandeling van lokaal nummeren, definieren we % echter een eigen nummer. @@ -5292,12 +5025,17 @@ \c!status=\@@nmstatus, \c!start=1] +% \@@pnstatus global, but \@@nmstatus local and only start/stop + +\global\let\@@pnstatus\@@pnstatus + \def\dostelpaginanummerin[#1]% {\getparameters [\??pn] - [\c!status=\v!start, + [%\c!status=\v!start, \c!nummer=, #1]% + \global\let\@@pnstatus\@@pnstatus \doifsomething{\@@pnnummer} {\setnummer[\s!page]{\@@pnnummer}% \setuserpageno{\ruwenummer[\s!page]}}} @@ -5306,45 +5044,20 @@ {\dosingleargument\dostelpaginanummerin} \def\verlaagpaginanummer% - {\doif{\@@pnstatus}{\v!start} + {\doifinset{\@@pnstatus}{\v!start,\v!leeg,\v!geen} {\verlaagnummer[\s!page]% \setuserpageno{\ruwenummer[\s!page]}}} \def\verhoogpaginanummer% - {\processaction - [\@@pnstatus] - [ \v!start=>{\verhoognummer[\s!page]% - \setuserpageno{\ruwenummer[\s!page]}}, - \v!handhaaf=>{\doassign[\??pn][\c!status=\v!start]}]} + {\doifinset{\@@pnstatus}{\v!start,\v!leeg,\v!geen} + {\verhoognummer[\s!page]% + \setuserpageno{\ruwenummer[\s!page]}}% + \doifinset{\@@pnstatus}{\v!handhaaf,\v!leeg} + {\global\let\@@pnstatus\v!start}} \def\checkpagecounter% {\checknummer{\s!page}} -%I n=Pagina -%I c=\pagina -%I -%I Het volgende commando kan worden gebruikt om pagina's af -%I te dwingen of blokkeren: -%I -%I \pagina[instelling] -%I -%I Waarbij als instelling kan worden gegeven: -%I -%I ja een geforceerde paginaovergang met \vfill -%I opmaak een geforceerde paginaovergang zonder \vfill -%I nee bij voorkeur geen paginaovergang -%I voorkeur bij voorkeur de paginaovergang hier (3) -%I grotevoorkeur bij voorkeur de paginaovergang hier (7) -%I links ga naar een linker pagina -%I rechts ga naar een rechter pagina -%I leeg een lege pagina -%I blokkeer blokkeer ja ... grotevoorkeur (1 pagina) -%I reset het blokkering ja ... grotevoorkeur op -%I -%I Als geen instelling wordt meegegeven (\pagina), wordt een -%I overgang geforceerd. Als een nummer wordt meegegeven, wordt -%I naar de opgegeven pagina gegaan. - \newif\ifpaginageblokkeerd \paginageblokkeerdfalse @@ -5405,11 +5118,11 @@ \fi \fi}, \v!grotevoorkeur=>{\ifpaginageblokkeerd\else - \ifbinnenkolommen - \dosomebreak\goodbreak - \else - \testpagina[5][\!!zeropoint]% - \fi + \ifbinnenkolommen + \dosomebreak\goodbreak + \else + \testpagina[5][\!!zeropoint]% + \fi \fi}, \v!leeg=>{\ejectinsert \ejectpage @@ -5524,146 +5237,6 @@ \global\rightpagetrue \fi} -%I n=Hoofdteksten -%I c=\stelnummeringin -%I c=\stelhoofdtekstenin,\stelvoettekstenin,\stelhoofdin,\stelvoetin -%I c=\stelboventekstenin,\stelondertekstenin,\stelbovenin,\stelonderin -%I -%I Zogeheten hoofd- en/of voetteksten kan men instellen -%I met: -%I -%I \stelhoofdtekstenin [linker tekst] [rechter tekst] -%I \stelvoettekstenin [linker tekst] [rechter tekst] -%I -%I Bij dubbelzijdig zetten worden de linker en rechter -%I teksten gespiegeld. -%I -%I In plaats van een tekst kunnen de woorden 'hoofdstuk', -%I 'paragraaf' en 'deel' worden meegegeven. Ook kan het -%I woord 'datum' worden meegegeven. -%P -%I Als men op de even en oneven pagina's een andere tekst -%I wil hebben, dan kan men een tweede paar meegeven. In dat -%I geval zijn er dus vier argumenten: [][][][]. -%I -%I Als men in de marge of randen teksten wil, kan men dat -%I direct achter het commando aangeven: -%I -%I \stelhoofdtekstenin [lokatie] [links] [rechts] -%I \stelvoettekstenin [lokatie] [links] [rechts] -%I -%I Mogelijke lokaties zijn: tekst, marge en rand. -%P -%I In de tekst opgenomen commando's kunnen soms voor -%I problemen zorgen. Commando's kan men daarom laten -%I voorafgaan \geentest, bijvoorbeeld: -%I -%I \stelvoettekstenin[\geentest\lastigcommando][] -%I -%I Meestal geven commando's geen problemen. Wel moet men -%I oppassen met []. Accolades zijn hiervoor de oplossing: -%I -%I \stelvoettekstenin[{{\huidigedatum[mm,/,jj]}}][] -%I -%I of -%I -%I \stelvoettekstenin[\geentest{\huidigedatum[mm,/,jj]}][] -%P -%I De wijze van nummeren wordt gedefinieerd met: -%I -%I \stelnummeringin[variant=,plaats=,conversie=, -%I links=,rechts=,tekst=,tekstscheider=,nummerscheider, -%I wijze=,blok=,status=,letter=,<sectie>nummer=,commando=] -%I -%I De plaats van het nummer hangt af van het eerste -%I meegegeven argument: -%I -%I enkelzijdig dubbelzijdig -%I -%I links, rechts kantlijn (links of rechts) -%I marge marge (links of rechts) -%I midden midden -%I inlinker, inrechter inlinker, inrechter -%P -%I Met plaats geeft men tevens aan of het nummer in het hoofd -%I of in de voet komt {hoofd,midden}. Met 'nummerscheider' geeft -%I men aan wat er binnen een (eventueel) samengestelde nummer -%I als scheider wordt gezet, standaard: 2-3. Met 'tekstscheider' -%I geeft men aan wat er tussen het paginanummer en een hoofd- of -%I voettekst wordt gezet (in geval van plaatsen op de marge). -%I -%I Liefhebbers kunnen aan 'commando' een eigen commando om het -%I nummer te zetten meegeven. Dit eigen commando krijgt als -%I argument het paginanummer mee. -%I -%I Het is mogelijk een dubbelzijdige tekst met enkelzijdige -%I marges te zetten: -%I -%I \stelnummeringin[variant={enkelzijdig,dubbelzijdig}] -%I -%I In dit geval worden de hoofd- en voetregels dus wel -%I gespiegeld en hebben commando's als \pagina[rechts] betekenis. -%P -%I Als 'conversie' is mogelijk: cijfers, letters, Letters, -%I romeins en Romeins. Als 'status' kan 'start' of 'stop' -%I worden meegegeven. Op deze manier kan het aangeven van -%I een paginanummer worden aan- en uitgezet. -%I -%I Er kan per sectienummer (deelnummer, hoofdstuknummer enz.) -%I worden ingesteld of het zichtbaar is ('ja' of 'nee'). -%I -%I Mogelijke wijzen van nummeren zijn: perdeel of perhoofdstuk. -%P -%I Hoofd- en voetregels blijven achterwege of juist niet na het -%I commando: -%I -%I \geenhoofdenvoetregels -%I \welhoofdenvoetregels -%I -%I of na: -%I -%I \stelhoofdin[lokatie][linkerletter=,rechterletter=, -%I letter=,linkerbreedte=,rechterbreedte=,voor=,na=] -%I \stelvoetin[locatie][linkerletter=,rechterletter=, -%I letter=,linkerbreedte=,rechterbreedte=,voor=,na=] -%I -%I mogelijke lokaties zijn: tekst, marge en rand. Als [lokatie] -%I wordt wegelaten, dan wordt tekst verondersteld. -%I -%I Als de breedte wordt ingesteld, dan wordt de weergegeven -%I tekst zonodig ingekort en gevolgd door ... -%P -%I Het is mogelijk het plaatsen van hoofd- en voetregels -%I stop te zetten: -%I -%I \stelhoofdin[status=] -%I \stelvoetin[status=] -%I -%I Aan status kunnen de olgende aarden worden toegekend: -%I -%I geen de kop/voet vervalt (de tekst schuift omhoog) -%I leeg de kop/voet blijft 1 pagina leeg -%I hoog de kop/voet vervalt 1 pagina leeg (idem) -%I normaal de kop/voet wordt gezet -%I stop de kop/voet blijft vanaf nu leeg -%I start de kop/voet wordt vanaf nu weer gevuld -%I -%I Het is ook mogelijk bij \stelhoofdin en \stelvoetin als -%I parameters [voor=] en [na=] mee te geven. De toegekende -%I commando's worden in dat geval voor en na het hoofd en de -%I de voet uitgevoerd. -%P -%I Boven het hoofd en onder de voet is ook ruimte. Deze kan -%I worden gedefinieerd met vergelijkbare commando's: -%I -%I \stelboventekstenin[...][...][...] -%I \stelondertekstenin[...][...][...] -%I -%I \stelbovenin[...] -%I \stelonderin[...] -%I -%I \geenbovenenonderregels -%I \welbovenenonderregels % De onderstaande macro's lijken op het eerste gezicht vrij % ingewikkeld en omslachtig. Dit is het gevolg van een @@ -5717,8 +5290,8 @@ {\ConvertConstantAfter\doifelse{\v!paginanummer}{#6} {\@@plaatspaginanummer} {\ConvertConstantAfter\doifelse{\v!datum}{#6} - {\currentdate} - {\opeenregel\dolimitateteksten{#1#2#5}{#6}}}}}}% + {\currentdate} % #6{}{}{} -> {} needed for lookahead macros, like \uniqueMPgraphic + {\opeenregel\dolimitateteksten{#1#2#5}{#6{}{}{}}}}}}}% \egroup} \def\dodoteksten#1#2#3#4#5#6% @@ -5953,10 +5526,6 @@ \def\placepositionanchors{\vskip\teksthoogte} \fi -%\def\@@plaatspaginascheider% -% {\doif{\@@nmstatus}{\v!start}% -% {\@@nmtekstscheider}} - \def\@@nmin {} % kan vervallen (upward compatibility) \def\@@nmplaats {} % mag {plaats, in} zijn @@ -6068,11 +5637,13 @@ \egroup} \unexpanded\def\@@plaatspaginanummer% called in empty tests - {\doif{\@@nmstatus}{\v!start}% + %{\doif{\@@pnstatus}{\v!start} + {\doif{\@@nmstatus\@@pnstatus}{\v!start\v!start} {{\@@nmcommando{\doattributes\??nm\c!letter\c!kleur{\volledigepaginanummer}}}}} -\def\@@plaatspaginascheider% - {\doif{\@@nmstatus}{\v!start}% +\def\@@plaatspaginascheider% still used ? + %{\doif{\@@pnstatus}{\v!start}% + {\doif{\@@nmstatus\@@pnstatus}{\v!start\v!start} {\@@nmtekstscheider}} \def\userfolio% naast realfolio @@ -6081,47 +5652,38 @@ \def\pagenumber% {\userfolio} -\def\volledigepaginanummer% alleen voor paginanummers !! - {\@@nmlinks - \def\donexttrackcommando##1% - {\doifvalue{\??nm##1\v!nummer}{\v!ja} % v - {\ifnum\countervalue{\??se##1}>0\relax - \getvalue{##1\c!nummer}\@@nmnummerscheider - \fi}% - \doifsomething{\@@nmtekst} - {\@@nmtekst\@@nmnummerscheider}% - \donexttracklevel{##1}}% - \donexttrackcommando{\firstsection}% - \pagenumber - \@@nmrechts} +\def\pageprefixes% + {\def\donexttrackcommando##1% + {\doifvalue{\??nm##1\v!nummer}{\v!ja} % v + {\ifnum\countervalue{\??se##1}>0\relax + \getvalue{##1\c!nummer}\@@nmnummerscheider + \fi}% + \doifsomething{\@@nmtekst} + {\@@nmtekst\@@nmnummerscheider}% + \donexttracklevel{##1}}% + \donexttrackcommando{\firstsection}} + +\unexpanded\def\volledigepaginanummer% + {\doif{\@@nmstatus\@@pnstatus}{\v!start\v!start} + {\@@nmlinks\labeltexts{\v!paginanummer}{\pageprefixes\pagenumber}\@@nmrechts}} + +\unexpanded\def\plaatspaginanummer% + {\doif{\@@nmstatus\@@pnstatus}{\v!start\v!start} + {\labeltexts{\v!paginanummer}{\pagenumber}}} \def\translatednumber[#1::#2::#3]% {#3} -%I n=Selecteren -%I c=\soortpagina,\verwerkpagina,\koppelpagina -%I -%I Het is mogelijk pagina's te markeren en selectief te -%I verwerken. Markering vindt plaats met het commando: -%I -%I \soortpagina[aanduiding] -%I -%I en selecteren vindt plaats met: -%I -%I \verwerkpagina[aanduiding,...][instelling] -%I -%I waarbij de instelling 'ja' of 'nee' is en meerdere -%I aanduidingen worden gescheiden door een comma. -%P -%I Er kunnen commando's worden gekoppeld aan pagina's: -%I -%I \koppelpagina[aanduiding,...][voor=,na=,optie=] -%I -%I De opgegeven commando's worden voor respectievelijk na het -%I vrijgeven van de pagina uitgevoerd. - % hier nog uti blokkeren +% don't change this / test case: +% +% \setupbackgrounds[state=repeat] +% \setupbackgrounds[text][text][background=whatever] +% \couplepage[chapter][before={\defineoverlay[whatever][ON]}] +% \setuphead[chapter][before={\pagetype[chapter]}] +% \chapter{First} \page test \chapter{second} \page test + \newif\ifgeselecteerd \geselecteerdtrue @@ -6283,70 +5845,6 @@ \unexpanded\def\referencepagenumber[#1]% {\paginaprefix\??rf[#1]\translatednumber[#1]} -%I n=Regels -%I c=\startregels,\stelregelsin -%I c=\startregelnummeren,\stelregelnummerenin -%I c=\crlf -%I c=\startregel,\stopregel,\eenregel,\inregel -%I -%I Het is mogelijk de indeling in regels zoals die in de ruwe -%I tekst wordt gehanteerd af te dwingen. Er wordt in dit -%I geval niet ingesprongen. De regels worden gezet tussen de -%I twee commando's: -%I -%I \startregels -%I -%I ................................................... -%I -%I \stopregels -%P -%I Er kan met betrekking tot regels een en ander worden -%I ingesteld: -%I -%I \stelregelsin[voor=,na=,inspringen=] -%I -%I Aan 'inspringen' kan men 'ja', 'nee', 'even' of 'oneven' -%I toekennen. -%P -%I Het is mogelijk regels te nummeren door ze tussen de -%I volgende commando's te plaatsen: -%I -%I \startregelnummeren -%I \stopregelnummeren -%I -%I Als de regelovergangen moeten worden gehandhaafd, dan moet -%I \startregels voor \startregelnummeren worden gegeven. -%I -%I Het nummeren begint steeds opnieuw bij 1. Als verder moet -%I worden genummeren, dan kan achter \startregelnummeren -%I [verder] worden meegegeven. -%I -%I Standaard worden regels alinea-gewijs genummerd. Als men -%I over een paginagrens wil nummeren, dan moet [opelkaar] -%I worden meegegeven. -%P -%I De wijze van nummeren kan worden ingesteld met: -%I -%I \stelregelnummerenin[conversie=,start=,stap=,letter=, -%I plaats=,breedte=,letter=] -%I -%I Als 'conversie' kan worden meegegeven: cijfers, letters, -%I Letters, romeins of Romeins. Aan 'start' en 'stap' kan -%I een getal worden toegekend, aan 'letter' een trefwoord, -%I aan 'breedte' een maat (bij voorkeur in ex) en aan -%I 'plaats' het trefwoord 'inmarge' of 'intekst'. -%P -%I Er kan worden overgegaan naar een nieuwe regel met: -%I -%I \crlf -%P -%I .... testfase ... -%I -%I \startregel[tag] ... \stopregel[tag] -%I \eenregel[tag] -%I -%I \inregel[tag] - \newif\ifinregels \newif\ifregelnummersinmarge @@ -6416,6 +5914,10 @@ % het gebruik van \setlocalreference scheelt een hash entry +\def\dodoshowlinenumber% for use elsewhere, to be extended + {\doschrijfregelnummer + \global\advance\linenumber by 1\relax}% + \def\regelweergave% {\convertnumber\@@rnconversie\linenumber}% @@ -6677,49 +6179,6 @@ \doshowparagraphnumberA \fi} -%I n=Opmaak -%I c=\definieeropmaak,\testopmaak,\startstandaardopmaak -%I -%I Het is mogelijk een lege pagina op te maken. Hiertoe wordt -%I een blok gereserveerd met het commando: -%I -%I \definieeropmaak[naam][breedte=,hoogte=,voffset=, -%I hoffset=,pagina=,commandos=,voor=,na=,dubbelzijdig=] -%I -%I Hierbij wordt bij de eerste vier parameters een getal -%I meegegeven (5cm, 24pt, enz.). Met 'pagina' geeft men aan -%I of naar een nieuwe pagina wordt gesprongen (standaard -%I 'rechts'). Aan de 'commandos' kunnen commando's worden -%I toekend die tijdens de opmaak gelden. Aan de laatste twee -%I parameters toegekende commando's worden voor en na het -%I opmaken van de pagina uitgevoerd. De opgemaakte pagina -%I kan worden geselecteerd op naam. Met 'dubbelzijdig' geeft -%I men aan of er een lege achterkant moet worden opgemaakt -%I (standaard: ja). Dit geldt aleen bij dubbelzijdig zetten. -%I -%I Naast het bovenstaande commando is er het commando: -%I -%I \stelopmaakin[naam][instellingen] -%P -%I Na het geven van dit commando zijn twee commando's -%I beschikbaar: \startnaamopmaak en \stopnaamopmaak. Tussen -%I deze twee commando's kunnen zetopdrachten en teksten -%I worden opgenomen. Een en ander wordt op een lege bladzijde -%I gezet. -%I -%I Met het commando \testopmaak kunnen hulplijnen worden -%I opgeroepen. -%I -%I De commando's \startstandaardopmaak en \stopstandaardopmaak -%I maken het opmaken binnen de standaard-layout mogelijk. -%P -%I Eventueel kunnen de volgende twee commando's worden gebruikt -%I om een pagina op te maken met hoofd- en voetregels. -%I -%I \startopmaak -%I ..... -%I \stopopmaak - \newbox\opmaak \def\setopmaaklayout[#1]% @@ -6849,31 +6308,6 @@ \def\stelopmaakin% {\dodoubleargument\dostelopmaakin} -%I n=Smaller -%I c=\startsmaller,\stelsmallerin -%I -%I Een paragraaf kan smaller gezet worden met behulp van de -%I commando's: -%I -%I \startsmaller[afstand] -%I \stopsmaller -%I -%I Als maat wordt links, rechts, midden of een combinatie -%I hiervan meegegeven. Eventueel wordt geen afstand meegegeven. -%I -%I De linker, rechter of dubbele inspringing kan worden -%I ingesteld met: -%I -%I \stelsmallerin[links=,rechts=,midden=] -%I -%I Enkele voorbeelden van smelelr zetten zijn: -%I -%I \startsmaller[2*links,rechts] -%I \stopsmaller -%I -%I \startsmaller[midden,rechts] -%I \stopsmaller - \newskip\linkssmaller \newskip\rechtssmaller \newskip\middensmaller @@ -6918,33 +6352,6 @@ \def\stelsmallerin% {\dodoubleargument\getparameters[\??sl]} -%I n=Boxen -%I c=\definieerhbox,\cbox,\lbox,\rbox,\sbox -%I -%I Het is mogelijk een tekst in een blok met een vaste -%I omvang te zetten. Dit is vergelijkbaar met het opmaken -%I van een tabel. -%I -%I \hbox?{tekst} (horizontaal blok) -%I -%I De box wordt eerst gedefinieerd met: -%I -%I \definieerhbox[?][maat] -%I -%I Er kan een links, rechts of midden uitgelijnde \vbox worden -%I gezet met de commando: -%I -%I \lbox{tekst\\tekst\\tekst} of \lbox to <maat>{...} -%I \rbox{tekst\\tekst\\tekst} of \rbox to <maat>{...} -%I \cbox{tekst\\tekst\\tekst} of \cbox to <maat>{...} -%I -%I Het commando \\ forceert een overgang naar een nieuwe regel. -%I -%I Een (hoge) box kan een gedwongen hoogte gelijk aan die -%I van een strut krijgen met: -%I -%I \sbox{box} - \def\dodefinieerhbox[#1][#2]% {\setvalue{hbox#1}##1% {\hbox to #2{\begstrut##1\endstrut\hss}}} @@ -6986,159 +6393,55 @@ \s!default=>\let\raggedbox\hbox, \s!unknown=>\let\raggedbox\hbox]} -\def\dosetraggedcommand#1% ook ruim,rechts en zo - {\processaction +% \def\dosetraggedcommand#1% ook ruim,rechts en zo +% {\processaction +% [#1] +% [ \v!links=>\def\raggedcommand{\raggedleft}, +% \v!rechts=>\def\raggedcommand{\raggedright}, +% \v!midden=>\def\raggedcommand{\raggedcenter}, +% \v!nee=>\def\raggedcommand{\raggedright}, +% \v!normaal=>\let\raggedcommand\relax, +% \s!default=>\def\raggedcommand{\raggedcenter}, +% \s!unknown=>\let\raggedcommand\relax]} + +\def\dosetraggedcommand#1% + {\expanded{\dodosetraggedcommand{#1}}} + +\def\dodosetraggedcommand#1% + {\doifinsetelse{\v!ruim} {#1}{\!!doneatrue}{\!!doneafalse}% + \doifinsetelse{\v!breed}{#1}{\!!donebtrue}{\!!donebfalse}% + \let\raggedcommand\relax + \let\raggedtopcommand\empty + \let\raggedbottomcommand\empty + \!!donectrue + \ExpandFirstAfter\processallactionsinset [#1] - [ \v!links=>\def\raggedcommand{\raggedleft}, - \v!rechts=>\def\raggedcommand{\raggedright}, - \v!midden=>\def\raggedcommand{\raggedcenter}, + [ \v!links=>\if!!donea \def\raggedcommand{\veryraggedleft}% + \else \def\raggedcommand{\raggedleft}% + \fi + \!!donecfalse, % {\v!links,\v!midden} + \v!rechts=>\if!!donea \def\raggedcommand{\veryraggedright}% + \else \def\raggedcommand{\raggedright}% + \fi + \!!donecfalse, % {\v!rechts,\v!midden} + \v!midden=>\if!!donec + \if!!doneb \def\raggedcommand{\raggedwidecenter}% + \else\if!!donea \def\raggedcommand{\veryraggedcenter}% + \else \def\raggedcommand{\raggedcenter}% + \fi\fi + \!!donecfalse % {\v!midden,\v!midden} + \else + \let\raggedbottomcommand\vfilll % bonus, pretty strong + \let\raggedtopcommand \vfilll % used with \framed for + \fi, % instance in tables + \v!hoog=>\let\raggedbottomcommand\vfilll, % and since we lack a + \v!laag=>\let\raggedtopcommand \vfilll, % proper keyword, but + \v!laho=>\let\raggedbottomcommand\vfilll % we do support the + \let\raggedtopcommand \vfilll, % ugly laho (lohi) \v!nee=>\def\raggedcommand{\raggedright}, - \v!normaal=>\let\raggedcommand\relax, - \s!default=>\def\raggedcommand{\raggedcenter}, - \s!unknown=>\let\raggedcommand\relax]} + \v!ja=>\let\raggedcommand\relax, + \v!normaal=>\let\raggedcommand\relax]} -%I n=Blokken -%I c=\stelplaatsblokkenin,\stelblokkopjesin -%I c=\definieerplaatsblok,\stelplaatsblokin -%I c=\reserveer,\leeg,\plaats,\volledigelijstmet,\plaatslijstmet -%I -%I Figuren, tabellen, grafieken enz. kunnen in de tekst -%I worden geplaatst met het commando: -%I -%I \plaats<bloknaam>[voorkeur][referentie]{titel}{blok} -%I -%I Als voorkeur kan worden opgegeven: -%I -%I hier bij voorkeur op deze plaats in de tekst -%I forceer per se op deze plaats in de tekst -%I pagina op een nieuwe pagina -%I boven bovenaan de huidige pagina -%I onder onderaan de huidige pagina -%I -%I links links in de paragraaf -%I rechts rechts in de paragraaf -%I -%I inlinker in linker marge (gelijke hoogte) -%I inrechter in rechter marge (gelijke hoogte) -%I inmarge in linker/rechter marge (gelijke hoogte) -%I marge in de marge -%P -%I Als er op de huidige bladzijde geen plaats is, dan wordt -%I standaard de figuur verplaatst (eerste vier opties) en/of -%I wordt overgegaan naar een nieuwe bladzijde (laatste twee -%I opties. -%I -%I Men kan plaatsen afdwingen door het trefwoord altijd -%I mee te geven: \plaats[hier,altijd][]{}{}. Er zijn dan -%I twee runs nodig, omdat de nummering van de blokken moet -%I worden aangepast. -%I -%I Als in plaats van een titel 'geen' wordt meegegeven, wordt -%I geen titel geplaatst. -%I -%I Als het blok nog onbekend is, kan in plaats van het blok -%I een van de volgende commando's worden meegegeven: -%I -%I \leeg<bloknaam> -%I \lege<bloknaam> -%P -%I Het is mogelijk ruimte voor een blok te reserveren: -%I -%I \reserveer<bloknaam>[hoogte=,breedte=,kader=][voorkeur] -%I [referentie]{titel} -%I -%I Beide commando's kunnen ook gegeven worden zonder [], -%I dus in de vorm -%I -%I \plaats<bloknaam>{titel}{blok} -%I \reserveer<bloknaam>{titel} -%I -%I Ten behoeve van een consistente verwijzing wordt het -%I commando: -%I -%I \in<bloknaam>[referentie] -%I -%I gedefinieerd. Dit levert in de tekst op: -%I -%I 'in <bloknaam> <nummer>' -%P -%I Blokken kunnen worden gedefinieerd met het commando: -%I -%I \definieerplaatsblok[blok][blokken] -%I -%I Hierna zijn de volgende commando's beschikbaar: -%I -%I \plaatsblok[plaats][referentie]{titel}{blok} -%I \reserveerblok[afmetingen][plaats][referentie]{titel} -%I \leegblok -%I -%I Het is mogelijk een en ander in te stellen met het -%I commando: -%I -%I \stelplaatsblokin[blok][hoogte=,breedte=,kader=, -%I bovenkader=,onderkader=,linkerkader=,rechterkader=, -%I paginaovergangen=] -%I -%I De hoogte en breedte hebben betrekking op de te reserveren -%I ruimte. -%P -%I Naast de eerder genoemde commando's zijn nog beschikbaar: -%I -%I \plaatslijstmetblokken -%I \volledigelijstmetblokken -%I -%I en een (extra) commando om tekst naast een blok (hier met -%I de naam 'blok') te plaatsen: -%I -%I \startbloktekst[plaats][referentie]{kop}{blok} -%I ... -%I \stopbloktekst -%I -%I Mogelijke plaatsen zijn 'links', 'rechts', 'hoog', 'laag' en -%I 'midden'. Ook is een combinatie van deze instellingen -%I mogelijk, bijvoorbeeld [links,hoog]. De instelling 'offset' -%I resulteert in een verschuiving van 1 regel. -%P -%I Blokken die tussen de tekst staan kunnen links, rechts of in -%I het midden worden uitgelijnd. De plaats wordt ingesteld met: -%I -%I \stelplaatsblokkenin[plaats=,breedte=,kader=,bovenkader=, -%I onderkader=,linkerkader=,rechterkader=,offset=,voorwit=, -%I nawit=,marge=] -%I -%I De genummerde kopjes bij blokken kunnen worden ingesteld -%I met: -%I -%I \stelblokkopjesin[plaats=,voor=,tussen=,na=,letter=, -%I kopletter=,breedte=,nummer=,uitlijnen=] -%I -%I waarbij als plaats kan worden meegegeven: 'boven', 'onder', -%I 'geen', 'hoog', 'laag' of 'midden'. Als breedte kan 'passend' -%I of 'max' worden meegegeven. De parameter nummer kan 'ja' of -%I 'nee' zijn. Als breedte=max, dan wordt het kopje over de -%I hele breedte geplaatst. In dat geval kan uitlijnen worden -%I ingesteld: 'links', 'midden' of 'rechts'. -%P -%I Als er geen plaats is, worden plaatsblokken tijdelijk -%I achtergehouden. De opgespaarde blokken worden op de -%I volgende bladzijde(n) geplaatst. Dit plaatsen is te -%I beinvloeden met: -%I -%I \stelplaatsblokkenin[nboven=,nonder=,nregels=] -%I -%I Standaard worden maximaal 2 blokken bovenaan de -%I bladzijde geplaatst en 0 blokken onder. Er wordt overgegaan -%I op een nieuwe bladzijde als het aantal regels groter is -%I dan 4. Deze waarden kunnen worden ingesteld. -%P -%I Kopjes boven lijsten en labels voor nummers kunnen worden -%I ingesteld met de elders beschreven commando's: -%I -%I \stellabeltekstin[label=...] -%I \stelkoptekstin[tekst=...] -%I -%I Standaard zijn deze ingesteld op de opgegeven namen. - \def\stelplaatsblokkenin% {\dodoubleargument\getparameters[\??bk]} @@ -7171,7 +6474,8 @@ \hsize=\@@mbbreedte}% \fi \global\insidefloattrue - \dowithnextbox + \dowithnextboxcontent + {\postponefootnotes} % new {\docompletefloat {#1}{#3}{#1}{#2}{#1}{#4} {\box\nextbox}}% @@ -7432,7 +6736,8 @@ \witruimte \previoussidefloat \stallsidefloat - \setbox\floatbox=\hbox{\vbox{\vskip\sidefloattopoffset#1}} + \setbox\floatbox=\hbox{\vbox % pretty ugly, will be rewritten + {\vskip\ifmarginfloat-\sidefloattopskip\else\sidefloattopoffset\fi#1}} \measuresidefloat \ifroomforfloat \setsidefloat @@ -7995,7 +7300,8 @@ \blanko[\@@bkvoorwit]% \flushfloatbox \blanko[\@@bknawit]% - \doinsertfloatinfo} + \doinsertfloatinfo + \doif{\@@bkspringvolgendein}{\v!nee}{\noindentation}} % new \def\somefixdfloat[#1]% {\doroomfloat @@ -8020,7 +7326,8 @@ \v!rechts=>\rightfloat{\box\floatbox}, \v!inlinker=>\leftmarginfloat{\box\floatbox}, \v!inrechter=>\rightmarginfloat{\box\floatbox}, - \v!inmarge=>{\doinmargenormal\leftmarginfloat\rightmarginfloat[]{\box\floatbox}}]% + \v!inmarge=>{\doinmargenormal\leftmarginfloat + \rightmarginfloat{\box\floatbox}}]% \doifinset{\v!lang}{#1} {\flushsidefloatsafterpar}% \fi} @@ -8047,6 +7354,7 @@ \setbox\floattext=\vbox to \floattextheight} {\setbox\floattext=\vbox}% \bgroup +\forgetall\stelblankoin\stelwitruimtein % new, also needed for footnotes \blanko[\v!blokkeer] \hsize\floattextwidth \ignorespaces} @@ -8258,10 +7566,10 @@ {\doregelplaats\@@flflplaats}% \ConvertToConstant\doifelse{#3}{\v!geen} {\global\setbox\floatbox=\vbox % pas op als wd groter dan hsize - {\ifbinnenkolommen\ifdim\wd4>\hsize - \let\locatefloat\relax - \fi\fi - \locatefloat{\box4}}} + {\ifbinnenkolommen\ifdim\wd4>\hsize + \let\locatefloat\relax + \fi\fi + \locatefloat{\copy4}}} % we need \wd4 later {\setbox2=\hbox {\footnotesenabledfalse\putcompletecaption{#4}{#2}{#3}{0}}% \doifinsetelse{\@@kjkjplaats}{\v!hoog,\v!midden,\v!laag} @@ -8303,10 +7611,11 @@ \hsize=0.9\wd4 \putcompletecaption{#4}{#2}{#3}{0}}% \else - \setbox0=\vbox - {\forgetall - \hsize=1.0\wd4 - \putcompletecaption{#4}{#2}{#3}{0}}% + %\setbox2=\vbox % was 0, bug + % {\forgetall + % \hsize=1.0\wd4 + % \putcompletecaption{#4}{#2}{#3}{0}}% + \setbox2=\hbox{\putcompletecaption{#4}{#2}{#3}{0}}% \fi \else \setbox0=\vbox @@ -8326,20 +7635,24 @@ \fi \putcompletecaption{#4}{#2}{#3}{0}}% \else - \setbox0=\vbox - {\forgetall - \dimen2=1.5\dimen0\relax - \ifdim\dimen2<\hsize - \hsize=\dimen2\relax - \fi - \putcompletecaption{#4}{#2}{#3}{0}}% + %\setbox2=\vbox % was 0, bug + % {\forgetall + % \dimen2=1.5\dimen0\relax + % \ifdim\dimen2<\hsize + % \hsize=\dimen2\relax + % \fi + % \putcompletecaption{#4}{#2}{#3}{0}}% + \setbox2=\hbox{\putcompletecaption{#4}{#2}{#3}{0}}% \fi \fi} {\dosetraggedvbox{\@@kjkjuitlijnen}% \setbox2=\raggedbox {\hsize\@@kjkjbreedte \putcompletecaption{#4}{#2}{#3}{0}}}% - \fi}}% + \else + \setbox2=\hbox % we want footnotes ! + {\putcompletecaption{#4}{#2}{#3}{0}}% + \fi}}% \global\setbox\floatbox=\vbox {\forgetall \processaction @@ -8377,13 +7690,32 @@ \tfskip \copy4}}, \v!geen=>\locatefloat{\copy4}]}}% - \ifdim\wd4>\hsize - \global\setbox\floatbox= - \hbox to \ifbinnenkolommen\wd4\else\hsize\fi - {\hss\box\floatbox\hss}% - \fi + % extended: + \postcenterfloatbox{\wd4}% + %\ifdim\wd4>\hsize + % \global\setbox\floatbox= + % \hbox to \ifbinnenkolommen\wd4\else\hsize\fi + % {\hss\box\floatbox\hss}% + %\fi \egroup} +\newif\ifpostponecolumnfloats \postponecolumnfloatsfalse % don't change + +\def\postcenterfloatbox#1% + {\ifbinnenkolommen + \ifpostponecolumnfloats + \scratchdimen=\makeupwidth + \else + \scratchdimen=#1\relax + \fi + \else\ifdim#1>\hsize + \scratchdimen=\hsize + \else + \scratchdimen=\wd\floatbox + \fi\fi + \global\setbox\floatbox=\hbox to \scratchdimen + {\hfill\box\floatbox\hfill}} % geen \hss, gaat mis in kolommen ! + \def\dosetparfloat#1#2#3#4% {\bgroup \forgetall @@ -8436,7 +7768,7 @@ \edef\@@kjkjplaats {\getvalue{\??kj#4\c!plaats}}% \edef\@@kjkjuitlijnen{\getvalue{\??kj#4\c!uitlijnen}}% \edef\@@flflplaats {\getvalue{\??fl#4\c!plaats}}% - \ifparfloat + \ifparfloat \dosetparfloat{#1}{#2}{#3}{#4}% \else \dosetpagfloat{#1}{#2}{#3}{#4}% @@ -8532,76 +7864,6 @@ #4% \pagina[\v!ja]} -%I n=Figuren -%I c=\plaatsfiguur,\reserveerfiguur,\startfiguurtekst -%I c=\leegfiguur,\volledigelijstmetfiguren -%I c=\plaatstabel,\reserveertabel,\starttabeltekst -%I c=\legetabel,\volledigelijstmettabellen -%I -%I Figuren en tabellen (gebruik ..tabel.. in plaats van -%I ..figuur..) kunnen in de tekst worden geplaatst met het -%I commando: -%I -%I \plaatsfiguur[plaats][referentie]{titel}{figuur} -%I -%I Als voorkeur kan worden opgegeven 'hier', 'forceer', -%I 'pagina', 'boven', 'onder', 'links' en 'rechts'. In plaats -%I van een titel kan 'geen' worden meegegeven, in dat geval -%I wordt geen titel geplaatst. Eventueel kan in combinatie -%I met links en rechts 'lang' worden opgegeven. -%I -%I De volgorde kan worden afgedwongen met 'altijd', -%I bijvoorbeeld [hier,altijd]. In dat geval wordt bij een -%I volgende run zonodig de nummering aangepast. -%I -%I In plaats van een titel kan {geen} worden ingevuld. In -%I dat geval blijft de titel achterwege. -%P -%I Het is mogelijk ruimte voor een figuur te reserveren: -%I -%I \reserveerfiguur[hoogte=,breedte=,kader=][voorkeur] -%I [referentie]{titel} -%P -%I Een lijst met figuren kan worden opgeroepen met: -%I -%I \plaatslijstmetfiguren -%I \volledigelijstmetfiguren -%I -%I Men kan een tekst naast een figuur zetten met: -%I -%I \startfiguurtekst[plaats][referentie]{kop}{figuur} -%I ... -%I \stopfiguurtekst -%I -%I Mogelijke plaatsen zijn (combinaties van) 'links', 'rechts', -%I 'hoog', 'laag' en 'midden'. Met 'offset' dwingt men een -%I verschuiving omlaag van van 1 regel af. -%I -%I Zie verder onder plaatsblokken. - -%I n=Tabellen -%I -%I Zie figuren. - -%I n=Intermezzo -%I -%I Zie figuren. - -%I n=Grafieken -%I -%I Zie figuren. - -%T n=figuur -%T m=fig -%T a=f -%T -%T \plaatsfiguur -%T [hier] -%T [fig:] -%T {} -%T {\naam{?}} -%T - \definieernummer [\??si] [\c!wijze=\v!per\v!tekst, @@ -8652,53 +7914,6 @@ \def\splitsplaatsblok% {\dosingleempty\dosplitsplaatsblok} -%I n=Formules -%I c=\plaatsformule,\plaatssubformule,\stelformulesin -%I -%I Formules kunnen in de tekst worden geplaatst met -%I het commando: -%I -%I \plaatsformule[referentie]subnummer$$formule$$ -%I -%I Dit commando handelt de witruimtes om de formules af en -%I plaatst nummers. Als geen nummer nodig is, en dus ook -%I geen referentie, dan moet met het commando als volgt -%I gebruiken: -%I -%I \plaatsformule-$$...$$ of \plaatsformule[-]$$...$$ -%I -%I Als het nummer niet moet worden opgehoogd, gebruikt men -%I -%I \plaatssubformule[referentie]subnummer$$formule$$ -%P -%I PAS OP: -%I -%I Binnen een aantal wiskundige commando's, zoals -%I \displaylines, moet men het nummer zelf plaatsen. Dit -%I kan gebeuren met: \formulenummer of \subformulenummer. -%I Ook hier kan een [referentie] en een {subnummer} worden -%I meegegeven. -%I -%I \plaatsformule -%I $$\displaylines -%I {x \hfill\formulenummer[eerste]{}\cr -%I y \hfill\cr -%I z \hfill\formulenummer[derde]{}\cr} -%I $$ -%P -%I De wijze waarop formules worden genummerd kan worden -%I be‹nvloed door het commando: -%I -%I \stelformulesin[links=,rechts=,plaats=] -%I -%I De nummers kunnen links en rechts worden gezet. Standaard -%I worden de symbolen ( en ) gebruikt. -%I -%I Tussen twee formules kan witruimte worden geforceerd met -%I het commando: -%I -%I \blanko[formule] - \abovedisplayskip = \!!zeropoint\relax \abovedisplayshortskip = \!!zeropoint\relax % evt. 0pt minus 3pt \belowdisplayskip = \!!zeropoint\relax @@ -8780,7 +7995,7 @@ \belowdisplayskip\!!zeropoint \abovedisplayshortskip\!!zeropoint \belowdisplayshortskip\!!zeropoint -\vbox{\strut}\vskip-2\lineheight % Why 2 and not 1? +\vbox{\strut}\vskip-2\openlineheight % Why 2 and not 1? ; 'open' is new $$\def\dostopformula{$$\egroup}} \def\plaatsformule% @@ -8849,17 +8064,6 @@ \ignorespaces \endgroup} -%I n=Naast -%I c=\startnaast,\stelnaastplaatsenin -%I -%I Experiment: -%I -%I \startnaast -%I ... -%I \stopnaast -%I -%I \stelnaastplaatsenin[status=] - \newbox\facingbox \newbox\facingpage @@ -8915,43 +8119,6 @@ \def\stelnaastplaatsenin% {\dosingleargument\dostelnaastplaatsenin} -%I n=Achtergronden -%I c=\stelachtergrondenin -%I -%I Achter de tekst kan een achtergrond worden geplaatst. -%I Voor de afzonderlijke elementen van een tekst wordt een -%I achtergrond gedefinieerd met het commando: -%I -%I \stelachtergrondenin -%I [boven,hoofd,tekst,voet,onder] -%I [linkerrand,rechterrand,linkermarge,reachtermarge,tekst] -%I [achtergrond=,kleur=,raster=] -%I -%I Voor de hele bladzijde gebruiken we: -%I -%I \stelachtergrondenin -%I [pagina] -%I [achtergrond=,kleur=,raster=] -%P -%I Het is mogelijk elk blok iets ruimer om de tekst te -%I plaatsen met: -%I -%I \stelachtergrondenin -%I [pagina] -%I [offset=,diepte=] -%I -%I Een offset van .25\korpsgrootte en een diepte van -%I .5\korpsgrootte voldoen aardig. -%I -%I Er kunnen ronde hoeken worden gezet met: -%I -%I \stelachtergrondenin -%I [pagina] -%I [hoek=,straal=] -%I -%I Hierbij kan voor hoek de instelling rond of recht worden -%I meegegeven en voor straal een dimensie. - % Don't use \@@mawhatevercommand directly, use \getvalue instead. \newif\ifnewbackground @@ -9246,93 +8413,6 @@ \egroup \fi} -%I n=File-management -%I c=\starttekst,\startprojekt,\startonderdeel,\startprodukt -%I c=\startomgeving,\startdeelomgeving -%I -%I Een eenvoudige tekst wordt gestart en gestopt met de -%I commando's: -%I -%I \starttekst -%I \stoptekst -%P -%I Het is mogelijk een projektstructuur op te zetten. Per -%I projekt wordt een file aangemaakt waarin de volgende -%I commando's voorkomen: -%I -%I \startprojekt naam -%I \stopprojekt -%I -%I Als deze file in TeX wordt geladen, dan worden alle -%I produkten achter elkaar gezet. -%I -%I Een produkt wordt gedefinieerd met: -%I -%I \startprodukt naam -%I \stopprodukt -%I -%I Deze file kan zelfstandig door TeX worden gehaald. -%P -%I Een omgeving wordt gedefinieerd door: -%I -%I \startomgeving naam -%I \stopomgeving -%I -%I Een onderdeel wordt gedefinieerd door: -%I -%I \startonderdeel naam -%I \stoponderdeel -%I -%I Files worden eerst gezocht op het actuele gebied. Als een -%I file niet aanwezig is wordt op de 'roots' gezocht. -%I -%I Een onderdeel kan zelfstandig door TeX worden gehaald. -%P -%I Binnen een projekt, produkt, omgeving of onderdeel komen -%I de volgende instellingen voor (tussen haakjes=facultatief): -%I -%I projekt omgeving produkt onderdeel -%I -%I \projekt naam * * -%I \omgeving naam (*) (*) (*) (*) -%I \produkt naam * -%I \onderdeel naam (*) (*) -%I -%I Binnen een omgeving kunnen deelomgevingen worden gedefinieerd -%I die alleen voor bepaalde produkten, onderdelen enz. gelden. -%I -%I \startdeelomgeving[naam,...,naam] -%I commando's -%I \stopdeelomgeving -%P -%I Het programma TeXEdit doorzoekt bij het aanmaken van een -%I file-menu de hele tekst op de genoemde commando's. Bij een -%I lange tekst kan dit misschien 'te' lang duren. Met het -%I commando: -%I -%I \geenfilesmeer -%I -%I kan worden aangegeven dat er geen structuurcommando's meer -%I volgen. -%I -%I Ten behoeve van TeXUtil moet in plaats van het commando -%I \input het commando \verwerkfile{naam} worden gebruikt. -%P -%I Als men standaard een en ander wil instellen, dan kan men -%I dit doen in de file 'cont-sys.tex'. Deze file wordt direkt -%I na het opstarten geladen cq. uitgevoerd. Daarnaast wordt, -%I indien aanwezig, de file 'cont-new.tex' geladen. - -%T n=starttekst -%T m=sta -%T a=x -%T -%T \starttekst -%T -%T ? -%T -%T \stoptekst - \def\currentproject {} \def\currentproduct {} \def\currentenvironment {} @@ -9348,7 +8428,7 @@ \setvalue{\c!file::0}{\jobname} -\def\processedfile% +\def\processedfile% is used in styles, don't change ! {\getvalue{\c!file::\fileprocesslevel}} %\def\processfile#1% @@ -9392,7 +8472,7 @@ {\addtocommalist{##1}\allinputpaths}}% \processcommalist[#1]\docommando} -\def\registreerfileinfo[#1#2]#3% +\def\registreerfileinfo[#1#2]#3% geen \showmessage ? {\writestatus{\m!systems}{#1#2 file #3 at line \the\inputlineno}% \immediatewriteutility{f #1 {#3}}} @@ -9428,8 +8508,8 @@ \loadallsystemfiles\f!filfilename \loadallsystemfiles\f!sysfilename} -%D Loading of \type {cont-usr.tex} and \type {cont-exe.tex} -%D (the one generated by texexec). +%D Loading of \type {cont-usr.tex} (edited by the user) +%D and \type {cont-fmt.tex} (generated by texexec). \def\loaduserspecifications {\readsysfile{\f!usrfilename} @@ -9452,19 +8532,20 @@ % \newevery \everyjob \EveryJob % \appendtoks ... \to \everyjob -\prependtoks \showcontextbanner \to \everyjob - -\appendtoks \loadsystemfiles \to \everyjob -\appendtoks \preloadfonts \to \everyjob -\appendtoks \settopskip \to \everyjob -\appendtoks \preloadlanguages \to \everyjob -\appendtoks \preloadspecials \to \everyjob -\appendtoks \openspecialfile \to \everyjob -\appendtoks \checkutilityfile \to \everyjob -\appendtoks \openutilities \to \everyjob -\appendtoks \loadoptionfile \to \everyjob -\appendtoks \loadtwopassdata \to \everyjob -\appendtoks \setupfootnotes \to \everyjob % pas op: hangt af van korps +\prependtoks \showcontextbanner \to \everyjob + +\appendtoks \loadsystemfiles \to \everyjob +\appendtoks \preloadfonts \to \everyjob +\appendtoks \settopskip \to \everyjob +\appendtoks \preloadlanguages \to \everyjob +\appendtoks \preloadspecials \to \everyjob +\appendtoks \openspecialfile \to \everyjob +\appendtoks \checkutilityfile \to \everyjob +\appendtoks \openutilities \to \everyjob +\appendtoks \loadoptionfile \to \everyjob +\appendtoks \loadtwopassdata \to \everyjob +\appendtoks \setupfootnotes \to \everyjob % depends on bodyfont +\appendtoks \initializeMPgraphics \to \everyjob % after loading system files \appendtoks \pagina[\v!laatste] \pagina \to \everybye \appendtoks \ifarrangingpages\poparrangedpages\fi \to \everybye @@ -9760,43 +8841,6 @@ \wd0=\!!zeropoint \box0\relax} -%I n=Commando's -%I c=\definieer,\naam -%I c=\gebruikcommandos -%I -%I Het is mogelijk eigen commando's te definieren met behulp -%I van het commando: -%I -%I \definieer[aantal argumenten]\commando{betekenis} -%I -%I Een argument kan worden opgeroepen door een # gevolgd -%I een nummer, bijvoorbeeld #2. -%I -%I \definieer\test{ziezo} \ziezo -%I \definieer[1]\test{ziezo #1} \ziezo{} -%I \definieer[2]\test{ziezo #1 en #2} \ziezo{}{} -%P -%I In commandonamen mogen alleen karakters voorkomen. Mocht -%I onverhoopt een cijfer nodig zijn, dan kunnen dergelijke -%I commando's worden opgeroepen met: -%I -%I \naam{} -%I -%I In een aantal gevallen, bijvoorbeeld bij het wegschrijven -%I naar lijsten, worden commando's \noexpand-ed. Dit is -%I bijvoorbeeld het geval bij synoniemen en sorteren, als -%I het criterium ongelijk is aan 'alles'. Dergelijke (zelf) -%I gedefinieerde commando's dienen eerst te worden -%I geactiveerd met : -%I -%I \gebruikcommandos{\commando} -%I -%I Er mogen meerdere commando's tegelijk worden opgegeven: -%I -%I \gebruikcommandos{\alfa,\beta,gamma} -%I -%I waarbij de \ facultatief is. Er wordt niets gezet! - % \docommando kan niet worden gebruikt omdat deze macro % soms lokaal wordt gebruikt @@ -9858,33 +8902,6 @@ \processcommalist[#1]\docommando \egroup} -%I n=Groeperen -%I c=\start,\definieerstartstop -%I -%I Met behulp van de volgende commando's kan de werking van -%I andere commando's worden beperkt: -%I -%I \start[label] -%I \stop[label] -%I -%I Men is vrij in de keuze van het commentaar. Het gebruik -%I van deze commando's komt overeen met het gebruiken van {}. -%P -%I Er kunnen \start-\stop-paren worden gedefinieerd en -%I ingesteld met: -%I -%I \definieerstartstop[label][voor=,na=,commandos=, -%I letter=] -%I -%I De aan 'voor' en 'na' toegekende commando's worden voor -%I \start en na \stop uitgevoerd; de aan 'commando' -%I toegekende commando's direct na \start. -%I -%I Naast het \start-\stop-paar is ook het verkorte commando -%I beschikbaar: -%I -%I \label{tekst} - \def\complexstart[#1]{\bgroup\getvalue{\e!start#1}} \def\complexstop [#1]{\getvalue{\e!stop #1}\egroup} @@ -9933,16 +8950,6 @@ \def\copyright {\omcirkeld{c}} -%I n=Systeem -%I c=\stelsysteemin -%I -%I Systeemvariabelen kunnen worden ingesteld met het -%I commando: -%I -%I \stelsysteemin[resolutie=,korps=] -%I -%I Aan 'resolutie' dient het aantal dpi (300). - \def\dosetupsystem[#1]% {\getparameters[\??sv][#1]% \setuprandomize[\@@svwillekeur]% @@ -9966,6 +8973,8 @@ \s!unknown=>\time=#1]% \nextrandom \egroup}} + +\def\outputfilename{\@@svfile} % Default-instellingen (verborgen) @@ -9979,8 +8988,9 @@ \setupsystem [\c!gebied=, - \c!resolutie=300dpi, + \c!resolutie=600dpi, \c!willekeur=, + \c!file=\jobname, \c!korps=\normalizedlocalbodyfontsize] % of iets anders % Pas op: @@ -9991,7 +9001,6 @@ \stellayoutin [ \c!kopwit=.08417508418\papierhoogte, % .08333 2.5cm - %\c!boven=.03367003367\papierhoogte, % .03331 1.0cm \c!boven=\!!zeropoint, \c!bovenafstand=\!!zeropoint, \c!hoofd=.06734006734\papierhoogte, % .06667 2.0cm @@ -10002,11 +9011,8 @@ \c!onderafstand=\@@lybovenafstand, \c!onder=\!!zeropoint, \c!rugwit=.11904761905\papierbreedte, % 2.5cm - %\c!rand=.14285714286\papierbreedte, % 3.0cm \c!rand=\!!zeropoint, \c!randafstand=\@@lymargeafstand, - %\c!marge=\@@lyrugwit, - %\c!marge=.07888078409\papierbreedte, % rugwit-2*afstand \c!marge=.12649983170\papierbreedte, % snijwit-2*afstand \c!margeafstand=.02008341748\papierbreedte, % 12.0pt \c!linkerrand=\@@lyrand, @@ -10023,7 +9029,7 @@ \c!tekstbreedte=, % dangerous here \tekstbreedte \c!letter=, \c!markering=\v!uit, - \c!plaats=\v!enkelzijdig, + \c!plaats=, % \v!enkelzijdig, but empty is signal \c!schaal=1, \c!nx=1, \c!ny=1, @@ -10031,8 +9037,8 @@ \c!dy=\!!zeropoint, \c!grid=\v!nee, \c!regels=, - \c!snijwit=, - \c!bodemwit=] + \c!snijwit=\!!zeropoint, + \c!bodemwit=\!!zeropoint] % instellingen hierop terugvallen, bijvoorbeeld de volgende: @@ -10106,6 +9112,7 @@ \c!diepte=.28, \c!boven=1.0, \c!onder=0.4, + \c!afstand=1pt, \c!regel=2.8ex] \stelkolommenin @@ -10468,6 +9475,7 @@ \c!nawit=\v!groot, \c!zijvoorwit=\@@bkvoorwit, \c!zijnawit=\@@bknawit, + \c!springvolgendein=\v!nee, \c!marge=1em, \c!nboven=2, \c!nonder=0, @@ -10519,7 +9527,8 @@ [\v!definitief] \stelpaginanummerin - [\c!nummer=1] + [\c!status=\v!start, + \c!nummer=1] \stelsubpaginanummerin [\c!wijze=\v!per\v!deel, diff --git a/tex/context/base/main-002.tex b/tex/context/base/main-002.tex index 169f5a0aa..6abe6cb1b 100644 --- a/tex/context/base/main-002.tex +++ b/tex/context/base/main-002.tex @@ -17,46 +17,6 @@ \unprotect -%I n=Items -%I c=\items,\stelitemsin -%I -%I Met het commando \items kunnen invullijsten worden -%I gegenereerd: -%I -%I \items{alternatief1,alternatief2,...,alternatiefN} -%I -%I Als in plaats van een alternatief een - wordt gegeven, -%I dan wordt ruimte opengelaten. -%I -%I De wijze waarop items worden weergegeven wordt ingesteld -%I met het commando: -%I -%I \stelitemsin[plaats=,symbool=,breedte=,n=,voor=, -%I tussen=,na=,uitlijnen=] -%I -%I Mogelijke plaatsen zijn links, rechts, onder, boven en -%I inmarge. Als breedte wordt de breedte van de totale tekst -%I opgegeven. Het aantal is facultatief, eventueel kan er -%I 'onbekend' worden meegegeven. Uitlijnen is 'ja' of 'nee'. -%P -%I Indien gewenst, kan de instelling direkt achter \item worden -%I geplaatst: -%I -%I \items[plaats=,symbool=,...]{alternatief1,...} -%I -%I In plaats van een symbool kan ook een van de volgende -%I aanduidingen worden meegegeven: -%I -%I a a, b, c, d, ... -%I A A, B, C, D, ... -%I n 1, 2, 3, 4, ... -%I r i, ii, iii, ... -%I R I, II, III, ... -%I -%I Eventueel kan een nummer worden meegegeven. In dat -%I geval wordt het overeenkomstige symbool van de -%I opsomming gebruikt (1--n). - %\def\checkinterlineskip% % {\ifvmode % \ifdim\lastskip>\!!zeropoint\relax @@ -96,14 +56,14 @@ \fi\fi}% \vbox{#2}} -\def\dostelitemsin[#1]% maakt direkt gebruik van \??ss en \??cv +\def\dostelitemsin[#1]% {\getparameters[\??is][#1]% \doif{\@@isbreedte}{\v!onbekend} {\def\@@isbreedte{\hsize}}% - \doifdefinedelse{\??cv\@@issymbool} + \doifconversiondefinedelse{\@@issymbool} {\def\doitembullet##1{\convertnumber{\@@issymbool}{##1}}} - {\doifdefined{\??ss\@@issymbool} - {\def\doitembullet##1{\symbol[\@@issymbool]}}}} + {\doifsymboldefinedelse{\@@issymbool} + {\def\doitembullet##1{\symbol[\@@issymbool]}}{}}} \def\makeitemsandbullets#1% {\doifelse{\@@isn}{\v!onbekend} @@ -184,36 +144,6 @@ \definecomplexorsimpleempty\items -%I n=Tabulatie (1) -%I c=\definieeralineas,\stelalineasin -%I -%I Er kunnen paragrafen in meerdere kolommen worden gezet na -%I het commando: -%I -%I \definieeralineas[naam][n=,voor=,na=,afstand=, -%I hoogte=,lijn=,binnen=] -%I -%I Kolommen worden vervolgens gezet met: -%I -%I \startnaam .... \naam .... \naam .... \stopnaam -%I -%I of (soms verwarrend): -%I -%I \naam .... \naam .... \naam .... \naam -%I -%I of (lekker kort): -%I -%I \naam .... \\ .... \\ .... \\ -%I -%I waarbij het aantal malen .... \naam of \\ gelijk is -%I aan n. Naast \naam en \\ is ook \volgendenaam toegestaan. -%P -%I Het is mogelijk per kolom een en ander in te stellen met -%I het commando: -%I -%I \stelalineasin[naam][kolomnummer][afstand=,breedte=, -%I hoogte=,boven=,onder=,letter=,binnen=,lijn=, -%I uitlijnen=,tolerantie=] % Te zijner tijd [plaats=boven,onder,midden] implementeren, % in dat geval moet eerst de maximale hoogte worden bepaald. @@ -405,21 +335,6 @@ \par \getvalue{\??al#1\c!na}}% -%I n=Tabulatie (2) -%I c=\steltabin,\tab -%I -%I Eenvoudige tabulatie is mogelijk met het commando: -%I -%I \tab{tekst} tekst tekst tekst ..... -%I -%I Instelling vindt plaats met het commando: -%I -%I \steltabin[monster=,breedte=,kopletter=,voor,na=] -%I -%I Dit commando is een vereenvoudigde variant van het -%I commando \doordefinieren. In de regel kan volstaan -%I worden met het opgeven van een monster. Dit is het -%I woord dat de breedte bepaalt. \def\dosteltabin[#1]% {\getparameters[\??ta] @@ -444,27 +359,6 @@ \def\steltabin% {\dosingleargument\dosteltabin} -%I n=Diversen -%I c=\celsius,\bedrag,\breuk -%I c=\procent,\promille -%I -%I De volgende commando's vatten (vooral mathematische) -%I zetcommando's samen: -%I -%I \chem{symbool}{onder}{boven} chemische symbolen -%I \celsius{graden} graden Celsius (..~øC) -%I \breuk{boven}{onder} breuken («) -%I \bedrag{getal} geldbedragen (Ÿ~..) -%I \punten[n] puntjes (. . .) -%I \ongeveer plus-minus (ñ) -%I \inch inch ('') -%I \doorsnede \circ doorsneden met / -%I \graden ø (^\circ) -%I \procent percentage (vgl promille) -%I \promille promilage -%I \dollar dollar teken -%I \sterling pound sterling teken -%I \florijn gulden teken % The following macro's are derived from PPCHTEX and % therefore take some LaTeX font-switching into account. @@ -662,37 +556,6 @@ f% \egroup} -%I n=Citaten -%I c=\startcitaat,\citaat,\stelcitatenin -%I c=\citeer,\stelciterenin -%I -%I Als variant op \startsmaller is het volgende commando -%I beschikbaar: -%I -%I \startcitaat -%I tekst -%I \stopcitaat -%I -%I Rond de tekst worden in de marge dubbele quotes -%I geplaatst. Ook bij dit commando kunnen tussen [] maten -%I worden opgegeven: -%I -%I \startcitaat[2*links,rechts] -%I -%I In de lopende tekst kan gebruik worden gemaakt van: -%I -%I \citaat{tekst} -%I \citeer{tekst} -%I -%I Het eerste commando levert dubbele quotes en het tweede -%I enkele quotes. -%P -%I Er zijn twee varianten (1 en 2) beschikbaar die kunnen -%I worden ingesteld met: -%I -%I \stelciterenin -%I [letter=] - \newsignal\quotationsignal \def\quotationskip{.125em} @@ -787,15 +650,6 @@ \def\activiteit#1#2% {\sym{\tijdspan{#1}{#2}}} -%I n=Toevoegen -%I c=\toevoegen -%I -%I Er kan witruimte worden gemarkeerd met het commando: -%I -%I \toevoegen[instelling]{korte tekst} -%I -%I waarbij als instellingen mogelijk zijn: klein, middel of -%I groot. \def\dotoevoegen#1% {\def\next{#1}% @@ -814,25 +668,6 @@ \definecomplexorsimpleempty\toevoegen -%I n=Roosters -%I c=\rooster -%I -%I Er kunnen roosters (te vergelijken met ruitjespapier) -%I worden gemaakt met: -%I -%I \rooster[nx=,ny=,dx=,dy=,eenheid=,xstap=,ystap=, -%I offset=,schaal=,factor=] -%I -%I De instelling [nx=20,ny=20,dx=.5,dy=.5,eenheid=cm] levert -%I een patroon van 10cm bij 10cm van hokjes van 0.5cm op. -%I -%I Met '.stap' kunnen getallen langs de assen worden gezet. -%I als 0 wordt ingevuld (default), dan worden geen getallen -%I gezet. Met offset (ja of nee) kan men aangeven of de -%I getallen langs de assen binnen of buiten de box rond -%I het rooster vallen (vergelijk \stelpositionerenin). -%I -%I !! Dit commando wordt nog aangepast/uitgebreid. !! \def\dorooster[#1]% {\begingroup @@ -945,33 +780,6 @@ \def\rooster% {\dosingleempty\dorooster} -%I n=Literatuurlijsten -%I c=\stelpublicatiesin,\startpublicatie,\publicatie -%I -%I Literatuurlijsten kunnen worden opgemaakt met het commando: -%I -%I \startpublicatie[referentie] -%I \naam .... -%I \titel .... -%I \jaar .... -%I \plaats .... -%I \uitgever .... -%I \stoppublicatie -%I -%I Een publicatie wordt opgeroepen met: -%I -%I \publicatie[referentie] -%P -%I Het formaat kan worden ingesteld met het commando: -%I -%I \stelpublicatiesin[variant=,voor=,na=,nummeren=, -%I breedte=,kopletter=,links=,rechts=] -%I -%I waarbij mogelijke varianten zijn: normaal apa en normaal. -%I Nummeren kan 'ja' of 'nee' zijn; links en rechts -%I hebben betrekking op de weergave in de tekst en zijn -%I standaard [ en ]. - % Dit wordt: % % \doorverwijzen[naam][instellingen] enz. @@ -1040,27 +848,6 @@ \def\publicatie#1[#2]% {\@@pblinks\in{#1}[#2]\@@pbrechts} -%I n=Kenmerken -%I c=\kenmerk,\kenmerkdatum -%I -%I Er kan een kenmerk worden gezet met het commando: -%I -%I \kenmerk[bet=,ken=,dat=,van=,aan=,ref=] -%I -%I waarbij de verplichte parameters staan voor 'betreft', -%I 'kenmerk' en 'datum' en de optionele voor 'van', 'aan' en -%I 'referentie'. -%I -%I Een kenmerk-datum kan worden gezet met het commando: -%I -%I \kenmerkdatum -%I -%I zodat een kenmerk er bijvoorbeeld uitziet als: -%I -%I \kenmerk -%I [bet=rekening eerste termijn, -%I ken=\kenmerkdatum.sork.gvk / afo, -%I dat=\currentdate] \def\kenmerkdatum% {\currentdate[\v!kenmerk]} diff --git a/tex/context/base/main-003.tex b/tex/context/base/main-003.tex index 989e6a792..3f401c0e0 100644 --- a/tex/context/base/main-003.tex +++ b/tex/context/base/main-003.tex @@ -32,33 +32,15 @@ \startmessages czech library: systems 41: externi soubor -- ve skupine -- neexistuje \stopmessages - -%I n=Formules+ -%I c=\startlegenda,\startgegeven -%I -%I Ten behoeve van een consistente toelichting op een -%I formule zijn er de volgende commando's: -%I -%I \startlegenda -%I \leg symbool \\ betekenis \\ dimensie \\ -%I \leg symbool \\ betekenis \\ dimensie \\ -%I \stoplegenda -%I -%I \startgegeven -%I \geg betekenis \\ symbool \\ waarde \\ -%I \geg betekenis \\ symbool \\ waarde \\ -%I \stopgegeven -%I -%I Ten behoeve van het zetten van ub- en superscripts zijn -%I er, naast \hbox, de commando's \xbox en \xxbox. -%P -%I Het onderstaande mag ook: -%I -%I \startlegenda[twee] -%I \leg symbool \\ symbool \\ betekenis \\ dimensie \\ -%I \leg symbool \\ symbool \\ betekenis \\ dimensie \\ -%I \stoplegenda +\startmessages italian library: systems + 41: il file esterno -- del gruppo -- non esiste +\stopmessages + +\startmessages norwegian library: systems + 41: ekstern fil -- i gruppe -- eksisterer ikke +\stopmessages + \definetabulate [\e!legenda] [|emj1|i1|mR|] @@ -89,13 +71,97 @@ % {$\rm#1$} %D \macros -%D {setuplegend, placelegend} +%D {definepairedbox, setuppairedbox, placepairedbox} %D -%D It makes sense to typeset a legend to a figure in \TEX\ and -%D not in a drawing package. The macro \type {\placelegend} -%D combines a figure (or something else) and its legend. +%D Paired boxes, formally called legends, but from now on a +%D legend is just an instance, are primarily meant for +%D typesetting some text alongside an illustration. Although +%D there is quite some variation possible, the functionality is +%D kept simple, if only because in most cases such pairs are +%D typeset sober. +%D +%D The location specification accepts a pair, where the first +%D keyword specifies the arrangement, and the second one the +%D alignment. The first key of the location pair is one of +%D \type {left}, \type {right}, \type {top} or \type {bottom}, +%D while the second key can also be \type {middle}. +%D +%D The first box is just collected in an horizontal box, but +%D the second one is a vertical box that gets passed the +%D bodyfont and alignment settings. + +% \startbuffer[test] +% \test left \test left,top \test left,bottom \test left,middle +% \test right \test right,top \test right,bottom \test right,middle +% \test top \test top,left \test top,right \test top,middle +% \test bottom \test bottom,left \test bottom,right \test bottom,middle +% \stopbuffer +% +% \def\showtest#1% +% {\pagina +% \typebuffer[demo] +% \def\test##1 +% {\startlinecorrection[blank] +% \getbuffer[demo]% +% \ruledhbox\placelegend +% [bodyfont=6pt,location={##1}] +% {\framed[width=.25\textwidth]{\tttf##1}} +% {#1} +% \stoplinecorrection} +% \getbuffer[test]} +% +% \startbuffer[demo] +% \setuplegend +% [width=\hsize,maxwidth=\makeupwidth, +% height=\vsize,maxheight=\makeupheight] +% \stopbuffer +% +% \showtest{These examples demonstrate the default settings.} +% +% \startbuffer[demo] +% \setuplegend +% [width=\textwidth, +% maxwidth=\textwidth] +% \stopbuffer +% +% \showtest{\input tufte } +% +% \startbuffer[demo] +% \setuplegend +% [width=.65\textwidth] +% \stopbuffer +% +% \showtest{\input knuth } +% +% \startbuffer[demo] +% \setuplegend +% [height=2cm] +% \stopbuffer +% +% \showtest{These examples demonstrate some other settings.} +% +% \startbuffer[demo] +% \setuplegend +% [width=.65\textwidth, +% height=2cm] +% \stopbuffer +% +% \showtest{These examples demonstrate some other settings.} +% +% \startbuffer[demo] +% \setuplegend +% [n=2,align=right,width=.5\textwidth] +% \stopbuffer +% +% \showtest{\input zapf } + +%D \macros +%D {setuplegend, placelegend} %D -%D \showsetup{placelegend} +%D It makes sense to typeset a legend to a figure in \TEX\ +%D and not in a drawing package. The macro \type {\placelegend} +%D combines a figure (or something else) and its legend. This +%D command is just a paired box. %D %D The legend is placed according to \type {location}, being %D \type {bottom} or \type {right}. The macro macro is used as @@ -153,121 +219,231 @@ %D \item head \item legs \item tail \item belly \item horns %D \stopitemize}} %D \stoptypen -%D -%D There are a few more parameters: -%D -%D \showsetup{setuplegend} -\def\setuplegend% - {\dodoubleargument\getparameters[\??ld]} +% \def\setuplegend% +% {\dodoubleargument\getparameters[\??ld]} +% +% \setuplegend +% [\c!n=1, +% \c!afstand=1em, +% \c!tussen={\blanko[\v!middel]}, +% \c!breedte=\hsize, +% \c!hoogte=\vsize, +% \c!korps=, +% \c!plaats=\v!onder] +% +% \def\placelegend% +% {\bgroup +% \dosingleempty\doplacelegend} +% +% \def\doplacelegend[#1]% watch the hsize/vsize tricks +% {\setuplegend[#1]% % and don't change them +% \dowithnextbox +% {\switchtobodyfont[\@@ldkorps]% split under same regime +% \scratchdimen=\wd\nextbox +% \doifelse{\@@ldplaats}{\v!rechts} +% {\vsize=\ht\nextbox +% \vsize=\@@ldhoogte +% \hsize=\zetbreedte +% \advance\hsize by -\scratchdimen +% \advance\hsize by -\@@ldafstand +% \plaatsnaastelkaar{\box\nextbox}\bgroup} +% {\hsize\scratchdimen +% \plaatsonderelkaar{\box\nextbox}\bgroup}% +% \hsize\@@ldbreedte +% \doif{\@@ldplaats}{\v!rechts}{\hskip\@@ldafstand}% +% \ifnum\@@ldn>1 +% \setrigidcolumnhsize\hsize\@@ldafstand\@@ldn +% \fi +% \dowithnextbox +% {\doifelse{\@@ldplaats}{\v!rechts} +% {\vbox to \vsize +% {\ifnum\@@ldn>1 +% \rigidcolumnbalance\nextbox +% \else +% \box\nextbox +% \fi +% \vfill}} +% {\vbox +% {\@@ldtussen +% \ifnum\@@ldn>1 +% \rigidcolumnbalance\nextbox +% \else +% \box\nextbox +% \fi}}% +% \egroup\egroup}% +% \vbox +% \bgroup +% \forgetall +% \tolerantTABLEbreaktrue % hm. +% \blanko[\v!blokkeer]% +% \everypar{\begstrut}% +% \let\next=} +% \hbox} + +\newbox\firstpairedbox +\newbox\secondpairedbox + +\def\definepairedbox% + {\dodoubleempty\dodefinepairedbox} + +\def\dodefinepairedbox[#1][#2]% + {\getparameters + [\??ld#1] + [\c!n=1, + \c!afstand=\bodyfontsize, + \c!tussen={\blanko[\v!middel]}, + \c!breedte=\hsize, + \c!hoogte=\vsize, + \c!maxbreedte=\zetbreedte, + \c!maxhoogte=\zethoogte, + \c!korps=, + \c!uitlijnen=, + \c!plaats=\v!onder, + #2]% + \setvalue{\e!stel#1\e!in}{\setuppairedbox[#1]}% + \setvalue{\e!plaats#1}{\placepairedbox[#1]}} + +\def\setuppairedbox% + {\dodoubleempty\dosetuppairedbox} + +\def\dosetuppairedbox[#1]% + {\getparameters[\??ld#1]} + +\def\placepairedbox% + {\bgroup\dodoubleempty\doplacepairedbox} + +\def\doplacepairedbox[#1][#2]% watch the hsize/vsize tricks + {\setuppairedbox[#1][#2]% % and don't change them + \copyparameters + [\??ld][\??ld#1] + [\c!n,\c!afstand,\c!tussen, + \c!breedte,\c!hoogte,\c!maxbreedte,\c!maxhoogte, + \c!korps,\c!uitlijnen,\c!plaats]% + \beforefirstpairedbox + \dowithnextbox + {\betweenbothpairedboxes + \dowithnextbox + {\afterbothpairedboxes + \egroup} + \vbox\bgroup + \insidesecondpairedbox + \let\next=} + \hbox} -\setuplegend - [\c!n=1, - \c!afstand=1em, - \c!tussen={\blanko[\v!middel]}, - \c!breedte=\hsize, - \c!hoogte=\vsize, - \c!korps=, - \c!plaats=\v!onder] +\def\beforefirstpairedbox% + {\chardef\pairedlocationa=1 % left + \chardef\pairedlocationb=4 % middle + \getfromcommacommand[\@@ldplaats][1]% + \processaction + [\commalistelement] + [ \v!links=>\chardef\pairedlocationa=0, + \v!rechts=>\chardef\pairedlocationa=1, + \v!boven=>\chardef\pairedlocationa=2, + \v!onder=>\chardef\pairedlocationa=3]% + \getfromcommacommand[\@@ldplaats][2]% + \processaction + [\commalistelement] + [ \v!links=>\chardef\pairedlocationb=0, + \v!rechts=>\chardef\pairedlocationb=1, + \v!hoog=>\chardef\pairedlocationb=2, + \v!boven=>\chardef\pairedlocationb=2, + \v!laag=>\chardef\pairedlocationb=3, + \v!onder=>\chardef\pairedlocationb=3, + \v!midden=>\chardef\pairedlocationb=4]} + +\def\betweenbothpairedboxes% + {\switchtobodyfont[\@@ldkorps]% split under same regime + \setbox\firstpairedbox=\box\nextbox + \ifnum\pairedlocationa<2 + \hsize\wd\firstpairedbox % trick + \hsize=\@@ldbreedte + \scratchdimen=\wd\firstpairedbox + \advance\scratchdimen by \@@ldafstand + \bgroup\advance\scratchdimen by \hsize + \ifdim\scratchdimen>\@@ldmaxbreedte\relax + \egroup + \hsize=\@@ldmaxbreedte + \advance\hsize by -\scratchdimen + \else + \egroup + \fi + \else + \hsize\wd\firstpairedbox + \hsize\@@ldbreedte % can be \hsize + \ifdim\hsize>\@@ldmaxbreedte\relax \hsize=\@@ldmaxbreedte \fi % can be \hsize + \fi + \ifnum\@@ldn>1 + \setrigidcolumnhsize\hsize\@@ldafstand\@@ldn + \fi} -\def\placelegend% - {\bgroup - \dosingleempty\doplacelegend} +\def\afterbothpairedboxes% + {\setbox\secondpairedbox=\vbox + {\ifnum\@@ldn>1 \rigidcolumnbalance\nextbox \else \box\nextbox \fi}% + \ifnum\pairedlocationa<2\hbox\else\vbox\fi\bgroup % hide vsize + \forgetall + \ifnum\pairedlocationa<2 + \scratchdimen=\maxoftwoboxdimens\ht\firstpairedbox\secondpairedbox + \vsize=\scratchdimen + \ifdim\scratchdimen<\@@ldhoogte\relax % can be \vsize + \scratchdimen=\@@ldhoogte + \fi + \ifdim\scratchdimen>\@@ldmaxhoogte\relax + \scratchdimen=\@@ldmaxhoogte + \fi + \valignpairedbox\firstpairedbox \scratchdimen + \valignpairedbox\secondpairedbox\scratchdimen + \else + \scratchdimen=\maxoftwoboxdimens\wd\firstpairedbox\secondpairedbox + \halignpairedbox\firstpairedbox \scratchdimen + \halignpairedbox\secondpairedbox\scratchdimen + \scratchdimen=\ht\secondpairedbox + \vsize=\scratchdimen + \ifdim\ht\secondpairedbox<\@@ldhoogte\relax % can be \vsize + \scratchdimen=\@@ldhoogte\relax % \relax needed + \fi + \ifdim\scratchdimen>\@@ldmaxhoogte\relax % todo: totale hoogte + \scratchdimen=\@@ldmaxhoogte\relax % \relax needed + \fi + \ifdim\scratchdimen>\ht\secondpairedbox + \setbox\secondpairedbox\vbox to \scratchdimen + {\ifnum\pairedlocationa=3 \vss\fi + \box\secondpairedbox + \ifnum\pairedlocationa=2 \vss\fi}% + \fi + \fi + \ifcase\pairedlocationa + \box\secondpairedbox\hskip\@@ldafstand\box\firstpairedbox \or + \box\firstpairedbox \hskip\@@ldafstand\box\secondpairedbox\or + \box\secondpairedbox\par \@@ldtussen \box\firstpairedbox \or + \box\firstpairedbox \par \@@ldtussen \box\secondpairedbox\else + \fi + \egroup} -\def\doplacelegend[#1]% watch the hsize/vsize tricks - {\setuplegend[#1]% % and don't change them - \dowithnextbox - {\switchtobodyfont[\@@ldkorps]% split under same regime - \scratchdimen=\wd\nextbox - \doifelse{\@@ldplaats}{\v!rechts} - {\vsize=\ht\nextbox - \vsize=\@@ldhoogte - \hsize=\zetbreedte - \advance\hsize by -\scratchdimen - \advance\hsize by -\@@ldafstand - \plaatsnaastelkaar{\box\nextbox}\bgroup} - {\hsize\scratchdimen - \plaatsonderelkaar{\box\nextbox}\bgroup}% - \hsize\@@ldbreedte - \doif{\@@ldplaats}{\v!rechts}{\hskip\@@ldafstand}% - \ifnum\@@ldn>1 - \setrigidcolumnhsize\hsize\@@ldafstand\@@ldn - \fi - \dowithnextbox - {\doifelse{\@@ldplaats}{\v!rechts} - {\vbox to \vsize - {\ifnum\@@ldn>1 - \rigidcolumnbalance\nextbox - \else - \box\nextbox - \fi - \vfill}} - {\vbox - {\@@ldtussen - \ifnum\@@ldn>1 - \rigidcolumnbalance\nextbox - \else - \box\nextbox - \fi}}% - \egroup\egroup}% - \vbox - \bgroup - \forgetall - \tolerantTABLEbreaktrue % hm. - \blanko[\v!blokkeer]% - \everypar{\begstrut}% - \let\next=} - \hbox} +\def\insidesecondpairedbox% + {\forgetall + \steluitlijnenin[\@@lduitlijnen]% + \tolerantTABLEbreaktrue % hm. + \blanko[\v!blokkeer]% + \everypar{\begstrut}} + +\def\maxoftwoboxdimens#1#2#3% + {#1\ifdim#1#2>#1#3 #2\else#3\fi} + +\def\valignpairedbox#1#2% + {\setbox#1=\vbox to #2 + {\ifcase\pairedlocationb\or\or\or\vss\or\vss\fi + \box#1\relax + \ifcase\pairedlocationb\or\or\vss\or\or\vss\fi}} + +\def\halignpairedbox#1#2% + {\setbox#1=\hbox to #2 + {\ifcase\pairedlocationb\or\hss\or\or\or\hss\fi + \box#1\relax + \ifcase\pairedlocationb\hss\or\or\or\or\hss\fi}} + +\definepairedbox[\e!legenda] -%I n=Combinaties -%I c=\startcombinatie,\stelcombinatiesin -%I -%I Er kunnen meerdere tabellen, figuren enz. worden -%I gecombineerd. Dit gebeurt met het commando: -%I -%I \startcombinatie[n*m] -%I {inhoud 1}{ondertitel 1} -%I {inhoud 2}{ondertitel 2} -%I ..... -%I \stopcombinatie -%I -%I Eventueel kan volstaan worden met [n]. Vier inhouden -%I kunnen bijvoorbeeld worden gecombineerd als: -%I -%I [4*1] of [4] vier inhouden naast elkaar -%I [1*4] vier inhouden onder elkaar -%I [2*2] inhouden twee aan twee onder elkaar -%P -%I Dit commando is goed te combineren met \plaats-commando's: -%I -%I \plaatsfiguur[][]{} -%I \startcombinatie[2] -%I {\legefiguur}{a} -%I {\legefiguur}{b} -%I \stopcombinatie -%I -%I Rond \start-\stopcombineer hoeven geen {} te worden -%I geplaatst. -%I -%I De afstanden tussen de inhouden en de titels kunnen worden -%I ingesteld met: -%I -%I \stelcombinatiesin[voor=,na=,tussen=,afstand=, -%I uitlijnen=,hoogte=,breedte=] -%I -%I Waarbij de afstand betrekking heeft op de horizontale -%I afstand (een maat dus) en voor, na en tussen commando's -%I zijn (bijvoorbeeld \blanko). - -%T n=combinaties -%T m=com -%T a=c -%T -%T \startcombinatie -%T {?} {} -%T {} {} -%T \stopcombinatie - \newcount\horcombinatie % counter \newcount\totcombinatie @@ -396,24 +572,6 @@ \def\plaatsnaastelkaar% {\plaatsondernaastelkaar\valign\vss} -%I n=Files -%I c=\definieerfile -%I -%I De onderstaande commando's zijn beschikbaar, maar nog in -%I ontwikkeling. -%I -%I \gebruikexternefile [groep] [naam] [file] [instellingen] -%I -%I \gebruikexternefiles [groep] [korps=,file=] -%I \stelexternefilesin [groep] [korps=,file=] -%I -%I \naam{naam} of \naam -%I -%I Standaard zijn gedefinieerd: -%I -%I \gebruikexternefiles[pictex][korps=klein,file=pictex] -%I \gebruikexternefiles[table][file=table] - \def\dogebruikexternefiles[#1][#2]% {\getparameters [\??fi#1] @@ -453,24 +611,6 @@ \def\gebruikexternefile% {\doquadrupleargument\dogebruikexternefile} -%I n=Roteren -%I c=\roteer -%I -%I Er is een rotatiecommando beschikbaar: -%I -%I \roteer[rotatie=]{} -%I -%I Waarbij als rotatie 0, 90, 180 of 270 kan worden opgegeven. -%I Als extra instellingen kunnen de instellingen van -%I \omlijnd worden meegegeven. Er wordt gebruik gemaakt van -%I het \special commando en het rotatiemechanisme van -%I PostScript. Dit betekent dat in de previewer de tekst -%I niet (!) geroteerd wordt. Overigens draagt TeX zorg voor -%I de exacte plaatsing, uitlijnen enz. De afhankelijkheid -%I van PostScript is dus tot een minimum beperkt. -%I -%I Verder zijn dezelfde instellingen mogelijk als bij -%I \omlijnd. \presetlocalframed[\??ro] @@ -484,10 +624,11 @@ \vbox to #1\nextbox {#2\relax \hbox to #4\nextbox - {#5\relax + {#5\relax % \number removes leading spaces too + \edef\@@rorotatie{\number\@@rorotatie}% \doifelsenothing{\@@rorotatie} {\dostartrotation{90}} - {\dostartrotation{\@@rorotatie}}% + {\dostartrotation{\@@rorotatie}}% \wd\nextbox=\!!zeropoint \ht\nextbox=\!!zeropoint \box\nextbox @@ -496,6 +637,7 @@ #3}% \egroup} + \def\dostoproteer% {\!!counta=\@@rorotatie \divide\!!counta by 90 @@ -535,28 +677,54 @@ % schaal +\def\doscalelikeafigure% + {\doifsomething{\@@xyfactor\@@xyschaal\@@xyhfactor\@@xybreedte\@@xyhoogte} + {\let \@@efschaal \@@xyschaal + \let \@@effactor \@@xyfactor + \let \@@efbfactor\@@xybfactor + \let \@@efhfactor\@@xyhfactor + \let \@@efbreedte\@@xybreedte + \let \@@efhoogte \@@xyhoogte + \let \@@epx \!!zeropoint + \let \@@epy \!!zeropoint + \edef\@@epw {\the\wd\nextbox}% + \edef\@@eph {\the\ht\nextbox}% + \setfactorfiguresize + \setscalefiguresize + \setdimensionfiguresize + \convertfigureinsertscale\@@epx\figx\figxsca\scax + \convertfigureinsertscale\@@epy\figy\figysca\scay + \scratchdimen=\scax pt \divide\scratchdimen by 100 + \edef\@@xysx{\withoutpt\the\scratchdimen}% + \scratchdimen=\scay pt \divide\scratchdimen by 100 + \edef\@@xysy{\withoutpt\the\scratchdimen}}} + \def\doschaal[#1]% {\bgroup \forgetall - \getparameters[\??xy][\c!sx=1,\c!sy=1,#1]% + \getparameters + [\??xy] + [\c!schaal=,\c!breedte=,\c!hoogte=, + \c!factor=,\c!hfactor=,\c!bfactor=, + \c!sx=1,\c!sy=1,#1]% \dowithnextbox {\dontshowcomposition + \doscalelikeafigure \dimen0=\@@xysy\ht\nextbox \dimen2=\@@xysy\dp\nextbox \dimen4=\@@xysx\wd\nextbox - \dimen6=\dimen0\advance\dimen6 by \dimen2 + \dimen6=\dimen0\advance\dimen6 by \dimen2 \setbox\nextbox=\vbox to \dimen6 {\ht\nextbox=\!!zeropoint \dp\nextbox=\!!zeropoint \vfill % erbij - \dostartscaling\@@xysx\@@xysy\box\nextbox\dostopscaling - }% was \vfill}% + \dostartscaling\@@xysx\@@xysy\box\nextbox\dostopscaling}% \ht\nextbox=\dimen0 \dp\nextbox=\dimen2 \wd\nextbox=\dimen4 \box\nextbox \egroup} - \hbox} % was \vbox} + \hbox} \def\schaal% {\dosingleempty\doschaal} @@ -583,7 +751,8 @@ % %\spiegel{\ruledhbox{\copy0 \schaal{\box0}}} -% verdelen \hsize in fracties +% verdelen \hsize in fracties, wordt nog wat algemener, +% beetje vaag nu % % \fractie[n/m,elementen,afstand] % diff --git a/tex/context/base/meta-clp.tex b/tex/context/base/meta-clp.tex new file mode 100644 index 000000000..8b841e876 --- /dev/null +++ b/tex/context/base/meta-clp.tex @@ -0,0 +1,164 @@ +%D \module +%D [ file=meta-clp, +%D version=2000.07.06, +%D title=\METAPOST\ Graphics, +%D subtitle=Clipping, +%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. + +%D In this library, we define a bunch of clipping paths that +%D can be fed to \type {\clip}. + +\startMPclip{ellipse} + clip currentpicture to unitcircle + xscaled \width yscaled \height ; +\stopMPclip + +\startMPclip{negellipse} + clip currentpicture to (unitcircle peepholed unitsquare) + xscaled \width yscaled \height ; +\stopMPclip + +\startMPclip{urellipse} + clip currentpicture to urcircle scaled 2 + xscaled \width yscaled \height ; +\stopMPclip + +\startMPclip{ulellipse} + clip currentpicture to ulcircle scaled 2 shifted (1,0) + xscaled \width yscaled \height ; +\stopMPclip + +\startMPclip{llellipse} + clip currentpicture to llcircle scaled 2 shifted (1,1) + xscaled \width yscaled \height ; +\stopMPclip + +\startMPclip{lrellipse} + clip currentpicture to lrcircle scaled 2 shifted (0,1) + xscaled \width yscaled \height ; +\stopMPclip + +\startMPclip{tellipse} + clip currentpicture to tcircle shifted (.5,0) yscaled 2 + xscaled \width yscaled \height ; +\stopMPclip + +\startMPclip{bellipse} + clip currentpicture to bcircle shifted (.5,.5) yscaled 2 + xscaled \width yscaled \height ; +\stopMPclip + +\startMPclip{lellipse} + clip currentpicture to lcircle shifted (.5,.5) xscaled 2 + xscaled \width yscaled \height ; +\stopMPclip + +\startMPclip{rellipse} + clip currentpicture to rcircle shifted (0,.5) xscaled 2 + xscaled \width yscaled \height ; +\stopMPclip + +\startMPclip{diamond} + clip currentpicture to unitdiamond + xscaled \width yscaled \height ; +\stopMPclip + +\startMPclip{negdiamond} + clip currentpicture to (unitdiamond peepholed unitsquare) + xscaled \width yscaled \height ; +\stopMPclip + +\startMPclip{urtriangle} + clip currentpicture to urtriangle scaled 2 + xscaled \width yscaled \height ; +\stopMPclip + +\startMPclip{ultriangle} + clip currentpicture to ultriangle scaled 2 shifted (1,0) + xscaled \width yscaled \height ; +\stopMPclip + +\startMPclip{lltriangle} + clip currentpicture to lltriangle scaled 2 shifted (1,1) + xscaled \width yscaled \height ; +\stopMPclip + +\startMPclip{lrtriangle} + clip currentpicture to lrtriangle scaled 2 shifted (0,1) + xscaled \width yscaled \height ; +\stopMPclip + +% More efficient: +% +% \def\dosimpleMPclip#1 +% {clip currentpicture to (#1) xscaled \width yscaled \height ;} +% +% \def\simpleMPclip#1#2% +% {\startMPclip{#1}\dosimpleMPclip{#2}\stopMPclip} +% +% \simpleMPclip {ellipse} {unitcircle} +% \simpleMPclip {diamond} {unitdiamond} +% +% \simpleMPclip {negellipse} {unitcircle peepholed unitsquare} +% \simpleMPclip {negdiamond} {unitdiamond peepholed unitsquare} +% +% \simpleMPclip {urellipse} {urcircle scaled 2 shifted (0,0)} +% \simpleMPclip {ulellipse} {ulcircle scaled 2 shifted (1,0)} +% \simpleMPclip {llellipse} {llcircle scaled 2 shifted (1,1)} +% \simpleMPclip {lrellipse} {lrcircle scaled 2 shifted (0,1)} +% +% \simpleMPclip {tellipse} {tcircle shifted (.5,0) yscaled 2} +% \simpleMPclip {bellipse} {bcircle shifted (.5,.5) yscaled 2} +% \simpleMPclip {lellipse} {lcircle shifted (.5,.5) xscaled 2} +% \simpleMPclip {rellipse} {rcircle shifted (0,.5) xscaled 2} +% +% \simpleMPclip {urtriangle} {urtriangle scaled 2 shifted (0,0)} +% \simpleMPclip {ultriangle} {ultriangle scaled 2 shifted (1,0)} +% \simpleMPclip {lltriangle} {lltriangle scaled 2 shifted (1,1)} +% \simpleMPclip {lrtriangle} {lrtriangle scaled 2 shifted (0,1)} + +%D \in {Figure} [fig:clipping paths] shows which paths are +%D predefined. When applied to a whole picture, their usage +%D is: +%D +%D \starttypen +%D \clip[nx=1,ny=1,mp=ellipse]{some clippable content} +%D \stoptypen +%D +%D \startbuffer +%D \setupclipping [nx=1,ny=1,x=1,y=1] +%D \setupblackrules[width=2cm,height=1cm] +%D \startcombinatie[6*3] % \startcombination[6*3] +%D {\clip[mp=urellipse] {\blackrule}} {urellipse} +%D {\clip[mp=ulellipse] {\blackrule}} {ulellipse} +%D {\clip[mp=llellipse] {\blackrule}} {llellipse} +%D {\clip[mp=lrellipse] {\blackrule}} {lrellipse} +%D {\clip[mp=ellipse] {\blackrule}} {ellipse} +%D {\clip[mp=negellipse]{\blackrule}} {negellipse} +%D {\clip[mp=tellipse] {\blackrule}} {tellipse} +%D {\clip[mp=bellipse] {\blackrule}} {bellipse} +%D {\clip[mp=lellipse] {\blackrule}} {lellipse} +%D {\clip[mp=rellipse] {\blackrule}} {rellipse} +%D {} {} +%D {} {} +%D {\clip[mp=urtriangle]{\blackrule}} {urtriangle} +%D {\clip[mp=ultriangle]{\blackrule}} {ultriangle} +%D {\clip[mp=lltriangle]{\blackrule}} {lltriangle} +%D {\clip[mp=lrtriangle]{\blackrule}} {lrtriangle} +%D {\clip[mp=diamond] {\blackrule}} {diamond} +%D {\clip[mp=negdiamond]{\blackrule}} {negdiamond} +%D \stopcombinatie % \stopcombination +%D \stopbuffer +%D +%D \plaatsfiguur % \placefigure +%D [here][fig:clipping paths] +%D {The predefined clipping paths.} +%D {\haalbuffer} % {\getbuffer} + +\endinput diff --git a/tex/context/base/meta-fig.tex b/tex/context/base/meta-fig.tex new file mode 100644 index 000000000..c282f36c7 --- /dev/null +++ b/tex/context/base/meta-fig.tex @@ -0,0 +1,85 @@ +%D \module +%D [ file=meta-fig, +%D version=2000.09.07, +%D title=\METAPOST\ Graphics, +%D subtitle=Stand Alone Graphics, +%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. + +\writestatus{loading}{MetaPost Graphics / Stand Alone Graphics} + +\unprotect + +%D This module implements a method for defining +%D stand||alone||graphics, that is, each graphic gets is own +%D page. Because graphics are wrapped in a \type {\framed}, +%D you can add overlays to the graphic directly, and since the +%D whole \CONTEXT\ machinery is available, you can also add +%D page backgrounds. +%D +%D \starttypen +%D \setupMPpage +%D [offset=1pt, +%D background=color, +%D backgroundcolor=green] +%D +%D \startMPpage +%D fill fullcircle scaled 10cm withcolor red ; +%D \stopMPpage +%D +%D \startMPpage +%D fill fullsquare rotated 45 scaled 8cm withcolor blue ; +%D \stopMPpage +%D \stoptypen +%D +%D Although this is hardly of any use, you can mix these +%D definitions with the text flow, since all settings are +%D kept local. The page is clipped to the image size. + +\presetlocalframed[\??mp] + +\def\setupMPpage% + {\dodoubleargument\getparameters[\??mp]} + +\def\startMPpage% + {\dosingleempty\dostartMPpage} + +\long\def\dostartMPpage[#1]#2\stopMPpage + {\page + \bgroup + \setbox\scratchbox=\hbox + {\localframed[\??mp][#1]{\startMPcode#2\stopMPcode}} + \edef\MPwd{\the\wd\scratchbox} + \edef\MPht{\the\ht\scratchbox} + \definepapersize + [\s!dummy] + [\c!breedte=\MPwd, + \c!hoogte=\MPht] + \startlocal % keep settings as local as can be + \setuppapersize + [\s!dummy][\s!dummy] + \setuplayout + [\c!breedte=\MPwd,\c!hoogte=\MPht, + \c!kopwit=\!!zeropoint,\c!rugwit=\!!zeropoint, + \c!snijwit=\!!zeropoint,\c!bodemwit=\!!zeropoint, + \c!hoofd=\!!zeropoint,\c!voet=\!!zeropoint] + \stoplocal % which saves us the trouble of push/pop + \startstandardmakeup + \centerbox{\box\scratchbox} + \stopstandardmakeup + \egroup} + +\setupMPpage + [\c!strut=\v!nee, + \c!uitlijnen=, + \c!offset=\v!overlay, + \c!breedte=\v!passend, + \c!hoogte=\v!passend, + \c!kader=\v!uit] + +\protect \endinput diff --git a/tex/context/base/meta-ini.tex b/tex/context/base/meta-ini.tex new file mode 100644 index 000000000..1554c175d --- /dev/null +++ b/tex/context/base/meta-ini.tex @@ -0,0 +1,510 @@ +%D \module +%D [ file=meta-ini, +%D version=1999.07.10, +%D title=\METAPOST\ Graphics, +%D subtitle=Initialization, +%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. + +\writestatus{loading}{MetaPost Graphics / Initializations} + +\unprotect + +\startmessages dutch library: metapost + title: metapost + 1: metapost bibliotheek -- wordt geladen +\stopmessages + +\startmessages english library: metapost + title: metapost + 1: loading metapost library -- +\stopmessages + +\startmessages german library: metapost + title: metapost + 1: loading metapost library -- +\stopmessages + +\startmessages czech library: metapost + title: metapost + 1: loading metapost library -- +\stopmessages + +\startmessages italian library: metapost + title: metapost + 1: caricamento della libreria metapost -- +\stopmessages + +\startmessages norwegian library: metapost + title: metapost + 1: metapost bibliotek -- blir lest inn +\stopmessages + +%D This module extends the functionality of the support module +%D \type {supp-mps}, the module that is responsible for +%D \METAPOST\ inclusion in \CONTEXT. Some basic macros will be +%D extended. Since some support is depends on \METAPOST\ +%D macros. so let's first preload a few auxiliary \METAPOST\ +%D files. + +\appendtoks + if unknown context_tool : input mp-tool ; fi ; + if unknown context_spec : input mp-spec ; fi ; +\to \MPinitializations + +%D Since we want lables to follow the document settings, we +%D also set the font related variables. + +\appendtoks + defaultfont := "\truefontname{Regular}" ; + defaultscale := \the\bodyfontsize/10pt ; % not good yet +\to \MPinitializations + +%D We save the number of graphics for the sake of \TEXEXEC. + +\newcounter\totalnumberofMPgraphics +\def\thecurrentMPgraphic{\the\currentMPgraphic} + +\appendtoks + \savecurrentvalue\totalnumberofMPgraphics\thecurrentMPgraphic +\to \everybye + +%D \macros +%D {setupMPvariables} +%D +%D When we build collections of \METAPOST\ graphics, like +%D background and buttons, the need for passing settings +%D arises. By (mis|)|using the local prefix that belongs to +%D \type {\framed}, we get a rather natural interface to +%D backgrounds. To prevent conflicts, we will use the \type +%D {-} in \METAPOST\ specific variables, like: +%D +%D \starttypen +%D \setupMPvariables[meta:button][size=20pt] +%D \stoptypen + +\def\@@meta{meta:} + +\def\setupMPvariables% + {\dodoubleempty\dosetupMPvariables} + +\def\dosetupMPvariables[#1][#2]% + {\ifsecondargument + \getrawparameters[#1:][#2]% + \else + \getrawparameters[\@@meta][#1]% + \fi} + +\let\@@framed\s!unknown + +\def\MPvariable#1% + {\getvalue{\ifundefined{\@@framed\@@meta#1}\else\@@framed\fi\@@meta#1}} + +\let\MPvar\MPvariable + +%D \macros +%D {startuniqueMPgraphic, uniqueMPgraphic} +%D +%D This macros is probably of most use to myself, since I like +%D to use graphics that adapt themselves. The next \METAPOST\ +%D kind of graphic is both unique and reused when possible. +%D +%D \starttypen +%D \defineoverlay[example][\uniqueMPgraphic{test}] +%D +%D \startuniqueMPgraphic {test} +%D draw unitsquare xscaled \overlaywidth yscaled \overlayheight ; +%D \stopuniqueMPgraphic +%D \stoptypen + +%D For educational purposes, we show the original version +%D first. This one used a rather simple method for determining +%D the uniqueness. +%D +%D \starttypen +%D \long\def\startuniqueMPgraphic#1#2\stopuniqueMPgraphic% +%D {\setvalue{MP:#1}% +%D {\startreusableMPgraphic{\overlaystamp:#1}#2\stopreusableMPgraphic +%D \reuseMPgraphic{\overlaystamp:#1}}} +%D +%D \def\uniqueMPgraphic#1% +%D {\getvalue{MP:#1}} +%D \stoptypen + +\def\overlaystamp% watch the \MPcolor, since colors can be redefined + {\overlaywidth:\overlayheight:\overlaydepth + :\MPcolor{\overlaycolor}:\MPcolor{\overlaylinecolor}} + +%D A better approach is to let additional variables play a role +%D in determining the uniqueness. In the next macro, the +%D second, optional, argument is used to guarantee the +%D uniqueness, as well as prepare variables for passing them to +%D \METAPOST. +%D +%D \starttypen +%D \startuniqueMPgraphic{meta:hash}{gap,angle,...} +%D \stoptypen +%D +%D The calling macro also accepts a second argument. For +%D convenient use in overlay definitions, we use \type {{}} +%D instead of \type {[]}. +%D +%D \starttypen +%D \uniqueMPgraphic{meta:hash}{gap=10pt,angle=30} +%D \stoptypen + +\def\handleuniqueMPgraphic#1#2#3% + {\def\@@meta{#1:}% + \extendMPoverlaystamp{#2}% incl prepare + %\startreusableMPgraphic{\overlaystamp:#1}#3\stopreusableMPgraphic + %\getvalue{MP:\overlaystamp:#1}} % no \reuseMPgraphic, else wrong \@@meta + \ifundefined{MP:\overlaystamp:#1}% + \enableincludeMPgraphics + \startMPgraphic#3\stopMPgraphic + \doifobjectssupportedelse{}{\useMPboxfalse}% + \ifuseMPbox + \douseMPbox{MP:\overlaystamp:#1}% + \else + \nouseMPbox{MP:\overlaystamp:#1}% + \fi + \fi + \getvalue{MP:\overlaystamp:#1}} + +\long\def\startuniqueMPgraphic% + {\dodoublegroupempty\dostartuniqueMPgraphic} + +\long\def\dostartuniqueMPgraphic#1#2#3\stopuniqueMPgraphic% + {\setvalue{MP:#1}{\handleuniqueMPgraphic{#1}{#2}{#3}}} + +\unexpanded\def\uniqueMPgraphic% + {\dodoublegroupempty\douniqueMPgraphic} + +\def\douniqueMPgraphic#1#2% +% {{\def\@@meta{#1:}\setupMPvariables[#2]\getvalue{MP:#1}{}}} + {{\setupMPvariables[#1][#2]\getvalue{MP:#1}{}}} + +\long\def\handleuseMPgraphic#1#2#3% + {\bgroup + \def\@@meta{#1:}% + \prepareMPvariables{#2}% + \enableincludeMPgraphics + \startMPgraphic#3\stopMPgraphic + \loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{}% + \deallocateMPslot\currentMPgraphic + \placeMPgraphic + \egroup} + +\long\def\startuseMPgraphic% + {\dodoublegroupempty\dostartuseMPgraphic} + +\long\def\dostartuseMPgraphic#1#2#3\stopuseMPgraphic% + {\long\setgvalue{MP:#1}{\handleuseMPgraphic{#1}{#2}{#3}}} + +\long\def\handlereusableMPgraphic#1#2#3% + {\bgroup + \def\@@meta{#1:}% + \prepareMPvariables{#2}% + \enableincludeMPgraphics + \startMPgraphic#3\stopMPgraphic + \doifobjectssupportedelse{}{\useMPboxfalse}% + \ifuseMPbox + \douseMPbox{MP:#1}% + \else + \nouseMPbox{MP:#1}% + \fi + \getvalue{MP:#1}% + \egroup} + +\long\def\startreusableMPgraphic% + {\dodoublegroupempty\dostartreusableMPgraphic} + +\long\def\dostartreusableMPgraphic#1#2#3\stopreusableMPgraphic% + {\ifundefined{MP:#1}% + \long\setgvalue{MP:#1}{\handlereusableMPgraphic{#1}{#2}{#3}}% + \fi} + +\unexpanded\def\useMPgraphic% + {\dodoublegroupempty\douseMPgraphic} + +\def\douseMPgraphic#1#2% + {{\setupMPvariables[#1][#2]\getvalue{MP:#1}{}}} + +\let\reuseMPgraphic\useMPgraphic + +\def\enableincludeMPgraphics% + {\let\handleuseMPgraphic \thirdofthreearguments + \let\handlereusableMPgraphic\thirdofthreearguments} + +%D One way of defining a stamp is: +%D +%D \starttypen +%D \def\extendMPoverlaystamp#1% +%D {\def\docommando##1% +%D {\edef\overlaystamp{\overlaystamp:\MPvariable{##1}}}% +%D \processcommalist[#1]\docommando} +%D \stoptypen + +%D Since we need to feed \METAPOST\ with expanded dimensions, +%D we introduce a dedicated expansion engine. + +\def\prepareMPvariable#1% + {\ifundefined{\@@framed\@@meta#1}% + \doprepareMPvariable{\@@meta#1}% + \else + \doprepareMPvariable{\@@framed\@@meta#1}% + \fi} + +\def\doprepareMPvariable#1% + {\doifelsenothing{\getvalue{#1}} + {\setevalue{#1}{\MPcolor{black}}} + {\doifcolorelse{\getvalue{#1}} + {\setevalue{#1}{\MPcolor{\getvalue{#1}}}} + {\setbox\scratchbox=\hbox{\scratchdimen=\getvalue{#1}sp}% + \ifdim\wd\scratchbox=\!!zeropoint + \scratchcounter=\getvalue{#1}\relax + \setevalue{#1}{\the\scratchcounter}% + \else + \scratchdimen=\getvalue{#1}\relax + \setevalue{#1}{\the\scratchdimen}% + \fi}}} + +%D We redefine \type {\extendMPoverlaystamp} to preprocess +%D variables using \type {\prepareMPvariable}. + +\def\extendMPoverlaystamp#1% + {\def\docommando##1% + {\prepareMPvariable{##1}% + \edef\overlaystamp{\overlaystamp:\MPvariable{##1}}}% + \processcommalist[#1]\docommando} + +\def\prepareMPvariables#1% + {\processcommalist[#1]\prepareMPvariable} + +%D \macros +%D {MPdatafile} +%D +%D We redefine a macro from \type {supp-mps.tex}: + +\def\MPdatafile% + {\bufferprefix mpd-\the\currentMPgraphic.mpd} + +%D We also have to make sure that \METAPOST\ knows this: + +\appendtoks + if not known _data_prefix_ : + string _data_prefix_ , _data_suffix_ ; + fi ; + _data_prefix_ := "\bufferprefix mpd-" ; + _data_suffix_ := ".mpd" ; +\to \MPinitializations + +%D \macros +%D {getMPdata} +%D +%D The current data is loaded with: + +\def\getMPdata% + {\readlocfile{\MPdatafile}{}{}} + +%D When we collect graphics in one file, we run into +%D troubles, since \METAPOST\ has a built in limit (of 4) +%D on the number of files it can handle. It's therefore +%D better to collect all data in one file and filter it. + +\def\getMPdata% + {\long\def\MPdata##1##2% + {\ifnum##1=\currentMPgraphic\relax##2\fi}% + \readlocfile{\MPgraphicfile.mpd}{}{}} + +%D We have to enable this mechanism with: + +\appendtoks + boolean collapse_data ; collapse_data := true ; + _data_suffix_ := ".mpd" ; % overloads previous one +\to \MPinitializations + +%D For the moment, the next one is a private macro: + +\def\processMPbuffer% + {\dosingleempty\doprocessMPbuffer} + +\def\doprocessMPbuffer[#1]% + {\doifelsenothing{#1} + {\doprocessMPbuffer[\jobname]} + {\bgroup + \let\par\empty + \!!toksa=\emptytoks + \def\copyMPbufferline{\expandafter\appendtoks\fileline\to\!!toksa}% + \def\dodoprocessMPbuffer##1% + {\doprocessfile\scratchread{\TEXbufferfile{##1}}\copyMPbufferline}% + \processcommalist[#1]\dodoprocessMPbuffer + \ifMPrun + \@EA\startMPrun\the\!!toksa\stopMPrun + \else + \@EA\startuseMPgraphic\@EA{\@EA\s!dummy\@EA}\the\!!toksa\stopuseMPgraphic + \useMPgraphic{\s!dummy}% + \fi + \egroup}} + +%D \macros +%D {startMPenvironment, resetMPenvironment} +%D +%D In order to synchronize the main \TEX\ run and the runs +%D local to \METAPOST, environments can be passed. + +\ifx\everyMPTEXgraphic\undefined + \newtoks\everyMPTEXgraphic +\fi + +\def\startMPenvironment% % second arg gobbles spaces, so + {\dodoubleempty\dostartMPenvironment} % that reset gives \emptytoks + +\long\def\dostartMPenvironment[#1][#2]#3\stopMPenvironment% + {\doif{#1}{\s!reset}{\resetMPenvironment}% + \appendtoks#3\to\everyMPTEXgraphic} + +\def\resetMPenvironment% + {\everyMPTEXgraphic=\emptytoks} % = is really needed ! + +%D This command takes \type {[reset]} as optional +%D argument. +%D +%D \starttypen +%D \startMPenvironment +%D \setupbodyfont[pos,14.4pt] +%D \stopMPenvironment +%D +%D \startMPcode +%D draw btex \sl Hans Hagen etex scaled 5 ; +%D \stopMPcode +%D \stoptypen +%D +%D The \type {\resetMPenvironment} is a quick way to erase +%D the token list. + +%D We don't want spurious files, do we? + +\def\initializeMPgraphics% \unlinkfile{\MPgraphicfile.mp} -> empty file + {%\ifx\bufferprefix\empty \else + \immediate\openout\MPwrite\MPgraphicfile.mp + \immediate\write\MPwrite{end.}% + \immediate\closeout\MPwrite + }%\fi} + +%D Loading specific \METAPOST\ related definitions is +%D accomplished by: + +\def\douseMPlibrary#1% + {\doifundefined{\c!file\f!javascriptprefix#1} + {\setvalue{\c!file\f!javascriptprefix#1}{} + \makeshortfilename[\f!metapostprefix#1] + \showmessage{\m!metapost}{1}{#1} + \startreadingfile + \readsysfile{\shortfilename}{}{} + \stopreadingfile}} + +\def\useMPlibrary[#1]% + {\processcommalist[#1]\douseMPlibrary} + +%D \macros +%D {setMPtext, MPtext, MPstring, MPbetex} +%D +%D To be documented: +%D +%D \starttyping +%D \setMPtext{identifier}{text} +%D +%D \MPtext {identifier} +%D \MPstring{identifier} +%D \MPbetex {identifier} +%D \stoptyping + +\def\@@MPT{@MPT@} + +\def\forceMPTEXgraphic% + {\long\def\checkMPTEXgraphic##1{\global\MPTEXgraphictrue}} + +\def\setMPtext#1#2% + {%\forceMPTEXgraphic + \convertargument#2\to\ascii + \setevalue{\@@MPT#1}{\ascii}} + +\def\MPtext #1{\getvalue{\@@MPT#1}} +\def\MPstring#1{"\getvalue{\@@MPT#1}"} +\def\MPbetex #1{btex \getvalue{\@@MPT#1} etex} + +%D In order to communicate conveniently with the \TEX\ +%D engine, we introduce some typesetting variables. + +\startuseMPgraphic{init data} + color OverlayColor, OverlayLineColor ; + % + OverlayWidth := \overlaywidth ; + OverlayHeight := \overlayheight ; + OverlayDepth := \overlayheight ; + OverlayColor := \MPcolor{\overlaycolor} ; + OverlayLineWidth := \overlaylinewidth ; + OverlayLineColor := \MPcolor{\overlaylinecolor} ; + % + BaseLineSkip := \the\baselineskip ; + LineHeight := \the\baselineskip ; + BodyFontSize := \the\bodyfontsize ; + % + StrutHeight := \strutheight ; + StrutDepth := \strutdepth ; + % + CurrentWidth := \the\hsize ; + CurrentHeight := \the\vsize ; + % + EmWidth := \the\fontdimen6\font ; + ExHeight := \the\fontdimen5\font ; + % + PageNumber := \the\realpageno ; + RealPageNumber := \the\pageno ; + LastPageNumber := \lastpage ; +\stopuseMPgraphic + +\appendtoks + \includeMPgraphic{init data} +\to \MPinitializations + +% this will become (more efficient) +% +% \startuseMPgraphic{init data} +% tx1 := \the\baselineskip ; +% tx2 := \the\baselineskip ; +% tx3 := \the\bodyfontsize ; +% tx4 := \strutheight ; +% tx5 := \strutdepth ; +% tx6 := \the\hsize ; +% tx7 := \the\vsize ; +% tx8 := \the\fontdimen6\font ; +% tx9 := \the\fontdimen5\font ; +% \stopuseMPgraphic +% +% def map_tx_variables = +% BaseLineSkip := tx1 ; +% LineHeight := tx2 ; +% BodyFontSize := tx3 ; +% StrutHeight := tx4 ; +% StrutDepth := tx5 ; +% CurrentWidth := tx6 ; +% Currentheight := tx7 ; +% EmWidth := tx8 ; +% ExHeight := tx9 ; +% enddef ; +% +% extra_begin_fig .... + +\protect \endinput + +% also: +% +% linecap := rounded ; +% linejoin := rounded ; +% drawoptions () ; diff --git a/tex/context/base/meta-pag.tex b/tex/context/base/meta-pag.tex new file mode 100644 index 000000000..7252cf868 --- /dev/null +++ b/tex/context/base/meta-pag.tex @@ -0,0 +1,115 @@ +%D \module +%D [ file=meta-ini, +%D version=1999.07.10, +%D title=\METAPOST\ Graphics, +%D subtitle=Initialization, +%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. + +%D These definitions used to be part of the old \type +%D {core-mps} file, later changed into \type {meta-ini}, but +%D keeping them separate is cleaner. + +\writestatus{loading}{MetaPost Graphics / Page Data Management} + +\unprotect + +\appendtoks + if unknown context_page : input mp-page ; fi ; +\to \MPinitializations + +%D The next few macros tell \METAPOST\ how the \CONTEXT\ +%D pagebody looks. + +\startuseMPgraphic{page data} + boolean PageStateAvailable ; PageStateAvailable := true ; + boolean OnRightPage ; OnRightPage := true ; + def LoadPageState = + OnRightPage := \MPonrightpage ; + PageNumber := \realfolio ; + PaperHeight := \the\papierhoogte ; + PaperWidth := \the\papierbreedte ; + PrintPaperHeight := \the\printpapierhoogte ; + PrintPaperWidth := \the\printpapierbreedte ; + TopSpace := \the\kopwit ; + BackSpace := \the\rugwit ; + MakeupHeight := \the\zethoogte ; + MakeupWidth := \the\zetbreedte ; + TopHeight := \the\bovenhoogte ; + TopDistance := \bovenafstand ; + HeaderHeight := \the\hoofdhoogte ; + HeaderDistance := \hoofdafstand ; + TextHeight := \the\teksthoogte ; + FooterDistance := \voetafstand ; + FooterHeight := \the\voethoogte ; + BottomDistance := \onderafstand ; + BottomHeight := \the\onderhoogte ; + LeftEdgeWidth := \the\linkerrandbreedte ; + LeftEdgeDistance := \linkerrandafstand ; + LeftMarginWidth := \the\linkermargebreedte ; + LeftMarginDistance := \linkermargeafstand ; + TextWidth := \the\tekstbreedte ; + RightMarginDistance := \rechtermargeafstand ; + RightMarginWidth := \the\rechtermargebreedte ; + RightEdgeDistance := \rechterrandafstand ; + RightEdgeWidth := \the\rechterrandbreedte ; + PageOffset := \MPpageoffset ; + PageDepth := \MPpagedepth ; + enddef ; +\stopuseMPgraphic + +\def\MPonrightpage{true} +\let\MPpageoffset \!!zeropoint +\let\MPpagedepth \!!zeropoint + +\def\freezeMPpagelayout% + {\doifelsevalue{\??ma\v!pagina\c!offset}{\v!overlay} + {\let\MPpageoffset\!!zeropoint} + {\edef\MPpageoffset{\getvalue{\??ma\v!pagina\c!offset}}}% + \edef\MPpagedepth{\getvalue{\??ma\v!pagina\c!diepte}}% + \freezedimenmacro\MPpageoffset + \freezedimenmacro\MPpagedepth + \doifbothsides + \def\MPonrightpage{true}% + \orsideone + \def\MPonrightpage{true}% + \orsidetwo + \def\MPonrightpage{false}% + \od} + +\def\freezeMPlayout% must be done more efficient + {\freezedimenmacro\bovenafstand + \freezedimenmacro\hoofdafstand + \freezedimenmacro\voetafstand + \freezedimenmacro\onderafstand + \freezedimenmacro\linkerrandafstand + \freezedimenmacro\linkermargeafstand + \freezedimenmacro\rechtermargeafstand + \freezedimenmacro\rechterrandafstand} + +%D We need to freeze the pagelayout before the backgrounds +%D are build, because the overlay will temporarily become +%D zero (overlay). + +\appendtoks + \freezeMPpagelayout +\to \everypagebody + +%D By freezing these value every graphic, we can use layout +%D variables that change halfways a page, whatever use that +%D has. + +\prependtoks + \freezeMPlayout % to be used grouped !!! +\to \everyMPgraphic + +\appendtoks + \includeMPgraphic{page data} +\to \MPinitializations + +\protect \endinput diff --git a/tex/context/base/meta-txt.tex b/tex/context/base/meta-txt.tex new file mode 100644 index 000000000..d39b20ef5 --- /dev/null +++ b/tex/context/base/meta-txt.tex @@ -0,0 +1,261 @@ +%D \module +%D [ file=meta-txt, +%D version=2000.07.06, +%D title=\METAPOST\ Graphics, +%D subtitle=Text Tricks, +%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. + +%D In this library some handy text manipulations are defined + +\unprotect + +\appendtoks + input mp-text ; +\to \MPinitializations + +%%%%%%% + +% \def\newchar#1{\chardef#1=0 } + +\newdimen\parwidth +\newdimen\parheight +\newdimen\parvoffset +\newdimen\parhoffset +\newcount\parlines +\newtoks \partoks +\newbox \shapetextbox +\newif \ifparseries +\chardef \parfirst=0 + +\def\startshapetext[#1]% + {\global\newcounter\currentshapetext + \global\setbox\shapetextbox=\vbox\bgroup + \expanded{\switchtobodyfont[\@@shkorps]}% + \dontcomplain + \hsize\parwidth + \setuptolerance[\v!zeersoepel,\v!rek]% + \!!counta=0 + \!!toksa=\emptytoks + \def\docommando##1% + {\setbox\scratchbox=\hbox{\useMPgraphic{##1}}% + \global\chardef\parfirst=0 + \getMPdata % \readlocfile{\MPdatafile}{}{}% + \setshapecharacteristics + \advance\!!counta by \parlines + \expandafter\appendtoks\the\partoks\to\!!toksa}% + \processcommalist[#1]\docommando + \global\parseriestrue + \xdef\totalparlines{\the\!!counta}% + \global\partoks\!!toksa + \expanded{\parshape \the\!!counta \the\!!toksa}% + \setshapecharacteristics % extra dummy + \ifparseries\def\par{\endgraf\adaptparshape}\fi + \EveryPar{\begstrut}} + +\def\stopshapetext% + {\endstrut + %\removebottomthings + \egroup + \global\newcounter\currentshapetext + \getshapecharacteristics} + +\def\adaptparshape% + {\def\docommando##1% + {\ifcase\!!counta + \expandafter\appendtoks\space##1 \to\!!toksa + \else + \advance\!!counta by -1 + \fi}% + \!!counta=\prevgraf + \doglobal\decrement(\totalparlines,\!!counta)% + \multiply\!!counta by 2 + \!!toksa=\emptytoks + \expanded{\processseparatedlist[\the\partoks][\space]}\docommando + \global\partoks=\!!toksa + \expanded{\parshape\totalparlines\the\partoks}} + +\def\getshapecharacteristics% + {\doglobal\increment\currentshapetext + \doifdefinedelse{parlines:\currentshapetext} + {\global\parlines =\getvalue{parlines:\currentshapetext}% + \global\chardef\parfirst =\getvalue{parfirst:\currentshapetext}% + \global\parvoffset =\getvalue{parvoffset:\currentshapetext}% + \global\parhoffset =\getvalue{parhoffset:\currentshapetext}% + \global\parwidth =\getvalue{parwidth:\currentshapetext}% + \global\parheight =\getvalue{parheight:\currentshapetext}} + {\global\parlines =1 + \global\chardef\parfirst =0 + \global\parvoffset =\!!zeropoint + \global\parhoffset =\!!zeropoint + \global\parwidth =\hsize + \global\parheight =\vsize}} + +\def\setshapecharacteristics% + {\doglobal\increment\currentshapetext + \setxvalue{parlines:\currentshapetext }{\the\parlines}% + \setxvalue{parfirst:\currentshapetext }{\the\parfirst}% + \setxvalue{parvoffset:\currentshapetext}{\the\parvoffset}% + \setxvalue{parhoffset:\currentshapetext}{\the\parhoffset}% + \setxvalue{parwidth:\currentshapetext }{\the\parwidth}% + \setxvalue{parheight:\currentshapetext }{\the\parheight}} + +\def\getshapetext% option: unvbox + {\vbox\bgroup + \forgetall + \setbox\scratchbox\vbox to \parheight + {\expanded{\switchtobodyfont[\@@shkorps]}% evt strutheight en + \splittopskip=\strutheight % lineheight opslaan + \vskip\parvoffset % scheelt switch en + \ifcase\parfirst\or\vskip\lineheight\fi % is ook veiliger + \hskip\parhoffset + \hbox{\vsplit\shapetextbox to \parlines\lineheight}}% + \wd\scratchbox=\parwidth + \ht\scratchbox=\parheight + \dp\scratchbox=\!!zeropoint + \box\scratchbox + \getshapecharacteristics + \egroup} + +\def\setupshapetexts% + {\dodoubleempty\getparameters[\??sh]} + +\setupshapetexts% + [\c!korps=] + +%%%%%%% + +\doifundefined{RotFont}{\definefont[RotFont][RegularBold]} + +\def\processfollowingtoken#1% strut toegevoegd + {\appendtoks#1\to\MPtoks + \setbox\MPbox=\hbox{\RotFont\setstrut\strut\the\MPtoks}% + \startMPdrawing + n := n + 1 ; len[n] := \the\wd\MPbox ; + \stopMPdrawing + \startMPdrawing[-] + pic[n] := btex \RotFont\setstrut\strut#1 etex ; + \stopMPdrawing} + +\startuseMPgraphic{followtokens} + % we default to nothing +\stopuseMPgraphic + +\def\followtokens#1% + {\vbox\bgroup + \forgetall + \dontcomplain + \MPtoks\emptytoks + \resetMPdrawing + \startMPdrawing + \includeMPgraphic{followtokens} + picture pic[] ; numeric len[], n ; n := 0 ; + \stopMPdrawing + \handletokens#1\with\processfollowingtoken + \startMPdrawing + if unknown RotPath : path RotPath ; RotPath := origin ; fi ; + if unknown TraceRot : boolean TraceRot ; TraceRot := false ; fi ; + if unknown ExtraRot : numeric ExtraRot ; ExtraRot := 0 ; fi ; + numeric al, at, pl, wid, pos ; pair ap, ad ; + al := arclength RotPath ; + if al=0 : + al := len[n] + ExtraRot ; + RotPath := origin -- (al,0) ; + fi ; + if al<len[n]: + RotPath := RotPath scaled ((len[n]+ExtraRot)/al) ; + al := arclength RotPath ; + fi ; + pl := (al-len[n])/(n-1) ; + if TraceRot : + draw RotPath withpen pencircle scaled 1pt withcolor blue ; + fi ; + for i=1 upto n : + wid := abs(xpart lrcorner pic[i] - xpart llcorner pic[i]) ; + pos := len[i]-wid/2 + (i-1)*pl ; + at := arctime pos of RotPath ; + ap := point at of RotPath ; + ad := direction at of RotPath ; + draw pic[i] shifted (-wid/2,0) rotated(angle(ad)) shifted ap ; + if TraceRot : + draw boundingbox + pic[i] shifted (-wid/2,0) rotated(angle(ad)) shifted ap + withpen pencircle scaled .25pt withcolor red ; + draw ap + withpen pencircle scaled .50pt withcolor green ; + fi ; + endfor ; + \stopMPdrawing + \MPdrawingdonetrue + \getMPdrawing + \resetMPdrawing + \egroup} + +% \followtokens +% {This is just a dummy text, kerned by T{\kern +% -.1667em\lower .5ex\hbox {E}}{\kern -.125emX} and typeset +% in a circle using {\setMFPfont M}{\setMFPfont +% E}{\setMFPfont T}{\setMFPfont A}{\setMFPfont +% P}{\setMFPfont O}{\setMFPfont S}{\setMFPfont T}.\quad} + +\startuseMPgraphic{fuzzycount} + begingroup + save height, span, drift, d, cp ; + height := 3/ 5 * \baselinedistance ; + span := 1/ 3 * height ; + drift := 1/10 * height ; + pickup pencircle scaled (1/12 * height) ; + def d = (uniformdeviate drift) enddef ; + for i := 1 upto \MPvar{n} : + draw + if (i mod 5)=0 : ((-d-4.5span,d)--(+d-0.5span,height-d)) + else : ((-d,+d)--(+d,height-d)) fi + shifted (span*i,d-drift) ; + endfor; + picture cp ; cp := currentpicture ; % for readability + setbounds currentpicture to + (llcorner cp shifted (0,-ypart llcorner cp) -- + lrcorner cp shifted (0,-ypart lrcorner cp) -- + urcorner cp -- ulcorner cp -- cycle) ; + endgroup ; +\stopuseMPgraphic + +\setupMPvariables + [fuzzycount] + [n=10] + +\def\fuzzycount#1% + {{\tx\useMPgraphic{fuzzycount}{n=#1}}} + +\defineconversion[fuzzy][\fuzzycount] + +%%%%%%% + +\setupMPvariables + [EnglishRule] + [height=1ex, + width=\the\localhsize, % without \the, problems in non e-tex + color=darkgray] + +\defineblank + [EnglishRule] + [medium] + +\startuniqueMPgraphic{EnglishRule}{height,width,color} + height = \MPvar{height} ; + x1 = 0 ; x3 = \MPvar{width} ; x2 = x4 = .5x3 ; + y1 = y3 = 0 ; y2 = -y4 = height/2 ; + fill z1..z2..z3 & z3..z4..z1 & cycle withcolor \MPvar{color} ; +\stopuniqueMPgraphic + +\def\EnglishRule% + {\startlinecorrection[EnglishRule] + \setlocalhsize \noindent \reuseMPgraphic{EnglishRule} + \stoplinecorrection} + +\protect \endinput diff --git a/tex/context/base/mult-com.tex b/tex/context/base/mult-com.tex index 3df62fa62..748cab454 100644 --- a/tex/context/base/mult-com.tex +++ b/tex/context/base/mult-com.tex @@ -21,7 +21,8 @@ %D future english will be the core language.} %D %D The German translations were provided by Tobias Burnus, -%D and the Czech ones by Tom Hudec. +%D the Czech ones by Tom Hudec, and the italian interface was +%D provided by Guiseppe Bilottta. \writestatus{loading}{Context Multilingual Macros / Commands} @@ -38,1283 +39,1666 @@ %D \startcompressdefinitions -\startcommands dutch english - german czech - - language: taal language - sprache jazyk - mainlanguage: hoofdtaal mainlanguage - hauptsprache hlavnijazyk - translate: vertaal translate - uebersetzten prelozit - installlanguage: installeertaal installlanguage - installieresprache jazykinstalace - setuplanguage: steltaalin setuplanguage - stellespracheein nastavjazyk - - showmakeup: toonopmaak showmakeup - zeigeumbruch ukazupravu - - useencoding: usecodering useencoding - benutzekodierung uzijkodovani - - usespecials: gebruikspecials usespecials - benutzespezielles uzijspeciality - defineoutput: definieeruitvoer defineoutput - defineoutput definujvystup - setupoutput: steluitvoerin setupoutput - stelleausgabeein nastavvystup - -% system redefineaccent: herdefinieeraccent redefineaccent -% redefiniereakzent redefinujakcent -% system redefinecharacter: herdefinieerkarakter redefinecharacter -% redefinierezeichen redefinujznak -% system redefinecommand: herdefinieercommando redefinecommand -% redefinierbefehl redefinujprikaz - defineaccent: definieeraccent defineaccent - definiereakzent definujakcent - definecharacter: definieerkarakter definecharacter - definierezeichen definujznak - definecommand: definieercommando definecommand - definierebefehl definujprikaz - startcoding: startcodering startcoding - startkodierung startkodovani - stopcoding: stopcodering stopcoding - stopkodierung stopkodovani - definebodyfontenvironment: definieerkorpsomgeving definebodyfontenvironment - definierefliesstextumgebung definebodyfontenvironment % TOM, was duplicate - setupbodyfontenvironment: stelkorpsomgevingin setupbodyfontenvironment - stellefliesstextumgebungein nastavprostredizakladnihofont - definebodyfont: definieerkorps definebodyfont - definierefliesstext definujzakladnifont - definefont: definieerfont definefont - definiereschrift definujfont - definefontsynonym: definieerfontsynoniem definefontsynonym - defineschriftsynonym definujsynonumumfontu - definestyle: definieerletter definestyle - definierestil definujstyl - definefontstyle: definieerfontstijl definefontstyle - definiereschriftstil definujstylfontu - setupstrut: stelstrutin setupstrut - setupstrut setupstrut - - setuptype: steltypein setuptype - stelletipein nastavtype - type: type type - tippen type - typ: typ typ - tip typ - arg: arg arg - arg arg - tex: tex tex - tex tex - definetyping: definieertypen definetyping - definieretippen definujopis - setuptyping: steltypenin setuptyping - stelletippenein nastavopis -% generated starttyping: starttypen starttyping -% starttippen startopis -% generated stoptyping: stoptypen stoptyping -% stoptippen stopopis - typefile: typefile typefile - tippedatei typesoubor - - setupfootnotes: stelvoetnotenin setupfootnotes - stellefussnotenein nastavpoznamkypodcarou - setupfootnotedefinition: stelvoetnootdefinitiein setupfootnotedefinition - stellefussnotendefinitionein nastavdefinicipoznamekpodcarou - note: noot note - notiz poznamka - footnote: voetnoot footnote - fussnote poznamkapodcarou - startlocalfootnotes: startlokalevoetnoten startlocalfootnotes - startlokalefussnoten startlokalnipoznamkypodcarou - stoplocalfootnotes: stoplokalevoetnoten stoplocalfootnotes - stoplokalefussnoten stoplokalnipoznamkypodcarou - placelocalfootnotes: plaatslokalevoetnoten placelocalfootnotes - platzierelokalefussnoten umistilokalnipoznamkypodcarou - placefootnotes: plaatsvoetnoten placefootnotes - platzierefussnoten umistipoznamkypodcarou - - currentdate: huidigedatum currentdate - heutigesdatum aktualnidatum - date: datum date - datum datum - weekday: weekdag weekday - wochentag vsedniden - WEEKDAY: WEEKDAG WEEKDAY - WOCHENTAG VSEDNIDEN - month: maand month - monat mesic - MONTH: MAAND MONTH - MONAT MESIC - - Numbers: Cijfers Numbers - Ziffern Cisla - numbers: cijfers numbers - ziffern cisla - romannumerals: romeins romannumerals - roemischezahlen rimskecislice - Romannumerals: Romeins Romannumerals - Roemischezahlen Rimskecislice - character: letter character - buchstabe znak - Character: Letter Character - Buchstabe Znak - characters: letters characters - buchstaben znaky - Characters: Letters Characters - Buchstaben Znaky - - unknown: onbekend unknown - unbekant neznamo - - definesymbol: definieersymbool definesymbol - definieresymbol definujsymbol - definefiguresymbol: definieerfiguursymbool definefiguresymbol - definiereabbsymbol definujobrazeksymbol - symbol: symbool symbol - symbol symbol - setupsymbolset: stelsymboolsetin setupsymbolset - stellesymbolsetein nastavsadusymbolu - showsymbolset: toonsymboolset showsymbolset - showsymbolset ukazsadusymbolu - startsymbolset: startsymboolset startsymbolset - startsymbolset startsadasymbolu - usesymbols: gebruiksymbolen usesymbols - verwendesymbole uzijsymbol - - defineconversion: definieerconversie defineconversion - definierekonversion definujkonverzi - convertnumber: converteernummer convertnumber - konvertierezahl konvertujcislo - - setupcapitals: stelkapitalenin setupcapitals - stelleversalienein nastavverzalky - - kap: kap kap - kap kap - KAP: KAP CAP - KAP KAP - nokap: nokap nocap - nokap nokap - Kap: Kap Cap - Kap Kap - Kaps: Kaps Caps - Kaps Kaps - WORD: WOORD WORD - WORT SLOVO - WORDS: WOORDEN WORDS - WOERTER SLOVA - Word: Woord Word - Wort Slovo - Words: Woorden Words - Woerter Slova - stretched: uitgerekt stretched - gestreckt roztazene - overstrike: doorstreep overstrike - durchgestrichen preskrtnuto - overstrikes: doorstrepen overstrikes - durchstreichen preskrtnuti - overbar: overstreep overbar - ueberstrichen nadtrzeno - overbars: overstrepen overbars - ueberstreichen nadtrzeni - underbar: onderstreep underbar - unterstrichen podtrzeno - underbars: onderstrepen underbars - unterstreichen podtrzeni - setupunderbar: stelonderstrepenin setupunderbar - stelleunterstreichenein nastavpodtrzeni - - setupbodyfont: stelkorpsin setupbodyfont - stellefliesstextein nastavzakladnifont - switchtobodyfont: switchnaarkorps switchtobodyfont - wechselezumfliesstext prepninazakladnifont - showbodyfont: toonkorps showbodyfont - zeigefliesstext ukazzakladnifont - showbodyfontenvironment: toonkorpsomgeving showbodyfontenvironment - zeigefliesstextumgebung ukazpostredizakladnihofontu - - headtext: koptekst headtext - ueberschrifttext texthlavicky - labeltext: labeltekst labeltext - labeltext textpopisku - LABELTEXT: LABELTEKST LABELTEXT - LABELTEXT TEXTPOPISKU - setupheadtext: stelkoptekstin setupheadtext - stelleueberschrifttextein nastavtexthlavicky - setuplabeltext: stellabeltekstin setuplabeltext - stellelabeltextein nastavtextpopisku - - marginrule: kantlijn marginrule - marginallinie marginalnilinka - startmarginrule: startkantlijn startmarginrule - startmarginallinie startmarginalnilinka - stopmarginrule: stopkantlijn stopmarginrule - stopmarginallinie stopmarginalnilinka - setupmarginrules: stelkantlijnin setupmarginrules - stellemarginallinieein nastavmarginalnilinky - - blackrule: blokje blackrule - rechteck cernalinka - blackrules: blokjes blackrules - rechtecke cernelinky - setupblackrules: stelblokjesin setupblackrules - stellerechteckein nastavcernelinky - - setupscreens: stelrastersin setupscreens - stellerasterein nastavrastr - - framed: omlijnd framed - umrahmt oramovani - inframed: inlijnd inframed - imumriss zaramovani - mframed: wilijnd maframed - maumrise maoramovani - inmframed: inwilijnd inmaframed - immaumrise mazaramovani - - setupframed: stelomlijndin setupframed - stelleumrahmtein nastavoramovani -% setuprules: stellijnenin setuprules -% stelleumrissein nastavobrys - setuplinewidth: stellijndiktein setuplinewidth - stellelinienbreiteein nastavsirkucary - - setupthinrules: steldunnelijnenin setupthinrules - stelleduennerumrissein nastavtenkelinky - thinrule: dunnelijn thinrule - duennelinie tenkalinka - thinrules: dunnelijnen thinrules - duennerumriss tenkelinky - hairline: haarlijn hairline - haarlinie vlasovalinka - - vl: vl vl - vl vl - hl: hl hl - hl hl - - defineframed: definieeromlijnd defineframed - definiereumrahmt definujoramovani - - defineframedtext: definieerkadertekst defineframedtext - definiereumrahmtertext definujoramovanytext -% startframedtext: startkadertekst startframedtext -% startumrahmtertext startoramovanytext -% stopframedtext: stopkadertekst stopframedtext -% stopumrahmtertext stoporamovanytext - setupframedtexts: stelkadertekstenin setupframedtexts - stelleumrahmtetexteein nastavoramovanetexty - - defineoverlay: definieeroverlay defineoverlay - definiereoverlay definujprekryv - background: achtergrond background - hintergrund pozadi - startbackground: startachtergrond startbackground - starthintergrund startpozadi - stopbackground: stopachtergrond stopbackground - stophintergrund stoppozadi - setupbackground: stelachtergrondin setupbackground - stellehintergrundein nastavpozadi - - fillinrules: invullijnen fillinrules - gefuelltesrechteck vyplnovelinky % ve formulari - setupfillinrules: stelinvullijnenin setupfillinrules - stellegefuelltesrechteckein nastavvyplnovelinky - fillintext: invultekst fillintext - ausfuelltext vyplnenytext - - setupfillinlines: stelinvulregelsin setupfillinlines - stellegefuelltezeileein nastavvyplnoveradky - fillinline: invulregel fillinline - gefuelltezeile vyplnovyradek - - setuptextrules: steltekstlijnenin setuptextrules - stelletextumrissein nastavtextovelinky - textrule: tekstlijn textrule - textlinie textovalinka - starttextrule: starttekstlijn starttextrule - starttextlinie starttextovalinka - stoptextrule: stoptekstlijn stoptextrule - stoptextlinie stoptextovalinka - - usemodule: gebruikmodule usemodule - verwendemodul uzijmodul - usemodules: gebruikmodules usemodules - verwendemodule uzijmoduly - - starttekst: starttekst starttext - starttext starttext - stoptekst: stoptekst stoptext - stoptext stoptext - - margetitel: margetitel margintitle - marginaltitel marginalninadpis - margewoord: margewoord marginword - marginalwort marginalnislovo - margetekst: margetekst margintext - marginaltext marginalnitext - - inlinker: inlinker inleft - imlinken vlevo - inmarge: inmarge inmargin - inmarginalie naokraj - inanderemarge: inanderemarge inothermargin - inanderermarginale nadruhyokraj - inrechter: inrechter inright - imrechten vpravo - startmargeblok: startmargeblok startmarginblock - startmarginalblock startmarginalniblok - stopmargeblok: stopmargeblok stopmarginblock - stopmarginalblock stopmarginalniblok - stelinmargein: stelinmargein setupinmargin - stelleinmarginalieein nastavmarginalie - stelmargeblokkenin: stelmargeblokkenin setupmarginblocks - stellemarginalblockein nastavmarginalniblok - - inleftside: inlinkerrand inleftside - imlinkenrand nalevo - inleftmargin: inlinkermarge inleftmargin - inlinkermarginale nalevyokraj - inrightmargin: inrechtermarge inrightmargin - inrechtermarginale napravyokraj - inrightside: inrechterrand inrightside - imrechtenrand napravo - - woordrechts: woordrechts wordright - wortrechts slovovpravo - - definieerblanko: definieerblanko defineblank - definiereblanko definujbilemisto - blanko: blanko blank - blanko bilemisto - stelblankoin: stelblankoin setupblank - stelleblankoein nastavbilemisto - corrigeerwitruimte: corrigeerwitruimte correctwhitespace - korrigierezwischenraum korekcebilehomista - fixedspaces: vastespaties fixedspaces - festesspatium tvrdemezery - fixedspace: vastespatie fixedspace - festesspatium tvrdamezera - nospace: geenspatie nospace - keinspatium zadnamezera - space: spatie space - spatium mezera - geenwitruimte: geenwitruimte nowhitespace - keinzwischenraum zadnebilemisto - opelkaar: opelkaar packed - kleinerdurchschuss zhustene - startopelkaar: startopelkaar startpacked - startkleinerdurchschuss startzhustene - stopopelkaar: stopopelkaar stoppacked - stopkleinerdurchschuss stopzhustene - startvanelkaar: startvanelkaar startunpacked - startgrosserdurchschuss startnezhustene - stopvanelkaar: stopvanelkaar stopunpacked - stopgrosserdurchschuss stopnezhustene - startregelcorrectie: startregelcorrectie startlinecorrection - startzeilenkorrektur startkorekceradku - stopregelcorrectie: stopregelcorrectie stoplinecorrection - stopzeilenkorrektur stopkorekceradku - omlaag: omlaag godown - nachunten jdidolu - witruimte: witruimte whitespace - zwischenraum bilemisto - - nietinspringen: nietinspringen noindenting - nichteinziehen zadneodsazovani - inspringen: inspringen indenting - einziehen odsazovani - stelinspringenin: stelinspringenin setupindenting - stelleeinziehenein nastavodsazovani - - startuitlijnen: startuitlijnen startalignment - startausrichtung startzarovnavani - stopuitlijnen: stopuitlijnen stopalignment - stopausrichtung stopzarovnavani - - startregels: startregels startlines - startzeilen startradky - stopregels: stopregels stoplines - stopzeilen stopradky - stelparagraafnummerenin: stelparagraafnummerenin setupparagraphnumbering - stelleabsatznummerierungein nastavcislovaniodstavcu - stelregelnummerenin: stelregelnummerenin setuplinenumbering - stellezeilennumerierungein nastavcislovaniradku - startregelnummeren: startregelnummeren startlinenumbering - startzeilennumerierung startcislovaniradku - stopregelnummeren: stopregelnummeren stoplinenumbering - stopzeilennumerierung stopcislovaniradku - startregel: startregel startline - startzeile startradek - stopregel: stopregel stopline - stopzeile stopradek - eenregel: eenregel someline - einezeile nejakyradek - inregel: inregel inline - inzeile vradku - crlf: crlf crlf - crlf crlf - stelregelsin: stelregelsin setuplines - stellezeilenein nastavradky - - startsmaller: startsmaller startnarrower - startenger startzuzeni - stopsmaller: stopsmaller stopnarrower - stopenger stopzuzeni - stelsmallerin: stelsmallerin setupnarrower - stelleengerein nastavzuzeni - - definetabulate: definieertabulatie definetabulate - definieretabulator definujtabelaci - setuptabulate: steltabulatiein setuptabulate - stelletabulatorein nastavtabelaci - - starttabel: starttabel starttable - starttabelle starttabulka - stoptabel: stoptabel stoptable - stoptabelle stoptabulka - starttabellen: starttabellen starttables - starttabellen starttabulky - stoptabellen: stoptabellen stoptables - stoptabellen stoptabulky - steltabellenin: steltabellenin setuptables - stelletabellenein nastavtabulky - definetabletemplate: definieertabelvorm definetabletemplate - definieretabellenvorlage definujsablonutabulky - - pagina: pagina page - seite strana - koppelpagina: koppelpagina couplepage - doppelseite parovastrana - soortpagina: soortpagina pagetype - seitentyp typstrany - verwerkpagina: verwerkpagina processpage - bearbeiteseite zpracujstranu - koppelpapier: koppelpapier couplepaper - doppelseitigespapier dvoustrannypapir - selecteerpapier: selecteerpapier selectpaper - waehlepapieraus vyberpapir - scherm: scherm screen - bildschirm obrazovka - - definieersectie: definieersectie definesection - definiereabschnitt definujsekci - definieersectieblok: definieersectieblok definesectionblock - definiereabschnittsblock definujbloksekce - stelsectieblokin: stelsectieblokin setupsectionblock - stelleabschnittsblockein nastavbloksekce - stelsectiein: stelsectiein setupsection - stelleabschnittein nastavsekci - - geenbovenenonderregels: geenbovenenonderregels notopandbottomlines - keinzeilenobenundunten zadnehorniadolniradky - geenhoofdenvoetregels: geenhoofdenvoetregels noheaderandfooterlines - keinekopfundfusszeilen zadnezahlaviaupati - stelbovenin: stelbovenin setuptop - stellenobenein nastavhorejsek - stelboventekstenin: stelboventekstenin setuptoptexts - stelletextobenein nastavhornitexty - stelhoofdin: stelhoofdin setupheader - stellekopfzeileein nastavzahlavi - stelhoofdtekstenin: stelhoofdtekstenin setupheadertexts - stellekopfzeilentextein nastavtextyzahlavi - stelnummeringin: stelnummeringin setuppagenumbering - stelleseitennummeriernungein nastavcislovanistran - stelonderin: stelonderin setupbottom - stelleuntenein nastavspodek - stelondertekstenin: stelondertekstenin setupbottomtexts - stelletextuntenein nastavdolnitexty - stelvoetin: stelvoetin setupfooter - stellefusszeileein nastavupati - stelvoettekstenin: stelvoettekstenin setupfootertexts - stellefusszeilentextein nastavtextyupati - stelpaginanummerin: stelpaginanummerin setuppagenumber - stelleseitennummerein nastavcislostrany - stelsubpaginanummerin: stelsubpaginanummerin setupsubpagenumber - stelleunterseitennummerein nastavpodcislostrany - steltekstin: steltekstin setuptext - stelletextein nastavtext - stelteksttekstenin: stelteksttekstenin setuptexttexts - stelletexttexteein nastavtexttexty - definieertekst: definieertekst definetext - definieretext definujtext - - pagenumber: paginanummer pagenumber - seitenummer cislostrany - - items: items items - posten polozky - stelitemsin: stelitemsin setupitems - stellepostenein nastavpolozky - - regellinks: regellinks leftaligned - linksbuendig zarovnanovlevo - regelmidden: regelmidden midaligned - zentriert zarovnanonastred - regelrechts: regelrechts rightaligned - rechtsbuendig zarovnanovpravo - - startkolommen: startkolommen startcolumns - startspalten startsloupce - stopkolommen: stopkolommen stopcolumns - stopspalten stopsloupce - stelkolommenin: stelkolommenin setupcolumns - stellespaltenein nastavsloupce - kolom: kolom column - spalte sloupec - - kop: kop head - kopf nadpis - but: but but - but spodek % bottom - som: som item - pos polozka - nop: nop nop - nop nop - mar: mar mar - mar okr % okraj - sym: sym sym - sym sym - its: its its - its pol % abbr. of polozka (item) - ran: ran ran - ran ran - startopsomming: startopsomming startitemize - startaufzaehlung startvycet - stelopsommingenin: stelopsommingenin setupitemizations - stelleaufzaehlungenein nastavvycty - stelopsommingin: stelopsommingin setupitemize - stelleaufzaehlungein nastavvycet - stopopsomming: stopopsomming stopitemize - stopaufzaehlung stopvycet - - definieerkop: definieerkop definehead - definiereueberschrift definujnadpis - stelkopin: stelkopin setuphead - stelleueberschriftein nastavnadpis - stelkoppenin: stelkoppenin setupheads - stelleueberschriftenein nastavnadpisy - stelkopnummerin: stelkopnummerin setupheadnumber - stellekopfzahlein nastavcislonadpisu - kopnummer: kopnummer headnumber - kopfnummer cislonadpisu - huidigekopnummer: huidigekopnummer currentheadnumber - heutigeskopfnummer aktualnicislonadpisu - bepaalkopnummer: bepaalkopnummer determineheadnumber - bestimmekopfnummer stanovcislonadpisu - - resetmarkering: resetmarkering resetmarking - ruecksetztenbeschriftung resetznaceni - stelmarkeringin: stelmarkeringin setupmarking - stellebeschriftungein nastavznaceni - definieermarkering: definieermarkering definemarking - definierebeschriftung definujznaceni - geenmarkering: geenmarkering nomarking - keinebeschriftung zadneznaceni - marking: markeer marking - beschriftung znaceni - ontkoppelmarkering: ontkoppelmarkering decouplemarking - entknuepfebeschriftung rozpojeneznaceni - koppelmarkering: koppelmarkering couplemarking - verknuepfebeschriftung propojeneznaceni - haalmarkering: haalmarkering getmarking - holebeschriftung ziskejznaceni - - stellayoutin: stellayoutin setuplayout - stellelayoutein nastavvzhled - paslayoutaan: paslayoutaan adaptlayout - passelayoutan prizpusobvzhled - steloffsetin: steloffsetin setupoffset - stelleoffsetein nastavoffset - plaatsopgrid: plaatsopgrid placeongrid - amgitterausrichten umistinamrizku - verplaatsopgrid: verplaatsopgrid moveongrid - amgitterneuausrichten premistinamrizku - - tooninstellingen: tooninstellingen showsetups - zeigeeinstellungen ukaznastaveni - toonkader: toonkader showframe - zeigerahmen ukazramecek - toongrid: toongrid showgrid - zeigegitter ukazmrizku - toonopbouw: toonopbouw showbuildup - zeigeaufbau ukazstrukturu - toonlayout: toonlayout showlayout - zeigelayout ukazvzhled - toonprint: toonprint showprint - zeigedruck ukazvytisk - toonstruts: toonstruts showstruts - zeigestruts ukazpodpery - - definieerpapierformaat: definieerpapierformaat definepapersize - definierepapierformat definujvelikostpapiru - stelpapierformaatin: stelpapierformaatin setuppapersize - stellepapierformatein nastavvelikostpapiru - stelarrangerenin: stelarrangerenin setuparranging - stelleanordnenein nastavusporadani - - versie: versie version - version verze - - stelachtergrondenin: stelachtergrondenin setupbackgrounds - stellehintergruendeein nastavpozadi - - steluitlijnenin: steluitlijnenin setupalign - stelleausrichtungein nastavzarovnani - stelwitruimtein: stelwitruimtein setupwhitespace - stellezwischenraumein nastavbilamista - - setupinteraction: stelinteractiein setupinteraction - stelleinteraktionein nastavinterakci - stelinteractiemenuin: stelinteractiemenuin setupinteractionmenu - stelleinteraktionsmenueein nastavinterakcnimenu - definieerinteractiemenu: definieerinteractiemenu defineinteractionmenu - definiereinteraktionsmenue definujinterakcnimenu -% startinteractiemenu: startinteractiemenu startinteractionmenu -% startinteraktionsmenue startinterakcnimenu - blokkeerinteractiemenu: blokkeerinteractiemenu disableinteractionmenu - inaktiviereinteraktionsmenue zablokujinterakcnimenu - interactiebuttons: interactiebuttons interactionbuttons - interaktionsknopfe interakcnitlacitka - interactiebalk: interactiebalk interactionbar - interaktionsbalken interakcnilista - stelinteractiebalkin: stelinteractiebalkin setupinteractionbar - stelleinteraktionsbalkenein nastavinterakcnilistu - stelinteractieschermin: stelinteractieschermin setupinteractionscreen - stelleinteraktionsbildschirmein nastavinterakcniobrazovku - - placebookmarks: plaatsbookmarks placebookmarks - platzierebookmarks umistizalozky - bookmark: bookmark bookmark - bookmark zalozka - - definieerbeeldmerk: definieerbeeldmerk definelogo - definierelogo definujlogo - plaatsbeeldmerken: plaatsbeeldmerken placelogos - platzierelogo umistiloga - - definecolor: definieerkleur definecolor - definierefarbe definujbarvu - definecolorgroup: definieerkleurgroep definecolorgroup - definierefarbengruppe definujskupinubarev - definepalet: definieerpalet definepalet - definierepalette definujpaletu - graycolor: grijskleur graycolor - graufarbe sedabarva - color: kleur color - farbe barva - startcolor: startkleur startcolor - startfarbe startbarva - stopcolor: stopkleur stopcolor - stopfarbe stopbarva - setupcolors: stelkleurenin setupcolors - stellefarbenein nastavbarvy - setupcolor: stelkleurin setupcolor - stellefarbeein nastavbarvu - setuppalet: stelpaletin setuppalet - stellepaletteein nastavpaletu - showcolor: toonkleur showcolor - zeigefarbe ukazbarvu - showcolorgroup: toonkleurgroep showcolorgroup - zeigefarbengruppe ukazskupinubarev - showpalet: toonpalet showpalet - zeigepalette ukazpaletu - comparecolorgroup: vergelijkkleurgroep comparecolorgroup - vergleichefarbengruppe porovnejskupinubarev - comparepalet: vergelijkpalet comparepalet - vergleichepalette porovnejpaletu - colorvalue: kleurwaarde colorvalue - farbewert hodnotabarvy - greyvalue: grijswaarde greyvalue - grauwert hodnotasedi - - startraster: startraster startraster - startraster startrastr - stopraster: stopraster stopraster - stopraster stoprastr - - definieerblok: definieerblok defineblock - definiereblock definujblok - stelblokin: stelblokin setupblock - stelleblockein nastavblok - gebruikblokken: gebruikblokken useblocks - verwendebloecke uzijbloky - verwerkblokken: verwerkblokken processblocks - bearbeitebloecke zpracujbloky - handhaafblokken: handhaafblokken keepblocks - behaltebloecke zachovejbloky - selecteerblokken: selecteerblokken selectblocks - waehlebloeckeaus vyberbloky - verbergblokken: verbergblokken hideblocks - verbergebloecke schovejbloky - geenblokkenmeer: geenblokkenmeer nomoreblocks - keinebloeckemehr zadnedalsibloky - - definieerlijst: definieerlijst definelist - definiereliste definujseznam - definieersamengesteldelijst: definieersamengesteldelijst definecombinedlist - definierezusammengestellteliste definujkombinovanyseznam - plaatslijst: plaatslijst placelist - platziereliste umistiseznam - plaatssamengesteldelijst: plaatssamengesteldelijst placecombinedlist - platzierezusammengestellteliste umistikombinovanyseznam - schrijfnaarlijst: schrijfnaarlijst writetolist - schreibezurliste zapisdoseznamu - schrijftussenlijst: schrijftussenlijst writebetweenlist - schreibezwischenliste zapismeziseznam - stellijstin: stellijstin setuplist - stellelisteein nastavseznam - stelsamengesteldelijstin: stelsamengesteldelijstin setupcombinedlist - stellezusammengestelltelisteein nastavkombinovanyseznam - - bepaallijstkenmerken: bepaallijstkenmerken determinelistcharacteristics - bestimmelistencharakeristika stanovcharakteristickuseznamu - lijstlengte: lijstlengte listlength - listenlaenge delkaseznamu - lijstbreedte: lijstbreedte listwidth - listenbreite sirkaseznamu - lijsthoogte: lijsthoogte listheight - listenhoehe vyskaseznamu - - geenlijst: geenlijst nolist - keineliste zadnyseznam - -% zal vervallen - - definieerreferentielijst: definieerreferentielijst definereferencelist - definierereferenzliste definujseznamodkazu - plaatsreferentielijst: plaatsreferentielijst placereferencelist - platzierereferenzliste umistiseznamodkazu - schrijfnaarreferentielijst: schrijfnaarreferentielijst writetoreferencelist - schreibezurreferenzliste zapisdoseznamuodkazu - stelreferentielijstin: stelreferentielijstin setupreferencelist - stellereferenzlisteein nastavseznamodkazu - - definieerplaatsblok: definieerplaatsblok definefloat - definieregleitobjekt definujplvouciobjekt - stelplaatsblokin: stelplaatsblokin setupfloat - stellegleitobjektein nastavplvouciobjekt - stelplaatsblokkenin: stelplaatsblokkenin setupfloats - stellegleitobjekteein nastavplvouciobjekty - splitsplaatsblok: splitsplaatsblok splitfloat - teilegleitobjekt rozdelplvouciobjekt - stelplaatsblokkensplitsenin: stelplaatsblokkensplitsenin setupfloatsplitting - stelleplatziegeteiltegleitobjekteein nastavdeleniplvoucichobjektu - startcombinatie: startcombinatie startcombination - startkombination startspojeni - stopcombinatie: stopcombinatie stopcombination - stopkombination stopspojeni - plaatsnaastelkaar: plaatsnaastelkaar placesidebyside - platzierenebeneinander umistivedlesebe - plaatsonderelkaar: plaatsonderelkaar placeontopofeachother - platziereuntereinander umistinadsebe - - stelblokkopjein: stelblokkopjein setupcaption - stellebildunterschriftein nastavpopisek - stelblokkopjesin: stelblokkopjesin setupcaptions - stellebilderunterschriftein nastavpopisky - stelcombinatiesin: stelcombinatiesin setupcombinations - stellekombinationein nastavspojeni - - startoverlay: startoverlay startoverlay - startoverlay startprekryv - stopoverlay: stopoverlay stopoverlay - stopoverlay stopprekryv - - definieerregister: definieerregister defineregister - definiereregister definujrejstrik - koppelregister: koppelregister coupleregister - verknuepfregister propojenyrejstrik - stelregisterin: stelregisterin setupregister - stelleregisterein nastavrejstrik - schrijfnaarregister: schrijfnaarregister writetoregister - schreibezumregister zapisdorejstriku - plaatsregister: plaatsregister placeregister - platziereregister umistirejstrik - - bepaalregisterkenmerken: bepaalregisterkenmerken determineregistercharacteristics - bestimmeregistercharakteristika urcicharakteristikurejstriku - - definieersorteren: definieersorteren definesorting - definieresortieren definujtrideni - definieersynoniemen: definieersynoniemen definesynonyms - definieresynonyme definujsynonyma - stelsorterenin: stelsorterenin setupsorting - stellesortierenein nastavtrideni - stelsynoniemenin: stelsynoniemenin setupsynonyms - stellesynonymein nastavsynonyma - - startsynchronisatie: startsynchronisatie startsynchronization - startsynchronisation startsynchronizace - stopsynchronisatie: stopsynchronisatie stopsynchronization - stopsynchronisation stopsynchronizace - stelsynchronisatiebalkin: stelsynchronisatiebalkin setupsynchronizationbar - stellesynchronisationsbalkenein nastavsynchronizacnilistu - stelsynchronisatiein: stelsynchronisatiein setupsynchronization - stellesynchronisationein nastavsynchronizaci - synchronisatiebalk: synchronisatiebalk synchronizationbar - synchronisationsbalken synchronizacnilista - synchroniseer: synchroniseer synchronize - synchronisieren synchronizovat - - gebruikexterndocument: gebruikexterndocument useexternaldocument - verwendeexteresdokument uzijexternidokument - gebruikURL: gebruikURL useURL - verwendeURL uzijURL - gebruikurl: gebruikurl useurl - verwendeurl uzijurl - setupurl: stelurlin setupurl - stelleurlein nastavurl - coupledocument: koppeldocument coupledocument - verknuepfedokument propojenydokument - - stelprogrammasin: stelprogrammasin setupprograms - stelleprogrammein nastavprogramy - definieerprogramma: definieerprogramma defineprogram - definiereprogramme definujprogram - programma: programma program - programm program - - stelpaginaovergangenin: stelpaginaovergangenin setuppagetransitions - stelleseitenuebergangein nastavprechodstrany - - definieerprofiel: definieerprofiel defineprofile - definiereprofil definujprofil - definieerversie: definieerversie defineversion - definiereversion definujverzi - markeerversie: markeerversie markversion - beschrifteversion oznacverzi - selecteerversie: selecteerversie selectversion - waehleversionaus vyberverzi - startprofiel: startprofiel startprofile - startprofil startprofil - startversie: startversie startversion - startversion startverze - stelprofielenin: stelprofielenin setupprofiles - stelleprofilein nastavprofily - stelversiesin: stelversiesin setupversions - stelleversionein nastavverze - stopprofiel: stopprofiel stopprofile - stopprofil stopprofil - stopversie: stopversie stopversion - stopversion stopverze - volgprofiel: volgprofiel followprofile - folgeprofil dodrzujprofil - volgprofielversie: volgprofielversie followprofileversion - folgeprofilversion dodrzujverziprofilu - volgversie: volgversie followversion - folgeversion dodrzujverzi - - doordefinieren: doordefinieren definedescription - definierebeschreibung definujpopis - doorlabelen: doorlabelen definelabel - definierelabel definujpopisek - doornummeren: doornummeren defineenumeration - definierenummerierung definujvycet - doorspringen: doorspringen defineindenting - definiereeinzug definujodsazovani - steldoordefinierenin: steldoordefinierenin setupdescriptions - definierebeschreibungen nastavpopisy - steldoornummerenin: steldoornummerenin setupenumerations - stellebeschreibungein nastavvycty - steldoorspringenin: steldoorspringenin setupindentations - stelleeinzuegein nastavodsazovani - - steltabin: steltabin setuptab - stelletabein nastavtab - tab: tab tab - tab tab - - setupexternalfigures: stelexternefigurenin setupexternalfigures - stelleexterneabbildungenein nastavexterniobrazy - showexternalfigures: toonexternefiguren showexternalfigures - zeigeexterneabbildungen ukazexterniobrazy - externalfigure: externfiguur externalfigure - externeabbildung externiobraz -% showexternalfigure: toonexternfiguur showexternalfigure -% zeigeexterneabbildung ukazexterniobrazy - useexternalfigure: gebruikexternfiguur useexternalfigure - verwendeexterneabbildung uzijexterniobraz - - startfigure: startfiguur startfigure - startabbildung startobraz -% stopfigure: stopfiguur stopfigure -% stopabbildung stopobraz - referring: refereer referring - referieren odkazujici -% marking: markeer marking -% beschriftung oznacujici - remark: toelichting remark - bemerkung remark % other word than poznamka/note, a commenting note - colorbar: kleurenbalk colorbar - farbbalken barevnalista - - rooster: rooster grid - gitter mrizka - - button: button button - knopf tlacitko - menubutton: menubutton menubutton - menueknopf tlacitkomenu - stelbuttonsin: stelbuttonsin setupbuttons - stelleknopfein nastavtlacitka - - usereferences: gebruikreferenties usereferences - verwendereferenzen uzijodkazy - reflijst: reflijst reflist - refliste seznamodkazu - stelreferentielijstin: stelreferentielijstin setupreferencelist - stellereferenzlisteein nastavseznamodkazu - setupreferencing: stelrefererenin setupreferencing - stellereferenzierenein nastavodkazovani - - textreference: tekstreferentie textreference - textreferenz odkaznatext - pagereference: paginareferentie pagereference - seitenreferenz odkaznastranu - reference: referentie reference - referenz odkaz - definereference: definieerreferentie definereference - definierereferenz definujodkaz - definereferenceformat: definieerreferentieformaat definereferenceformat - definierereferenzformat definujformatodkazu - - useJSscripts: gebruikJSscripts useJSscripts - verwendeJSscript uzijJSscripts - - uit: uit from - von from % z - in: in in - in in % v - op: op at - bei at % v - over: over about - ueber about % o - naar: naar goto - zu jdina - atpage: oppagina atpage - aufseite nastrane - somewhere: ergens somewhere - irgendwo nekde - ref: ref ref - ref odk % short - naarbox: naarbox gotobox - zurbox jdinabox - naarpagina: naarpagina gotopage - zurseite jdinastranu - -% startformule: startformule startformula -% startformel startrovnice -% stopformule: stopformule stopformula -% stopformel stoprovnice - plaatsformule: plaatsformule placeformula - platziereformel umistirovnici - plaatssubformule: plaatssubformule placesubformula - platziereunterformel umistipodrovnici - stelformulesin: stelformulesin setupformulae - stelleformelnein nastavrovnice - formulenummer: formulenummer formulanumber - formelnummer cislorovnice - - subformulenummer: subformulenummer subformulanumber - unterformelnummer cislopodrovnice - -% startgegeven: startgegeven startfact -% startgegeben startfakt -% stopgegeven: stopgegeven stopfact -% stopgegeben stopfakt -% startlegenda: startlegenda startlegend -% startlegende startlegenda -% stoplegenda: stoplegenda stoplegend -% stoplegende stoplegenda - leg: leg leg - leg leg - geg: geg fact - geg fakt - - mathematics: wiskunde mathematics - mathematik matematika - dimension: dimensie dimension - dimension rozmer - nodimension: geendimensie nodimension - keindimension zadnyrozmer - - startomgeving: startomgeving startenvironment - startumgebung startprostredi - stopomgeving: stopomgeving stopenvironment - stopumgebung stopprostredi - startdeelomgeving: startdeelomgeving startlocalenvironment - startlokaleumgebung startlokalnihoprostredi - startonderdeel: startonderdeel startcomponent - startkomponente startkomponenta - stoponderdeel: stoponderdeel stopcomponent - stopkomponente stopkomponenta - startprodukt: startprodukt startproduct - startprodukt startprodukt - stopprodukt: stopprodukt stopproduct - stopprodukt stopprodukt - startproject: startproject startproject - startprojekt startprojekt - stopproject: stopproject stopproject - stopprojekt stopprojekt - - setups: instellingen setups - einstellungen nastaveni - - project: project project - projekt projekt - onderdeel: onderdeel component - komponente komponenta - produkt: produkt product - produkt produkt - omgeving: omgeving environment - umgebung prostredi - geenfilesmeer: geenfilesmeer nomorefiles - keinedateienmehr zadnedalsisoubory - - haalbuffer: haalbuffer getbuffer - holepuffer ziskejbuffer -% startbuffer: startbuffer startbuffer -% startbuffer startbuffer -% stopbuffer: stopbuffer stopbuffer -% stopbuffer stopbuffer - stelbufferin: stelbufferin setupbuffer - stellepufferein nastavbuffer - typebuffer: typebuffer typebuffer - tippepuffer typebuffer - definieerbuffer: definieerbuffer definebuffer - definierepuffer definujbuffer - - betekenis: betekenis unitmeaning - bedeutung vyznam - voluit: voluit infull - volleswort plnezneni - - citaat: citaat quotation - zitat citace - citeer: citeer quote - zitieren citovat - startcitaat: startcitaat startquotation - startzitat startcitace - stopcitaat: stopcitaat stopquotation - stopzitat stopcitace - stelciterenin: stelciterenin setupquote - stellezitierenein nastavcitaci - - definieer: definieer define - definieren definuj - herhaal: herhaal redo - wiederholen opakovat - gebruikcommandos: gebruikcommandos usecommands - verwendebefehl uzijprikazy - definieerstartstop: definieerstartstop definestartstop - definierestartstop definujstartstop - startlocal: startlokaal startlocal - startlokal startlokalni - stoplocal: stoplokaal stoplocal - stoplokal stoplokalni - startglobal: startglobaal startglobal - startglobal startglobalni - stopglobal: stopglobaal stopglobal - stopglobal stopglobalni - naam: naam name - name jmeno - - definieeropmaak: definieeropmaak definemakeup - definiereumbruch definujupravu - stelopmaakin: stelopmaakin setupmakeup - stelleumbruchein nastavupravu - startopmaak: startopmaak startmakeup - startumbruch startuprava - stopopmaak: stopopmaak stopmakeup - stopumbruch stopuprava - - useexternalsoundtrack: gebruikexterngeluidsfragment useexternalsoundtrack - verwendeexternestonstueck uzijexternizvuk - - gebruikexternefile: gebruikexternefile useexternalfile - verwendeexternedatei uzijexternisoubor - gebruikexternefiles: gebruikexternefiles useexternalfiles - verwendeexternedateien uzijexternisoubory - - kenmerk: kenmerk referral - verweis odkaz - kenmerkdatum: kenmerkdatum referraldate - verweisdatum odkaznadatum - - high: hoog high - hoch vysoky - lohi: laho lohi - hoti nivy - low: laag low - tief nizky - -% startuitstellen: startuitstellen startpostponing -% startverschieben startodsunuti -% stopuitstellen: stopuitstellen stoppostponing -% stopverschieben stopodsunuti -% startverbergen: startverbergen starthiding -% startverbergen startukryti -% stopverbergen: stopverbergen stophiding -% stopverbergen stopukryti - - breuk: breuk fraction - bruch zlomek - chem: chem chem - chem chem - - startnaast: startnaast startopposite - startgegenueber startprotejsek - - stopnaast: stopnaast stopopposite - stopgegenueber stopprotejsek - stelnaastplaatsenin: stelnaastplaatsenin setupoppositeplacing - stellegegenueberplatzierenein nastavumisteniprotejsku - - startpositioneren: startpositioneren startpositioning - startpositionieren startumistovani - stoppositioneren: stoppositioneren stoppositioning - stoppositionieren stopumistovani - positioneer: positioneer position - position pozice - stelpositionerenin: stelpositionerenin setuppositioning - stellepositionierenein nastavumistovani - - roteer: roteer rotate - drehen otocit - stelroterenin: stelroterenin setuprotate - stelledrehenein nastavotoceni - - spiegel: spiegel mirror - spiegeln zrcadlit - schaal: schaal scale - format meritko - - stelnummerenin: stelnummerenin setupnumbering - stellenummerierungein nastavcislovani - reset: reset reset - ruecksetzten reset - - stelpublicatiesin: stelpublicatiesin setuppublications - stellepublikationein nastavpublikace - publicatie: publicatie publication - publikation publikace - - definieerhbox: definieerhbox definehbox - definierehbox definujhbox - - toevoegen: toevoegen adding - zusatz scitani - - punten: punten periods - punkt tecky - - stelkoppeltekenin: stelkoppeltekenin setuphyphenmark - stellebindestrichein nastavdelitko - stelinterliniein: stelinterliniein setupinterlinespace - stellezeilenabstandein nastavmeziradkovoumezeru - stelspatieringin: stelspatieringin setupspacing - stellespatiumein nastavradkovani - steltolerantiein: steltolerantiein setuptolerance - stelletoleranzein nastavtoleranci - - setupsystem: stelsysteemin setupsystem - stellesystemein nastavsystem - usepath: gebruikgebied usedirectory - benutzeverzeichnis uzijcestu % TOBIAS - - definieeralineas: definieeralineas defineparagraphs - definiereabsaetze definujodstavce - stelalineasin: stelalineasin setupparagraphs - stelleabsaetzeein nastavodstavce - - geentest: geentest donttest - keintest zadnytest - - stelcommentaarin: stelcommentaarin setupcomment - stellekommentarein nastavkomentar - commentaar: commentaar comment - kommentar komentar - - definefield: definieerveld definefield - definierefeld definujpole - definemainfield: definieerhoofdveld definemainfield - definierehauptfeld definujhlavnipole - definesubfield: definieersubveld definesubfield - definieresubfeld definujpodpole - clonefield: kloonveld clonefield - klonierefeld klonujpole - copyfield: copieerveld copyfield - kopierefeld kopirujpole - setupfield: stelveldin setupfield - stellefeldein nastavpole - setupfields: stelveldenin setupfields - stellefelderin nastavvsechnapole - field: veld field - feld pole - fitfield: passendveld fitfield - passendfeld prizpusobivepole % or vhodnepole ? - logfields: registreervelden logfields - registrierefelder zaznamovepole - showfields: toonvelden showfields - zeigefelder ukazpole - tooltip: suggestie tooltip - tooltip bublinkovanapoveda - fillinfield: invulveld fillinfield - ausfuellfeld vyplnovepole - definefieldstack: definieerveldstapel definefieldstack - definierefeldstapel definujzasobnikpoli - fieldstack: veldstapel fieldstack - feldstapel zasobnikpoli - - setupclipping: stelclipin setupclipping - stelleausschnittein nastavorez - clip: clip clip - ausschnitt orez - - placelegend: plaatslegenda placelegend - platzierelegende umistilegendu - setuplegend: stellegendain setuplegend - stellelegendeein nastavlegendu - - setuppagecomment: stelpaginacommentaarin setuppagecomment - stelleseitenkommentarein nastavkomentarstrany - - setupstrut: stelstrutin setupstrut - setupstrut setupstrut - - definerule: definieerlijn definerule - definerule definerule - placerule: plaatslijn placerule - placerule placerule - setuprule: stellijnin setuprule - setuprule setuprule - - definetextvariable: definieertekstvariabele definetextvariable - definetextvariable definetextvariable - setuptextvariable: steltekstvariabelein setuptextvariable - setuptextvariable setuptextvariable - settextvariable: kentekstvariabeletoe settextvariable - settextvariable settextvariable - placetextvariable: plaatstekstvariabele placetextvariable - placetextvariable placetextvariable - textvariable: tekstvariabele textvariable - textvariable textvariable - - definetextposition: definieertekstpositie definetextposition - definetextposition definetextposition - setuptextposition: steltekstpositiein setuptextposition - setuptextposition setuptextposition - positiontext: positioneertekst positiontext - positiontext positiontext - definerawfont: definerawfont definerawfont - definerawfont definerawfont - switchtorawfont: switchtorawfont switchtorawfont - switchtorawfont switchtorawfont - +\startcommands dutch english + german czech + italian + + language: taal language + sprache jazyk + lingua + mainlanguage: hoofdtaal mainlanguage + hauptsprache hlavnijazyk + linguaprincipale + translate: vertaal translate + uebersetzten prelozit + traduci + installlanguage: installeertaal installlanguage + installieresprache instalacejazyka + linguainstallazione + setuplanguage: steltaalin setuplanguage + stellespracheein nastavjazyk + impostalingua % GB + showmakeup: toonopmaak showmakeup + zeigeumbruch ukazupravu + mostramakeup % GB + useencoding: usecodering useencoding + benutzekodierung uzijkodovani + usacodifica + usespecials: gebruikspecials usespecials + benutzespezielles uzijspeciality + usaspecialita % GB + defineoutput: definieeruitvoer defineoutput + defineoutput definujvystup + definiscioutput % GB + setupoutput: steluitvoerin setupoutput + stelleausgabeein nastavvystup + impostaoutput % GB + defineaccent: definieeraccent defineaccent + definiereakzent definujakcent + definisciaccento + definecharacter: definieerkarakter definecharacter + definierezeichen definujznak + definiscicarattere + definecommand: definieercommando definecommand + definierebefehl definujprikaz + definiscicomando + startcoding: startcodering startcoding + startkodierung startkodovani + iniziacodifica + stopcoding: stopcodering stopcoding + stopkodierung stopkodovani + terminacodifica + definebodyfontenvironment: definieerkorpsomgeving definebodyfontenvironment + definierefliesstextumgebung definujprostredizakladnihofontu + definisciambientefontdelcorpo + setupbodyfontenvironment: stelkorpsomgevingin setupbodyfontenvironment + stellefliesstextumgebungein nastavprostredizakladnihofontu + impostaambientefontdelcorpo + definebodyfont: definieerkorps definebodyfont + definierefliesstext definujzakladnifont + definiscifontdelcorpo + definefont: definieerfont definefont + definiereschrift definujfont + definiscifont + definefontsynonym: definieerfontsynoniem definefontsynonym + defineschriftsynonym definujsynonumumfontu + definiscisinonimofont + definestyle: definieerletter definestyle + definierestil definujstyl + definiscistile + definefontstyle: definieerfontstijl definefontstyle + definiereschriftstil definujstylfontu + definiscistilefont + setupstrut: stelstrutin setupstrut + setupstrut setupstrut + impostastrut + setuptype: steltypein setuptype + stelletipein nastavtype + impostatype + type: type type + tippen opis + type + typ: typ typ + tip pis + typ + arg: arg arg + arg arg + arg + tex: tex tex + tex tex + tex + definetyping: definieertypen definetyping + definieretippen definujopis + definiscityping %GB + setuptyping: steltypenin setuptyping + stelletippenein nastavopis + impostatyping %GB + typefile: typefile typefile + tippedatei opissoubor + typefile %GB + setupfootnotes: stelvoetnotenin setupfootnotes + stellefussnotenein nastavpoznamkypodcarou + impostanotepdp + setupfootnotedefinition: stelvoetnootdefinitiein setupfootnotedefinition + stellefussnotendefinitionein nastavdefinicipoznamekpodcarou + impostadefinizionenotepdp + note: noot note + notiz poznamka + nota + footnote: voetnoot footnote + fussnote poznamkapodcarou + notapdp + startlocalfootnotes: startlokalevoetnoten startlocalfootnotes + startlokalefussnoten startlokalnipoznamkypodcarou + inizianotepdplocali + stoplocalfootnotes: stoplokalevoetnoten stoplocalfootnotes + stoplokalefussnoten stoplokalnipoznamkypodcarou + terminanotepdplocali + placelocalfootnotes: plaatslokalevoetnoten placelocalfootnotes + platzierelokalefussnoten umistilokalnipoznamkypodcarou + mettinotepdplocali + placefootnotes: plaatsvoetnoten placefootnotes + platzierefussnoten umistipoznamkypodcarou + mettinotepdp + currentdate: huidigedatum currentdate + heutigesdatum aktualnidatum + datadioggi + date: datum date + datum datum + data + weekday: weekdag weekday + wochentag vsedniden + giornosettimana + WEEKDAY: WEEKDAG WEEKDAY + WOCHENTAG VSEDNIDEN + GIORNOSETTIMANA + month: maand month + monat mesic + mese + MONTH: MAAND MONTH + MONAT MESIC + MESE + Numbers: Cijfers Numbers + Ziffern Cisla + Numeri + numbers: cijfers numbers + ziffern cisla + numeri + romannumerals: romeins romannumerals + roemischezahlen rimskecislice + numeriromani + Romannumerals: Romeins Romannumerals + Roemischezahlen Rimskecislice + Numeriromani + character: letter character + buchstabe znak + carattere + Character: Letter Character + Buchstabe Znak + Carattere + characters: letters characters + buchstaben znaky + caratteri + Characters: Letters Characters + Buchstaben Znaky + Caratteri + unknown: onbekend unknown + unbekant neznamo + ignoto + definesymbol: definieersymbool definesymbol + definieresymbol definujsymbol + definiscisimbolo + definefiguresymbol: definieerfiguursymbool definefiguresymbol + definiereabbsymbol definujobrazeksymbol + definiscifigurasimbolo + symbol: symbool symbol + symbol symbol + simbolo + setupsymbolset: stelsymboolsetin setupsymbolset + stellesymbolsetein nastavsadusymbolu + impostasetsimboli + showsymbolset: toonsymboolset showsymbolset + showsymbolset ukazsadusymbolu + mostrasetsimboli % TB + startsymbolset: startsymboolset startsymbolset + startsymbolset startsadasymbolu + iniziasetsimboli % TB + usesymbols: gebruiksymbolen usesymbols + verwendesymbole uzijsymbol + usasimboli + defineconversion: definieerconversie defineconversion + definierekonversion definujkonverzi + definisciconversione + convertnumber: converteernummer convertnumber + konvertierezahl konvertujcislo + convertinumero + setupcapitals: stelkapitalenin setupcapitals + stelleversalienein nastavkapitalky + impostamaiuscole + kap: kap kap + kap kap + kap + KAP: KAP CAP + KAP KAP + CAP + nokap: nokap nocap + nokap nokap + nocap + Kap: Kap Cap + Kap Kap + Cap + Kaps: Kaps Caps + Kaps Kaps + Caps + WORD: WOORD WORD + WORT SLOVO + PAROLA + WORDS: WOORDEN WORDS + WOERTER SLOVA + PAROLE + Word: Woord Word + Wort Slovo + Parola + Words: Woorden Words + Woerter Slova + Parole + stretched: uitgerekt stretched + gestreckt roztazene + stirato + overstrike: doorstreep overstrike + durchgestrichen preskrtnuto + sbarrato + overstrikes: doorstrepen overstrikes + durchstreichen preskrtnuti + sbarrati + overbar: overstreep overbar + ueberstrichen nadtrzeno + sopralinea + overbars: overstrepen overbars + ueberstreichen nadtrzeni + sopralinee + underbar: onderstreep underbar + unterstrichen podtrzeno + sottolinea + underbars: onderstrepen underbars + unterstreichen podtrzeni + sottolinee + setupunderbar: stelonderstrepenin setupunderbar + stelleunterstreichenein nastavpodtrzeni + impostasottolinea + setupbodyfont: stelkorpsin setupbodyfont + stellefliesstextein nastavzakladnifont + impostafontdelcorpo + switchtobodyfont: switchnaarkorps switchtobodyfont + wechselezumfliesstext prepninazakladnifont + cambiaafontdelcorpo + showbodyfont: toonkorps showbodyfont + zeigefliesstext ukazzakladnifont + mostrafontdelcorpo + showbodyfontenvironment: toonkorpsomgeving showbodyfontenvironment + zeigefliesstextumgebung ukazpostredizakladnihofontu + mostraambientefontdelcorpo + headtext: koptekst headtext + ueberschrifttext texthlavicky + testoinstestazioni + labeltext: labeltekst labeltext + labeltext textpopisku + testoetichette + LABELTEXT: LABELTEKST LABELTEXT + LABELTEXT TEXTPOPISKU + TESTOETICHETTA + setupheadtext: stelkoptekstin setupheadtext + stelleueberschrifttextein nastavtexthlavicky + impostatestointestazioni + setuplabeltext: stellabeltekstin setuplabeltext + stellelabeltextein nastavtextpopisku + impostatestoetichette + marginrule: kantlijn marginrule + marginallinie marginalnilinka + lineamargine + startmarginrule: startkantlijn startmarginrule + startmarginallinie startmarginalnilinka + inizialineamargine + stopmarginrule: stopkantlijn stopmarginrule + stopmarginallinie stopmarginalnilinka + terminalineamargine + setupmarginrules: stelkantlijnin setupmarginrules + stellemarginallinieein nastavmarginalnilinky + impostalineamargine + blackrule: blokje blackrule + rechteck cernalinka + lineanera + blackrules: blokjes blackrules + rechtecke cernelinky + lineenere + setupblackrules: stelblokjesin setupblackrules + stellerechteckein nastavcernelinky + impostalineenere + setupscreens: stelrastersin setupscreens + stellerasterein nastavrastr + impostaschermi + framed: omlijnd framed + umrahmt oramovani + incorniciato + inframed: inlijnd inframed + imumriss zaramovani + inframed % GB + mframed: wilijnd maframed + maumrise maoramovani + maframed + inmframed: inwilijnd inmaframed + immaumrise mazaramovani + inmaframed + setupframed: stelomlijndin setupframed + stelleumrahmtein nastavoramovani + impostaincorniciato + setuplinewidth: stellijndiktein setuplinewidth + stellelinienbreiteein nastavsirkucary + impostaampiezzariga + setupthinrules: steldunnelijnenin setupthinrules + stelleduennerumrissein nastavtenkelinky + impostalineesottili + thinrule: dunnelijn thinrule + duennelinie tenkalinka + lineasottile + thinrules: dunnelijnen thinrules + duennerumriss tenkelinky + lineesottili + hairline: haarlijn hairline + haarlinie vlasovalinka + filodicapello + vl: vl vl + vl vl + vl + hl: hl hl + hl hl + hl + defineframed: definieeromlijnd defineframed + definiereumrahmt definujoramovani + definisciincorniciato + defineframedtext: definieerkadertekst defineframedtext + definiereumrahmtertext definujoramovanytext + definiscitestoincorniciato + setupframedtexts: stelkadertekstenin setupframedtexts + stelleumrahmtetexteein nastavoramovanetexty + impostatestoincorniciato + defineoverlay: definieeroverlay defineoverlay + definiereoverlay definujprekryv + definiscisovrapposizione + background: achtergrond background + hintergrund pozadi + sfondo + startbackground: startachtergrond startbackground + starthintergrund startpozadi + iniziasfondo + stopbackground: stopachtergrond stopbackground + stophintergrund stoppozadi + terminasfondo + setupbackground: stelachtergrondin setupbackground + stellehintergrundein nastavpozadi + impostasfondo + fillinrules: invullijnen fillinrules + gefuelltesrechteck vyplnovelinky % ve formulari + lineeriempimento + setupfillinrules: stelinvullijnenin setupfillinrules + stellegefuelltesrechteckein nastavvyplnovelinky + impostalineeriempimento + fillintext: invultekst fillintext + ausfuelltext vyplnenytext + testoriempimento + setupfillinlines: stelinvulregelsin setupfillinlines + stellegefuelltezeileein nastavvyplnoveradky + impostarigheriempimento + fillinline: invulregel fillinline + gefuelltezeile vyplnovyradek + lineariempimento + setuptextrules: steltekstlijnenin setuptextrules + stelletextumrissein nastavtextovelinky + impostalineetesto + textrule: tekstlijn textrule + textlinie textovalinka + lineatesto + starttextrule: starttekstlijn starttextrule + starttextlinie starttextovalinka + inizialineatesto + stoptextrule: stoptekstlijn stoptextrule + stoptextlinie stoptextovalinka + terminalineatesto + usemodule: gebruikmodule usemodule + verwendemodul uzijmodul + usamodulo + usemodules: gebruikmodules usemodules + verwendemodule uzijmoduly + usamoduli + starttekst: starttekst starttext + starttext starttext + iniziatesto + stoptekst: stoptekst stoptext + stoptext stoptext + terminatesto + margetitel: margetitel margintitle + marginaltitel marginalninadpis + titoloinmargine + margewoord: margewoord marginword + marginalwort marginalnislovo + parolainmargine + margetekst: margetekst margintext + marginaltext marginalnitext + testoinmargine + inlinker: inlinker inleft + imlinken vlevo + insinistra + inmarge: inmarge inmargin + inmarginalie naokraj + inmargine + inanderemarge: inanderemarge inothermargin + inanderermarginale nadruhyokraj + inaltromargine + inrechter: inrechter inright + imrechten vpravo + indestra + startmargeblok: startmargeblok startmarginblock + startmarginalblock startmarginalniblok + iniziabloccomargine + stopmargeblok: stopmargeblok stopmarginblock + stopmarginalblock stopmarginalniblok + terminabloccomargine + stelinmargein: stelinmargein setupinmargin + stelleinmarginalieein nastavmarginalie + impostainmargine + stelmargeblokkenin: stelmargeblokkenin setupmarginblocks + stellemarginalblockein nastavmarginalniblok + impostablocchimargine + inleftside: inlinkerrand inleftside + imlinkenrand nalevo + inlatosinistro + inleftmargin: inlinkermarge inleftmargin + inlinkermarginale nalevyokraj + inmarginesinistro + inrightmargin: inrechtermarge inrightmargin + inrechtermarginale napravyokraj + inmarginedestro + inrightside: inrechterrand inrightside + imrechtenrand napravo + inlatodestro + woordrechts: woordrechts wordright + wortrechts slovovpravo + paroladestra + definieerblanko: definieerblanko defineblank + definiereblanko definujpreskok + definisciblank % GB + blanko: blanko blank + blanko preskoc + blank + stelblankoin: stelblankoin setupblank + stelleblankoein nastavpreskok + impostablank + corrigeerwitruimte: corrigeerwitruimte correctwhitespace + korrigierezwischenraum korekcebilehomista + correggiwhitespace + fixedspaces: vastespaties fixedspaces + festesspatium tvrdemezery + spazifissi + fixedspace: vastespatie fixedspace + festesspatium tvrdamezera + spaziofisso + nospace: geenspatie nospace + keinspatium zadnamezera + nientespazio + space: spatie space + spatium mezera + spazio + geenwitruimte: geenwitruimte nowhitespace + keinzwischenraum zadnebilemisto + nientewhitespace + opelkaar: opelkaar packed + kleinerdurchschuss zhustene + impaccato + startopelkaar: startopelkaar startpacked + startkleinerdurchschuss startzhustene + iniziaimpaccato + stopopelkaar: stopopelkaar stoppacked + stopkleinerdurchschuss stopzhustene + terminaimpaccato + startvanelkaar: startvanelkaar startunpacked + startgrosserdurchschuss startnezhustene + iniziaunpacked % GB + stopvanelkaar: stopvanelkaar stopunpacked + stopgrosserdurchschuss stopnezhustene + terminaunpacked + startregelcorrectie: startregelcorrectie startlinecorrection + startzeilenkorrektur startkorekceradku + iniziacorrezioneriga + stopregelcorrectie: stopregelcorrectie stoplinecorrection + stopzeilenkorrektur stopkorekceradku + terminacorrezioneriga + omlaag: omlaag godown + nachunten jdidolu + vaigiu % GB + witruimte: witruimte whitespace + zwischenraum bilemisto + whitespace % GB + nietinspringen: nietinspringen noindenting + nichteinziehen zadneodsazovani + nienterientro + inspringen: inspringen indenting + einziehen odsazovani + rientro + stelinspringenin: stelinspringenin setupindenting + stelleeinziehenein nastavodsazovani + impostarientro + startuitlijnen: startuitlijnen startalignment + startausrichtung startzarovnavani + iniziaallineamento + stopuitlijnen: stopuitlijnen stopalignment + stopausrichtung stopzarovnavani + terminaallineamento + startregels: startregels startlines + startzeilen startradky + iniziarighe + stopregels: stopregels stoplines + stopzeilen stopradky + terminarighe + stelparagraafnummerenin: stelparagraafnummerenin setupparagraphnumbering + stelleabsatznummerierungein nastavcislovaniodstavcu + impostanumerazionecapoversi + stelregelnummerenin: stelregelnummerenin setuplinenumbering + stellezeilennumerierungein nastavcislovaniradku + impostanumerazionerighe + startregelnummeren: startregelnummeren startlinenumbering + startzeilennumerierung startcislovaniradku + inizianumerazionerighe + stopregelnummeren: stopregelnummeren stoplinenumbering + stopzeilennumerierung stopcislovaniradku + terminanumerazionerighe + startregel: startregel startline + startzeile startradek + iniziariga + stopregel: stopregel stopline + stopzeile stopradek + terminariga + eenregel: eenregel someline + einezeile nejakyradek + qualcheriga + inregel: inregel inline + inzeile vradku + inriga + crlf: crlf crlf + crlf crlf + crlf + stelregelsin: stelregelsin setuplines + stellezeilenein nastavradky + impostarighe + startsmaller: startsmaller startnarrower + startenger startzuzeni + iniziapiustretto + stopsmaller: stopsmaller stopnarrower + stopenger stopzuzeni + terminapiustretto + stelsmallerin: stelsmallerin setupnarrower + stelleengerein nastavzuzeni + impostapiustretto + definetabulate: definieertabulatie definetabulate + definieretabulator definujtabelaci + definiscitabulate % GB + setuptabulate: steltabulatiein setuptabulate + stelletabulatorein nastavtabelaci + impostatabulate + starttabel: starttabel starttable + starttabelle starttabulka + iniziatabella + stoptabel: stoptabel stoptable + stoptabelle stoptabulka + terminatabella + starttabellen: starttabellen starttables + starttabellen starttabulky + iniziatabelle + stoptabellen: stoptabellen stoptables + stoptabellen stoptabulky + terminatabelle + steltabellenin: steltabellenin setuptables + stelletabellenein nastavtabulky + impostatabelle + definetabletemplate: definieertabelvorm definetabletemplate + definieretabellenvorlage definujsablonutabulky + definiscimodellotabella + pagina: pagina page + seite strana + pagina + koppelpagina: koppelpagina couplepage + doppelseite parovastrana + accoppiapagina % GB + soortpagina: soortpagina pagetype + seitentyp typstrany + tipopagina + verwerkpagina: verwerkpagina processpage + bearbeiteseite zpracujstranu + elaborapagina + koppelpapier: koppelpapier couplepaper + doppelseitigespapier dvoustrannypapir + accoppiacarta % GB + selecteerpapier: selecteerpapier selectpaper + waehlepapieraus vyberpapir + selezionacarta + scherm: scherm screen + bildschirm obrazovka + schermo + definieersectie: definieersectie definesection + definiereabschnitt definujsekci + definiscisezione + definieersectieblok: definieersectieblok definesectionblock + definiereabschnittsblock definujbloksekce + definiscibloccosezione + stelsectieblokin: stelsectieblokin setupsectionblock + stelleabschnittsblockein nastavbloksekce + impostabloccosezione + stelsectiein: stelsectiein setupsection + stelleabschnittein nastavsekci + impostasezione + geenbovenenonderregels: geenbovenenonderregels notopandbottomlines + keinzeilenobenundunten zadnehorniadolniradky + nientelineecimafondo + geenhoofdenvoetregels: geenhoofdenvoetregels noheaderandfooterlines + keinekopfundfusszeilen zadnezahlaviaupati + nientelineintestazionepdp + stelbovenin: stelbovenin setuptop + stellenobenein nastavhorejsek + impostacima + stelboventekstenin: stelboventekstenin setuptoptexts + stelletextobenein nastavhornitexty + impostatesticima + stelhoofdin: stelhoofdin setupheader + stellekopfzeileein nastavzahlavi + impostainstestazione + stelhoofdtekstenin: stelhoofdtekstenin setupheadertexts + stellekopfzeilentextein nastavtextyzahlavi + impostatestiintestazioni + stelnummeringin: stelnummeringin setuppagenumbering + stelleseitennummeriernungein nastavcislovanistran + impostanumerazionepagina + stelonderin: stelonderin setupbottom + stelleuntenein nastavspodek + impostafondo + stelondertekstenin: stelondertekstenin setupbottomtexts + stelletextuntenein nastavdolnitexty + impostatestifondo + stelvoetin: stelvoetin setupfooter + stellefusszeileein nastavupati + impostapdp + stelvoettekstenin: stelvoettekstenin setupfootertexts + stellefusszeilentextein nastavtextyupati + impostatestipdp + stelpaginanummerin: stelpaginanummerin setuppagenumber + stelleseitennummerein nastavcislostrany + impostanumeropagina + stelsubpaginanummerin: stelsubpaginanummerin setupsubpagenumber + stelleunterseitennummerein nastavpodcislostrany + impostanumerosottopagina + steltekstin: steltekstin setuptext + stelletextein nastavtext + impostatesto + stelteksttekstenin: stelteksttekstenin setuptexttexts + stelletexttexteein nastavtexttexty + impostatestotesti + definieertekst: definieertekst definetext + definieretext definujtext + definiscitesto + pagenumber: paginanummer pagenumber + seitenummer cislostrany + numeropagina + completepagenumber: volledigepaginanummer completepagenumber + completepagenumber completepagenumber % TOBIAS % TO + numeropaginacompleto % TB TH + placepagenumber: plaatspaginanummer placepagenumber + placepagenumber placepagenumber % TOBIAS % TOM + mettinumeropagina % TB TH + items: items items + posten polozky + elementi + stelitemsin: stelitemsin setupitems + stellepostenein nastavpolozky + impostaelementi + regellinks: regellinks leftaligned + linksbuendig zarovnanovlevo + asinistra % GB + regelmidden: regelmidden midaligned + zentriert zarovnanonastred + alcentro + regelrechts: regelrechts rightaligned + rechtsbuendig zarovnanovpravo + adestra + startkolommen: startkolommen startcolumns + startspalten startsloupce + iniziacolonne + stopkolommen: stopkolommen stopcolumns + stopspalten stopsloupce + terminacolonne + stelkolommenin: stelkolommenin setupcolumns + stellespaltenein nastavsloupce + impostacolonne + kolom: kolom column + spalte sloupec + colonna + kop: kop head + kopf nadpis + testa % GB + but: but but + but spodek + fondo + som: som item + pos polozka + elemento + nop: nop nop + nop nop + nop + mar: mar mar + mar okr + mar + sym: sym sym + sym sym + sim + its: its its + its pol % abbr. of polozka (it em) + el %abbr. of elemento + ran: ran ran + ran ran + ran + startopsomming: startopsomming startitemize + startaufzaehlung startvycet + iniziaitemize % GB + stelopsommingenin: stelopsommingenin setupitemizations + stelleaufzaehlungenein nastavvycty + impostaitemization + stelopsommingin: stelopsommingin setupitemize + stelleaufzaehlungein nastavvycet + impostaitemize + stopopsomming: stopopsomming stopitemize + stopaufzaehlung stopvycet + terminaitemize + definieerkop: definieerkop definehead + definiereueberschrift definujnadpis + definiscitesta % GB + stelkopin: stelkopin setuphead + stelleueberschriftein nastavnadpis + impostatesta + stelkoppenin: stelkoppenin setupheads + stelleueberschriftenein nastavnadpisy + impostateste + stelkopnummerin: stelkopnummerin setupheadnumber + stellekopfzahlein nastavcislonadpisu + impostanumerotesta + kopnummer: kopnummer headnumber + kopfnummer cislonadpisu + numerotesta + huidigekopnummer: huidigekopnummer currentheadnumber + heutigeskopfnummer aktualnicislonadpisu + numerotestacorrente + bepaalkopnummer: bepaalkopnummer determineheadnumber + bestimmekopfnummer stanovcislonadpisu + determinanumerotesta + resetmarkering: resetmarkering resetmarking + ruecksetztenbeschriftung resetznaceni + reimpostamarcatura + stelmarkeringin: stelmarkeringin setupmarking + stellebeschriftungein nastavznaceni + impostamarcatura + definieermarkering: definieermarkering definemarking + definierebeschriftung definujznaceni + definiscimarcatura + geenmarkering: geenmarkering nomarking + keinebeschriftung zadneznaceni + nientemarcatura + marking: markeer marking + beschriftung znaceni + marcatura + ontkoppelmarkering: ontkoppelmarkering decouplemarking + entknuepfebeschriftung rozpojeneznaceni + decouplemarcatura % GB + koppelmarkering: koppelmarkering couplemarking + verknuepfebeschriftung propojeneznaceni + accoppiamarcatura % GB + haalmarkering: haalmarkering getmarking + holebeschriftung ziskejznaceni + prendimarcatura % GB + stellayoutin: stellayoutin setuplayout + stellelayoutein nastavvzhled + impostalayout + paslayoutaan: paslayoutaan adaptlayout + passelayoutan prizpusobvzhled + adattalayout + steloffsetin: steloffsetin setupoffset + stelleoffsetein nastavoffset + impostaoffest + plaatsopgrid: plaatsopgrid placeongrid + amgitterausrichten umistinamrizku + mettiingriglia + verplaatsopgrid: verplaatsopgrid moveongrid + amgitterneuausrichten premistinamrizku + spostaagriglia + tooninstellingen: tooninstellingen showsetups + zeigeeinstellungen ukaznastaveni + mostraimpostazioni + toonkader: toonkader showframe + zeigerahmen ukazramecek + mostracornice + toongrid: toongrid showgrid + zeigegitter ukazmrizku + mostragriglia + toonopbouw: toonopbouw showbuildup + zeigeaufbau ukazstrukturu + mostrabuildup % GB + toonlayout: toonlayout showlayout + zeigelayout ukazvzhled + mostralyout + toonprint: toonprint showprint + zeigedruck ukazvytisk + mostrastampa + toonstruts: toonstruts showstruts + zeigestruts ukazpodpery + mostrastruts + definieerpapierformaat: definieerpapierformaat definepapersize + definierepapierformat definujvelikostpapiru + definiscidimensionicarta + stelpapierformaatin: stelpapierformaatin setuppapersize + stellepapierformatein nastavvelikostpapiru + impostadimensionicarta + stelarrangerenin: stelarrangerenin setuparranging + stelleanordnenein nastavusporadani + impostaparranging % GB + versie: versie version + version verze + versione + stelachtergrondenin: stelachtergrondenin setupbackgrounds + stellehintergruendeein nastavpozadi + impostasfondi + steluitlijnenin: steluitlijnenin setupalign + stelleausrichtungein nastavzarovnani + impostaallineamento + stelwitruimtein: stelwitruimtein setupwhitespace + stellezwischenraumein nastavbilamista + impostawhitespace % GB + setupinteraction: stelinteractiein setupinteraction + stelleinteraktionein nastavinterakci + impostainterazione + stelinteractiemenuin: stelinteractiemenuin setupinteractionmenu + stelleinteraktionsmenueein nastavinterakcnimenu + impostamenuinterazione + definieerinteractiemenu: definieerinteractiemenu defineinteractionmenu + definiereinteraktionsmenue definujinterakcnimenu + definiscimenuinterazione + blokkeerinteractiemenu: blokkeerinteractiemenu disableinteractionmenu + inaktiviereinteraktionsmenue zablokujinterakcnimenu + disabilitamenuinterazione + interactiebuttons: interactiebuttons interactionbuttons + interaktionsknopfe interakcnitlacitka + pulsantinterazione + interactiebalk: interactiebalk interactionbar + interaktionsbalken interakcnilista + barrainterazione + stelinteractiebalkin: stelinteractiebalkin setupinteractionbar + stelleinteraktionsbalkenein nastavinterakcnilistu + impostabarrainterazione + stelinteractieschermin: stelinteractieschermin setupinteractionscreen + stelleinteraktionsbildschirmein nastavinterakcniobrazovku + impostaschermointerazione + placebookmarks: plaatsbookmarks placebookmarks + platzierebookmarks umistizalozky + mettisegnalibro + bookmark: bookmark bookmark + bookmark zalozka + segnalibro + definieerbeeldmerk: definieerbeeldmerk definelogo + definierelogo definujlogo + definiscilogo + plaatsbeeldmerken: plaatsbeeldmerken placelogos + platzierelogo umistiloga + mettiloghi + definecolor: definieerkleur definecolor + definierefarbe definujbarvu + definiscicolore + definecolorgroup: definieerkleurgroep definecolorgroup + definierefarbengruppe definujskupinubarev + definiscigruppocolori + definepalet: definieerpalet definepalet + definierepalette definujpaletu + definiscitavolozza + graycolor: grijskleur graycolor + graufarbe sedabarva + coloregrigio + color: kleur color + farbe barva + colore + startcolor: startkleur startcolor + startfarbe startbarva + iniziacolore + stopcolor: stopkleur stopcolor + stopfarbe stopbarva + terminacolore + setupcolors: stelkleurenin setupcolors + stellefarbenein nastavbarvy + impostacolori + setupcolor: stelkleurin setupcolor + stellefarbeein nastavbarvu + impostacolore + setuppalet: stelpaletin setuppalet + stellepaletteein nastavpaletu + impostatavolozza + showcolor: toonkleur showcolor + zeigefarbe ukazbarvu + mostracolore + showcolorgroup: toonkleurgroep showcolorgroup + zeigefarbengruppe ukazskupinubarev + mostragruppocolori + showpalet: toonpalet showpalet + zeigepalette ukazpaletu + mostratavolozza + comparecolorgroup: vergelijkkleurgroep comparecolorgroup + vergleichefarbengruppe porovnejskupinubarev + confrontagruppocolori + comparepalet: vergelijkpalet comparepalet + vergleichepalette porovnejpaletu + confrontatavolozza + colorvalue: kleurwaarde colorvalue + farbewert hodnotabarvy + valorecolore + greyvalue: grijswaarde greyvalue + grauwert hodnotasedi + valoregrigio + startraster: startraster startraster + startraster startrastr + iniziaraster % GB + stopraster: stopraster stopraster + stopraster stoprastr + terminaraster + definieerblok: definieerblok defineblock + definiereblock definujblok + definisciblocco + stelblokin: stelblokin setupblock + stelleblockein nastavblok + impostablocco + gebruikblokken: gebruikblokken useblocks + verwendebloecke uzijbloky + usablocco + verwerkblokken: verwerkblokken processblocks + bearbeitebloecke zpracujbloky + elaborablocchi + handhaafblokken: handhaafblokken keepblocks + behaltebloecke zachovejbloky + tieniblocchi + selecteerblokken: selecteerblokken selectblocks + waehlebloeckeaus vyberbloky + selezionablocchi + verbergblokken: verbergblokken hideblocks + verbergebloecke schovejbloky + nascondiblocchi + passeerblokken: passeerblokken bypassblocks + bypassblocks bypassblocks + saltablocchi + forceerblokken: forceerblokken forceblocks + forceblocks forceblocks + forzablocchi + geenblokkenmeer: geenblokkenmeer nomoreblocks + keinebloeckemehr zadnedalsibloky + bastablocchi + definieerlijst: definieerlijst definelist + definiereliste definujseznam + definiscielenco + definieersamengesteldelijst: definieersamengesteldelijst definecombinedlist + definierezusammengestellteliste definujkombinovanyseznam + definiscielencocombinato + plaatslijst: plaatslijst placelist + platziereliste umistiseznam + mettielenco + plaatssamengesteldelijst: plaatssamengesteldelijst placecombinedlist + platzierezusammengestellteliste umistikombinovanyseznam + mettilistacombinata + schrijfnaarlijst: schrijfnaarlijst writetolist + schreibezurliste zapisdoseznamu + scriviinelenco + schrijftussenlijst: schrijftussenlijst writebetweenlist + schreibezwischenliste zapismeziseznam + scrivitraelenchi + stellijstin: stellijstin setuplist + stellelisteein nastavseznam + impostaelenco + stelsamengesteldelijstin: stelsamengesteldelijstin setupcombinedlist + stellezusammengestelltelisteein nastavkombinovanyseznam + impostaelencocombinato + bepaallijstkenmerken: bepaallijstkenmerken determinelistcharacteristics + bestimmelistencharakeristika stanovcharakteristickuseznamu + determinacarattersticheelenco + lijstlengte: lijstlengte listlength + listenlaenge delkaseznamu + lunghezzaelenco + lijstbreedte: lijstbreedte listwidth + listenbreite sirkaseznamu + ampiezzaelenco + lijsthoogte: lijsthoogte listheight + listenhoehe vyskaseznamu + altezzaelenco + geenlijst: geenlijst nolist + keineliste zadnyseznam + nienteelenco + definieerreferentielijst: definieerreferentielijst definereferencelist + definierereferenzliste definujseznamodkazu + definiscielencoriferimenti + plaatsreferentielijst: plaatsreferentielijst placereferencelist + platzierereferenzliste umistiseznamodkazu + mettielencoriferimenti + schrijfnaarreferentielijst: schrijfnaarreferentielijst writetoreferencelist + schreibezurreferenzliste zapisdoseznamuodkazu + scriviinelencoriferimenti + stelreferentielijstin: stelreferentielijstin setupreferencelist + stellereferenzlisteein nastavseznamodkazu + impostaelencoriferimenti + definieerplaatsblok: definieerplaatsblok definefloat + definieregleitobjekt definujplvouciobjekt + definiscioggettomobile + stelplaatsblokin: stelplaatsblokin setupfloat + stellegleitobjektein nastavplvouciobjekt + impostaoggettomobile + stelplaatsblokkenin: stelplaatsblokkenin setupfloats + stellegleitobjekteein nastavplvouciobjekty + impostaoggettimobili + splitsplaatsblok: splitsplaatsblok splitfloat + teilegleitobjekt rozdelplvouciobjekt + spezzaoggettomobile + stelplaatsblokkensplitsenin: stelplaatsblokkensplitsenin setupfloatsplitting + stelleplatziegeteiltegleitobjekt nastavdeleniplvoucichobjektu + impostaspezzamentooggettomobile + startcombinatie: startcombinatie startcombination + startkombination startspojeni + iniziacombinazione + stopcombinatie: stopcombinatie stopcombination + stopkombination stopspojeni + terminacombinazione + plaatsnaastelkaar: plaatsnaastelkaar placesidebyside + platzierenebeneinander umistivedlesebe + mettifiancoafianco + plaatsonderelkaar: plaatsonderelkaar placeontopofeachother + platziereuntereinander umistinadsebe + mettiunosullaltro + stelblokkopjein: stelblokkopjein setupcaption + stellebildunterschriftein nastavpopisek + impostacaption % GB + stelblokkopjesin: stelblokkopjesin setupcaptions + stellebilderunterschriftein nastavpopisky + impostacaptions % GB + stelcombinatiesin: stelcombinatiesin setupcombinations + stellekombinationein nastavspojeni + impostacombinazioni + startoverlay: startoverlay startoverlay + startoverlay startprekryv + iniziasovrapposizione + stopoverlay: stopoverlay stopoverlay + stopoverlay stopprekryv + terminasovrapposizione + definieerregister: definieerregister defineregister + definiereregister definujrejstrik + definisciregistro + koppelregister: koppelregister coupleregister + verknuepfregister propojenyrejstrik + accoppiaregistro + stelregisterin: stelregisterin setupregister + stelleregisterein nastavrejstrik + impostaregistro + schrijfnaarregister: schrijfnaarregister writetoregister + schreibezumregister zapisdorejstriku + scriviinregistro + plaatsregister: plaatsregister placeregister + platziereregister umistirejstrik + mettiregistro + bepaalregisterkenmerken: bepaalregisterkenmerken determineregistercharacteristics + bestimmeregistercharakteristika urcicharakteristikurejstriku + determinacaratteristicheregistro + definieersorteren: definieersorteren definesorting + definieresortieren definujtrideni + definisciordinamento + definieersynoniemen: definieersynoniemen definesynonyms + definieresynonyme definujsynonyma + definiscisinonimi + stelsorterenin: stelsorterenin setupsorting + stellesortierenein nastavtrideni + impostaordinamento + stelsynoniemenin: stelsynoniemenin setupsynonyms + stellesynonymein nastavsynonyma + impostasinonimi + startsynchronisatie: startsynchronisatie startsynchronization + startsynchronisation startsynchronizace + iniziasincronizzazione + stopsynchronisatie: stopsynchronisatie stopsynchronization + stopsynchronisation stopsynchronizace + terminasincronizzazione + stelsynchronisatiebalkin: stelsynchronisatiebalkin setupsynchronizationbar + stellesynchronisationsbalkenein nastavsynchronizacnilistu + impostabarrasincronizzazione + stelsynchronisatiein: stelsynchronisatiein setupsynchronization + stellesynchronisationein nastavsynchronizaci + impostasincronizzazione + synchronisatiebalk: synchronisatiebalk synchronizationbar + synchronisationsbalken synchronizacnilista + barrasincronizzazione + synchroniseer: synchroniseer synchronize + synchronisieren synchronizovat + sincronizza + gebruikexterndocument: gebruikexterndocument useexternaldocument + verwendeexteresdokument uzijexternidokument + usadocumentoesterno + gebruikURL: gebruikURL useURL + verwendeURL uzijURL + usaURL + gebruikurl: gebruikurl useurl + verwendeurl uzijurl + usaurl + setupurl: stelurlin setupurl + stelleurlein nastavurl + impostaurl + coupledocument: koppeldocument coupledocument + verknuepfedokument propojenydokument + accoppiadocumento + stelprogrammasin: stelprogrammasin setupprograms + stelleprogrammein nastavprogramy + impostaprogrammi + definieerprogramma: definieerprogramma defineprogram + definiereprogramme definujprogram + definisciprogramma + programma: programma program + programm program + programma + stelpaginaovergangenin: stelpaginaovergangenin setuppagetransitions + stelleseitenuebergangein nastavprechodstrany + impostatransizionepagina + definieerprofiel: definieerprofiel defineprofile + definiereprofil definujprofil + definisciprofilo + definieerversie: definieerversie defineversion + definiereversion definujverzi + definisciversion + markeerversie: markeerversie markversion + beschrifteversion oznacverzi + marcaversione % GB + selecteerversie: selecteerversie selectversion + waehleversionaus vyberverzi + selezionaversione % GB + startprofiel: startprofiel startprofile + startprofil startprofil + iniziaprofilo + startversie: startversie startversion + startversion startverze + iniziaversione + stelprofielenin: stelprofielenin setupprofiles + stelleprofilein nastavprofily + impostaprofili + stelversiesin: stelversiesin setupversions + stelleversionein nastavverze + impostaversioni + stopprofiel: stopprofiel stopprofile + stopprofil stopprofil + terminaprofili + stopversie: stopversie stopversion + stopversion stopverze + terminaversioni + volgprofiel: volgprofiel followprofile + folgeprofil dodrzujprofil + seguiprofilo + volgprofielversie: volgprofielversie followprofileversion + folgeprofilversion dodrzujverziprofilu + seguiversioneprofilo + volgversie: volgversie followversion + folgeversion dodrzujverzi + seguiversione + doordefinieren: doordefinieren definedescription + definierebeschreibung definujpopis + definiscidescrizione + doorlabelen: doorlabelen definelabel + definierelabel definujpopisek + definiscietichetta + doornummeren: doornummeren defineenumeration + definierenummerierung definujvycet + definiscienumerazione + doorspringen: doorspringen defineindenting + definiereeinzug definujodsazovani + definiscirientro + steldoordefinierenin: steldoordefinierenin setupdescriptions + definierebeschreibungen nastavpopisy + impostadescrizioni + steldoornummerenin: steldoornummerenin setupenumerations + stellebeschreibungein nastavvycty + impostaenumerazioni + steldoorspringenin: steldoorspringenin setupindentations + stelleeinzuegein nastavodsazovani + impostarientri + steltabin: steltabin setuptab + stelletabein nastavtab + impostatab + tab: tab tab + tab tab + tab + setupexternalfigures: stelexternefigurenin setupexternalfigures + stelleexterneabbildungenein nastavexterniobrazy + impostafigureesterne + showexternalfigures: toonexternefiguren showexternalfigures + zeigeexterneabbildungen ukazexterniobrazy + mostrafiguresterne + externalfigure: externfiguur externalfigure + externeabbildung externiobraz + figuraesterna + useexternalfigure: gebruikexternfiguur useexternalfigure + verwendeexterneabbildung uzijexterniobraz + usafiguraesterna + startfigure: startfiguur startfigure + startabbildung startobraz + iniziafigura + referring: refereer referring + referieren odkazujici + referring % GB + remark: toelichting remark + bemerkung oznaceni + commento + colorbar: kleurenbalk colorbar + farbbalken barevnalista + barracolori + rooster: rooster grid + gitter mrizka + griglia + button: button button + knopf tlacitko + pulsante + menubutton: menubutton menubutton + menueknopf tlacitkomenu + pulsantemenu + stelbuttonsin: stelbuttonsin setupbuttons + stelleknopfein nastavtlacitka + impostapulsanti + usereferences: gebruikreferenties usereferences + verwendereferenzen uzijodkazy + usariferimenti + reflijst: reflijst reflist + refliste seznamodkazu + listarif + stelreferentielijstin: stelreferentielijstin setupreferencelist + stellereferenzlisteein nastavseznamodkazu + impostalistariferimenti + setupreferencing: stelrefererenin setupreferencing + stellereferenzierenein nastavodkazovani + impostariferimento + textreference: tekstreferentie textreference + textreferenz odkaznatext + riferimentotesto + pagereference: paginareferentie pagereference + seitenreferenz odkaznastranu + riferimentopagina + reference: referentie reference + referenz odkaz + riferimento + definereference: definieerreferentie definereference + definierereferenz definujodkaz + definisciriferimento + definereferenceformat: definieerreferentieformaat definereferenceformat + definierereferenzformat definujformatodkazu + definisciformatoriferimento + useJSscripts: gebruikJSscripts useJSscripts + verwendeJSscript uzijJSscripts + usaJSscripts + uit: uit from + von zref + da + in: in in + in tref + in + op: op at + bei pref + al % GB + over: over about + ueber oref + intorno + naar: naar goto + zu jdina + vaia + atpage: oppagina atpage + aufseite nastrane + apagina + somewhere: ergens somewhere + irgendwo nekde + daqualcheparte + ref: ref ref + ref ref + rif + naarbox: naarbox gotobox + zurbox jdinabox + vaiabox % GB + naarpagina: naarpagina gotopage + zurseite jdinastranu + vaiapagina + plaatsformule: plaatsformule placeformula + platziereformel umistirovnici + mettiformula + plaatssubformule: plaatssubformule placesubformula + platziereunterformel umistipodrovnici + mettisottoformula + stelformulesin: stelformulesin setupformulae + stelleformelnein nastavrovnice + impostaformule + formulenummer: formulenummer formulanumber + formelnummer cislorovnice + numeroformula + subformulenummer: subformulenummer subformulanumber + unterformelnummer cislopodrovnice + numerosottoformula + leg: leg leg + leg leg + leg + geg: geg fact + geg fakt + fatto + mathematics: wiskunde mathematics + mathematik matematika + matematica + dimension: dimensie dimension + dimension rozmer + dimensione + nodimension: geendimensie nodimension + keindimension zadnyrozmer + nientedimensioni + startomgeving: startomgeving startenvironment + startumgebung startprostredi + iniziaambiente + stopomgeving: stopomgeving stopenvironment + stopumgebung stopprostredi + terminaambiente + startdeelomgeving: startdeelomgeving startlocalenvironment + startlokaleumgebung startlokalnihoprostredi + iniziaambientelocale + startonderdeel: startonderdeel startcomponent + startkomponente startkomponenta + iniziacomponente + stoponderdeel: stoponderdeel stopcomponent + stopkomponente stopkomponenta + terminacomponente + startprodukt: startprodukt startproduct + startprodukt startprodukt + iniziaprodotto + stopprodukt: stopprodukt stopproduct + stopprodukt stopprodukt + terminaprodotto + startproject: startproject startproject + startprojekt startprojekt + iniziaprogetto + stopproject: stopproject stopproject + stopprojekt stopprojekt + terminaprogetto + setups: instellingen setups + einstellungen nastaveni + impostazioni + project: project project + projekt projekt + progetto + onderdeel: onderdeel component + komponente komponenta + componenet + produkt: produkt product + produkt produkt + prodotto + omgeving: omgeving environment + umgebung prostredi + amiente + geenfilesmeer: geenfilesmeer nomorefiles + keinedateienmehr zadnedalsisoubory + bastafile + haalbuffer: haalbuffer getbuffer + holepuffer ziskejbuffer + prendibuffer + stelbufferin: stelbufferin setupbuffer + stellepufferein nastavbuffer + impostabuffer + typebuffer: typebuffer typebuffer + tippepuffer typebuffer + typebuffer % GB + definieerbuffer: definieerbuffer definebuffer + definierepuffer definujbuffer + definiscibuffer + betekenis: betekenis unitmeaning + bedeutung vyznam + nomeunita % GB + voluit: voluit infull + volleswort plnezneni + perlungo + citaat: citaat quotation + zitat citace + quotation % GB + citeer: citeer quote + zitieren citovat + quote + startcitaat: startcitaat startquotation + startzitat startcitace + iniziaquotation + stopcitaat: stopcitaat stopquotation + stopzitat stopcitace + terminaquotation + stelciterenin: stelciterenin setupquote + stellezitierenein nastavcitaci + impostaquote + definieer: definieer define + definieren definuj + definisci + herhaal: herhaal redo + wiederholen opakovat + rifai + gebruikcommandos: gebruikcommandos usecommands + verwendebefehl uzijprikazy + usacomandi + definieerstartstop: definieerstartstop definestartstop + definierestartstop definujstartstop + definisciiniziatermina + startlocal: startlokaal startlocal + startlokal startlokalni + inizialocale + stoplocal: stoplokaal stoplocal + stoplokal stoplokalni + terminalocale + startglobal: startglobaal startglobal + startglobal startglobalni + iniziaglobale + stopglobal: stopglobaal stopglobal + stopglobal stopglobalni + terminaglobale + naam: naam name + name jmeno + nome + definieeropmaak: definieeropmaak definemakeup + definiereumbruch definujupravu + definiscimakeup % GB + stelopmaakin: stelopmaakin setupmakeup + stelleumbruchein nastavupravu + impostamakeup + startopmaak: startopmaak startmakeup + startumbruch startuprava + iniziamakeup + stopopmaak: stopopmaak stopmakeup + stopumbruch stopuprava + terminamakeup + useexternalsoundtrack: gebruikexterngeluidsfragment useexternalsoundtrack + verwendeexternestonstueck uzijexternizvuk + usacolonnasonoraesterna + gebruikexternefile: gebruikexternefile useexternalfile + verwendeexternedatei uzijexternisoubor + usafileesterno + gebruikexternefiles: gebruikexternefiles useexternalfiles + verwendeexternedateien uzijexternisoubory + usafileesterni + kenmerk: kenmerk referral + verweis odkaz + referral % GB + kenmerkdatum: kenmerkdatum referraldate + verweisdatum odkaznadatum + datareferral + high: hoog high + hoch vysoky + ap + lohi: laho lohi + tiho nivy + pedap + low: laag low + tief nizky + ped + breuk: breuk fraction + bruch zlomek + frazione + chem: chem chem + chem chem + chim + startnaast: startnaast startopposite + startgegenueber startprotejsek + iniziaopposto + stopnaast: stopnaast stopopposite + stopgegenueber stopprotejsek + terminaopposto + stelnaastplaatsenin: stelnaastplaatsenin setupoppositeplacing + stellegegenueberplatzierenein nastavumisteniprotejsku + impostaposizionamentoopposti + startpositioneren: startpositioneren startpositioning + startpositionieren startumistovani + iniziaposizionamento + stoppositioneren: stoppositioneren stoppositioning + stoppositionieren stopumistovani + terminaposizionamento + positioneer: positioneer position + position pozice + posizione + stelpositionerenin: stelpositionerenin setuppositioning + stellepositionierenein nastavumistovani + impostaposizionamento + roteer: roteer rotate + drehen otocit + rotazione % GB + stelroterenin: stelroterenin setuprotate + stelledrehenein nastavotoceni + impostarotazione + spiegel: spiegel mirror + spiegeln zrcadlit + riflessione + schaal: schaal scale + format meritko + scale % GB + stelnummerenin: stelnummerenin setupnumbering + stellenummerierungein nastavcislovani + impostanumerazione + reset: reset reset + ruecksetzten reset + reimposta + stelpublicatiesin: stelpublicatiesin setuppublications + stellepublikationein nastavpublikace + impostapubblicazioni + publicatie: publicatie publication + publikation publikace + pubblicazione + definieerhbox: definieerhbox definehbox + definierehbox definujhbox + definiscihbox + toevoegen: toevoegen adding + zusatz scitani + adding % GB + punten: punten periods + punkt tecky + punti + stelkoppeltekenin: stelkoppeltekenin setuphyphenmark + stellebindestrichein nastavdelitko + impostasegnosillabazione % GB + stelinterliniein: stelinterliniein setupinterlinespace + stellezeilenabstandein nastavmeziradkovoumezeru + impostainterlinea + stelspatieringin: stelspatieringin setupspacing + stellespatiumein nastavradkovani + impostaspaziatura + steltolerantiein: steltolerantiein setuptolerance + stelletoleranzein nastavtoleranci + impostatolleranza + setupsystem: stelsysteemin setupsystem + stellesystemein nastavsystem + impostasistema + usepath: gebruikgebied usedirectory + benutzeverzeichnis uzijadresar % TOBIAS + usacartella % GB + definieeralineas: definieeralineas defineparagraphs + definiereabsaetze definujodstavce + definiscicapoversi + stelalineasin: stelalineasin setupparagraphs + stelleabsaetzeein nastavodstavce + impostacapoversi + geentest: geentest donttest + keintest zadnytest + notest + stelcommentaarin: stelcommentaarin setupcomment + stellekommentarein nastavkomentar + impostacommento + commentaar: commentaar comment + kommentar komentar + commento + definefield: definieerveld definefield + definierefeld definujpole + definiscicampo + definemainfield: definieerhoofdveld definemainfield + definierehauptfeld definujhlavnipole + definiscicampoprincipale + definesubfield: definieersubveld definesubfield + definieresubfeld definujpodpole + definiscisottocampo + clonefield: kloonveld clonefield + klonierefeld klonujpole + clonacampo + copyfield: copieerveld copyfield + kopierefeld kopirujpole + copiacampo + setupfield: stelveldin setupfield + stellefeldein nastavpole + impostacampo + setupfields: stelveldenin setupfields + stellefelderin nastavvsechnapole + impostacampi + field: veld field + feld pole + campi + fitfield: passendveld fitfield + passendfeld prizpusobivepole % or vhodnepole + adattacampo + logfields: registreervelden logfields + registrierefelder zaznamovepole + logcampi % GB + showfields: toonvelden showfields + zeigefelder ukazpole + mostracampi + tooltip: suggestie tooltip + tooltip bublinkovanapoveda + tooltip % GB + fillinfield: invulveld fillinfield + ausfuellfeld vyplnovepole + camporiempimento + definefieldstack: definieerveldstapel definefieldstack + definierefeldstapel definujzasobnikpoli + definiscistackcampi % GB + fieldstack: veldstapel fieldstack + feldstapel zasobnikpoli + stackcampi + setupforms: stelformulierenin setupforms + setupforms setupforms + impostaforms % GB + setupclipping: stelclipin setupclipping + stelleausschnittein nastavorez + impostaclippling % GB + clip: clip clip + ausschnitt orez + clip + placelegend: plaatslegenda placelegend + platzierelegende umistilegendu + mettilegenda + setuplegend: stellegendain setuplegend + stellelegendeein nastavlegendu + impostalegenda + setuppagecomment: stelpaginacommentaarin setuppagecomment + stelleseitenkommentarein nastavkomentarstrany + impostacommentopagina + setupstrut: stelstrutin setupstrut + setupstrut setupstrut + impostastrut + definerule: definieerlijn definerule + definerule definerule + definiscilinea + placerule: plaatslijn placerule + placerule placerule + mettilinea + setuprule: stellijnin setuprule + setuprule setuprule + impostalinea + definetextvariable: definieertekstvariabele definetextvariable + definetextvariable definetextvariable + definiscivariabiletesto + setuptextvariable: steltekstvariabelein setuptextvariable + setuptextvariable setuptextvariable + impostavariabiletesto + settextvariable: kentekstvariabeletoe settextvariable + settextvariable settextvariable + setvariabiletesto % GB + placetextvariable: plaatstekstvariabele placetextvariable + placetextvariable placetextvariable + mettivariabiletesto + textvariable: tekstvariabele textvariable + textvariable textvariable + variabiletesto + definetextposition: definieertekstpositie definetextposition + definetextposition definetextposition + definisciposizionetesto + setuptextposition: steltekstpositiein setuptextposition + setuptextposition setuptextposition + impostaposizionetesto + positiontext: positioneertekst positiontext + positiontext positiontext + posizionetesto % GB + definerawfont: definerawfont definerawfont + definerawfont definerawfont + definiscifontgrezzo + switchtorawfont: switchtorawfont switchtorawfont + switchtorawfont switchtorawfont + passaafontgrezzo \stopcommands % ^ ^ ^ nadenken over \settextvariable vs \setuptextvariable in nl @@ -1327,79 +1711,109 @@ %D \startcompressdefinitions -\startcommands dutch english - german czech - - - bovenhoogte: bovenhoogte topheight - hoeheoben vyskahorejsku - bovenafstand: bovenafstand topdistance - abstandoben vzdalenosthorejsku - hoofdhoogte: hoofdhoogte headerheight - kopfzeilenhoehe vyskazahlavi - hoofdafstand: hoofdafstand headerdistance - kopfzeilenabstand vzdalenostzahlavi - teksthoogte: teksthoogte textheight - texthoehe vyskatextu - voetafstand: voetafstand footerdistance - fusszeileabstand vzdalenostupati - voethoogte: voethoogte footerheight - fusszeilenhoehe vyskaupati - onderafstand: onderafstand bottomdistance - abstandunten vzdalenostspodku - onderhoogte: onderhoogte bottomheight - hoeheunten vyskaspodku - margebreedte: margebreedte marginwidth - marginalbreite sirkamarginalie - linkermargebreedte: linkermargebreedte leftmarginwidth - linkemarginalbreite sirkalevemarginalie - rechtermargebreedte: rechtermargebreedte rightmarginwidth - rechtemarginalbreite sirkapravemarginalie - margeafstand: margeafstand margindistance - marginalafstand vzdalenostmarginalie - linkermargeafstand: linkermargeafstand leftmargindistance - linkemarginalafstand vzdalenostlevemarginalie - rechtermargeafstand: rechtermargeafstand rightmargindistance - rechtemarginalafstand vzdalenostpravemarginalie - randbreedte: randbreedte edgewidth - randbreite sirkaokraje - linkerrandbreedte: linkerrandbreedte leftedgewidth - breitelinkerrand sirkalevehookraje - rechterrandbreedte: rechterrandbreedte rightedgewidth - breiterechterrand sirkapravehookraje - randafstand: randafstand edgedistance - randabstand vzdalenostokraje - linkerrandafstand: linkerrandafstand leftedgedistance - abstandlinkerrand vzdalenostlevehookraje - rechterrandafstand: rechterrandafstand rightedgedistance - abstandrechterrand vzdalenostpravehookraje - tekstbreedte: tekstbreedte textwidth - textbreite sirkatextu - zetbreedte: zetbreedte makeupwidth - satzbreite sirkasazby - zethoogte: zethoogte makeupheight - satzhoehe vyskasazby - kopwit: kopwit topspace - kopfweite hornimezera - rugwit: rugwit backspace - rumpfweite spodnimezera - - papierbreedte: papierbreedte paperwidth - papierbreite sirkapapiru - papierhoogte: papierhoogte paperheight - papierhoehe vyskapapiru - printpapierbreedte: printpapierbreedte printpaperwidth - printpapierbreite sirkatiskpapiru - printpapierhoogte: printpapierhoogte printpaperheight - printpapierhoehe vyskatiskpapiru - kopniveau: kopniveau headlevel - kopfniveau hlavniuroven - - linewidth: lijndikte linethickness - liniendicke tloustkacary - - totaalaantalpaginas: totaalaantalpaginas totalnumberofpages - gesamtseitenanzahl celkovypocetstran +\startcommands dutch english + german czech + italian + + bovenhoogte: bovenhoogte topheight + hoeheoben vyskahorejsku + altezzacima + bovenafstand: bovenafstand topdistance + abstandoben vzdalenosthorejsku + distanzacima + hoofdhoogte: hoofdhoogte headerheight + kopfzeilenhoehe vyskazahlavi + altezzaintestazione + hoofdafstand: hoofdafstand headerdistance + kopfzeilenabstand vzdalenostzahlavi + distanzaintestazione + teksthoogte: teksthoogte textheight + texthoehe vyskatextu + altezzatesto + voetafstand: voetafstand footerdistance + fusszeileabstand vzdalenostupati + distanzapdp + voethoogte: voethoogte footerheight + fusszeilenhoehe vyskaupati + altezzapdp + onderafstand: onderafstand bottomdistance + abstandunten vzdalenostspodku + distanzafondo + onderhoogte: onderhoogte bottomheight + hoeheunten vyskaspodku + altezzafondo + margebreedte: margebreedte marginwidth + marginalbreite sirkamarginalie + ampiezzamargine % GB + linkermargebreedte: linkermargebreedte leftmarginwidth + linkemarginalbreite sirkalevemarginalie + ampiezzamarginesinistro + rechtermargebreedte: rechtermargebreedte rightmarginwidth + rechtemarginalbreite sirkapravemarginalie + ampiezzamarginedestro + margeafstand: margeafstand margindistance + marginalafstand vzdalenostmarginalie + distanzamargine + linkermargeafstand: linkermargeafstand leftmargindistance + linkemarginalafstand vzdalenostlevemarginalie + distanzamarginesinistro + rechtermargeafstand: rechtermargeafstand rightmargindistance + rechtemarginalafstand vzdalenostpravemarginalie + distanzamarginedestro + randbreedte: randbreedte edgewidth + randbreite sirkaokraje + ampiezzabordo + linkerrandbreedte: linkerrandbreedte leftedgewidth + breitelinkerrand sirkalevehookraje + ampiezzabordosinistro + rechterrandbreedte: rechterrandbreedte rightedgewidth + breiterechterrand sirkapravehookraje + ampiezzabordodestro + randafstand: randafstand edgedistance + randabstand vzdalenostokraje + distanzabordo + linkerrandafstand: linkerrandafstand leftedgedistance + abstandlinkerrand vzdalenostlevehookraje + distanzabordosinistro + rechterrandafstand: rechterrandafstand rightedgedistance + abstandrechterrand vzdalenostpravehookraje + distanzabordodestro + tekstbreedte: tekstbreedte textwidth + textbreite sirkatextu + ampiezzatesto + zetbreedte: zetbreedte makeupwidth + satzbreite sirkasazby + ampiezzamakeup % GB + zethoogte: zethoogte makeupheight + satzhoehe vyskasazby + altezzamakeup + kopwit: kopwit topspace + kopfweite odsazenishora + spaziocima + rugwit: rugwit backspace + rumpfweite odsazenizleva + spaziodietro % GB + papierbreedte: papierbreedte paperwidth + papierbreite sirkapapiru + ampiezzacarta + papierhoogte: papierhoogte paperheight + papierhoehe vyskapapiru + altezzacarta + printpapierbreedte: printpapierbreedte printpaperwidth + printpapierbreite sirkatiskpapiru + ampiezzacartastampa % GB + printpapierhoogte: printpapierhoogte printpaperheight + printpapierhoehe vyskatiskpapiru + altezzacartastampa % GB + kopniveau: kopniveau headlevel + kopfniveau hlavniuroven + livellotesta % GB + linewidth: lijndikte linethickness + liniendicke tloustkacary + spessoreriga + totaalaantalpaginas: totaalaantalpaginas totalnumberofpages + gesamtseitenanzahl celkovypocetstran + numerototaledipagine \stopcommands @@ -1411,35 +1825,49 @@ %D \startcompressdefinitions -\startcommands dutch english - german czech - - startdocument: startdocument startdocument - startdokument startdokument - stopdocument: stopdocument stopdocument - stopdokument stopdokument - startoverzicht: startoverzicht startoverview - startueberblick startprehled - stopoverzicht: stopoverzicht stopoverview - stopueberblick stopprehled - stelbrievenin: stelbrievenin setupcorrespondence - stellekorrespondenzein nastavkorespondenci - brieven: brieven letters - briefe dopisy - brief: brief letter - brief dopis - label: label label - label poppisek - sheet: sheet sheet - blatt list - stelstickersin: stelstickersin setupstickers - stellestickerein nastavetikety - stelsheetsin: stelsheetsin setupsheets - stelleblattein nastavlisty - labels: labels labels - labels popisky - woonplaats: woonplaats domicile - wohnort bydliste +\startcommands dutch english + german czech + italian + + startdocument: startdocument startdocument + startdokument startdokument + iniziadocumento + stopdocument: stopdocument stopdocument + stopdokument stopdokument + terminadocumento + startoverzicht: startoverzicht startoverview + startueberblick startprehled + iniziaoverview % GB + stopoverzicht: stopoverzicht stopoverview + stopueberblick stopprehled + terminaoverview + stelbrievenin: stelbrievenin setupcorrespondence + stellekorrespondenzein nastavkorespondenci + impostacorrispondenza + brieven: brieven letters + briefe dopisy + lettere + brief: brief letter + brief dopis + lettera + label: label label + label poppisek + etichetta + sheet: sheet sheet + blatt list + foglio + stelstickersin: stelstickersin setupstickers + stellestickerein nastavetikety + impostafrancobolli % GB + stelsheetsin: stelsheetsin setupsheets + stelleblattein nastavlisty + impostafogli + labels: labels labels + labels popisky + etichette + woonplaats: woonplaats domicile + wohnort bydliste + domicilio \stopcommands diff --git a/tex/context/base/mult-con.tex b/tex/context/base/mult-con.tex index 765011727..8e94e01e1 100644 --- a/tex/context/base/mult-con.tex +++ b/tex/context/base/mult-con.tex @@ -1,6 +1,6 @@ %D \module %D [ file=mult-con, -%D version=1996.06.01, +%D version=2000.09.12, %D title=\CONTEXT\ Multilingual Macros, %D subtitle=Constants, %D author=Hans Hagen, @@ -14,8 +14,8 @@ %D In this rather large definition file we are going to tell %D \CONTEXT\ which constants, variables and elements we use. %D -%D The German translations were provided by Tobias Burnus, -%D and the Czech ones by Tom Hudec. +%D The German translations were provided by Tobias Burnus, +%D and the Czech ones by Tom Hudec. \writestatus{loading}{Context Multilingual Macros / Constants} @@ -26,14 +26,25 @@ %D \startcompressdefinitions -\startvariables dutch english german czech - - een: een one eins jedna - twee: twee two zwei dve - drie: drie three drei tri - vier: vier four vier ctyri - vijf: vijf five fuenf pet - +\startvariables dutch english + german czech + italian + + een: een one + eins jedna + uno + twee: twee two + zwei dve + due + drie: drie three + drei tri + tre + vier: vier four + vier ctyri + quattro + vijf: vijf five + fuenf pet + cinque \stopvariables %D \stopcompressdefinitions @@ -42,42 +53,90 @@ %D \startcompressdefinitions -\startvariables dutch english german czech - - sunday: zondag sunday sonntag nedele - monday: maandag monday montag pondeli - tuesday: dinsdag tuesday dienstag utery - wednesday: woensdag wednesday mittwoch streda - thursday: donderdag thursday donnerstag ctvrtek - friday: vrijdag friday freitag patek - saturday: zaterdag saturday samstag sobota - +\startvariables dutch english + german czech + italian + + sunday: zondag sunday + sonntag nedele + domenica + monday: maandag monday + montag pondeli + lunedi + tuesday: dinsdag tuesday + dienstag utery + martedi + wednesday: woensdag wednesday + mittwoch streda + mercoledi + thursday: donderdag thursday + donnerstag ctvrtek + giovedi + friday: vrijdag friday + freitag patek + venerdi + saturday: zaterdag saturday + samstag sobota + sabato \stopvariables -\startvariables dutch english german czech - - january: januari January Januar leden - february: februari February Februar unor - march: maart March Maerz brezen - april: april April April duben - may: mei May Mai kveten - june: juni June Juni cerven - july: juli July Juli cervenec - august: augustus August August srpen - september: september September September zari - october: oktober October Oktober rijen - november: november November November listopad - december: december December Dezember prosinec - +\startvariables dutch english + german czech + italian + + january: januari January + Januar leden + gennaio + february: februari February + Februar unor + febbraio + march: maart March + Maerz brezen + marzo + april: april April + April duben + aprile + may: mei May + Mai kveten + maggio + june: juni June + Juni cerven + giugno + july: juli July + Juli cervenec + luglio + august: augustus August + August srpen + agosto + september: september September + September zari + settembre + october: oktober October + Oktober rijen + ottobre + november: november November + November listopad + novembre + december: december December + Dezember prosinec + dicembre \stopvariables %D Next we introduce some general label bound variables: -\startvariables dutch english german czech +\startvariables dutch english + german czech + italian - oppagina: oppagina atpage aufseite nastrance - hierboven: hierboven hencefore vorher vyse - hieronder: hieronder hereafter nachher nize + oppagina: oppagina atpage + aufseite nastrance + apagina + hierboven: hierboven hencefore + vorher vyse + precedente + hieronder: hieronder hereafter + nachher nize + seguente \stopvariables @@ -87,67 +146,82 @@ %D use variable when defining them. First we define some %D general structuring variables: -%D \startcompressdefinitions - -% to be added: sub subsub subsubsub subsubsubsub - -\startvariables dutch english german - czech - - sectionlevel: sectie section abschnitt - oddil - - deel: deel part teil - cast - hoofdstuk: hoofdstuk chapter kapitel - kapitola - onderwerp: onderwerp subject thema - tema - paragraaf: paragraaf section absatz - sekce - titel: titel title titel - titul - - margetitel: margetitel margintitle marginaltitel - titulmarginalie - - inhoud: inhoud content inhalt - obsah - inhouden: inhouden contents inhalte - obsah - - bijlage: bijlage appendix anhang - dodatek - bijlagen: bijlagen appendices anhaenge - dodatky - hoofdtekst: hoofdtekst bodypart haupttext - hlavnicast - hoofdteksten: hoofdteksten bodymatter haupttexte - hlavnicasti - inleiding: inleiding frontpart einleitung - prednicast - inleidingen: inleidingen frontmatter einleitungen - prednicasti - uitleiding: uitleiding backpart epilog - epilog - uitleidingen: uitleidingen backmatter epiloge - epilogy - - voetnoot: voetnoot footnote fussnote - poznamkapodcarou - - systeem: systeem system systeme - system +%D \startcompressdefinitions + +\startvariables dutch english + german czech + italian + + sectionlevel: sectie section + abschnitt oddil + sezione + deel: deel part + teil cast + parte + hoofdstuk: hoofdstuk chapter + kapitel kapitola + capitolo + onderwerp: onderwerp subject + thema tema + argomento + paragraaf: paragraaf section + absatz sekce + capoverso %paragrafo + titel: titel title + titel titul + titolo + margetitel: margetitel margintitle + marginaltitel titulmarginalie + titoloinmargine + inhoud: inhoud content + inhalt obsah + indice % GB + inhouden: inhouden contents + inhalte obsah + indici % GB + bijlage: bijlage appendix + anhang dodatek + appendice + bijlagen: bijlagen appendices + anhaenge dodatky + appendici + hoofdtekst: hoofdtekst bodypart + haupttext hlavnicast + bodypart % GB + hoofdteksten: hoofdteksten bodymatter + haupttexte hlavnicasti + bodymatter % GB + inleiding: inleiding frontpart + einleitung prednicast + frontpart % GB + inleidingen: inleidingen frontmatter + einleitungen prednicasti + frontmatter % GB + uitleiding: uitleiding backpart + epilog epilog + backpart % GB + uitleidingen: uitleidingen backmatter + epiloge epilogy + backmatter % GB + voetnoot: voetnoot footnote + fussnote poznamkapodcarou + notapdp + systeem: systeem system + systeme system + sistema \stopvariables -\startvariables dutch english german - czech +\startvariables dutch english + german czech + italian - typen: typen typing tippen - typing - file: file file datei - soubor + typen: typen typing + tippen typing + typing % GB + file: file file + datei soubor + file % GB \stopvariables @@ -159,56 +233,75 @@ %D \startcompressdefinitions -\startvariables dutch english german - czech - - formule: formule formula formel - rovnice - formules: formules formulae formeln - rovnice - - figuur: figuur figure abbildung - obrazek - figuren: figuren figures abbildungen - obrazky - tabel: tabel table tabelle - tabulka - tabellen: tabellen tables tabellen - tabulky - grafiek: grafiek graphic grafik - graf - grafieken: grafieken graphics grafiken - grafy - intermezzo: intermezzo intermezzo intermezzo - intermezzo - intermezzos: intermezzos intermezzi intermezzi - intermezzi - - index: index index index - rejstrik - indices: indices indices indizies - rejstriky - - afkorting: afkorting abbreviation abkuerzung - zkratka - afkortingen: afkortingen abbreviations abkuerzungen - zkratky - logo: logo logo logo - logo - logos: logos logos logos - loga - eenheid: eenheid unit einheit - jednotka - eenheden: eenheden units einheiten - jednotky - - regel: regel line zeile - radek - regels: regels lines zeilen - radky - - framedtext: kadertekst framedtext umrahmtertext - oramovanytext +\startvariables dutch english + german czech + italian + + formule: formule formula + formel rovnice + formula + formules: formules formulae + formeln rovnice + formule + figuur: figuur figure + abbildung obrazek + figura + figuren: figuren figures + abbildungen obrazky + figure + tabel: tabel table + tabelle tabulka + tabella + tabellen: tabellen tables + tabellen tabulky + tabelle + grafiek: grafiek graphic + grafik graf + grafico + grafieken: grafieken graphics + grafiken grafy + grafici + intermezzo: intermezzo intermezzo + intermezzo intermezzo + intermezzo + intermezzos: intermezzos intermezzi + intermezzi intermezzi + intermezzi + index: index index + index rejstrik + indiceanalitico + indices: indices indices + indizies rejstriky + indicianalitici + afkorting: afkorting abbreviation + abkuerzung zkratka + abbreviazione + afkortingen: afkortingen abbreviations + abkuerzungen zkratky + abbreviazioni + logo: logo logo + logo logo + logo + logos: logos logos + logos loga + loghi + eenheid: eenheid unit + einheit jednotka + unita +% GB: unita in italian means "joined", the previous should be "unit\`a"; +% moreover, the plural (following) is the same as the singular. What should I do? + eenheden: eenheden units + einheiten jednotky + unita + regel: regel line + zeile radek + riga + regels: regels lines + zeilen radky + righe + framedtext: kadertekst framedtext + umrahmtertext oramovanytext + testoincorniciato \stopvariables @@ -221,627 +314,937 @@ %D \startcompressdefinitions -\startconstants dutch english german - czech - - leftquotation: linkercitaat leftquotation linkerzitat - citacevlevo - rightquotation: rechtercitaat rightquotation rechterzitat - citacevpravo - leftquote: linkerciteer leftquote linkerzitieren - citovatvlevo - rightquote: rechterciteer rightquote rechterzitieren - citovatvpravo - leftsentence: linkerzin leftsentence linkersatz - vetavlevo - rightsentence: rechterzin rightsentence rechtersatz - vetavpravo - leftsubsentence: linkersubzin leftsubsentence linkersubsatz - podvetavlevo - rightsubsentence: rechtersubzin rightsubsentence rechtersubsatz - podvetavpravo - - datum: datum date datum - datum - - voorwit: voorwit spacebefore vorspatium - mezerapred - nawit: nawit spaceafter nachspatium - mezeraza - zijvoorwit: zijvoorwit sidespacebefore nebenvorspatium - bocnimezerapred - zijnawit: zijnawit sidespaceafter nebennachspatium - bocnimezeraza - - aan: aan to zu - na - aanduiding: aanduiding indicator indikator - indikator - achtergrond: achtergrond background hintergrund - pozadi - achtergronddiepte: achtergronddiepte backgrounddepth hintergrundtiefe - hloubkapozadi - achtergrondhoek: achtergrondhoek backgroundcorner hintergrundwinkel - rohpozadi - achtergrondkleur: achtergrondkleur backgroundcolor hintergrundfarbe - barvapozadi - achtergrondoffset: achtergrondoffset backgroundoffset hintergrundoffset - offsetpozadi - achtergrondraster: achtergrondraster backgroundscreen hintergrundraster - rastrpozadi - achtergrondstraal: achtergrondstraal backgroundradius hintergrundradius - polomerpozadi - adres: adres address adresse - adresa - afsluiter: afsluiter stopper abschnitttrenner - predel - afstand: afstand distance abstand - vzdalenost - alinea: alinea paragraph absatz - odstavec - assenstelsel: assenstelsel axis achsen - osa - auteur: auteur author autor - autor - balanceren: balanceren balance ausgleichen - rovnovaha - bfactor: bfactor wfactor bfaktor - sfaktor - binnen: binnen inner innen - vnitrni - blanko: blanko blank blanko - prazdny - blokkade: blokkade obstruction gesperrt - prekazka - blokwijze: blokwijze blockway blockauf - dobloku - bodemwit: bodemwit bottomspace bottomspace - bottomspace - boven: boven top oben - vrsek - bovenafstand: bovenafstand topdistance obenabstand - vzdalenostvrsku - bovenkader: bovenkader topframe obenrahmen - vrchniramecek - bovenoffset: bovenoffset topoffset obenoffset - offsetvrsku - bovenstatus: bovenstatus topstate statusoben - statusvrsku - breedte: breedte width breite - sirka - maxbreedte: maxbreedte maxwidth maxbreite - maxsirka - bron: bron source quelle - zdroj - commando: commando command befehl - prikaz - commandos: commandos commands befehle - prikazy - contrastkleur: contrastkleur contrastcolor kontrastfarbe - kontrastnibarva - conversie: conversie conversion konversion - konverze - kopconversie: kopconversie headconversion headconversion - konverzehlavicky % TOBIAS - koplabel: koplabel headlabel headlabel - popisekhlavicky % TOBIAS - criterium: criterium criterium kriterium - kriterium - datum: datum date datum - datum - default: default default default - implicitni - diepte: diepte depth tiefe - hloubka - dieptecorrectie: dieptecorrectie depthcorrection tiefekorrektur - korekcehloubky - dikte: dikte thickness dicke - tloustka - doorgaan: doorgaan continue fortsetzen - pokracovat - dubbelzijdig: dubbelzijdig doublesided doppelseitig - oboustranne - dummy: dummy dummy dummy - dummy - eenheid: eenheid unit einheit - jednotka - eigennummer: eigennummer ownnumber eigenenummer - vlastnicislo - evenmarge: evenmarge evenmargin geraderand - sudamarginalie - expansie: expansie expansion expansion - expanzen - factor: factor factor faktor - faktor - converteerfile: converteerfile convertfile konvertieredatei - konverzesouboru - file: file file datei - soubor - formaat: formaat size groesse - velikost - autofocus: autofocus autofocus autofocus - autoostreni - focus: focus focus focus - zaostreni - gebied: gebied directory verzeichnis - adresar - grid: grid grid gritter - mrizka - groot: groot big gross - velky - haal: haal get hole - ziskat - hang: hang hang haengend - zaveseni - herhaal: herhaal repeat wiederholen - opakovat - hfactor: hfactor hfactor hfaktor - vfaktor - hoek: hoek corner winkel - roh - hoffset: hoffset hoffset hoffset - hoffset - hokjes: hokjes frames umrahmen - ramecky - hoofd: hoofd header kopfzeile - zahlavi - hoofdafstand: hoofdafstand headerdistance kopfzeilenabstand - vzdalenostzahlavi - hoofdstatus: hoofdstatus headerstate kopfzeilenstatus - statuszahlavi - hoogte: hoogte height hoehe - vyska - maxhoogte: maxhoogte maxheight maxhoehe - maxvyska - huidige: huidige current aktuell - aktualni - in: in in in - v - inspringen: inspringen indenting einziehen - odsazovani - interactie: interactie interaction interaktion - interakce - interlinie: interlinie interlinespace zeilenabstande - meziradkovamezera - items: items items posten - polozky - kader: kader frame rahmen - ramecek - kaderdiepte: kaderdiepte framedepth rahmentiefe - hloubkaramecku - kaderhoek: kaderhoek framecorner rahmenwinkel - rohramecku - kaderkleur: kaderkleur framecolor rahmenfarbe - barvaramecku - kaderoffset: kaderoffset frameoffset rahmenoffset - offsetramecku - kaderstraal: kaderstraal frameradius rahmenradius - polomerramecku - kantlijn: kantlijn marginedge marginalkante - textovahrana - kantlijntekst: kantlijntekst marginedgetext marginalkantetext - textmarginalnihookraje - karakteruitlijnen: karakteruitlijnen aligncharacter aligncharacter - aligncharacter % TOBIAS / TOM - uitlijnkarakter: uitlijnkarakter alignmentcharacter alignmentcharacter - alignmentcharacter % TOBIAS / TOM - klein: klein small klein - male - kleur: kleur color farbe - barva - kolom: kolom column spalte - sloupec - kolomafstand: kolomafstand columndistance spaltenabstand - vzdalenostsloupcu - kopkleur: kopkleur headcolor kopffarbe - barvahlavicky - kopletter: kopletter headstyle kopfstil - stylhlavicky - kopna: kopna afterhead nachkopf - pohlavicce - kopoffset: kopoffset veroffset kopfoffset - offsethlavicky - koppeling: koppeling coupling verknuepfung - propojeni - koppelwijze: koppelwijze couplingway verkopplungsart - zpusobpropojeni - kopvoor: kopvoor beforehead vorkopf - predhlavickou - kopwit: kopwit topspace kopfspatium - svrchnimezera - korps: korps bodyfont fliesstext - zakladnifont - label: label label label - popisek - leeg: leeg empty leer - prazdne - letter: letter style stil - pismeno - lijn: lijn rule linie - linka - lijndikte: lijndikte rulethickness liniendicke - tloustkalinky - lijnkleur: lijnkleur rulecolor linienfarbe - barvalinky - lijst: lijst list liste - seznam - linkerbreedte: linkerbreedte leftwidth linkerbreite - sirkavlevo - linkerkader: linkerkader leftframe linkerrahmen - ramecekvlevo - linkerkleur: linkerkleur leftcolor linkerfarbe - barvavlevo - linkerletter: linkerletter leftstyle linkerstil - stylvlevo - linkermarge: linkermarge leftmargin linkerrand - levyokraj - linkermargeafstand: linkermargeafstand leftmargindistance linkerrandabstand - vzdalenostlevehookraje - linkeroffset: linkeroffset leftoffset linkeroffset - levyoffset - linkerrand: linkerrand leftedge linkekante - levahrana - linkerrandafstand: linkerrandafstand leftedgedistance linkerkantenabstand - vzdalenostlevehrany - linkertekst: linkertekst lefttext linkertext - textvlevo - links: links left links - vlevo - logo: logo logo logo - logo - logos: logos logos logos - loga - lokaal: lokaal local lokal - lokalne - marge: marge margin marginalie - marginalie - margeafstand: margeafstand margindistance marginalabstand - vzdalenostokraje - margetekst: margetekst margintext marginaltext - textmarginalie - markering: markering marking beschriftung - znaceni - markleur: markleur marcolor beschrfarbe - barvaznacky - marletter: marletter marstyle beschrstil - stylsnacky - menu: menu menu menue - menu - methode: methode method methode - metoda - midden: midden middle mittig - stredni - middentekst: middentekst middletext mittigertext - strednitext - min: min min min - min - monster: monster sample muster - vzor - na: na after nach - po - naam: naam name name - jmeno - nacommando: nacommando commandafter zumbefehl - prikazpo - nboven: nboven ntop noben - nvrsek - niveau: niveau level niveau - uroven - niveaus: niveaus levels niveaus - urovne - nonder: nonder nbottom nunten - nspodek - norm: norm norm norm - norm - nregels: nregels nlines zzeile - nradky - nummer: nummer number nummer - cislo - nummercommando: nummercommando numbercommand nummerbefehl - ciselnyprikaz - nummeren: nummeren numbering nummerierung - cislovani - nummerkleur: nummerkleur numbercolor nummernfarbe - barvacisla - nummerletter: nummerletter numberstyle nummernstil - stylcisla - nummerscheider: nummerscheider numberseparator nummernseperator - oddelovaccisla - object: object object objekt - objekt - offset: offset offset offset - offset - onder: onder bottom unten - spodek - onderafstand: onderafstand bottomdistance abstandunten - vzdalenostspodku - onderkader: onderkader bottomframe untenrahmen - ramecekspodku - onderoffset: onderoffset bottomoffset untenoffset - offsetspodku - onderstatus: onderstatus bottomstate untenstatus - statusspodku - onevenmarge: onevenmarge oddmargin ungeraderand - lichyokraj - op: op at bei - u % not 'na', since that's already taken by 'aan' - optie: optie option option - volba - pagina: pagina page seite - stranka - paginacommando: paginacommando pagecommand seitenbefehl - strankovyprikaz - paginakleur: paginakleur pagecolor seitenfarbe - barvastranky - paginaletter: paginaletter pagestyle seitenstil - stylstranky - paginanummer: paginanummer pagenumber seitennummer - cislostranky - paginaovergangen: paginaovergangen pageboundaries seitenbegrenzung - hranicestranky - palet: palet palet palette - paleta - papier: papier paper papier - papir - plaats: plaats location platz - misto - plaatsafsluiter: plaatsafsluiter placestopper setzetrenner - predelmista - plaatsen: plaatsen place platziere - umistit - plaatskop: plaatskop placehead setzekopf - umistihlavicku - prefix: prefix prefix prefix - prefix - preset: preset preset voreinstellung - prednastaveni - preview: preview preview vorschau - nahled - punt: punt dot punkt - tecka - pijl: pijl arrow pfeil - sipka - rand: rand edge kante - hrana - randafstand: randafstand edgedistance kantenabstand - vzdalenosthrany - raster: raster screen raster - rastr - rechterbreedte: rechterbreedte rightwidth rechterbreite - sirkavpravo - rechterkader: rechterkader rightframe rechterrahmen - ramecekvpravo - rechterkleur: rechterkleur rightcolor rechterfarbe - barvavpravo - rechterletter: rechterletter rightstyle rechterstil - stylvpravo - rechtermarge: rechtermarge rightmargin rechterrand - pravyokraj - rechtermargeafstand: rechtermargeafstand rightmargindistance rechterrandabstand - vzdalenostpravehookraje - rechteroffset: rechteroffset rightoffset rechterabstand - pravyoffset - rechterrand: rechterrand rightedge rechtekante - pravahrana - rechterrandafstand: rechterrandafstand rightedgedistance rechterkantenabstand - vzdalenostpravehrany - rechtertekst: rechtertekst righttext rechtertext - textvpravo - rechts: rechts right rechts - vpravo - reductie: reductie reduction reduktion - redukce - refereren: refereren referencing referieren - odkazujici - regel: regel line zeile - radek - regelcorrectie: regelcorrectie linecorrection zeilekorrektur - korekceradku - regels: regels lines zeilen - radky - resolutie: resolutie resolution aufloesung - rozliseni - rotatie: rotatie rotation rotation - rotace - rugoffset: rugoffset horoffset rumpfabstand - horoffset - rugwit: rugwit backspace rumpfspatium - zpetnamezera - richting: richting direction richtung - smer - schaal: schaal scale format - meritko - scheider: scheider separator seperator - oddelovac - scherm: scherm display bildschirm - obrazovka - scope: scope scope bereich - rozsah - sectie: sectie section abschnitt - oddil - sectienummer: sectienummer sectionnumber abschnittsnummer - cislooddilu - snijwit: snijwit cutspace cutspace - cutspace - soort: soort family familie - rodina - spatie: spatie space spatium - mezera - spatiering: spatiering spacing spatiumausgleich - mezerovani - springvolgendein: springvolgendein indentnext ziehefolgendeein - odsadpristi - stap: stap step schritt - krok - start: start start start - start - status: status state status - status - stop: stop stop stop - stop - straal: straal radius radius - polomer - streep: streep dash strich - pomlcka - sub: sub sub unter - pod - subtitel: subtitel subtitle untertitel - podtitulek - symbool: symbool symbol symbol - symbol - symboolset: symboolset symbolset symbolset - sadasymbolu - symkleur: symkleur symcolor symfarbe - barvasymbolu - symletter: symletter symstyle symstil - stylsymboly - synoniem: synoniem synonym synonym - synonymum - synoniemkleur: synoniemkleur synonymcolor synonymfarbe - barvasynonyma - synoniemletter: synoniemletter synonymstyle synonymstil stylsynonyma - tab: tab tab tab - tab - teken: teken sign zeichen - znak - tekst: tekst text text - text - tekstbreedte: tekstbreedte textwidth textbreite - sirkatextu - tekstcommando: tekstcommando textcommand textbefehl - textovyprikaz - tekstformaat: tekstformaat textsize textgroesse - velikosttextu - tekstkleur: tekstkleur textcolor textfarbe - barvatextu - tekstletter: tekstletter textstyle textstil - styltextu - tekstscheider: tekstscheider textseparator textseparator - oddelovactextu - tekststatus: tekststatus textstate textstatus - statustextu - titel: titel title titel - titul - titeluitlijnen: titeluitlijnen aligntitle titelausrichten - zarovnejtitul - tolerantie: tolerantie tolerance toleranz - tolerance - tussen: tussen inbetween zwischen - mezi - type: type type typ - typ - uitlijnen: uitlijnen align ausrichtung - zarovnani - urlspatie: urlspatie urlspace urlspatium - prostorurl - urlvariant: urlvariant urlalternative urlalternative - urlalternativa - van: van from von - z - variant: variant alternative alternative - alternativa - verhoog: verhoog increment erhoehen - zvysit - verhoognummer: verhoognummer incrementnumber nummererhoehen - zvysujicicislo - verwijzing: verwijzing reference referenz - odkaz - onbekendeverwijzing: onbekendeverwijzing unknownreference unbekantereferenz - neznamyodkaz - voet: voet footer fusszeile - upati - voetafstand: voetafstand footerdistance fusszeilenabstand - vzdalenostupati - voetstatus: voetstatus footerstate fusszeilenstatus - statusupati - voffset: voffset voffset voffset - voffset - volgende: volgende next folgende - dalsi - voor: voor before vor - pred - voorcommando: voorcommando commandbefore vorbefehl - predchoziprikaz - vorige: vorige previous vorige - predchozi - vorigenummer: vorigenummer previousnumber vorigenummer - predchozicislo - wachttijd: wachttijd delay wartezeit - prodleva - wijze: wijze way art - zpusob - willekeur: willekeur random zufaellig - nahodne - wit: wit white weiss - bily - xfactor: xfactor xfactor xfaktor - xfaktor - xmax: xmax xmax xmax - xmax - xoffset: xoffset xoffset xoffset - xoffset - xschaal: xschaal xscale xformat - xmeritko - xstap: xstap xstep xschritt - xkrok - yfactor: yfactor yfactor yfaktor - yfaktor - ymax: ymax ymax ymax - ymax - yoffset: yoffset yoffset yoffset - yoffset - yschaal: yschaal yscale yformat - ymeritko - ystap: ystap ystep yschritt - ykrok - zelfdepagina: zelfdepagina samepage selbeseite - stejnastranka - zij: zij side objektabstand - strana - -veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrundfarbe - barvapozadipole - veldkaderkleur: veldkaderkleur fieldframecolor feldrahmenfarbe - barvarameckupole - veldoffset: veldoffset fieldoffset feldoffset - offsetpole - - openactie: openactie openaction oeffenaktion - otevriakci - sluitactie: sluitactie closeaction schliessenaktion - zavriakci - - openpaginaactie: openpaginaactie openpageaction openpageaction - akceotevrenistranky % TOBIAS - sluitpaginaactie: sluitpaginaactie closepageaction closepageaction - akcezavrenistranky % TOBIAS - - klikin: klikin clickin klickin - klikuvnitr - klikuit: klikuit clickout klickaus - klikvne - gebiedin: gebiedin regionin regionin - oblastuvnitr - gebieduit: gebieduit regionout regionaus - oblastvne - natoets: natoets afterkey nachtaste - klavesapo - formatteer: formatteer format formatieren - formatovat - valideer: valideer validate validieren - validovat - bereken: bereken calculate berechnen - pocitat - - klik: klik click klick - klik - - vcommando: vcommando vcommand vbefehl - vprikaz - icommando: icommando icommand ibefehl - iprikaz - ccommando: ccommando ccommand cbefehl - cprikaz +\startconstants dutch english + german czech + italian + + leftquotation: linkercitaat leftquotation + linkerzitat citacevlevo + leftquotation % GB + rightquotation: rechtercitaat rightquotation + rechterzitat citacevpravo + rightquotation % GB + leftquote: linkerciteer leftquote + linkerzitieren citovatvlevo + leftquote % GB + rightquote: rechterciteer rightquote + rechterzitieren citovatvpravo + rightquote % GB + leftsentence: linkerzin leftsentence + linkersatz vetavlevo + leftsentence % GB + rightsentence: rechterzin rightsentence + rechtersatz vetavpravo + rightsentence % GB + leftsubsentence: linkersubzin leftsubsentence + linkersubsatz podvetavlevo + leftsubsentence % GB + rightsubsentence: rechtersubzin rightsubsentence + rechtersubsatz podvetavpravo + rightsubsentence % GB + datum: datum date + datum datum + data + voorwit: voorwit spacebefore + vorspatium mezerapred + spazioprima + nawit: nawit spaceafter + nachspatium mezeraza + spaziodopo + zijvoorwit: zijvoorwit sidespacebefore + nebenvorspatium bocnimezerapred + sidespacebefore % GB + zijnawit: zijnawit sidespaceafter + nebennachspatium bocnimezeraza + sidespaceafter % GB + aan: aan to + zu na + a + aanduiding: aanduiding indicator + indikator indikator + indicator % GB + achtergrond: achtergrond background + hintergrund pozadi + sfondo + achtergronddiepte: achtergronddiepte backgrounddepth + hintergrundtiefe hloubkapozadi + profonditasfondo + achtergrondhoek: achtergrondhoek backgroundcorner + hintergrundwinkel rohpozadi + angolosfondo + achtergrondkleur: achtergrondkleur backgroundcolor + hintergrundfarbe barvapozadi + coloresfondo + achtergrondoffset: achtergrondoffset backgroundoffset + hintergrundoffset offsetpozadi + offsetsfondo + achtergrondraster: achtergrondraster backgroundscreen + hintergrundraster rastrpozadi + schermosfondo + achtergrondstraal: achtergrondstraal backgroundradius + hintergrundradius polomerpozadi + raggiosfondo + adres: adres address + adresse adresa + indirizzo + afsluiter: afsluiter stopper + abschnitttrenner predel + stopper + afstand: afstand distance + abstand vzdalenost + distanza + alinea: alinea paragraph + absatz odstavec + capoverso %paragrafo + assenstelsel: assenstelsel axis + achsen osa + asse + auteur: auteur author + autor autor + autore + autofile: autofile autofile + autofile autofile + autofile % TB TH GB + balanceren: balanceren balance + ausgleichen rovnovaha + bilanciamento + bfactor: bfactor wfactor + bfaktor sfaktor + wfactor % GB + binnen: binnen inner + innen vnitrni + interno + blanko: blanko blank + blanko prazdny + blank % GB + blokkade: blokkade obstruction + gesperrt prekazka + ostruzione + blokwijze: blokwijze blockway + blockauf dobloku + blockway % GB + bodemwit: bodemwit bottomspace + bottomspace bottomspace + spaziofondo + boven: boven top + oben vrsek + cima + bovenafstand: bovenafstand topdistance + obenabstand vzdalenostvrsku + distanzacima + bovenkader: bovenkader topframe + obenrahmen rameceknahore + cornicecima + bovenoffset: bovenoffset topoffset + obenoffset offsetvrsku + offsetcima + bovenstatus: bovenstatus topstate + statusoben statusvrsku + statocima + breedte: breedte width + breite sirka + ampiezza + maxbreedte: maxbreedte maxwidth + maxbreite maxsirka + ampiezzamax + minbreedte: minbreedte minwidth + minbreite minsirka + ampiezzamin % TB TH + bron: bron source + quelle zdroj + origine + commando: commando command + befehl prikaz + comando + commandos: commandos commands + befehle prikazy + comandi + contrastkleur: contrastkleur contrastcolor + kontrastfarbe kontrastnibarva + colorecontrasto + conversie: conversie conversion + konversion konverze + conversione + kopconversie: kopconversie headconversion + headconversion konverzehlavicky + headconversion % TB GB + koplabel: koplabel headlabel + headlabel popisekhlavicky + headlabel % TB GB + criterium: criterium criterium + kriterium kriterium + criterio + datum: datum date + datum datum + data + default: default default + default implicitni + implicito + diepte: diepte depth + tiefe hloubka + profondita + dieptecorrectie: dieptecorrectie depthcorrection + tiefekorrektur korekcehloubky + correzioneprofondita + dikte: dikte thickness + dicke tloustka + spessore + doorgaan: doorgaan continue + fortsetzen pokracovat + continua + dubbelzijdig: dubbelzijdig doublesided + doppelseitig oboustranne + doppiafaccia + dummy: dummy dummy + dummy dummy + dummy + eenheid: eenheid unit + einheit jednotka + unita + eigennummer: eigennummer ownnumber + eigenenummer vlastnicislo + proprionumero % GB + evenmarge: evenmarge evenmargin + geraderand sudamarginalie + marginepari + expansie: expansie expansion + expansion expanzen + espansione + factor: factor factor + faktor faktor + fattore + converteerfile: converteerfile convertfile + konvertieredatei konverzesouboru + convertfile % GB + file: file file + datei soubor + file + formaat: formaat size + groesse velikost + dimensione + autofocus: autofocus autofocus + autofocus autoostreni + autofocus + focus: focus focus + focus zaostreni + focus % GB + gebied: gebied directory + verzeichnis adresar + directory %cartella + grid: grid grid + gritter mrizka + griglia + groot: groot big + gross velky + grande + haal: haal get + hole ziskat + prendi + hang: hang hang + haengend zaveseni + sospendi % GB + herhaal: herhaal repeat + wiederholen opakovat + ripeti % GB + hfactor: hfactor hfactor + hfaktor vfaktor + hfactor % GB + hoek: hoek corner + winkel roh + angolo + hoffset: hoffset hoffset + hoffset hoffset + hoffset % GB + hokjes: hokjes frames + umrahmen ramecky + frames % GB + hoofd: hoofd header + kopfzeile zahlavi + intestazione %testatina + hoofdafstand: hoofdafstand headerdistance + kopfzeilenabstand vzdalenostzahlavi + distanzaintestazione + hoofdstatus: hoofdstatus headerstate + kopfzeilenstatus statuszahlavi + statointestazione + hoogte: hoogte height + hoehe vyska + altezza + maxhoogte: maxhoogte maxheight + maxhoehe maxvyska + altezzamax + huidige: huidige current + aktuell aktualni + corrente + in: in in + in v + in + inspringen: inspringen indenting + einziehen odsazovani + rientro + interactie: interactie interaction + interaktion interakce + interazione + interlinie: interlinie interlinespace + zeilenabstande meziradkovamezera + interlinea + items: items items + posten polozky + elemnti + kader: kader frame + rahmen ramecek + cornice + kaderdiepte: kaderdiepte framedepth + rahmentiefe hloubkaramecku + profonditacornice + kaderhoek: kaderhoek framecorner + rahmenwinkel rohramecku + angolocornice + kaderkleur: kaderkleur framecolor + rahmenfarbe barvaramecku + colorecornice + kaderoffset: kaderoffset frameoffset + rahmenoffset offsetramecku + offsetcornice + kaderstraal: kaderstraal frameradius + rahmenradius polomerramecku + raggiocornice + kantlijn: kantlijn marginedge + marginalkante textovahrana + bordomargine + kantlijntekst: kantlijntekst marginedgetext + marginalkantetext textmarginalnihookraje + testobordomargine + karakteruitlijnen: karakteruitlijnen aligncharacter + aligncharacter aligncharacter + aligncharacter % TB TH GB + uitlijnkarakter: uitlijnkarakter alignmentcharacter + alignmentcharacter alignmentcharacter + carattereallineamento % TB TH + klein: klein small + klein male + piccolo + kleur: kleur color + farbe barva + colore + kolom: kolom column + spalte sloupec + colonna + kolomafstand: kolomafstand columndistance + spaltenabstand vzdalenostsloupcu + distanzacolonne + kopkleur: kopkleur headcolor + kopffarbe barvahlavicky + coloreintestazione + kopletter: kopletter headstyle + kopfstil stylhlavicky + stileintestazione + kopna: kopna afterhead + nachkopf pohlavicce + dopointestazione + kopoffset: kopoffset veroffset + kopfoffset offsethlavicky + veroffset % GB + koppeling: koppeling coupling + verknuepfung propojeni + accoppiamento + koppelwijze: koppelwijze couplingway + verkopplungsart zpusobpropojeni + modoaccoppiamento + kopvoor: kopvoor beforehead + vorkopf predhlavickou + primadiintestazione + kopwit: kopwit topspace + kopfspatium svrchnimezera + spaziocima + korps: korps bodyfont + fliesstext zakladnifont + fontcorpo + label: label label + label popisek + etichetta + leeg: leeg empty + leer prazdne + vuoto + letter: letter style + stil pismeno + stile + lijn: lijn rule + linie linka + linea + lijndikte: lijndikte rulethickness + liniendicke tloustkalinky + spessorelinea + lijnkleur: lijnkleur rulecolor + linienfarbe barvalinky + colorelinea + lijst: lijst list + liste seznam + elenco + linkerbreedte: linkerbreedte leftwidth + linkerbreite sirkavlevo + ampiezzasinistra + linkerkader: linkerkader leftframe + linkerrahmen ramecekvlevo + cornicesinistra + linkerkleur: linkerkleur leftcolor + linkerfarbe barvavlevo + coloresinistra + linkerletter: linkerletter leftstyle + linkerstil stylvlevo + stilesinistra + linkermarge: linkermarge leftmargin + linkerrand levyokraj + marginesinistro + linkermargeafstand: linkermargeafstand leftmargindistance + linkerrandabstand vzdalenostlevehookraje + distanzamarginesinistro + linkeroffset: linkeroffset leftoffset + linkeroffset levyoffset + offsetsinistro % GB + linkerrand: linkerrand leftedge + linkekante levahrana + bordosinistro + linkerrandafstand: linkerrandafstand leftedgedistance + linkerkantenabstand vzdalenostlevehrany + distanzabordosinistro + linkertekst: linkertekst lefttext + linkertext textvlevo + testosinistro % GB + links: links left + links vlevo + sinistra + logo: logo logo + logo logo + logo + logos: logos logos + logos loga + loghi + lokaal: lokaal local + lokal lokalne + locale + marge: marge margin + marginalie marginalie + margine + margeafstand: margeafstand margindistance + marginalabstand vzdalenostokraje + distanzamargine + margetekst: margetekst margintext + marginaltext textmarginalie + testomargine + markering: markering marking + beschriftung znaceni + marcatura + markleur: markleur marcolor + beschrfarbe barvaznacky + coloremarcatura + marletter: marletter marstyle + beschrstil stylsnacky + stilemarcatura + menu: menu menu + menue menu + menu + methode: methode method + methode metoda + metodo + midden: midden middle + mittig stredni + mezzo % GB + middentekst: middentekst middletext + mittigertext strednitext + testocentro % GB + min: min min + min min + min + monster: monster sample + muster vzor + campione + na: na after + nach po + dopo + naam: naam name + name jmeno + nome + nacommando: nacommando commandafter + zumbefehl prikazpo + comdandodopo + nboven: nboven ntop + noben nvrsek + ncima + niveau: niveau level + niveau uroven + livello + niveaus: niveaus levels + niveaus urovne + livelli + nonder: nonder nbottom + nunten nspodek + nfondo + norm: norm norm + norm norm + norma + nregels: nregels nlines + zzeile nradky + nrighe + nummer: nummer number + nummer cislo + numero + nummercommando: nummercommando numbercommand + nummerbefehl ciselnyprikaz + comandonumero + nummeren: nummeren numbering + nummerierung cislovani + numerazione + nummerkleur: nummerkleur numbercolor + nummernfarbe barvacisla + colorenumero + nummerletter: nummerletter numberstyle + nummernstil stylcisla + stilenumero + nummerscheider: nummerscheider numberseparator + nummernseperator oddelovaccisla + separatorenumero + object: object object + objekt objekt + oggetto + offset: offset offset + offset offset + offset + onder: onder bottom + unten spodek + fondo + onderafstand: onderafstand bottomdistance + abstandunten vzdalenostspodku + distanzafondo + onderkader: onderkader bottomframe + untenrahmen ramecekdole + cornicefondo + onderoffset: onderoffset bottomoffset + untenoffset offsetspodku + offsetfondo + onderstatus: onderstatus bottomstate + untenstatus statusspodku + statofondo + onevenmarge: onevenmarge oddmargin + ungeraderand lichyokraj + marginedispari + op: op at + bei u + ad + optie: optie option + option volba + opzione + pagina: pagina page + seite stranka + pagina + paginacommando: paginacommando pagecommand + seitenbefehl strankovyprikaz + comandopagina + paginakleur: paginakleur pagecolor + seitenfarbe barvastranky + colorepagina + paginaletter: paginaletter pagestyle + seitenstil stylstranky + stilepagina + paginanummer: paginanummer pagenumber + seitennummer cislostranky + numeropagina + paginaovergangen: paginaovergangen pageboundaries + seitenbegrenzung hranicestranky + limitipagina + palet: palet palet + palette paleta + tavolozza + papier: papier paper + papier papir + carta + plaats: plaats location + platz misto + location + plaatsafsluiter: plaatsafsluiter placestopper + setzetrenner predelmista + mettistopper % GB + plaatsen: plaatsen place + platziere umistit + metti % GB + plaatskop: plaatskop placehead + setzekopf umistihlavicku + mettitesta % GB + positie: positie position + position position + position % TB TH GB + prefix: prefix prefix + prefix prefix + prefisso + preset: preset preset + voreinstellung prednastaveni + preimpostato % GB + preview: preview preview + vorschau nahled + anteprima + punt: punt dot + punkt tecka + punto + pijl: pijl arrow + pfeil sipka + freccia + rand: rand edge + kante hrana + bordo + randafstand: randafstand edgedistance + kantenabstand vzdalenosthrany + distanzabordo + raster: raster screen + raster rastr + schermo + rechterbreedte: rechterbreedte rightwidth + rechterbreite sirkavpravo + ampiezzadestra + rechterkader: rechterkader rightframe + rechterrahmen ramecekvpravo + cornicedestra + rechterkleur: rechterkleur rightcolor + rechterfarbe barvavpravo + coloredestra + rechterletter: rechterletter rightstyle + rechterstil stylvpravo + stiledestra + rechtermarge: rechtermarge rightmargin + rechterrand pravyokraj + marginedestro + rechtermargeafstand: rechtermargeafstand rightmargindistance + rechterrandabstand vzdalenostpravehookraje + distanzamarginedestro + rechteroffset: rechteroffset rightoffset + rechterabstand pravyoffset + offsetdestro + rechterrand: rechterrand rightedge + rechtekante pravahrana + bordodestro + rechterrandafstand: rechterrandafstand rightedgedistance + rechterkantenabstand vzdalenostpravehrany + distanzabordodestro + rechtertekst: rechtertekst righttext + rechtertext textvpravo + testodestro % GB + rechts: rechts right + rechts vpravo + destra + reductie: reductie reduction + reduktion redukce + riduzione + refereren: refereren referencing + referieren odkazujici + referencing % GB + regel: regel line + zeile radek + riga + regelcorrectie: regelcorrectie linecorrection + zeilekorrektur korekceradku + correzioneriga + regels: regels lines + zeilen radky + righe + resolutie: resolutie resolution + aufloesung rozliseni + risoluzione + rotatie: rotatie rotation + rotation rotace + rotazione + rugoffset: rugoffset horoffset + rumpfabstand horoffset + horoffset % GB + rugwit: rugwit backspace + rumpfspatium zpetnamezera + backspace % GB + richting: richting direction + richtung smer + direzione + schaal: schaal scale + format meritko + scale % GB + scheider: scheider separator + seperator oddelovac + separatore + scherm: scherm display + bildschirm obrazovka + display % GB + scope: scope scope + bereich rozsah + scope % GB + sectie: sectie section + abschnitt oddil + sezione + sectienummer: sectienummer sectionnumber + abschnittsnummer cislooddilu + numerosezione + snijwit: snijwit cutspace + cutspace cutspace + cutspace % GB + soort: soort family + familie rodina + famiglia + spatie: spatie space + spatium mezera + spazio + spatiering: spatiering spacing + spatiumausgleich mezerovani + spaziatura + splitsen: splitsen split + split split + split % TB TH GB + springvolgendein: springvolgendein indentnext + ziehefolgendeein odsadpristi + rientrosuccessivo + stap: stap step + schritt krok + passo + start: start start + start start + inizia + status: status state + status status + stato + stop: stop stop + stop stop + termina + straal: straal radius + radius polomer + raggio + streep: streep dash + strich pomlcka + dash % GB + sub: sub sub + unter pod + sotto + subtitel: subtitel subtitle + untertitel podtitulek + sottotitolo + symbool: symbool symbol + symbol symbol + simbolo + symboolset: symboolset symbolset + symbolset sadasymbolu + setsimboli + symkleur: symkleur symcolor + symfarbe barvasymbolu + coloresimbolo + symletter: symletter symstyle + symstil stylsymboly + stilesimbolo + synoniem: synoniem synonym + synonym synonymum + sinonimo + synoniemkleur: synoniemkleur synonymcolor + synonymfarbe barvasynonyma + coloresinonimi + synoniemletter: synoniemletter synonymstyle + synonymstil stylsynonyma + stilesinonimi + tab: tab tab + tab tab + tab + teken: teken sign + zeichen znak + segno + tekst: tekst text + text text + testo + tekstbreedte: tekstbreedte textwidth + textbreite sirkatextu + ampiezzatesto + tekstcommando: tekstcommando textcommand + textbefehl textovyprikaz + comandotesto + tekstformaat: tekstformaat textsize + textgroesse velikosttextu + dimensionetesto + tekstkleur: tekstkleur textcolor + textfarbe barvatextu + coloretesto + tekstletter: tekstletter textstyle + textstil styltextu + stiletesto + tekstscheider: tekstscheider textseparator + textseparator oddelovactextu + separatoretesto + tekststatus: tekststatus textstate + textstatus statustextu + statotesto + titel: titel title + titel titul + titolo + titeluitlijnen: titeluitlijnen aligntitle + titelausrichten zarovnejtitul + allineatitolo + tolerantie: tolerantie tolerance + toleranz tolerance + tolleranza + tussen: tussen inbetween + zwischen mezi + tra + type: type type + typ typ + type % GB + uitlijnen: uitlijnen align + ausrichtung zarovnani + allinea + urlspatie: urlspatie urlspace + urlspatium prostorurl + spaziourl + urlvariant: urlvariant urlalternative + urlalternative urlalternativa + alternativaurl + van: van from + von z + da + variant: variant alternative + alternative alternativa + alternativa + verhoog: verhoog increment + erhoehen zvysit + incremento % GB + verhoognummer: verhoognummer incrementnumber + nummererhoehen zvysujicicislo + incrementanumero + verwijzing: verwijzing reference + referenz odkaz + riferimento + onbekendeverwijzing: onbekendeverwijzing unknownreference + unbekantereferenz neznamyodkaz + riferimentoingoto + voet: voet footer + fusszeile upati + piedipagina + voetafstand: voetafstand footerdistance + fusszeilenabstand vzdalenostupati + distanzapdp + voetstatus: voetstatus footerstate + fusszeilenstatus statusupati + statopdp + voffset: voffset voffset + voffset voffset + voffset + volgende: volgende next + folgende dalsi + successivo + voor: voor before + vor pred + prima + voorcommando: voorcommando commandbefore + vorbefehl predchoziprikaz + comandoprima + vorige: vorige previous + vorige predchozi + precedente + vorigenummer: vorigenummer previousnumber + vorigenummer predchozicislo + numeroprecedente + wachttijd: wachttijd delay + wartezeit prodleva + attesa + wijze: wijze way + art zpusob + modo + willekeur: willekeur random + zufaellig nahodne + casuale + wit: wit white + weiss bily + bianco + xfactor: xfactor xfactor + xfaktor xfaktor + xfactor % GB + xmax: xmax xmax + xmax xmax + xmax % GB + xoffset: xoffset xoffset + xoffset xoffset + xoffset % GB + xschaal: xschaal xscale + xformat xmeritko + xscale % GB + xstap: xstap xstep + xschritt xkrok + xstep % GB + yfactor: yfactor yfactor + yfaktor yfaktor + yfactor % GB + ymax: ymax ymax + ymax ymax + ymax % GB + yoffset: yoffset yoffset + yoffset yoffset + yoffset % GB + yschaal: yschaal yscale + yformat ymeritko + yscale % GB + ystap: ystap ystep + yschritt ykrok + ystep % GB + zelfdepagina: zelfdepagina samepage + selbeseite stejnastranka + stessapagina + zij: zij side + objektabstand pocitat + lato + veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor + feldhintergrundfarbe barvapozadipole + coloresfondocampo + veldkaderkleur: veldkaderkleur fieldframecolor + feldrahmenfarbe barvarameckupole + colorecornicecampo + veldoffset: veldoffset fieldoffset + feldoffset offsetpole + offsetcampo + openactie: openactie openaction + oeffenaktion otevriakci + azioneapri + sluitactie: sluitactie closeaction + schliessenaktion zavriakci + azionechiudi + openpaginaactie: openpaginaactie openpageaction + openpageaction akceotevrenistranky + azioneapripagina % TB + sluitpaginaactie: sluitpaginaactie closepageaction + closepageaction akcezavrenistranky + azionechiudipagina % TB + klikin: klikin clickin + klickin klikuvnitr + clickdentro + klikuit: klikuit clickout + klickaus klikvne + clickfuori + gebiedin: gebiedin regionin + regionin oblastuvnitr + entraregione + gebieduit: gebieduit regionout + regionaus oblastvne + esciregione + natoets: natoets afterkey + nachtaste klavesapo + dopotasto + formatteer: formatteer format + formatieren formatovat + format % GB + valideer: valideer validate + validieren validovat + verifica + bereken: bereken calculate + berechnen pocitat + calcola + klik: klik click + klick klik + click + vcommando: vcommando vcommand + vbefehl vprikaz + vcomando + icommando: icommando icommand + ibefehl iprikaz + icomando + ccommando: ccommando ccommand + cbefehl cprikaz + ccomando \stopconstants @@ -853,502 +1256,773 @@ veldachtergrondkleur: veldachtergrondkleur fieldbackgroundcolor feldhintergrund %D \startcompressdefinitions -\startvariables dutch english german - czech - - aan: aan on an - zap % opposite of off - - aanelkaar: aanelkaar serried kleinerabstand - semknuto - aansluitend: aansluitend joinedup keinabstand - spojeno - absoluut: absoluut absolute absolut - absolutni - achtergrond: achtergrond background hintergrund - pozadi - achteruit: achteruit backward rueckwaerts - zpet - actie: actie action aktion - akce - afsluiter: afsluiter stopper trenner - predel - alinea: alinea paragraph absatz - odstavec - alles: alles all alles - vse - altijd: altijd always immer - vzdy - autointro: autointro autointro autointro - autouvod - beide: beide both beide - obe - binnen: binnen inner innen - vnitrni - blanko: blanko blank blanko - prazdny - blokkeer: blokkeer disable sperren - zablokovat - boven: boven top oben - vrsek - breed: breed wide breit - siroce - breedte: breedte width breite - sirka - buffer: buffer buffer puffer - buffer - buiten: buiten outer aussen - vnejsi - cijfers: cijfers numbers ziffern - cisla - Cijfers: Cijfers Numbers Ziffern - Cisla - commando: commando command befehl - prikaz - commandos: commandos commands befehle - prikazy - concept: concept concept konzept - koncept - dag: dag day tag - den - datum: datum date datum - datum - default: default default default - implicitni - definitief: definitief final endfassung - finalni - diepte: diepte depth tiefe - podlehloubky % ? hloubka - dubbelzijdig: dubbelzijdig doublesided doppelseitig - dvoustranny - eerste: eerste first erste - prvni - elk: elk each jede - kazdy - enkelzijdig: enkelzijdig singlesided einzelseitig - jednostranne - ergens: ergens somewhere irgendwo - nekde - nergens: nergens nowhere nirgens - nikde - even: even even gerade - sude - extern: extern external extern - externi - file: file file datei - soubor - flexibel: flexibel flexible flexibel - prizpusobive - forceer: forceer force zwinge - sila - gebruikt: gebruikt used verwende - uzito - geen: geen none kein - zadny - geenmarkering: geenmarkering nomarking keinebeschriftung - zadneznaceni - geenwit: geenwit nowhite keinweiss - zadnabila - geroteerd: geroteerd rotated gedreht - otoceno - gespiegeld: gespiegeld mirrored gespiegelt - zrcadleno - globaal: globaal global global - globalne - grid: grid grid gritter - mrizka - groot: groot big gross - velky - grotevoorkeur: grotevoorkeur bigpreference grosszuegig - vysokapriorita - grijs: grijs gray grau - seda - halveregel: halveregel halfline halbezeile - pulradku - handhaaf: handhaaf keep behalte - drzet - hangend: hangend hanging haengend - visici - herhaal: herhaal repeat wiederholen - opakovat - herstel: herstel fix stellewiederher - fixuj - hier: hier here hier - zde - hoofd: hoofd header kopfzeile - zahlavi - hoog: hoog high hoch - vysoko - hoogte: hoogte height hoehe - vyska - horizontaal: horizontaal horizontal horizontal - horizontalne - huidige: huidige current aktuell - aktualni - italic: italic italic italic - kurziva - inlinker: inlinker inleft imlinken - vlevo - inmarge: inmarge inmargin imrand - naokraji - inrechter: inrechter inright imrechten - vpravo - interactie: interactie interaction interaktion - interakce - intekst: intekst intext imtext - dotextu - intro: intro intro intro - uvod - its: its its its - pol - ja: ja yes ja - ano - jaar: jaar year jahr - rok - kader: kader frame rahmen - ramecek - kantlijn: kantlijn marginedge marginalkante - textovahrana - kap: kap cap kap - kap - kapitaal: kapitaal capital versalien - verzalky - kenmerk: kenmerk referral merkmal - znacka - klein: klein small klein - male - kleinnormaal: kleinnormaal smallnormal kleinnormal - malenormalni - kleinschuin: kleinschuin smallslanted kleingeneigt - malesklonene - kleinschuinvet: kleinschuinvet smallslantedbold kleingeneigtfett - malesklonenetucne - kleinitalic: kleinitalic smallitalic kleinitalic - malekurzivni - kleinitalicvet: kleinitalicvet smallitalicbold kleinitalicfett - malekurzivnitucne - kleintype: kleintype smalltype kleintippen - maletype - kleinvet: kleinvet smallbold kleinfett - maletucne - kleinvetschuin: kleinvetschuin smallboldslanted kleinfettgeneigt - maletucnesklonene - kleinvetitalic: kleinvetitalic smallbolditalic kleinfettitalic - maletucnekurzivni - kleur: kleur color farbe - barevne - kolommen: kolommen columns spalten - sloupce - kop: kop head kopf - hlavicka - laag: laag low tief - nizko - laatste: laatste last letzte - posledni - label: label label label - popisek - lang: lang tall lang - vysoko - leeg: leeg empty leer - prazdne - Letter: Letter Character Buchstabe - Pismeno - letter: letter character buchstabe - pismeno - Letters: Letters Characters Buchstaben - Pismena - letters: letters characters buchstaben - pismena - liggend: liggend landscape querformat - nasirku - lijn: lijn rule linie - linka - lijst: lijst list liste - seznam - linkermarge: linkermarge leftmargin linkerrand - levyokraj - linkerpagina: linkerpagina leftpage linkerseite - levastranka - linkerrand: linkerrand leftedge linkekante - levahrana - links: links left links - vlevo - lokaal: lokaal local lokal - lokalne - nieuw: nieuw new neu - novy - MAAND: MAAND MONTH MONAT - MESIC - maand: maand month monat - mesic - mar: mar mar mar - mar - marge: marge margin marginalie - marginalie - max: max max max - max - mediaeval: mediaeval mediaeval mittelalterlich - stredoveky - middel: middel medium mittel - stredni - midden: midden middle mittig - nastred - na: na after nach - po - naam: naam name name - jmeno - naast: naast opposite gegenueber - naproti % ? opacna - nee: nee no nein - ne - negatief: negatief negative negativ - negativ - niet: niet not nicht - ne - nooit: nooit never nie - nikdy - normaal: normaal normal normal - normalni - nummer: nummer number nummer - cislo - offset: offset offset offset - offset - onbekend: onbekend unknown unbekannt - neznamy - onder: onder bottom unten - spodek - oneven: oneven odd ungerade - liche - opelkaar: opelkaar packed gepackt - zhustene - vanelkaar: vanelkaar unpacked ungepackt - rozbalene - opmaak: opmaak markup umbruch - zlom - opmarge: opmarge atmargin amrand - naokraji - overlay: overlay overlay overlay - prekryv - pagina: pagina page seite - stranka - paginanummer: paginanummer pagenumber seitennummer - cislostranky - papier: papier paper papier - papir - scherm: scherm display bildschirm - obrazovka - passend: passend fit passend - prizpusobive - postscript: postscript postscript postscript - postscript - preview: preview preview vorschau - nahled - programma: programma program programm - program - punt: punt dot punkt - tecka - ran: ran ran ran - rozsah - rand: rand edge kante - hrana - raster: raster screen raster - rastr - recht: recht rectangular rechteckig - pravouhly - rechtermarge: rechtermarge rightmargin rechterrand - pravyokraj - rechterpagina: rechterpagina rightpage rechterseite - pravastranka - rechterrand: rechterrand rightedge rechterkante - pravahrana - rechts: rechts right rechts - vpravo - regel: regel line zeile - radek - register: register register register - rejstrik - relatief: relatief relative relativ - relativni - reset: reset reset zuruecksetzten - reset - Romeins: Romeins Romannumerals Roemischezahlen - Rimskecislice - romeins: romeins romannumerals roemischezahlen - rimskecislice - grieks: grieks greek griechisch - recky - Grieks: Grieks Greek Griechisch - Recky - rond: rond round rund - zaobleny - roteer: roteer rotate drehe - otoc - rek: rek stretch strecken - natahnout - ruim: ruim broad breit - siroky - schuin: schuin slanted geneigt - sklonene - schuinvet: schuinvet slantedbold geneigtfett - sklonenetucne - italicvet: italicvet italicbold italicfett - kurzivnitucne - sectienummer: sectienummer sectionnumber abschnittsnummer - cislooddilu - smal: smal narrow schmall - uzky - soepel: soepel tolerant tolerant - tolerantni - standaard: standaard standard standard - standardni - start: start start start - start - stop: stop stop stop - stop - streng: streng strict streng - striktni - strut: strut strut strut - strut - sub: sub sub unter - pod - sym: sym sym sym - sym - symbool: symbool symbol symbol - symbol - tekst: tekst text text - text - back: terug back zurueck - zpet - test: test test test - test - tussen: tussen inbetween zwischen - mezi - type: type type tippen - type - uit: uit off aus - vyp % opposite of on - url: url url url - url - URL: URL URL URL - URL - vast: vast fixed fest - fixne - los: los loose lose - uvolnene - verder: verder continue fortsetzten - pokracovat - vertikaal: vertikaal vertical vertikal - vertikalne - vet: vet bold fett - tucne - vetschuin: vetschuin boldslanted fettgeneigt - tucnesklonene - vetitalic: vetitalic bolditalic fettitalic - tucnekurzivni - viertal: viertal quadruple viertel - ctyrnasobny - voet: voet footer fusszeile - upati - volgende: volgende next folgende - dalsi - voor: voor before vor - pred - voorgrond: voorgrond foreground vordergrund - popredi - voorkeur: voorkeur preference einstellung - nastaveni - voorlopig: voorlopig temporary temporaer - docasne - vooruit: vooruit forward vorwaerts - vpred - vorige: vorige previous vorig - predchozi - waarde: waarde value wert - hodnota - week: week week woche - tyden - weekdag: weekdag weekday wochentag - vsedniden - WEEKDAG: WEEKDAG WEEKDAY WOCHENTAG - VSEDNIDEN - willekeurig: willekeurig random zufaellig - nahodny - wit: wit white weiss - bily - zeer: zeer very sehr - velmi - zeersoepel: zeersoepel verytolerant sehrtolerant - velmitolerantni - zeerstreng: zeerstreng verystrict sehrstreng - velmistriktni - zie: zie see sieh - viz - - smallcaps: smallcaps smallcaps smallcaps - maleverzalky - WOORD: WOORD WORD WORT - SLOVO - - eerstepagina: eerstepagina firstpage ersteseite - prvnistranka - vorigepagina: vorigepagina previouspage vorigeseite - predchozistranka - volgendepagina: volgendepagina nextpage folgendeseite - dalsistranka - laatstepagina: laatstepagina lastpage letzteseite - poslednistranka - eerstesubpagina: eerstesubpagina firstsubpage ersteunterseite - prvnipodstranka - vorigesubpagina: vorigesubpagina previoussubpage vorigeunterseite - predchozipodstranka - volgendesubpagina: volgendesubpagina nextsubpage folgendeunterseite - dalsipodstranka - laatstesubpagina: laatstesubpagina lastsubpage letzteunterseite - poslaednipodstranka - - volgendeevenpagina: volgendeevenpagina nextevenpage naechstegeradeseite - dalsisudastranka -volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungeradeseite - dalsilichastranka - vorigeevenpagina: vorigeevenpagina previousevenpage vorigegeradeseite - predchozisudastranka - vorigeonevenpagina: vorigeonevenpagina previousoddpage vorigeungeradeseite - predchozilichastranka - - alleenleesbaar: alleenleesbaar readonly nurlesbar - pouzeprocteni - verplicht: verplicht required obligatorisch - pozadovane - beschermd: beschermd protected geschuetzt - chranene - gesorteerd: gesorteerd sorted sortiert - tridene - nietbeschikbaar: nietbeschikbaar unavailable nichtverfuegbar - nedostupne - verborgen: verborgen hidden versteckt - skryte - printbaar: printbaar printable druckbar - tisknutelne - - bookmark: bookmark bookmark bookmark - zalozka - +\startvariables dutch english + german czech + italian + + aan: aan on + an zap + attivo + aanelkaar: aanelkaar serried + kleinerabstand semknuto + serried % GB + aansluitend: aansluitend joinedup + keinabstand spojeno + uniti + absoluut: absoluut absolute + absolut absolutni + assoluto + achtergrond: achtergrond background + hintergrund pozadi + sfondo + achteruit: achteruit backward + rueckwaerts zpet + indietro + actie: actie action + aktion akce + azione + afsluiter: afsluiter stopper + trenner predel + stopper + alinea: alinea paragraph + absatz odstavec + capoverso %paragrafo + alles: alles all + alles vse + tutti + altijd: altijd always + immer vzdy + sempre + autointro: autointro autointro + autointro autouvod + autointro + beide: beide both + beide obe + entrambi + binnen: binnen inner + innen uvnitr + interno + blanko: blanko blank + blanko prazdny + blank % GB + blokkeer: blokkeer disable + sperren zablokovat + disattiva + boven: boven top + oben vrsek + cima + breed: breed wide + breit siroce + ampio + breedte: breedte width + breite sirka + ampiezza + buffer: buffer buffer + puffer buffer + buffer + buiten: buiten outer + aussen vnejsi + esterno + cijfers: cijfers numbers + ziffern cisla + numeri + Cijfers: Cijfers Numbers + Ziffern Cisla + Numeri + commando: commando command + befehl prikaz + comando + commandos: commandos commands + befehle prikazy + comandi + concept: concept concept + konzept koncept + concetto + dag: dag day + tag den + giorno + datum: datum date + datum datum + data + default: default default + default implicitni + implicito + definitief: definitief final + endfassung finalni + finale + diepte: diepte depth + tiefe podlehloubky + profondita % GB + dubbelzijdig: dubbelzijdig doublesided + doppelseitig dvoustranny + doppiafaccia + eerste: eerste first + erste prvni + primo + elk: elk each + jede kazdy + ogni + enkelzijdig: enkelzijdig singlesided + einzelseitig jednostranne + facciasingola + ergens: ergens somewhere + irgendwo nekde + daqualcheparte + nergens: nergens nowhere + nirgens nikde + danessunaparte + even: even even + gerade sude + pari + extern: extern external + extern externi + esterno + file: file file + datei soubor + file + flexibel: flexibel flexible + flexibel prizpusobive + flessibile + forceer: forceer force + zwinge sila + forza + gebruikt: gebruikt used + verwende uzito + usato + geen: geen none + kein zadny + nessuno + geenmarkering: geenmarkering nomarking + keinebeschriftung zadneznaceni + nomarcature + geenwit: geenwit nowhite + keinweiss zadnabila + nobianco + geroteerd: geroteerd rotated + gedreht otoceno + ruotato + gespiegeld: gespiegeld mirrored + gespiegelt zrcadleno + riflesso + globaal: globaal global + global globalne + globale + grid: grid grid + gritter mrizka + griglia + groot: groot big + gross velke + grande + grotevoorkeur: grotevoorkeur bigpreference + grosszuegig vysokapriorita + grandepreferenza + grijs: grijs gray + grau seda + grigio + halveregel: halveregel halfline + halbezeile pulradku + mezzariga + handhaaf: handhaaf keep + behalte drzet + mantieni + hangend: hangend hanging + haengend visici + sospeso + herhaal: herhaal repeat + wiederholen opakovat + ripeti + herstel: herstel fix + stellewiederher fixuj + fisso + hier: hier here + hier zde + qui + hoofd: hoofd header + kopfzeile zahlavi + intestazione %testatina + hoog: hoog high + hoch vysoko + alto + hoogte: hoogte height + hoehe vyska + altezza + horizontaal: horizontaal horizontal + horizontal horizontalne + orizzontale + huidige: huidige current + aktuell aktualni + corrente + italic: italic italic + italic kurziva + corsivo + inlinker: inlinker inleft + imlinken vlevo + insinistra + inmarge: inmarge inmargin + imrand naokraji + inmargine + inrechter: inrechter inright + imrechten vpravo + indestra + interactie: interactie interaction + interaktion interakce + interazione + intekst: intekst intext + imtext dotextu + intesto + intro: intro intro + intro uvod + intro + its: its its + its pol + suo + ja: ja yes + ja ano + si + jaar: jaar year + jahr rok + anno + kader: kader frame + rahmen ramecek + cornice + kantlijn: kantlijn marginedge + marginalkante textovahrana + bordomargine + kap: kap cap + kap kap + cap % GB + kapitaal: kapitaal capital + versalien kapitalky + maiuscolo + kenmerk: kenmerk referral + merkmal znacka + referral % GB + klein: klein small + klein male + piccolo + kleinnormaal: kleinnormaal smallnormal + kleinnormal malenormalni + piccolonormale + kleinschuin: kleinschuin smallslanted + kleingeneigt malesklonene + piccoloinclinato + kleinschuinvet: kleinschuinvet smallslantedbold + kleingeneigtfett malesklonenetucne + piccoloinclinatograssetto + kleinitalic: kleinitalic smallitalic + kleinitalic malekurzivni + piccolocorsivo + kleinitalicvet: kleinitalicvet smallitalicbold + kleinitalicfett malekurzivnitucne + piccolocorsivograssetto + kleintype: kleintype smalltype + kleintippen maletype + piccolotype % GB + kleinvet: kleinvet smallbold + kleinfett maletucne + piccolograssetto + kleinvetschuin: kleinvetschuin smallboldslanted + kleinfettgeneigt maletucnesklonene + piccolograssettoinclinato + kleinvetitalic: kleinvetitalic smallbolditalic + kleinfettitalic maletucnekurzivni + piccolograssettocorsivo + kleur: kleur color + farbe barevne + colore + kolom: kolom column + column column + colonna % TB TH + kolommen: kolommen columns + spalten sloupce + colonne + kop: kop head + kopf hlavicka + testa % GB + laag: laag low + tief nizko + basso + laatste: laatste last + letzte posledni + ultimo + label: label label + label popisek + etichetta + laho: laho lohi + hoti nivy + pedap % TB TH + lang: lang tall + lang vysoko + alto % GB + leeg: leeg empty + leer prazdne + vuoto + Letter: Letter Character + Buchstabe Pismeno + Carattere + letter: letter character + buchstabe pismeno + carattere + Letters: Letters Characters + Buchstaben Pismena + Caratteri + letters: letters characters + buchstaben pismena + caratteri + liggend: liggend landscape + querformat nasirku + orizzontale + lijn: lijn rule + linie linka + linea + lijst: lijst list + liste seznam + elenco + linkermarge: linkermarge leftmargin + linkerrand levyokraj + marginesinistro + linkerpagina: linkerpagina leftpage + linkerseite levastranka + paginasinistra + linkerrand: linkerrand leftedge + linkekante levahrana + bordosinistro + links: links left + links vlevo + sinistra + lokaal: lokaal local + lokal lokalne + locale + nieuw: nieuw new + neu novy + nuovo + MAAND: MAAND MONTH + MONAT MESIC + MESE + maand: maand month + monat mesic + mese + mar: mar mar + mar mar + mar % GB + marge: marge margin + marginalie marginalie + margine + max: max max + max max + max + mediaeval: mediaeval mediaeval + mittelalterlich stredoveky + medievale + middel: middel medium + mittel stredni + medio + midden: midden middle + mittig nastred + centro + na: na after + nach po + dopo + naam: naam name + name jmeno + nome + naast: naast opposite + gegenueber naproti + opposto + nee: nee no + nein ne + no + negatief: negatief negative + negativ negativ + negativo + niet: niet not + nicht ne + non + nooit: nooit never + nie nikdy + mai + normaal: normaal normal + normal normalni + normale + nummer: nummer number + nummer cislo + numero + offset: offset offset + offset offset + offset + onbekend: onbekend unknown + unbekannt neznamy + ignoto + onder: onder bottom + unten spodek + fondo + oneven: oneven odd + ungerade liche + dispari + opelkaar: opelkaar packed + gepackt zhustene + raggruppati + vanelkaar: vanelkaar unpacked + ungepackt rozbalene + unpacked % GB + opmaak: opmaak markup + umbruch zlom + markup % GB + opmarge: opmarge atmargin + amrand naokraji + almargine + overlay: overlay overlay + overlay prekryv + sovrapponi + pagina: pagina page + seite stranka + pagina + paginanummer: paginanummer pagenumber + seitennummer cislostranky + numeropagina + papier: papier paper + papier papir + carta + scherm: scherm display + bildschirm obrazovka + display % GB + passend: passend fit + passend prizpusobive + adatta + postscript: postscript postscript + postscript postscript + postscript + preview: preview preview + vorschau nahled + anteprima + programma: programma program + programm program + programma + punt: punt dot + punkt tecka + punto + ran: ran ran + ran rozsah + corse + rand: rand edge + kante hrana + bordo + raster: raster screen + raster rastr + schermo + recht: recht rectangular + rechteckig pravouhly + rettangolare + rechtermarge: rechtermarge rightmargin + rechterrand pravyokraj + marginedestro + rechterpagina: rechterpagina rightpage + rechterseite pravastranka + paginadestra + rechterrand: rechterrand rightedge + rechterkante pravahrana + bordodestro + rechts: rechts right + rechts vpravo + destra + regel: regel line + zeile radek + riga + register: register register + register rejstrik + registro + relatief: relatief relative + relativ relativni + relativo + reset: reset reset + zuruecksetzten reset + reimposta + Romeins: Romeins Romannumerals + Roemischezahlen Rimskecislice + Numeriromani + romeins: romeins romannumerals + roemischezahlen rimskecislice + numeriromani + grieks: grieks greek + griechisch recky + greco + Grieks: Grieks Greek + Griechisch Recky + Greco + rond: rond round + rund zaobleny + rotondo + roteer: roteer rotate + drehe otoc + ruota + rek: rek stretch + strecken natahnout + dilata + ruim: ruim broad + breit siroky + ampio + rij: rij row + row row + row % TB TH GB + schuin: schuin slanted + geneigt sklonene + inclinato + schuinvet: schuinvet slantedbold + geneigtfett sklonenetucne + inclinatograssetto + italicvet: italicvet italicbold + italicfett kurzivnitucne + corsivograssetto + sectienummer: sectienummer sectionnumber + abschnittsnummer cislooddilu + numerosezione + smal: smal narrow + schmall uzky + stretto + soepel: soepel tolerant + tolerant tolerantni + tollerante + standaard: standaard standard + standard standardni + standard + start: start start + start start + inizia + stop: stop stop + stop stop + termina + streng: streng strict + streng striktni + strict % GB + strut: strut strut + strut strut + strut + sub: sub sub + unter pod + sotto + sym: sym sym + sym sym + sim + symbool: symbool symbol + symbol symbol + simbolo + tekst: tekst text + text text + testo + back: terug back + zurueck zpet + dietro % GB + test: test test + test test + test + tussen: tussen inbetween + zwischen mezi + tra + type: type type + tippen type + type % GB + uit: uit off + aus vyp + disattivo + url: url url + url url + url + URL: URL URL + URL URL + URL + vast: vast fixed + fest fixne + fisso + los: los loose + lose uvolnene + lento + verder: verder continue + fortsetzten pokracovat + continua + vertikaal: vertikaal vertical + vertikal vertikalne + verticale + vet: vet bold + fett tucne + grassetto + vetschuin: vetschuin boldslanted + fettgeneigt tucnesklonene + grassettoinclinato + vetitalic: vetitalic bolditalic + fettitalic tucnekurzivni + grassettocorsivo + viertal: viertal quadruple + viertel ctyrnasobny + quadruplo + voet: voet footer + fusszeile upati + piedipagina + volgende: volgende next + folgende dalsi + successivo + voor: voor before + vor pred + prima + voorgrond: voorgrond foreground + vordergrund popredi + foreground % GB + voorkeur: voorkeur preference + einstellung nastaveni + preferenza + voorlopig: voorlopig temporary + temporaer docasne + temporaneo + vooruit: vooruit forward + vorwaerts vpred + avanti + vorige: vorige previous + vorig predchozi + precedente + waarde: waarde value + wert hodnota + valore + week: week week + woche tyden + settimana + weekdag: weekdag weekday + wochentag vsedniden + giornosettimana + WEEKDAG: WEEKDAG WEEKDAY + WOCHENTAG VSEDNIDEN + GIORNOSETTIMANA + willekeurig: willekeurig random + zufaellig nahodny + casuale + wit: wit white + weiss bily + bianco + zeer: zeer very + sehr velmi + molto + zeersoepel: zeersoepel verytolerant + sehrtolerant velmitolerantni + moltotollerante + zeerstreng: zeerstreng verystrict + sehrstreng velmistriktni + moltostrict % GB + zie: zie see + sieh viz + vedi + smallcaps: smallcaps smallcaps + smallcaps kapitalky + maiuscoletto + WOORD: WOORD WORD + WORT SLOVO + PAROLA + eerstepagina: eerstepagina firstpage + ersteseite prvnistranka + primapagina + vorigepagina: vorigepagina previouspage + vorigeseite predchozistranka + paginaprecedente + volgendepagina: volgendepagina nextpage + folgendeseite dalsistranka + paginasuccessiva + laatstepagina: laatstepagina lastpage + letzteseite poslednistrana + ultimapagina + eerstesubpagina: eerstesubpagina firstsubpage + ersteunterseite prvnipodstranka + primasottopagina + vorigesubpagina: vorigesubpagina previoussubpage + vorigeunterseite predchozipodstranka + sottopaginaprecedente + volgendesubpagina: volgendesubpagina nextsubpage + folgendeunterseite dalsipodstranka + sottopaginasuccessiva + laatstesubpagina: laatstesubpagina lastsubpage + letzteunterseite poslaednipodstranka + ultimasottopagina + volgendeevenpagina: volgendeevenpagina nextevenpage + naechstegeradeseite dalsisudastranka + paginaparisuccessiva + volgendeonevenpagina: volgendeonevenpagina nextoddpage + naechsteungeradeseite dalsilichastranka + paginadisparisuccessiva + vorigeevenpagina: vorigeevenpagina previousevenpage + vorigegeradeseite predchozisudastranka + paginapariprecedente + vorigeonevenpagina: vorigeonevenpagina previousoddpage + vorigeungeradeseite predchozilichastranka + paginadispariprecedente + alleenleesbaar: alleenleesbaar readonly + nurlesbar pouzeprocteni + solalettura + verplicht: verplicht required + obligatorisch pozadovane + richiestp + beschermd: beschermd protected + geschuetzt chranene + protetto + gesorteerd: gesorteerd sorted + sortiert tridene + ordinato + nietbeschikbaar: nietbeschikbaar unavailable + nichtverfuegbar nedostupne + non disponibile + verborgen: verborgen hidden + versteckt skryte + nascosto + printbaar: printbaar printable + druckbar tisknutelne + stampabile + bookmark: bookmark bookmark + bookmark zalozka + segnalibro \stopvariables +% nieuw, to be translated + +\startvariables dutch english + german czech + italian + + niethangend: niethangend nothanging + nothanging nothanging + nothanging + afgebroken: afgebroken hyphenated + hyphenate hyphenated + hyphenate + nietafgebroken: afgebroken nothyphenated + nothyphenated nothyphenated + nothyphenated + +\stopvariables + +\startconstants dutch english + german czech + italian + + globaal: globaal global + global globalne + globale + +\stopconstants + +% so far + %D \stopcompressdefinitions -%D Maybe it's better to make the next few variables into +%D Maybe it's better to make the next few variables into %D elements as well. %D \startcompressdefinitions -\startvariables dutch english german - czech +\startvariables dutch english + german czech + italian - conversie: conversie conversion konversion - konverze - per: per by pro - skrz + conversie: conversie conversion + konversion konverze + coversione + per: per by + pro skrz + da \stopvariables @@ -1359,26 +2033,24 @@ volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungerades %D \startcompressdefinitions -\startconstants all - - dx: dx - dy: dy - nx: nx - ny: ny - nr: nr - nc: nc - sx: sx - sy: sy - n: n - vfil: vfil - hfil: hfil - strut: strut - reset: reset - set: set - - escape: escape - - apa: apa +\startconstants all + + dx: dx + dy: dy + nx: nx + ny: ny + nr: nr + nc: nc + sx: sx + sy: sy + n: n + vfil: vfil + hfil: hfil + strut: strut + reset: reset + set: set + escape: escape + apa: apa \stopconstants @@ -1389,33 +2061,43 @@ volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungerades %D \startcompressdefinitions -\startvariables dutch english german - czech - - calligraphic: calligrafie calligraphic kalligraphie - krasopisne - handwritten: handschrift handwritten handschrift - rukopisne - sansserif: schreefloos sansserif grotesk - bezserifu - roman: romaan roman antiqua - antikva - teletype: teletype teletype fernschreiber - dalnopis - - type: type type tippen - type - - serif: serif serif serif - serif - regular: regular regular regular - radne - support: support support support - podpora - sans: sans sans sans - sans - mono: mono mono mono - mono +\startvariables dutch english + german czech + italian + + calligraphic: calligrafie calligraphic + kalligraphie kaligraficke + calligrafico + handwritten: handschrift handwritten + handschrift rukopisne + grafiamanuale + sansserif: schreefloos sansserif + grotesk bezserifu + sansserif % GB + roman: romaan roman + antiqua antikva + roman % GB + teletype: teletype teletype + fernschreiber strojopis + teletype % GB + type: type type + tippen opis + type % GB + serif: serif serif + serif serif + serif % GB + regular: regular regular + regular pravidelne + regolare + support: support support + support podpora + supporto + sans: sans sans + sans sans + sans + mono: mono mono + mono mono + mono \stopvariables @@ -1429,43 +2111,61 @@ volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungerades %D \startcompressdefinitions -\startsetupvariables dutch english german - czech - - doornummering: doornummering enumeration nummerierung - vycet - doordefinitie: doordefinitie description beschreibung - popis - doorsprong: doorsprong indentation einzug - odsazovani - doorlabel: doorlabel labeling beschriften - oznacovani - samengesteldelijst: samengesteldelijst combinedlist kombiniereliste - kombinovanyseznam - sectie: sectie section abschnitt - oddil - register: register register register - rejstrik - interactie: interactie interaction interaktion - interakce - synoniem: synoniem synonym synonym - synonymum - synoniemen: synoniemen synonyms synonyme - synonyma - sorteer: sorteer sort sortiere - trid - sorteren: sorteren sorts sortieren - tridit - naam: naam name name - jmeno - blok: blok float gleitobjekt - plvouciobjekt - blokken: blokken floats gleitobjekte - plvouciobjekty - alinea: alinea paragraph absatz - odstavec - framedtext: kadertekst framedtext umrahmtertext - oramovanytext +\startsetupvariables dutch english + german czech + italian + + doornummering: doornummering enumeration + nummerierung vycet + enumerazione + doordefinitie: doordefinitie description + beschreibung popis + descrizione + doorsprong: doorsprong indentation + einzug odsazovani + rientro + doorlabel: doorlabel labeling + beschriften oznacovani + etichettatura + samengesteldelijst: samengesteldelijst combinedlist + kombiniereliste kombinovanyseznam + elencocombinato + sectie: sectie section + abschnitt oddil + sezione + register: register register + register rejstrik + registro + interactie: interactie interaction + interaktion interakce + interazione + synoniem: synoniem synonym + synonym synonymum + sinonimo + synoniemen: synoniemen synonyms + synonyme synonyma + sinonimi + sorteer: sorteer sort + sortiere trid + sort % GB + sorteren: sorteren sorts + sortieren tridit + sorts % GB + naam: naam name + name jmeno + nome + blok: blok float + gleitobjekt plvouciobjekt + oggettomobile + blokken: blokken floats + gleitobjekte plvouciobjekty + oggettimobili + alinea: alinea paragraph + absatz odstavec + capoverso + framedtext: kadertekst framedtext + umrahmtertext oramovanytext + testoincorniciato \stopsetupvariables @@ -1477,94 +2177,136 @@ volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungerades %D \startcompressdefinitions -\startelements dutch english german - czech - - beginvan: beginvan begin anfang - zacatek - buffer: buffer buffer puffer - buffer - commentaar: commentaar comment kommentar - komentar - eindvan: eindvan end ende - konec - formule: formule formula formel - rovnice - gekoppelde: gekoppelde coupled verknuepft - propojeny - haal: haal get get - ziskat - huidigelokale: huidigelokale currentlocal aktuelllokal - aktualnelokalni - in: in - ein - - % v, not really needed - instellingen: instellingen setups einstellungen - nastaveni - interactiemenu: interactiemenu interactionmenu interaktionsmenue - interaktivnimenu - laad: laad load laden - nacist - leeg: leeg empty leer - prazdne - lege: lege empty leer - prazdne - lijst: lijst list auflisten - seznam - lijstmet: lijstmet listof auflistenvon - seznam - lokale: lokale local lokal - lokalne - opmaak: opmaak makeup umbruch - zlom - plaats: plaats place platziere - umisti % better than 'misto' - reserveer: reserveer reserve reservieren - rezervovat - start: start start start - start - stel: stel setup stelle - nastaveni - stop: stop stop stop - stop - tabelkop: tabelkop tablehead tabellenueberschrift - zahlavitabulky - tabelstaart: tabelstaart tabletail tabellenende - konectabulky - tabulate: tabulatie tabulate tabulator - tabelator - tekst: tekst text text - text - type: type type type - type - uitstellen: uitstellen postponing verschieben - odlozit - verbergen: verbergen hiding verbergen - skryt - verhoog: verhoog increment erhoehen - zvysit - volgende: volgende next folgende - dalsi - volledige: volledige complete vollende - uplny - vorige: vorige previous vorige - predchozi - vorigelokale: vorigelokale previouslocal voriglokal - predchozilokalni - zie: zie see sieh - viz - register: register register register - rejstrik - - gegeven: gegeven fact gegeben - fakt - legenda: legenda legend legende - legenda - - helptext: helptekst helptext hilfetext - textnapovedy - - pagecomment: paginacommentaar pagecomment pagecomment - komentarstranky % TOBIAS +\startelements dutch english + german czech + italian + + beginvan: beginvan begin + anfang zacatek + inizio + buffer: buffer buffer + puffer buffer + buffer + commentaar: commentaar comment + kommentar komentar + commento + eindvan: eindvan end + ende konec + fine + formule: formule formula + formel rovnice + formula + gekoppelde: gekoppelde coupled + verknuepft propojene + accoppiato + haal: haal get + get ziskat + prendi + huidigelokale: huidigelokale currentlocal + aktuelllokal aktualnelokalni + correntelocale + in: in - + ein - + in + instellingen: instellingen setups + impostazioni einstellungen + nastaveni + interactiemenu: interactiemenu interactionmenu + interaktionsmenue interaktivnimenu + menuinterattivo + laad: laad load + laden nacist + carica + leeg: leeg empty + vuoto leer + prazdne + lege: lege empty + leer prazdne + vuoti + lijst: lijst list + auflisten seznam + elenco + lijstmet: lijstmet listof + auflistenvon seznam + elencodi + lokale: lokale local + lokal lokalne + locale + opmaak: opmaak makeup + umbruch zlom + makeup % GB + plaats: plaats place + platziere umisti + metti + reserveer: reserveer reserve + reservieren rezervovat + riserva + start: start start + start start + inizia + stel: stel setup + stelle nastaveni + imposta + stop: stop stop + stop stop + termina + tabelkop: tabelkop tablehead + tabellenueberschrift zahlavitabulky + testatabella % GB + tabelstaart: tabelstaart tabletail + tabellenende konectabulky + codatabella % GB + tabulate: tabulatie tabulate + tabulator tabelator + tabulate % GB + tekst: tekst text + text text + testo + type: type type + type opis + type % GB + uitstellen: uitstellen postponing + verschieben odlozit + posporre % GB + verbergen: verbergen hiding + verbergen skryt + nascondere + verhoog: verhoog increment + erhoehen zvysit + incrementa + volgende: volgende next + folgende dalsi + successivo + volledige: volledige complete + vollende uplny + completo + vorige: vorige previous + vorige predchozi + precedente + vorigelokale: vorigelokale previouslocal + voriglokal predchozilokalni + precedentelocale + zie: zie see + sieh viz + vedi + register: register register + register rejstrik + registro + gegeven: gegeven fact + gegeben fakt + fatto + legenda: legenda legend + legende legenda + legenda + helptext: helptekst helptext + hilfetext textnapovedy + testoaiuto + pagecomment: paginacommentaar pagecomment + pagecomment komentarstranky + commentopagina % TB + sectieblokomgeving: sectieblokomgeving sectionblockenvironment + sectionblockenvironment sectionblockenvironment + ambientebloccosezione % TB TH \stopelements @@ -1576,93 +2318,131 @@ volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungerades %D \startcompressdefinitions -\startvariables dutch english german - czech - - FirstPage: EerstePagina FirstPage ErsteSeite - PrvniStrana - PreviousPage: VorigePagina PreviousPage VorigeSeite - JdiNaStranku - NextPage: VolgendePagina NextPage FolgendeSeite - DalsiStrana - LastPage: LaatstePagina LastPage LetzteSeite - PosledniStrana - PreviousJump: VorigeSprong PreviousJump VorigerSprung - PredchoziSkok - NextJump: VolgendeSprong NextJump NaechsterSprung - DalsiSkok - SwapViewer: WisselViewer SwapViewer WechseleViewer - ZamenitProhlizec - ExitViewer: VerlaatViewer ExitViewer BeendeViewer - SkoncitProhlizec - CloseDocument: SluitDocument CloseDocument SchliesseDokument - ZavritDokument - SaveDocument: BewaarDocument SaveDocument SpeichereDokument - UlozitDokument - ViewerHelp: ViewerHelp ViewerHelp ViewerHilfe - NapovedaProhlizece - PrintDocument: PrintDocument PrintDocument DruckeDokument - VytisknoutDokument - SearchDocument: DoorzoekDocument SearchDocument DokumentDurchsuchen - ProhledatDokument - SearchAgain: HerhaalZoeken SearchAgain WeiterSuchen - HledatZnovu - GotoPage: GaNaarPagina GotoPage GotoPage % Tobias - GaNaarPagina % TOM - - StartMovie: StartFilm StartMovie StartFilm - SpustitFilmu - StopMovie: StopFilm StopMovie StopFilm - ZastavitFilm - PauseMovie: PauzeerFilm PauseMovie PauseFilm - PozastavitFilm - ResumeMovie: HervatFilm ResumeMovie FortsetzenFilm - PokracovatVeFilmu - - StartSound: StartGeluid StartSound StartSound - StartZvuk % TOBIAS - StopSound: StopFilm StopSound StopSound - StopZvuk % TOBIAS - PauseSound: PauzeerFilm PauseSound PauseSound - PauzaZvuk % TOBIAS - ResumeSound: HervatSound ResumeSound ResumeSound - PokracovatZvuk % TOBIAS - - SaveForm: BewaarFormulier SaveForm SpeicheFormular - UlozitFormular - LoadForm: LaadFormulier LoadForm LadeFormular - NacistFormular - ResetForm: ResetFormulier ResetForm ZuruecksetzenFormular - ResetFormulare - SubmitForm: VerzendFormulier SubmitForm VersendeFormular - PoslatFormular - - HideField: VerbergVeld HideField VerbergeFeld - SkryjPole - ShowField: ToonVeld ShowField ZeigeFeld - UkazPole +\startvariables dutch english + german czech + italian + + FirstPage: EerstePagina FirstPage + ErsteSeite PrvniStrana + PrimaPagina + PreviousPage: VorigePagina PreviousPage + VorigeSeite PredchoziStrana + PaginaPrecedente + NextPage: VolgendePagina NextPage + FolgendeSeite DalsiStrana + PaginaSuccessiva + LastPage: LaatstePagina LastPage + LetzteSeite PosledniStrana + UltimaPagina + PreviousJump: VorigeSprong PreviousJump + VorigerSprung PredchoziSkok + SaltoPrecedente + NextJump: VolgendeSprong NextJump + NaechsterSprung NasledujiciSkok + SaltoSuccessivo + SwapViewer: WisselViewer SwapViewer + WechseleViewer ZmenitProhlizec + ScambiaVisualizzatore + ExitViewer: VerlaatViewer ExitViewer + BeendeViewer UkoncitProhlizec + EsciVisualizzatore + CloseDocument: SluitDocument CloseDocument + SchliesseDokument ZavritDokument + ChiudiDocumento + SaveDocument: BewaarDocument SaveDocument + SpeichereDokument UlozitDokument + SalvaDocumento + ViewerHelp: ViewerHelp ViewerHelp + ViewerHilfe NapovedaProhlizece + AiutoVisualizzatore + PrintDocument: PrintDocument PrintDocument + DruckeDokument VytisknoutDokument + StampaDocumento + SearchDocument: DoorzoekDocument SearchDocument + DokumentDurchsuchen ProhledatDokument + CercaDocumento + SearchAgain: HerhaalZoeken SearchAgain + WeiterSuchen HledatZnovu + CercaAncora + Query: RaadpleegDocument Query + Query Query + Query % TB TH GB + QueryAgain: HerhaalRaadplegen QueryAgain + QueryAgain QueryAgain + QueryAgain % TB TH GB + GotoPage: GaNaarPagina GotoPage + GotoPage JdiNaStranku + VaiAPagina % TB + StartMovie: StartFilm StartMovie + StartFilm SpustitFilm + IniziaFilm + StopMovie: StopFilm StopMovie + StopFilm ZastavitFilm + FermaFilm + PauseMovie: PauzeerFilm PauseMovie + PauseFilm PozastavitFilm + PausaFilm + ResumeMovie: HervatFilm ResumeMovie + FortsetzenFilm PokracovatFilm + RiprendiFilm + StartSound: StartGeluid StartSound + StartSound StartZvuk + IniziaSuono % TB + StopSound: StopFilm StopSound + StopSound StopZvuk + FermaSuono % TB + PauseSound: PauzeerFilm PauseSound + PauseSound PozastavitZvuk + PausaSuono % TB + ResumeSound: HervatSound ResumeSound + ResumeSound PokracovatZvuk + RiprendiSuono % TB + SaveForm: BewaarFormulier SaveForm + SpeicheFormular UlozitFormular + SalvaForm + LoadForm: LaadFormulier LoadForm + LadeFormular NacistFormular + CaricaForm + ResetForm: ResetFormulier ResetForm + ZuruecksetzenFormular ResetFormulare + ReimpostaForm + SubmitForm: VerzendFormulier SubmitForm + VersendeFormular PoslatFormular + MandaForm + HideField: VerbergVeld HideField + VerbergeFeld SkryjPole + NascondiCampo + ShowField: ToonVeld ShowField + ZeigeFeld UkazPole + MostraCampo \stopvariables %D Here are some symbol names. We capitalize them because they are %D viewer specific. -\startvariables dutch english german - czech - - New: Nieuw New Neu - Novy - Balloon: Ballon Balloon Ballon - Bublinka - Addition: Toevoeging Addition Zusatz - Pridavek % Dodatek - Help: Help Help Hilfe - Napoveda - Paragraph: Paragraaf Paragraph Absatz - Odstavec - Key: Sleutel Key Schluessel - Klic - +\startvariables dutch english + german czech + italian + + New: Nieuw New + Neu Novy + Nuovo + Balloon: Ballon Balloon + Ballon Bublinka + Pallone + Addition: Toevoeging Addition + Zusatz Pridavek + Aggiunta + Help: Help Help + Hilfe Napoveda + Aiuto + Paragraph: Paragraaf Paragraph + Absatz Odstavec + Capoverso + Key: Sleutel Key + Schluessel Klavesa + Tasto \stopvariables %D \stopcompressdefinitions @@ -1672,21 +2452,25 @@ volgendeonevenpagina: volgendeonevenpagina nextoddpage naechsteungerades %D \startcompressdefinitions -\startconstants all - bet: bet - dat: dat - ken: ken - ref: ref +\startconstants all + + bet: bet + dat: dat + ken: ken + ref: ref + \stopconstants -\startvariables all - formeel: formeel - informeel: informeel - rekening: rekening - sticker: sticker - sheet: sheet - brief: brief - ls: ls +\startvariables all + + formeel: formeel + informeel: informeel + rekening: rekening + sticker: sticker + sheet: sheet + brief: brief + ls: ls + \stopvariables %D \stopcompressdefinitions diff --git a/tex/context/base/mult-ini.tex b/tex/context/base/mult-ini.tex index 16e67b67f..ca650b1dd 100644 --- a/tex/context/base/mult-ini.tex +++ b/tex/context/base/mult-ini.tex @@ -13,7 +13,18 @@ %D This module implements the multi||lingual interface to %D \CONTEXT. These capabilities concern messages, commands and -%D parameters. +%D parameters. Currently the following interfaces are +%D supported: +%D +%D \starttabulatie[|l|l|c|c|] +%D \NC\bf language\NC\bf translator \NC\bf messages\NC\bf interface\NC\NR +%D \NC dutch \NC Hans Hagen \NC yes \NC yes \NC\NR +%D \NC english \NC Hans Hagen \NC yes \NC yes \NC\NR +%D \NC german \NC Tobias Burnus \NC yes \NC yes \NC\NR +%D \NC czech \NC Tom Hudec \NC yes \NC yes \NC\NR +%D \NC italian \NC Giuseppe Bilotta \NC yes \NC yes \NC\NR +%D \NC norwegian \NC Hans Fredrik Nordhaug\NC yes \NC no \NC\NR +%D \stoptabulatie \writestatus{loading}{Context Multilingual Macros / Initialization} @@ -180,6 +191,17 @@ %D not ask for interface specifications when these are already %D defined (like in cont-nl.tex and alike). +\ifx\undefined\scratchwrite \newwrite\scratchwrite \fi +\ifx\undefined\scratchread \newwrite\scratchread \fi + +\immediate\openin\scratchread=mult-def.tex % may overload the defaults + +\ifeof\scratchread % no high level commands yet + \immediate\closein\scratchread +\else + \immediate\closein\scratchread \input mult-def.tex +\fi + \ifx\defaultinterface\undefined \def\defaultinterface{english} @@ -205,7 +227,7 @@ \def\selectinterface% {\writestatus{interface}{defining \currentinterface\space interface}% \writeline - \writestatus{interface}{using \currentresponses\space messages}% + \writestatus{interface}{using \currentresponses\space messages}% \writeline \let\selectinterface\relax} @@ -388,7 +410,7 @@ \fi \next} -\gdef\startmessages #1 library: #2 +\def\startmessages #1 library: #2 {\definemessageconstant{#2}% handy for modules \bgroup \obeylines @@ -401,6 +423,40 @@ {\long\def\next##1\stopmessages{\egroup}}% \next} +%D Here, the messages are stored in a way that saves hash +%D entries, i.e. they are packed in one macro per library. +%D This was important in the days when we used \TEX's with +%D hash tables of about 10.000. The next, less efficient way +%D of storing the message, makes \CONTEXT\ run upto 5\% +%D faster by storing each message in a macro. In July 2000, +%D this costs some 185 additional hash entries, and since +%D we run large \TEX's, let do it! + +\def\startmessages #1 library: #2 + {\definemessageconstant{#2}% handy for modules + \bgroup + \obeylines + \doifinsetelse{#1}{\currentresponses,all} + {\def\next% + {\def\currentmessagelibrary{#2}% + \futurelet\next\getinterfacemessage}} + {\long\def\next##1\stopmessages{\egroup}}% + \next} + +\def\findinterfacemessage#1#2% + {\edef#2{\getvalue{\??ms\currentmessagelibrary#1}}} + +\def\doaddinterfacemessage#1#2% + {\doifdefined{\??ms\currentmessagelibrary#1} + {\debuggerinfotrue % we consider this an important error + \debuggerinfo + {message} + {duplicate tag #1 + in library \currentmessagelibrary\space + of interface \currentresponses}}% + \setxvalue{\??ms\currentmessagelibrary#1}{#2}% + \futurelet\next\getinterfacemessage} + %D \macros %D {ifshowwarnings, ifshowmessages} %D @@ -461,7 +517,7 @@ %D These macros are called upon quite often and so we optimized %D them a bit. -\def\dosetvalue#1#2#3% +\def\dosetvalue#1#2#3% {\let\c!internal!\c!internal!n \p!doifundefined{\k!prefix!#2}% \let\c!internal!\c!internal!y @@ -473,7 +529,7 @@ \@EA\def\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}% \fi} -\def\dosetevalue#1#2#3% +\def\dosetevalue#1#2#3% {\let\c!internal!\c!internal!n \p!doifundefined{\k!prefix!#2}% \let\c!internal!\c!internal!y @@ -485,7 +541,7 @@ \@EA\edef\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}% \fi} -\def\docopyvalue#1#2#3% +\def\docopyvalue#1#2#3% {\let\c!internal!\c!internal!n \p!doifundefined{\k!prefix!#3}% \let\c!internal!\c!internal!y @@ -502,11 +558,11 @@ \def\doresetvalue#1#2% {\dosetvalue{#1}{#2}{}} -%\def\dogetvalue#1#2% +%\def\dogetvalue#1#2% % {\csname#1\csname\k!prefix!#2\endcsname\endcsname} %D Although maybe not clearly visible, there is a -%D considerable profit in further optimalization. By expanding +%D considerable profit in further optimization. By expanding %D the embedded \type {\csname} we can reduce the format file %D by about 5\% (60~KB out of 1.9~MB). @@ -523,11 +579,11 @@ \endcsname\@EA{\csname#2\csname\k!prefix!#3\endcsname\endcsname}% \fi} -%D The next alternatives are slightly faster. +%D The next alternatives are slightly faster. \beginTEX -\def\dosetvalue#1#2#3% +\def\dosetvalue#1#2#3% {\let\c!internal!\c!internal!n \@EA\ifx\csname\k!prefix!#2\endcsname\relax \let\c!internal!\c!internal!y @@ -537,7 +593,7 @@ \@EA\def\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}% \fi} -\def\dosetevalue#1#2#3% +\def\dosetevalue#1#2#3% {\let\c!internal!\c!internal!n \@EA\ifx\csname\k!prefix!#2\endcsname\relax \let\c!internal!\c!internal!y @@ -547,7 +603,7 @@ \@EA\edef\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}% \fi} -\def\dosetgvalue#1#2#3% +\def\dosetgvalue#1#2#3% {\let\c!internal!\c!internal!n \@EA\ifx\csname\k!prefix!#2\endcsname\relax \let\c!internal!\c!internal!y @@ -557,7 +613,7 @@ \@EA\gdef\csname#1\csname\k!prefix!#2\endcsname\endcsname{#3}% \fi} -\def\docopyvalue#1#2#3% +\def\docopyvalue#1#2#3% {\let\c!internal!\c!internal!n \@EA\ifx\csname\k!prefix!#3\endcsname\relax \let\c!internal!\c!internal!y @@ -575,7 +631,7 @@ \beginETEX \protected -\def\dosetvalue#1#2#3% +\def\dosetvalue#1#2#3% {\let\c!internal!\c!internal!n \ifcsname\k!prefix!#2\endcsname \let\c!internal!\c!internal!y @@ -585,7 +641,7 @@ \@EA\def\csname#1#2\endcsname{#3}% \fi} -\def\dosetevalue#1#2#3% +\def\dosetevalue#1#2#3% {\let\c!internal!\c!internal!n \ifcsname\k!prefix!#2\endcsname \let\c!internal!\c!internal!y @@ -595,7 +651,7 @@ \@EA\edef\csname#1#2\endcsname{#3}% \fi} -\def\dosetgvalue#1#2#3% +\def\dosetgvalue#1#2#3% {\let\c!internal!\c!internal!n \ifcsname\k!prefix!#2\endcsname \let\c!internal!\c!internal!y @@ -605,7 +661,7 @@ \@EA\gdef\csname#1#2\endcsname{#3}% \fi} -\def\docopyvalue#1#2#3% +\def\docopyvalue#1#2#3% {\let\c!internal!\c!internal!n \ifcsname\k!prefix!#3\endcsname \let\c!internal!\c!internal!y @@ -647,7 +703,7 @@ \fi \fi} -\def\dogetargument#1#2#3#4% +\long\def\dogetargument#1#2#3#4% {\doifnextcharelse{#1} {\let\expectedarguments\noexpectedarguments #3\dodogetargument} @@ -676,6 +732,28 @@ \nextargument}% \futurelet\nextargument\nextnextargument} +\def\dogetgroupargument#1#2% + {\def\nextnextargument% + {\normalifx\nextargument\bgroup + \endrobusttest + \let\expectedarguments\noexpectedarguments + \def\nextargument{#1\dodogetargument}% + %\normalelse\normalifx\nextargument\lineending % this can be an option + % \def\nextargument{\bgroup\def\\ {\egroup\dogetgroupargument#1#2}\\}% + %\normalelse\normalifx\nextargument\blankspace % but may never be default + % \def\nextargument{\bgroup\def\\ {\egroup\dogetgroupargument#1#2}\\}% + \normalelse + \endrobusttest + \ifnum\expectedarguments>\noexpectedarguments + \showmessage{check}{2}{\the\expectedarguments,\the\inputlineno}% + \fi + \let\expectedarguments\noexpectedarguments + \def\nextargument{#2\dodogetargument{}}% + \normalfi%\normalfi\normalfi % so let's get rid of it + \nextargument}% + \beginrobusttest + \futurelet\nextargument\nextnextargument} + \def\checkdefined#1#2#3% {\doifdefined{#3} {\showmessage{check}{3}{#2,#3}}} @@ -967,8 +1045,6 @@ %D The next few macros come into action when we generate %D interface log files: -\ifx\undefined\scratchwrite \newwrite\scratchwrite \fi - \newif\iflogginginterface \def\flushinterfaceelementline% @@ -1286,12 +1362,12 @@ %D \stoptypen %D %D Giving \type{\interfaced{breedte}} results in \type{width} -%D or, when not defined, in \type{breedte} itself. This -%D macro is used in the font switching mechanism. +%D or, when not defined, in \type{breedte} itself. This +%D macro is used in the font switching mechanism. \beginTEX -\def\interfaced#1% +\def\interfaced#1% {\expandafter\ifx\csname\k!prefix!#1\endcsname\relax #1% \else @@ -1302,7 +1378,7 @@ \beginETEX \ifcsname -\def\interfaced#1% +\def\interfaced#1% {\ifcsname\k!prefix!#1\endcsname \csname\k!prefix!#1\endcsname \else @@ -1336,7 +1412,7 @@ \ifx\undefined\normaldump \newtoks\everydump - \let\normaldump\dump + \let\normaldump\dump \def\dump{\the\everydump\normaldump} \fi diff --git a/tex/context/base/mult-sys.tex b/tex/context/base/mult-sys.tex index 599d063c1..ba597846e 100644 --- a/tex/context/base/mult-sys.tex +++ b/tex/context/base/mult-sys.tex @@ -46,8 +46,9 @@ \definesystemconstant {norwegian} \definesystemconstant {no} \definesystemconstant {polish} \definesystemconstant {pl} \definesystemconstant {portuguese} \definesystemconstant {pt} +\definesystemconstant {romanian} \definesystemconstant {ro} \definesystemconstant {slovak} \definesystemconstant {sk} -\definesystemconstant {spanish} \definesystemconstant {sp} +\definesystemconstant {spanish} \definesystemconstant {es} \definesystemconstant {swedish} \definesystemconstant {sv} \definesystemconstant {turkish} \definesystemconstant {tr} \definesystemconstant {ukenglish} \definesystemconstant {uk} @@ -65,6 +66,10 @@ \definesystemconstant {BoldSlanted} \definesystemconstant {BoldItalic} +\definesystemconstant {Serif} \definesystemconstant {Regular} +\definesystemconstant {Sans} \definesystemconstant {Support} +\definesystemconstant {Mono} \definesystemconstant {Type} + %D As the name of their define command states, the next set of %D constants is used in the message macro's. @@ -145,6 +150,8 @@ \definesystemconstant {done} +\definesystemconstant {font} + %D A more experienced \TEX\ user will recognize the next four %D constants. We need these because font-definitions are %D partially english. @@ -162,6 +169,7 @@ \definesystemconstant {encoding} \definesystemconstant {mapping} \definesystemconstant {patterns} +\definesystemconstant {handling} %D Just to be complete we define the standard \TEX\ units. @@ -334,6 +342,7 @@ \definesystemvariable {cr} % kleur (ColoR) \definesystemvariable {cv} % ConVersie \definesystemvariable {da} % DAte +\definesystemvariable {dc} % DroppedCaps \definesystemvariable {dd} % DoorDefinieren \definesystemvariable {de} % DEel \definesystemvariable {dl} % DunneLijnen @@ -351,6 +360,7 @@ \definesystemvariable {fl} % Floats \definesystemvariable {fm} % ForMules \definesystemvariable {fp} % FilegroeP +\definesystemvariable {fr} % ForM \definesystemvariable {fs} % FileSynonym \definesystemvariable {ft} % FonTs \definesystemvariable {ia} % Interactie @@ -374,6 +384,7 @@ \definesystemvariable {ko} % KOp(pen) \definesystemvariable {kp} % KopPelteken \definesystemvariable {kr} % KoRps +\definesystemvariable {ks} % KolomSpan \definesystemvariable {kt} % KonTakten \definesystemvariable {kw} % KontaktWaarde \definesystemvariable {la} % LAnguage @@ -386,6 +397,7 @@ \definesystemvariable {ly} % LaYout \definesystemvariable {ma} % MargeAchtergrond \definesystemvariable {mb} % MargeBlokken +\definesystemvariable {mp} % MetaPost \definesystemvariable {mk} % MarKering \definesystemvariable {nm} % Nummering \definesystemvariable {np} % NaastPlaatsen @@ -396,6 +408,7 @@ \definesystemvariable {oo} % OpsOmmingen \definesystemvariable {op} % OPsomming \definesystemvariable {os} % OffSet +\definesystemvariable {ov} % OVerlay \definesystemvariable {pa} % PAlet \definesystemvariable {pb} % PuBlicatie \definesystemvariable {pc} % PageComment @@ -420,6 +433,7 @@ \definesystemvariable {sc} % SCherm \definesystemvariable {sd} % SounD \definesystemvariable {se} % SEctie +\definesystemvariable {sh} % ShapeText \definesystemvariable {si} % SplIt \definesystemvariable {sk} % SectieKop \definesystemvariable {sl} % SmalLer @@ -538,6 +552,7 @@ \definefileconstant {javascriptprefix} {java-} \definefileconstant {languageprefix} {lang-} \definefileconstant {specialprefix} {spec-} +\definefileconstant {metapostprefix} {meta-} \definefileconstant {moduleprefix} {m-} \definefileconstant {styleprefix} {s-} \definefileconstant {privateprefix} {p-} @@ -593,6 +608,7 @@ \defineinterfaceconstant {jpg} {jpg} \defineinterfaceconstant {pdf} {pdf} \defineinterfaceconstant {png} {png} +\defineinterfaceconstant {avi} {avi} \defineinterfaceconstant {mov} {mov} \defineinterfaceconstant {tex} {tex} \defineinterfaceconstant {tmp} {tmp} @@ -638,6 +654,20 @@ 3: -- -- nahrazuje makro, uzijte VERZALKY! \stopmessages +\startmessages italian library: check + title: controllo + 1: '=' mancante dopo '--' alla riga -- + 2: -- argomento/i attesi alla riga -- + 3: -- -- sostituisce una macro, usare le MAIUSCOLE! +\stopmessages + +\startmessages norwegian library: check + title: kontroll + 1: manglende '=' etter '--' i linje -- + 2: -- argument forventet i linje -- + 3: -- -- overskygger en makro, bruk STORE BOKSTAVER! +\stopmessages + \fi %D Ok, here are some more, because we've got ouselves some diff --git a/tex/context/base/s-abr-01.tex b/tex/context/base/s-abr-01.tex index 870dee7a7..40c650745 100644 --- a/tex/context/base/s-abr-01.tex +++ b/tex/context/base/s-abr-01.tex @@ -41,6 +41,7 @@ \logo [DVI] {dvi} \logo [EC] {ec} \logo [EMACS] {emacs} +\logo [EIFFEL] {Eiffel} \logo [EMTEX] {em\TeX} \logo [EPS] {eps} \logo [ETEX] {\eTeX} @@ -67,6 +68,10 @@ \logo [MIKTEX] {Mik\TeX} \logo [METAFONT] {\MetaFont} \logo [METAPOST] {\MetaPost} +\logo [OMEGA] {Omega} +\logo [PASCAL] {Pascal} +\logo [ALGOL] {ALGOL} +\logo [MLTEX] {ml\TeX} \logo [MODULA] {Modula} \logo [MOV] {mov} \logo [MPS] {mps} @@ -74,6 +79,7 @@ \logo [MSWINDOWS] {MSWindows} \logo [NTG] {ntg} \logo [NTS] {nts} +\logo [PDFTOPS] {pdftops} \logo [PDFETEX] {pdf-\eTeX} \logo [PDFTEX] {pdf\TeX} \logo [PDF] {pdf} @@ -125,6 +131,7 @@ \logo [UNICODE] {Unicode} \logo [UNIX] {unix} \logo [LINUX] {linux} +\logo [WEB] {web} \logo [WEBC] {web2c} \logo [WDT] {wdt} \logo [WWW] {www} @@ -134,9 +141,12 @@ \logo [XDVI] {Xdvi} \logo [XINDY] {Xindy} \logo [YandY] {y\&y} +\logo [WYSIWYG] {wysiwyg} \logo [WINNX] {Win9x} \logo [WINNT] {WinNT} +\def\METAFUN {\MetaFun} + \def\SystemSpecialA#1{$\langle\it#1\rangle$} \def\SystemSpecialB#1{{\tttf<#1>}} diff --git a/tex/context/base/s-chi-00.tex b/tex/context/base/s-chi-00.tex index 36c372c00..9bddd057d 100644 --- a/tex/context/base/s-chi-00.tex +++ b/tex/context/base/s-chi-00.tex @@ -22,6 +22,8 @@ \stelsectiein [\v!sectionlevel-2] [\c!kopconversie=\s!chinese] \stelsectiein [\v!sectionlevel-3] [\c!kopconversie=\s!chinese] +\stelsectiein [\v!sectionlevel-2] [\v!bijlage\c!conversie=] + \stelkopin [\v!hoofdstuk] [\c!afstand=1.25em] \stelkopin [\v!paragraaf] [\c!afstand=1.25em] \stelkopin [\v!sub\v!paragraaf] [\c!afstand=1.00em] @@ -44,4 +46,8 @@ \definereferenceformat [inchapter] [\c!label=\v!hoofdstuk] \definereferenceformat [insection] [\c!label=\v!paragraaf] +% important + +\setuptyping[\c!tab=\v!nee] + \protect \endinput diff --git a/tex/context/base/s-map-01.tex b/tex/context/base/s-map-01.tex index 4f1f06dd6..07cb3b935 100644 --- a/tex/context/base/s-map-01.tex +++ b/tex/context/base/s-map-01.tex @@ -60,8 +60,13 @@ %D \type{groot} meegeven. Met \type{x} geven we de maat aan van %D de pseudo klein||kapitalen. De \MAPS\ wordt gezet in 9pt. -\setupbodyfont - [map,mty,9pt] +\setupbodyfont[map,9pt] + +\startnotmode[localfonts] + + \setupbodyfont[mty] + +\stopnotmode %D We gebruiken echte small caps: @@ -475,7 +480,7 @@ \setbox0=\hbox{X}% \advance\dimen0 by -\ht0 \getpagestatus - \ifodd\MapsPagina \rightpagetrue \fi + \ifodd\MapsPagina\relax \rightpagetrue \fi \setbox0=\vtop {\hsize\margebreedte \forgetall diff --git a/tex/context/base/s-pre-05.tex b/tex/context/base/s-pre-05.tex index dac9efc9c..a25dd6040 100644 --- a/tex/context/base/s-pre-05.tex +++ b/tex/context/base/s-pre-05.tex @@ -49,6 +49,10 @@ [state=repeat] \setupbackgrounds + [page] + [backgroundcolor=white] + +\setupbackgrounds [text][text] [background={HashFrameA,NextPage}, backgroundoffset=20pt] @@ -113,7 +117,7 @@ {}[forward]} \def\StartTitlePage% - {\setupbackgrounds[page][background={TitleGraphic,NextPage}] + {\setupbackgrounds[page][background={color,TitleGraphic,NextPage}] \setupbackgrounds[text][text][background=] \setupinteraction[menu=off] \setupinteractionbar[state=stop] @@ -131,7 +135,7 @@ \setuplayout[width=430pt,rightedge=110pt] \setupinteraction[menu=on] \setupinteractionbar[state=start] - \setupbackgrounds[page][background=] + \setupbackgrounds[page][background=color] \setupbackgrounds[text][text][background={HashFrameA,NextPage}]} \def\TitlePage#1% diff --git a/tex/context/base/s-pre-15.tex b/tex/context/base/s-pre-15.tex new file mode 100644 index 000000000..df27ea562 --- /dev/null +++ b/tex/context/base/s-pre-15.tex @@ -0,0 +1,179 @@ +%D \module +%D [ file=s-pre-15, +%D version=1999.09.01, +%D title=\CONTEXT\ Style File, +%D subtitle=Presentation Environment 15, +%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. + +%D This is one of the styles I made for the presentation on +%D the \NTS\ project at Euro\TeX\ 1998. You need balls to let +%D \TEX\ typeset graphics, but thsi style demonstrates that it +%D can be done. +%D +%D This presentation is meant for presentations that build up +%D an idea stepwise. +%D +%D \starttyping +%D \TitlePage{Do you know \TEX ?} +%D +%D \StartIdea +%D \StartItem We use \TEX\ for typesetting \unknown \StopItem +%D \StartItem mathematical text \unknown \StopItem +%D \StartItem but also for text that has no math \unknown \StopItem +%D \StartItem or presentations like this \unknown \StopItem +%D \StartItem and whatever you can come up with! \StopItem +%D \StopIdea +%D \stoptyping + +%D The basic layout is rather simple and used as much of the +%D screen as possible. + +\setuppapersize + [S6][S6] + +\setuplayout + [backspace=25pt, + topspace=25pt, + width=middle, + height=middle, + header=0pt, + footer=0pt] + +\setupinteraction + [state=start, + display=new, + color=LineColor, + contrastcolor=LineColor, + click=no] + +\setupinteractionscreen + [option=max] + +\setupbodyfont + [lbr,14.4pt] + +%D We use a lot of color. You can remap them if you want +%D differend ones. The ideas circulate over the colors. + +\setupcolors + [state=start] + +\definecolor[TextColor][s=.8] +\definecolor[PageColor][s=.6] +\definecolor[LineColor][s=.4] + +\definecolor[red] [r=.4] \definecolor[cyan] [g=.4,b=.4] +\definecolor[green][g=.4] \definecolor[magenta][r=.4,b=.4] +\definecolor[blue] [b=.4] \definecolor[yellow] [r=.4,g=.4] + +\definecolor[linecolor 1][red] \definecolor[linecolor 5][cyan] +\definecolor[linecolor 2][green] \definecolor[linecolor 6][magenta] +\definecolor[linecolor 3][blue] \definecolor[linecolor 4][yellow] + +%D We use variables to make sure that the graphics are reused +%D but unique. + +\setupMPvariables[pageframe][pagecolor=PageColor,linecolor=LineColor] +\setupMPvariables[textframe][textcolor=TextColor,linecolor=LineColor] + +\setupbackgrounds + [page] + [background={pageframe,nextpage}] + +\defineoverlay [pageframe] [\uniqueMPgraphic{pageframe}] +\defineoverlay [textframe] [\uniqueMPgraphic{textframe}] +\defineoverlay [nextpage] [\overlaybutton{forward}] + +\startuniqueMPgraphic{pageframe}{pagecolor,linecolor} + path p ; p := fullsquare xyscaled (\overlaywidth,\overlayheight) ; + pickup pencircle scaled 10pt ; + fill p withcolor \MPvar{pagecolor} ; + draw p withcolor \MPvar{linecolor} ; +\stopuniqueMPgraphic + +\startuniqueMPgraphic{textframe}{textcolor,linecolor} + path p ; p := fullcircle xyscaled (\overlaywidth,\overlayheight) ; + pickup pencircle scaled 10pt ; + fill p withcolor \MPvar{textcolor} ; + draw p withcolor \MPvar{linecolor} ; +\stopuniqueMPgraphic + +%D The rest of the file implements the nasty part: typesetting +%D text embedded in a graphic. The text is collected in a box +%D so that we can reuse it. + +\newbox\CollectedIdeas +\newcounter\CurrentTopic + +\def\StartItem% + {\setbox\CollectedIdeas=\hbox\bgroup + \ifdim\wd\CollectedIdeas>0pt \unhbox\CollectedIdeas\hskip25pt \fi + \setbox\scratchbox=\hbox\bgroup + \framed + [width=160pt,height=160pt,align=middle,frame=off, + background=textframe,offset=15pt,top=\vfill,bottom=\vfill] + \bgroup} + +\def\StopItem% + {\egroup + \egroup + \setbox\scratchbox=\hbox{\lower.5\ht\scratchbox\box\scratchbox}% + \ht\scratchbox=.5\ht\scratchbox + \dp\scratchbox= \ht\scratchbox + \box\scratchbox + \egroup + \startstandardmakeup + \dontcomplain + \leftskip 0pt plus 50pt + \rightskip 0pt plus 50pt + \parfillskip 0pt + \baselineskip 100pt + \unhcopy\CollectedIdeas + \stopstandardmakeup} + +\def\StartIdea% + {\ifnum\CurrentTopic=6 \doglobal\newcounter\CurrentTopic \fi + \doglobal\increment\CurrentTopic + \definecolor[LineColor][linecolor \CurrentTopic] + \setbox\CollectedIdeas=\null} + +\def\StopIdea% + {} + +\def\TitlePage#1% + {\startstandardmakeup + \setupalign[middle] + \def\\{\vfil\bfb\setupinterlinespace} + \bfd\setupinterlinespace + \vfil#1\vfil\vfil + \stopstandardmakeup} + +\endinput + +%D A simple test on functionality. + +\setupoutput[pdftex] + +\starttext + +\TitlePage{Do you know \TEX ?} + +\startbuffer +\StartIdea + \StartItem We use \TEX\ for typesetting \unknown \StopItem + \StartItem mathematical text \unknown \StopItem + \StartItem but also for text that has no math \unknown \StopItem + \StartItem or presentations like this \unknown \StopItem + \StartItem and whatever you can come up with! \StopItem +\StopIdea +\stopbuffer + +\dorecurse{6}{\getbuffer} + +\stoptext diff --git a/tex/context/base/s-pre-19.tex b/tex/context/base/s-pre-19.tex new file mode 100644 index 000000000..f93deb1a7 --- /dev/null +++ b/tex/context/base/s-pre-19.tex @@ -0,0 +1,328 @@ +%D \module +%D [ file=s-pre-19, +%D version=2000.07.31, +%D title=\CONTEXT\ Style File, +%D subtitle=Presentation Environment 19, +%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. + +%D This style is made in the process or writing the \METAFUN\ +%D manual. It exploits a few tricks, like graphics calculated +%D using positional information. It also uses the (at that +%D moment) new menu list placement alternative. If you forget +%D about the definition of the button shapes, which is +%D complicated in any system, this style is not even that hard +%D to follow. Watch how the left side of the buttons follow +%D the right side of the text graphic. +%D +%D While playing bit with this style, the random alternative +%D made me think of those organic building with non equal +%D windows (we have a few in The Netherlands), so I decided to +%D label this style as \type {pre-organic}. +%D +%D At the end of this file, there is a small test file, so +%D when you process this file with \TEXEXEC\ and the options +%D \type {--mode=demo} and \type {--pdf}, you will get a demo +%D document. + +%D We use one of the standard screen \quote {paper} sizes, and +%D map it onto the same size, so that we get a nicely cropped +%D page. + +\setuppapersize + [S6][S6] + +%D Like in the \METAFUN\ manual, we use the Palatino as main +%D bodyfont. This font is quite readable on even low +%D resolution screens, although I admit that this style is +%D developed using an $1400\times1050$ pixel LCD screen, so I +%D may be biased. + +\setupbodyfont + [ppl] + +%D The layout specification sets up a text area and a right +%D edge area where the menus will go. Watch the rather large +%D edge distance. By setting the header and footer dimensions +%D to zero, we automatically get rid of page body ornaments, +%D like the pagenumber. + +\setuplayout + [topspace=48pt, + backspace=48pt, + cutspace=12pt, + width=400pt, + margin=0cm, + rightedge=88pt, + rightedgedistance=48pt, + header=0cm, + footer=0cm, + height=middle] + +%D We use a moderate, about a line height, interparagraph +%D white space. + +\setupwhitespace + [big] + +%D Of course we use colors, since on computer displays they +%D come for free. + +\setupcolors + [state=start] + +\definecolor [red] [r=.75] +\definecolor [yellow] [r=.75,g=.75] +\definecolor [gray] [s=.50] +\definecolor [white] [s=.85] + +%D This is an interactive document, so we enable interaction. +%D In this style, we disable the viewer's \quote {highlight a +%D hyperlink when it's clicked on} feature. We will use a +%D menu, so we enable menus. Later we will see the contract +%D color |<|hyperlinks gets that color when we are already on +%D the location|>| in action. + +\setupinteraction + [state=start, + click=off, + color=red, + contrastcolor=gray, + menu=on] + +%D The menu itself is set up as follows. Because we will +%D calculate menubuttons based on their position on the page, +%D we have to keep track of the positions. Therefore, we set +%D the \type {position} variable to \type {yes}. + +\setupinteractionmenu + [right] + [frame=off, + position=yes, + align=middle, + topoffset=-.75cm, + bottomoffset=-.75cm, + color=gray, + contrastcolor=gray, + style=bold, + before=, + after=] + +%D The menu content is rather sober: a list of topics (later +%D we will define the command that generates topic entries), +%D and a close button. + +\startinteractionmenu[right] + \placelist[Topic][alternative=right] + \vfill + \but [CloseDocument] close \\ +\stopinteractionmenu + +%D We have now arived at the more interesting part of the style +%D definition: the graphic that goes in the page background. +%D Because this graphic will change, we define a usable +%D \METAPOST\ graphic. Page backgrounds are recalculated each +%D page, opposite to the other backgrounds that are calculated +%D when a new background is defined, or when repetitive +%D calculation is turned on. + +\setupbackgrounds + [page] + [background=page] + +\defineoverlay + [page] + [\useMPgraphic{page}] + +\setupMPvariables + [page] + [alternative=3] + +\startuseMPgraphic{page} + + \includeMPgraphic{rightsuperbutton} + + StartPage ; + + path p, q ; pickup pencircle scaled 3pt ; + + p := Field[Text][Text] enlarged 36pt superellipsed .90 ; + + + fill Page withcolor \MPcolor{yellow} ; + fill p withcolor \MPcolor{white} ; + draw p withcolor \MPcolor{red} ; + + p := Field[Text][Text] enlarged 48pt superellipsed .90 ; + + def right_menu_button (expr nn, rr, pp, xx, yy, ww, hh, dd) = + if (pp>0) and (rr>0) : + q := rightsuperbutton(p,xx,yy,RightEdgeWidth,hh) ; + fill q withcolor \MPcolor{white} ; + draw q withcolor if rr=2 : \MPcolor{gray} else : \MPcolor{red} fi ; + fi ; + enddef ; + + \MPmenubuttons{right} + + StopPage ; +\stopuseMPgraphic + +\startuseMPgraphic{page} + + \includeMPgraphic{rightsuperbutton} + + StartPage ; + + numeric alternative, seed, superness, squeezeness, randomness ; + path p, q ; transform t ; + + alternative := \MPvar{alternative} ; + seed := uniformdeviate 100 ; + + if alternative > 10 : + superness := .85 + ((\realfolio-1)/\lastpage) * .15 ; + squeezeness := 12pt - ((\realfolio-1)/\lastpage) * 10pt ; + else : + superness := .90 ; + squeezeness := 12pt ; + fi ; + + randomness := squeezeness ; + + alternative := alternative mod 10 ; + + t := identity if alternative=3: shifted (9pt,-9pt) fi ; + + % first we draw the shape that surrounds the text + + randomseed := seed ; + + p := Field[Text][Text] enlarged if + alternative = 1 : 36pt superellipsed superness elseif + alternative = 2 : 36pt squeezed squeezeness elseif + alternative = 3 : 36pt randomized randomness else + : 36pt fi ; + + pickup pencircle scaled 3pt ; + + fill Page withcolor \MPcolor{yellow} ; + fill p withcolor \MPcolor{white} ; + draw p withcolor \MPcolor{red} ; + + % we set p to the wider shape from which we will chip off pieces + + randomseed := seed ; + + p := ( Field[Text][Text] enlarged if + alternative = 1 : 48pt superellipsed superness elseif + alternative = 2 : 48pt squeezed squeezeness elseif + alternative = 3 : 36pt randomized randomness else + : 48pt fi ) transformed t ; + + % calls to *_menu_button are generated automatically ... + + def right_menu_button (expr nn, rr, pp, xx, yy, ww, hh, dd) = + if (pp>0) and (rr>0) : + q := rightsuperbutton(p,xx,yy,RightEdgeWidth,hh) ; % \MPw{menu:right:\realfolio} + fill q withcolor \MPcolor{white} ; + draw q withcolor if rr=2 : \MPcolor{gray} else : \MPcolor{red} fi ; + fi ; + enddef ; + + % ... and inserted when the graphic data is flushed here ... + + \MPmenubuttons{right} + + StopPage ; +\stopuseMPgraphic + +\startuseMPgraphic{rightsuperbutton} + +vardef rightsuperbutton (expr pat, xpos, ypos, wid, hei) = + + save p, ptop, pbot, t, b, edge, shift, width, height ; + path p, ptop, pbot ; pair t, b ; numeric edge, shift, width, height ; + + edge := xpos + wid ; shift := ypos + hei ; + + p := rightpath pat ; + + ptop := ((-infinity,shift)--(edge,shift)) ; + pbot := ((-infinity,shift-hei)--(edge,shift-hei)) ; + + t := p intersectionpoint ptop ; + b := p intersectionpoint pbot ; + + p := subpath(0,xpart (p intersectiontimes ptop)) of p ; + p := subpath(xpart (p intersectiontimes pbot),length(p)) of p ; + + (p -- t -- point 1 of ptop & + point 1 of ptop -- point 1 of pbot & + point 1 of pbot -- b + -- cycle) + +enddef ; + +\stopuseMPgraphic + +%D Topics are identified with \type {\Topic}, which is an +%D instance of chapter headings. The number is made invisible. +%D Since it still is a numbered section header, \CONTEXT\ will +%D write the header to the table of contents. + +\definehead + [Topic] + [chapter] + +\setuphead + [Topic] + [number=no] + +%D We will use a bold font in the table of contents. We also +%D force a complete list. + +\setuplist + [Topic] + [criterium=all, + style=bold, + before=, + after=] + +%D The \type {\TitlePage} macro looks horrible, because we +%D want to keep the interface simple: a list of small +%D sentences, separated by \type {\\}. + +\def\TitlePage#1% + {\startstandardmakeup + \switchtobodyfont[big] + \def\\{\vfill\bfb\let\\=\par} + \bfd\setupinterlinespace\gray + \vskip.5cm#1\\\vskip.5cm % \\ is really needed -) + \stopstandardmakeup} + +\doifnotmode{demo}{\endinput} + +\starttext + +% \useenvironment[pre-organic] +% \setupoutput[pdftex] + +\setupMPvariables[page][alternative=1] + +\TitlePage + {A Few Nice Quotes\\ + A Simple Style Demo\\ + Hans Hagen, August 2000} + +\Topic {Rudolf D. Hofstadter} \input douglas \page +\Topic {Donald E. Knuth} \input knuth \page +\Topic {Edward R. Tufte} \input tufte \page +\Topic {Hermann Zapf} \input zapf \page + +\stoptext diff --git a/tex/context/base/spec-fdf.tex b/tex/context/base/spec-fdf.tex index dd440d9aa..0150390a3 100644 --- a/tex/context/base/spec-fdf.tex +++ b/tex/context/base/spec-fdf.tex @@ -154,12 +154,23 @@ \ScaledPointsToWholeBigPoints{\number\!!heighta}\bottom \ScaledPointsToWholeBigPoints{\number\!!widtha }\width \ScaledPointsToWholeBigPoints{\number\!!heightb}\height - \doPDFpagesattribute + \xdef\currentPDFcropbox% \doPDFpagesattribute {/CropBox [\left\space\bottom\space\width\space\height]}% - \doPDFaddtocatalog + \xdef\currentPDFpagemode% \doPDFaddtocatalog {/PageMode \ifcase#6 /UseNone\or/FullScreen\or/UseOutlines\fi}% \egroup} +\global\let\currentPDFcropbox \empty +\global\let\currentPDFpagemode\empty + +\appendtoks % hack to prevent duplicates + \ifcase\realfolio\or\doPDFaddtocatalog{\currentPDFpagemode}\fi +\to\everyshipout + +\appendtoks + \doPDFpageattribute{\currentPDFcropbox}% +\to\everyshipout + %D \macros %D {doPDFsetupopenaction,doPDFsetupcloseaction, %D doPDFsetupopenpageaction,doPDFsetupclosepageaction} @@ -223,6 +234,8 @@ %D The goto macros use the switch \type{\ifsecondaryreference} %D to determine if actions should be linked. +\def\locationfilesuffix{pdf} + \def\doPDFstartgotolocation#1#2#3#4#5#6% {\bgroup \doifelsenothing{#3} @@ -233,8 +246,9 @@ {\let\PDFfile\empty} {\doifparentfileelse{#4} {\let\PDFfile\empty} - {\setreferencefilename R /F (#4.pdf)\to\PDFfile - \ifgotonewwindow\edef\PDFfile{\PDFfile\space/NewWindow true}\fi}}% + {\setreferencefilename#4.\locationfilesuffix\to\PDFfile + \edef\PDFfile% + {R /F (\PDFfile)\ifgotonewwindow\space/NewWindow true \fi}}}% \edef\action% {/S /GoTo\PDFfile\space /D (\PDFdestination)}}} {\doifelsenothing{#4} @@ -269,8 +283,9 @@ {\let\PDFfile\empty} {\doifparentfileelse{#4} {\let\PDFfile\empty} - {\setreferencefilename R /F (#4.pdf)\to\PDFfile % becomes /GotoR - \ifgotonewwindow\edef\PDFfile{\PDFfile\space/NewWindow true}\fi}}% + {\setreferencefilename#4.\locationfilesuffix\to\PDFfile + \edef\PDFfile% + {R /F (\PDFfile)\ifgotonewwindow\space/NewWindow true \fi}}}% \edef\action% {/S /GoTo\PDFfile\space /D [\PDFdestination\PDFpageviewwrd]}% @@ -334,14 +349,11 @@ \def\PDFformcode#1% {\doFDFiffieldset{#1}{/Field [\doFDFgetfieldset{#1}]}} -\chardef\PDFsubmitformat=1 % 0=FDF 1=HTML - \def\PDFexecuteimportform {/Named /N /AcroForm:ImportFDF} \def\PDFexecuteexportform {/Named /N /AcroForm:ExportFDF} \def\PDFexecuteresetform {/ResetForm \PDFformcode\argumentA} \def\PDFexecutesubmitform {/SubmitForm \PDFformcode\argumentB - %/Flags \ifnum\PDFsubmitformat=1 12\fi - %/Flags \ifnum\PDFsubmitformat=1 4\fi + /Flags \ifnum\submitoutputformat=2 12\else4\fi /F (\argumentA)} \def\PDFexecutehide {/Hide /T (\argumentA) /H true} @@ -362,6 +374,9 @@ \def\PDFexecutesearch {/Named /N /Find} \def\PDFexecutesearchagain {/Named /N /FindAgain} \def\PDFexecutegotopage {/Named /N /GoToPage} +\def\PDFexecutequery {/Named /N /AcroSrch:Query} +\def\PDFexecutequeryagain {/Named /N /AcroSrch:NextHit} + \def\doPDFstartexecutecommand#1#2#3#4% {\doifdefined{PDFexecute#3} @@ -513,10 +528,11 @@ \def\doPDFinsertsoundtrack#1#2#3% {\bgroup \xdef\currentsound{#2}% - \doPDFannotation width 0 height 0 data - {/Subtype /Movie - /T (sound \currentsound) - /Movie <</F (#1)>>}% + \flushatshipout % since it can be buried in a chained box + {\doPDFannotation width 0 height 0 data + {/Subtype /Movie + /T (sound \currentsound) + /Movie <</F (#1)>>}}% \egroup} %D \macros diff --git a/tex/context/base/spec-ini.tex b/tex/context/base/spec-ini.tex index f1a37104e..8e4586f72 100644 --- a/tex/context/base/spec-ini.tex +++ b/tex/context/base/spec-ini.tex @@ -66,6 +66,28 @@ 7: neznamy ovladac (driver) -- \stopmessages +\startmessages italian library: specials + title: specialità + 1: -- caricato + 2: non è permesso un annidamento maggiore -- + 3: -- reimpostato + 4: il comando -- non esiste + 5: caricamento del file di definizione -- + 6: annidamento non permesso + 7: driver sconosciuto -- +\stopmessages + +\startmessages norwegian library: specials + title: specials + 1: -- er lest inn + 2: dypere 'nesting' er ikke tillatt -- + 3: -- er tilbakestilt + 4: kommando -- eksisterer ikke + 5: leser inn definisjonsfil for -- + 6: 'nesting' er ikke tillatt + 7: ukjent driver -- +\stopmessages + \startmessages dutch library: interactions 21: -- code tussengevoegd \stopmessages @@ -82,6 +104,14 @@ 21: -- kod vlozen \stopmessages +\startmessages italian library: interactions + 21: codice -- inserito +\stopmessages + +\startmessages norwegian library: interactions + 21: -- kode satt inn / tilføyd +\stopmessages + %D \TEX\ produces files in the \DVI\ format. This format is %D well defined and stable. In this format one||byte commands %D are used which can optionally be followed by length @@ -272,11 +302,11 @@ \addtocommalist\currentspecial\preloadedspecials} \def\startspecials% - {\pushmacro\currentspecial + {\localpushmacro\currentspecial \dodoubleempty\dostartspecials} \def\stopspecials% - {\popmacro\currentspecial + {\localpopmacro\currentspecial \protect} %D \macros diff --git a/tex/context/base/spec-mis.tex b/tex/context/base/spec-mis.tex index 2722ee686..ae7c61e44 100644 --- a/tex/context/base/spec-mis.tex +++ b/tex/context/base/spec-mis.tex @@ -121,6 +121,15 @@ \fi +%D When submitting forms, we need to communicate the format. + +\chardef\submitoutputformat=0 % 0=unknown 1=HTML 2=FDF + +\def\setsubmitoutputformat#1% + {\doifinsetelse{#1}{FDF,fdf} + {\chardef\submitoutputformat=2} + {\chardef\submitoutputformat=1}} + \protect \endinput diff --git a/tex/context/base/spec-pdf.tex b/tex/context/base/spec-pdf.tex index 377821506..6b1565eff 100644 --- a/tex/context/base/spec-pdf.tex +++ b/tex/context/base/spec-pdf.tex @@ -187,6 +187,9 @@ \definefileinsertion{yy}{mov}{\doPDFinsertmov} \definefileinsertion{tr}{mov}{\doPDFinsertmov} +\definefileinsertion{yy}{avi}{\doPDFinsertmov} +\definefileinsertion{tr}{avi}{\doPDFinsertmov} + %D \macros %D {doinsertsoundtrack} %D @@ -433,25 +436,22 @@ %D Next come our housekeeping macros. \def\doPDFaddtocatalog#1% - {\special - {\@@insertpostscriptretain - [ {Catalog} << #1 >> - /PUT - pdfmark}} + {\doifsomething{#1} + {\special + {\@@insertpostscriptretain + [ {Catalog} << #1 >> /PUT pdfmark}}} \def\doPDFpageattribute#1% - {\special - {\@@insertpostscriptretain - [ {ThisPage} #1 - /PUT - pdfmark}} + {\doifsomething{#1} + {\special + {\@@insertpostscriptretain + [ {ThisPage} << #1 >> /PUT pdfmark}}} \def\doPDFpagesattribute#1% - {\special - {\@@insertpostscriptretain - [ #1 - /PAGES - pdfmark}} + {\doifsomething{#1} + {\special + {\@@insertpostscriptretain + [ #1 /PAGES pdfmark}}} \let\doPDFresetpageattributes=\relax diff --git a/tex/context/base/spec-ps.tex b/tex/context/base/spec-ps.tex index 2906f0e6b..9a5a81490 100644 --- a/tex/context/base/spec-ps.tex +++ b/tex/context/base/spec-ps.tex @@ -75,7 +75,7 @@ {\special {\@@insertpostscriptliteral gsave currentpoint currentpoint translate - #1 rotate neg exch neg exch translate}} + \number#1\space\space rotate neg exch neg exch translate}} \definespecial\dostoprotation% {\special diff --git a/tex/context/base/spec-tpd.tex b/tex/context/base/spec-tpd.tex index 3b6065ec9..d7059a8b5 100644 --- a/tex/context/base/spec-tpd.tex +++ b/tex/context/base/spec-tpd.tex @@ -169,10 +169,11 @@ \definefileinsertion{tpd}{mps}#1#2#3#4#5#6#7#8#9% {\hbox - {\convertMPcolors{#1}% + {%\convertMPcolors{#1}% plugged in supp-mpe \scratchdimen=#3pt \PointsToReal{.01\scratchdimen}\xscale \scratchdimen=#4pt \PointsToReal{.01\scratchdimen}\yscale - \convertMPtoPDF{#1}\xscale\yscale}} + \convertMPtoPDF{#1}\xscale\yscale + \global\let\PDFimagereference\empty}} %D The old, \TEX\ base \PDF\ insertion macro: %D @@ -263,6 +264,7 @@ %D general \PDF\ one. \definefileinsertion{tpd}{mov}{\doPDFinsertmov} +\definefileinsertion{tpd}{avi}{\doPDFinsertmov} %D \macros %D {doinsertsoundtrack} @@ -358,6 +360,11 @@ \def\dogetfiguresizetif{\dogetTPDfiguresize\normaldogetfiguresizetif} \def\dogetfiguresizejpg{\dogetTPDfiguresize\normaldogetfiguresizejpg} +\appendtoks \let\dogetfiguresizepdf\normaldogetfiguresizepdf \to \everyresetspecials +\appendtoks \let\dogetfiguresizepng\normaldogetfiguresizepng \to \everyresetspecials +\appendtoks \let\dogetfiguresizetif\normaldogetfiguresizetif \to \everyresetspecials +\appendtoks \let\dogetfiguresizejpg\normaldogetfiguresizejpg \to \everyresetspecials + %D \macros %D {doregisterfigure} %D diff --git a/tex/context/base/spec-tr.tex b/tex/context/base/spec-tr.tex index 5a29ed1e0..1d12a80b5 100644 --- a/tex/context/base/spec-tr.tex +++ b/tex/context/base/spec-tr.tex @@ -73,7 +73,7 @@ {\special {\@@insertpostscriptliteral gsave currentpoint currentpoint translate - #1 neg rotate neg exch neg exch translate}} + \number#1\space\space neg rotate neg exch neg exch translate}} \definespecial\dostoprotation% {\special diff --git a/tex/context/base/supp-ali.tex b/tex/context/base/supp-ali.tex new file mode 100644 index 000000000..363c239bc --- /dev/null +++ b/tex/context/base/supp-ali.tex @@ -0,0 +1,140 @@ +%D \module +%D [ file=supp-ali, +%D version=2000.4.17, +%D title=\CONTEXT\ Support Macros, +%D subtitle=Alignment, +%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. + +%D Yet undocumented. + +% 0 = centered +% 1 = left in before +% 2 = right in before +% 3 = left in after +% 4 = right in after + +\unprotect + +\chardef\characteralignmentmode=4 + +\let\afterassignwidth \!!zeropoint +\let\beforeassignwidth\!!zeropoint + +\def\alignmentcharacter{.} + +\let\alignmentclass\s!default % can be used to handle multiple mixed ones + +\def\setfirstpasscharacteralign% + {\popcharacteralign + \expanded{\dosetfirstpasscharacteralign{\alignmentcharacter}}} + +\def\dosetfirstpasscharacteralign#1% + {\def\checkalignment##1% + {\popcharacteralign + \setbox\scratchbox=\hbox{#1}% + \edef\characterassignwidth{\the\wd\scratchbox}% + \setbox\scratchbox=\hbox{}% + \docheckalignment#1##1#1\relax\relax + \scratchdimen=-\wd\scratchbox + \setbox\scratchbox=\hbox{##1}% + \advance\scratchdimen by \wd\scratchbox + \ifdim\scratchdimen>\beforeassignwidth\relax + \edef\beforeassignwidth{\the\scratchdimen}% + \fi + \ifdim\scratchdimen=\!!zeropoint + \setbox\scratchbox=\hbox{##1}% + \scratchdimen=\wd\scratchbox + \ifnum\characteralignmentmode=0 + % do nothing + \else\ifnum\characteralignmentmode<3 + \advance\scratchdimen by \characterassignwidth + \ifdim\scratchdimen>\beforeassignwidth\relax + \edef\beforeassignwidth{\the\scratchdimen}% + \fi + \else + \ifdim\scratchdimen>\afterassignwidth\relax + \edef\afterassignwidth{\the\scratchdimen}% + \fi + \fi\fi + \fi + \pushcharacteralign}% + \def\docheckalignment##1#1##2##3\relax% + {\ifx##2\relax + \setbox\scratchbox=\hbox{##1}% + \ifdim\wd\scratchbox>\afterassignwidth + \edef\afterassignwidth{\the\wd\scratchbox}% + \fi + \else + \docheckalignment##2##3\relax + \fi}} + +\def\setsecondpasscharacteralign% + {\popcharacteralign + \expanded{\dosetsecondpasscharacteralign{\alignmentcharacter}}} + +\def\dosetsecondpasscharacteralign#1% + {\def\checkalignment##1% + {\popcharacteralign + \setbox\scratchbox=\hbox{#1}% + \edef\characterassignwidth{\the\wd\scratchbox}% + \setbox\scratchbox=\hbox{}% + \docheckalignment#1##1#1\relax\relax + \scratchdimen=\wd\scratchbox + \setbox\scratchbox=\hbox{##1}% + \ifdim\scratchdimen=\wd\scratchbox + \ifcase\characteralignmentmode + \noindent\box\scratchbox + \else + \noindent\hbox + {\dontcomplain + \hbox to \beforeassignwidth + {\ifcase\characteralignmentmode\or + \box\scratchbox\hss + \or + \hss\box\scratchbox\hskip\characterassignwidth + \or + \hss\rlap{\box\scratchbox}% + \or + \hss\rlap{\hbox to \afterassignwidth{\hss\box\scratchbox}}% + \fi}% + \hskip\afterassignwidth}% + \fi + \else + \noindent\hbox + {\hbox to \beforeassignwidth + {\hss\box\scratchbox\hskip-\scratchdimen}% + \hskip\afterassignwidth}% + \fi}% + \def\docheckalignment##1#1##2##3\relax% + {\ifx##2\relax + \setbox\scratchbox=\hbox{##1}% + \else + \docheckalignment##2##3\relax + \fi}} + +% provide a means to use multiple alignments mixed + +\def\pushcharacteralign% + {\setxvalue{@cac@\alignmentclass}{\noexpand\do + {\afterassignwidth}{\beforeassignwidth}{\alignmentcharacter}}} + +\def\popcharacteralign% + {\def\do##1##2##3% + {\def\afterassignwidth {##1}% + \def\beforeassignwidth {##2}% + \def\alignmentcharacter{##3}}% + \getvalue{@cac@\alignmentclass}} + +\long\def\startcharacteralign#1\stopcharacteralign% + {\bgroup + \setfirstpasscharacteralign #1% + \setsecondpasscharacteralign#1% + \egroup} + +\protect \endinput diff --git a/tex/context/base/supp-box.tex b/tex/context/base/supp-box.tex index abc14fc67..aa6f3a7d5 100644 --- a/tex/context/base/supp-box.tex +++ b/tex/context/base/supp-box.tex @@ -18,6 +18,12 @@ \writestatus{loading}{Context Support Macros / Boxes} \unprotect + +%D First a hack to make this module loadable in plain \TEX. + +\ifx\outer\relax \else + \def\newbox{\alloc@4\box\chardef\insc@unt} +\fi %D \macros %D {nextdepth} @@ -111,8 +117,7 @@ %D \stoptypen \def\getboxheight#1\of#2\box#3% - {#1=\ht#3% - \advance#1 by \dp#3\relax} + {#1=\ht#3\advance#1 by \dp#3\relax} %D \macros %D {doiftextelse, doiftext} @@ -183,6 +188,9 @@ \afterassignment\dododowithnextbox \setbox\nextbox} +\def\dododowithnextbox% + {\aftergroup\dodowithnextbox} + % Better but first to be checked: % %\long\def\dowithnextbox#1% @@ -190,9 +198,6 @@ % \afterassignment\dododowithnextbox % \setbox\nextbox} -\def\dododowithnextbox% - {\aftergroup\dodowithnextbox} - %D So in fact we get: %D %D \starttypen @@ -225,7 +230,29 @@ %D \stoptypen %D %D This alternative also accepts \type{\box0} and alike, but -%D we don't really need this functionality now. +%D we don't really need this functionality now. + +%D \macros +%D {dowithnextboxcontent} +%D +%D But, occasionally we do need to pass some local settings +%D without wanting to use additional grouping. Therefore we +%D provide: +%D +%D \starttypen +%D \dowithnextboxcontent{inside}{after}{box content} +%D \stoptypen + +\long\def\dowithnextboxcontent#1#2% inside, after + {\long\def\dodowithnextbox{#2}% + \def\dododowithnextbox{#1\aftergroup\dodowithnextbox}% + \afterassignment\dododowithnextbox + \setbox\nextbox} + +%D Now we can redefine \type {\dowithnextbox} as follows: + +\def\dowithnextbox% + {\dowithnextboxcontent{}} %D \macros %D {beginofshapebox, @@ -363,7 +390,7 @@ \newcount\shapecounter -\def\reshapebox#1% +\def\reshapebox#1% {\doreshapebox {#1} {\penalty\shapepenalty} @@ -376,50 +403,50 @@ \unvcopy\oldshapebox \setbox\newshapebox=\box\voidb@x \shapecounter=0 - \loop - \someshapelefttrue - \ifdim\lastskip=\!!zeropoint\relax - \ifdim\lastkern=\!!zeropoint\relax - \ifnum\lastpenalty=0 - \setbox\shapebox=\lastbox - \ifvoid\shapebox - \unskip\unpenalty\unkern - \else - \ifdim\wd\shapebox=\shapesignal\relax - \someshapeleftfalse - \else - \shapecounter=0 - \setbox\newshapebox= - \normalvbox{#1\unvbox\newshapebox} - \fi - \fi - \else - \shapepenalty=\lastpenalty - \setbox\newshapebox= - \normalvbox{#2\unvbox\newshapebox} - \unpenalty - \fi + \doloop{\dodoreshapebox{#1}{#2}{#3}{#4}}% + \unvbox\newshapebox + \egroup} + +\def\dodoreshapebox#1#2#3#4% \shapebox, \shapepenalty, \shapekern, \shapeskip + {\ifdim\lastskip=\!!zeropoint\relax + \ifdim\lastkern=\!!zeropoint\relax + \ifnum\lastpenalty=0 + \setbox\shapebox=\lastbox + \ifvoid\shapebox + \unskip\unpenalty\unkern + \else + \ifdim\wd\shapebox=\shapesignal\relax + \exitloop \else - \shapekern=\lastkern + \shapecounter=0 \setbox\newshapebox= - \normalvbox{#3\unvbox\newshapebox} - \unkern + \normalvbox{#1\unvbox\newshapebox} \fi - \else - \shapeskip=\lastskip - \setbox\newshapebox= - \normalvbox{#4\unvbox\newshapebox} - \unskip \fi - \ifnum\shapecounter>100 % can be less - \message{<<forced exit from shapebox>>}% - \someshapeleftfalse \else - \advance\shapecounter by 1 + \shapepenalty=\lastpenalty + \setbox\newshapebox= + \normalvbox{#2\unvbox\newshapebox} + \unpenalty \fi - \ifsomeshapeleft \repeat - \unvbox\newshapebox - \egroup} + \else + \shapekern=\lastkern + \setbox\newshapebox= + \normalvbox{#3\unvbox\newshapebox} + \unkern + \fi + \else + \shapeskip=\lastskip + \setbox\newshapebox= + \normalvbox{#4\unvbox\newshapebox} + \unskip + \fi + \ifnum\shapecounter>100 % can be less + \message{<<forced exit from shapebox>>}% + \exitloop + \else + \advance\shapecounter by 1 + \fi} \def\beginofshapebox% {\setbox\oldshapebox=\normalvbox @@ -493,6 +520,21 @@ %D \som \type{\shapekern} %D \som \type{\shapeskip} %D \stopopsomming + +%D \macros +%D {shapedhbox} +%D +%D When constructing a new box, using the content of \type +%D {\shapebox}, one can best use \type {\shapedhbox} instead +%D of \type {\hbox}, since it manages the height and depth of +%D the line. + +\def\shapedhbox% + {\dowithnextbox + {\ht\nextbox=\!!zeropoint + \dp\nextbox=\!!zeropoint + \box\nextbox} + \hbox} %D \macros %D {hyphenatedword, @@ -586,32 +628,48 @@ %D third argument into account, which leads to a bit more %D complex macro than needed at first sight. +% \def\dodoboundtext#1% +% {\setbox0=\hbox{\unhcopy0 #1}% +% \ifdim\wd0>\dimen0 +% \let\dodoboundtext=\gobbleoneargument +% \else +% #1\relax +% \fi} +% +% \def\doboundtext#1#2#3% +% {\hbox +% {\setbox0=\hbox{#1}% +% \dimen0=#2\relax +% \ifdim\wd0>\dimen0 +% \setbox2=\hbox{#3}% +% \advance\dimen0 by -\wd2 +% \setbox0=\hbox{}% +% \processtokens +% {\dodoboundtext} +% {\dodoboundtext} +% {} +% {\space} +% {#1}% +% \box2 +% \else +% \box0 +% \fi}} + \def\dodoboundtext#1% - {\setbox0=\hbox{\unhcopy0 #1}% - \ifdim\wd0>\dimen0 - \let\dodoboundtext=\gobbleoneargument - \else - #1\relax - \fi} + {\setbox2=\hbox{#1}% + \advance\dimen0 by -\wd2 + \ifdim\dimen0>\!!zeropoint\relax#1\fi}% \def\doboundtext#1#2#3% {\hbox {\setbox0=\hbox{#1}% \dimen0=#2\relax \ifdim\wd0>\dimen0 - \setbox2=\hbox{#3}% - \advance\dimen0 by -\wd2 - \setbox0=\hbox{}% - \processtokens - {\dodoboundtext} - {\dodoboundtext} - {} - {\space} - {#1}% - \box2 - \else - \box0 - \fi}} + \setbox0=\hbox{#3}% + \advance\dimen0 by -\wd0 + \handletokens#1\with\dodoboundtext + \fi + \box0}} %D \macros %D {limitatetext} @@ -630,33 +688,104 @@ \ifx\fakecompoundhyphen\undefined \let\fakecompoundhyphen\relax \fi +%D The simple alternative is as follows: +%D +%D \starttypen +%D \unexpanded\def\limitatetext% +%D {\bgroup % evt \setstrut +%D \fakecompoundhyphen % dangerous ! ! ! ! ! ! ! ! ! +%D \dowithnextbox\dolimitatetext\hbox} +%D +%D \def\dolimitatetext#1#2% +%D {\doifelsenothing{#1} +%D {\unhbox\nextbox} +%D {\widowpenalty=0 +%D \clubpenalty=0 +%D \scratchdimen=#1\relax +%D \ifdim\wd\nextbox>\scratchdimen +%D \setbox\scratchbox=\hbox{ #2}% +%D \advance\scratchdimen by -\wd\scratchbox +%D \setbox\nextbox=\vbox +%D {\hsize=\scratchdimen +%D \hfuzz\maxdimen +%D \veryraggedright +%D \strut\unhcopy\nextbox}% +%D \ifdim\ht\nextbox>\ht\strutbox \else +%D \setbox\scratchbox\null % overfull and not split +%D \fi +%D \setbox\nextbox=\vbox % if omitted: missing brace reported +%D {\splittopskip=\openstrutheight +%D \setbox\nextbox=\vsplit\nextbox to \ht\strutbox +%D \unvbox\nextbox +%D \setbox\nextbox=\lastbox +%D \global\setbox1=\hbox +%D {\unhbox\nextbox\unskip\kern\!!zeropoint\box\scratchbox\unskip}}% +%D \unhbox1 +%D \else +%D \unhbox\nextbox +%D \fi}% +%D \egroup} +%D \stoptypen +%D +%D The next alternative accepts a negative width. A negative +%D value crops the beginning. The macro thereby becomes less +%D readable, which is why we kept the original here too. + \unexpanded\def\limitatetext% - {\bgroup + {\bgroup % evt \setstrut + \fakecompoundhyphen % dangerous ! ! ! ! ! ! ! ! ! \dowithnextbox\dolimitatetext\hbox} - + \def\dolimitatetext#1#2% {\doifelsenothing{#1} {\unhbox\nextbox} - {\fakecompoundhyphen - \widowpenalty=0 + {\widowpenalty=0 \clubpenalty=0 \scratchdimen=#1\relax + \ifdim\scratchdimen<\!!zeropoint\relax % we'll take the last line + \donefalse + \scratchdimen=-\scratchdimen + \else + \donetrue + \fi \ifdim\wd\nextbox>\scratchdimen - \setbox\scratchbox=\hbox{ #2}% + \setbox\scratchbox=\hbox{\ifdone\space#2\else#2\space\fi}% \advance\scratchdimen by -\wd\scratchbox + \setbox0=\box\nextbox \setbox\nextbox=\vbox {\hsize=\scratchdimen \hfuzz\maxdimen \veryraggedright - \strut\unhbox\nextbox}% - \setbox\nextbox=\vbox % if omitted: missing brace reported - {\splittopskip=\openstrutheight - \setbox\nextbox=\vsplit\nextbox to \ht\strutbox - \unvbox\nextbox - \setbox\nextbox=\lastbox - \global\setbox1=\hbox - {\unhbox\nextbox\unskip\kern\!!zeropoint\box\scratchbox\unskip}}% - \unhbox1 + \strut + \ifdone \else + \parfillskip=\!!zeropoint + \rightskip=\!!zeropoint + \hskip\!!zeropoint \!!plus 1\!!fill % \hsize + \fi + \unhcopy0}% + \ifdim\ht\nextbox>\ht\strutbox + \setbox\nextbox=\vbox % if omitted: missing brace reported + {\splittopskip=\openstrutheight + \ifdone + \setbox\nextbox=\vsplit\nextbox to \ht\strutbox + \else + \doloop + {\setbox0=\vsplit\nextbox to \ht\strutbox + \ifdim\ht\nextbox>\ht\strutbox \else \exitloop \fi}% + \fi + \unvbox\nextbox + \setbox\nextbox=\lastbox + \global\setbox1=\hbox + {\ifdone + \unhbox\nextbox\unskip\kern\!!zeropoint\box\scratchbox + \else + \box\scratchbox\unhbox\nextbox + \fi + \unskip}}% + \unhbox1 + \else + \unhbox0 + \fi \else \unhbox\nextbox \fi}% @@ -757,6 +886,8 @@ %D In order to prevent problems with nested isolated words, we %D do process them, but only split at the outermost level. +\newskip\isolatedlastskip + \def\processisolatedwords#1#2% todo: vbox ipv hbox ivm afbreken! {\bgroup % todo: doloop \fakecompoundhyphen @@ -768,7 +899,7 @@ \global\let\localbetweenisolatedwords\betweenisolatedwords \setbox0=\hbox % we default to spaces, but from inside out {\ignorespaces#1% \localbetweenisolatedwords can be overruled - \xdef\isolatedlastskip{\the\lastskip}}% + \global\isolatedlastskip=\lastskip}% \setbox2=\vbox {%\hyphenpenalty10000 % this one fails in \url breaking, \lefthyphenmin=\!!maxcard % but this trick works ok, due to them @@ -792,11 +923,20 @@ \vbox % outer \hbox needed {\unvbox4 % for nested use \setbox4=\lastbox - \hbox{#2{\hbox{\unhbox4}}}}}% - \ifdim\ht2>\!!zeropoint \localbetweenisolatedwords \repeat + \hbox{#2{\hbox + {\unhbox4 + \unskip\unpenalty % remove end of line stuff + \global\dimen1=\lastkern}}}}}% + \ifdim\ht2>\!!zeropoint\relax + \ifdim\dimen1=\compoundbreakpoint + \allowbreak + \else + \localbetweenisolatedwords + \fi + \repeat \unskip}% \unhbox0\unskip - \ifdim\isolatedlastskip=\!!zeropoint\else % added + \ifdim\isolatedlastskip=\!!zeropoint\relax\else % added \hskip\isolatedlastskip \fi \fi @@ -1003,45 +1143,41 @@ \advance\hsize by \scratchdimen \divide\hsize by #3\relax} +\newbox\rigidcolumnbox + \def\rigidcolumnbalance#1% - {\global\chardef\rigidcolumnbox=#1\relax - \ifnum\rigidcolumns=1 - \ifinner\ifhmode\box\else\unvbox\fi\else\unvbox\fi\rigidcolumnbox + {\ifnum\rigidcolumns=1 % tzt ook h/d correctie + \ifinner\ifhmode\box\else\unvbox\fi\else\unvbox\fi#1\relax \else - \hbox to \savedrigidhsize % was \hsize - {\vbadness=10000 - \tabskip\!!zeropoint + \vbox + {\forgetall + \dontcomplain \setbox\rigidcolumnbox=\vbox - {\unvbox\rigidcolumnbox - \unpenalty\removelastskip}% get rid of \blank's - %\splittopskip=\openstrutheight - \splittopskip=\!!zeropoint - %\scratchdimen=\ht\rigidcolumnbox % sensitive for overflow - %\divide\scratchdimen by \rigidcolumns % therefore we need the hack: - \scratchdimen=1pt - \divide\scratchdimen by \rigidcolumns - \expanded{\scratchdimen=\withoutpt{\the\scratchdimen}\ht\rigidcolumnbox}% - \advance\scratchdimen by \ht\strutbox - \valign{##\vfill\cr\dorigidcolumnsplits}}% - \fi} - -\def\dorigidcolumnsplits% - {\ifnum\rigidcolumns>0 - \setbox\scratchbox=\vsplit\rigidcolumnbox to \scratchdimen - \hbox to \hsize - \bgroup - \ifalignrigidcolumns - \vbox to \ifstretchrigidcolumns\vsize\else\scratchdimen\fi - {\unvbox\scratchbox}% - \else - \vbox{\unvbox\scratchbox}% - \fi - \hss - \egroup - \doglobal\decrement\rigidcolumns - \cr - \ifnum\rigidcolumns>0\noalign{\hfil}\fi - \expandafter\dorigidcolumnsplits + {\line{}\goodbreak\unvbox#1\removebottomthings}% + \splittopskip=\openstrutheight + \setbox\scratchbox=\vsplit\rigidcolumnbox to \!!zeropoint + \scratchdimen=\ht\rigidcolumnbox + \divide\scratchdimen by \rigidcolumns + \getnoflines\scratchdimen + \scratchdimen=\noflines\lineheight + \setbox\scratchbox=\hbox to \savedrigidhsize + {\dorecurse{\rigidcolumns} + {\setbox\scratchbox=\vsplit\rigidcolumnbox to \scratchdimen + \dp\scratchbox=\openstrutdepth + \setbox\scratchbox=\vtop + \ifalignrigidcolumns to + \ifstretchrigidcolumns\vsize\else\scratchdimen\fi + \fi + {\unvbox\scratchbox}% + \wd\scratchbox=\hsize + \box\scratchbox + \hfill}% + \hfillneg}% + \advance\scratchdimen by -\openstrutdepth + \setbox\scratchbox\hbox{\raise\scratchdimen\box\scratchbox} + \dp\scratchbox=\openstrutdepth + \ht\scratchbox=\scratchdimen + \box\scratchbox} \fi} %D \macros @@ -1492,6 +1628,19 @@ \egroup} \hbox} +%D \macros +%D {lhbox,mhbox,rhbox} +%D +%D A few more boxes. + +\def\lhbox{\dowithnextbox{\hbox to \hsize{\box\nextbox\hss }}\hbox} +\def\mhbox{\dowithnextbox{\hbox to \hsize{\hss\box\nextbox\hss}}\hbox} +\def\rhbox{\dowithnextbox{\hbox to \hsize{\hss\box\nextbox }}\hbox} + +\let\lefthbox =\lhbox +\let\midhbox =\mhbox +\let\righthbox=\rhbox + %D \macros %D {boxofsize} %D @@ -1641,6 +1790,71 @@ \def\middlebox#1% {\hbox{\setbox0=\placedbox{#1}\boxoffset=-.5\wd0\rightbox{\box0}}} +%D \macros +%D {initializeboxstack,savebox,foundbox} +%D +%D At the cost of some memory, but saving box registers, we +%D have implemented a box repository. +%D +%D \starttypen +%D \initializeboxstack{one} +%D +%D \savebox{one}{a}{test a} +%D \savebox{one}{p}{test p} +%D \savebox{one}{q}{test q} +%D +%D \hbox{a:\foundbox{one}{a}} \par +%D \hbox{q:\foundbox{one}{q}} \par +%D \hbox{p:\foundbox{one}{p}} \par +%D \hbox{x:\foundbox{one}{x}} \par +%D \hbox{y:\foundbox{two}{a}} \par +%D \stoptypen + +\def\@@stackbox{boxstack:b:} +\def\@@stackmax{boxstack:m:} +\def\@@stacktag{boxstack:t:} + +\def\initializeboxstack#1% + {\ifundefined{\@@stackbox#1}% + \@EA\newbox\csname\@@stackbox#1\endcsname + \else + \@EA\global\@EA\setbox\csname\@@stackbox#1\endcsname\vbox{}% + \fi + % actually we should erase the old values + \setgvalue{\@@stackmax#1}{0}} + +\def\savebox#1#2% stack name + {\dowithnextbox + {\doifdefined{\@@stackbox#1} + {\@EA\doglobal\@EA\increment\csname\@@stackmax#1\endcsname + \setxvalue{\@@stacktag#2}{\csname\@@stackmax#1\endcsname}% + \global\setbox\csname\@@stackbox#1\endcsname=\vbox + {\forgetall + \setbox\scratchbox=\vbox{\box\nextbox} + \ht\scratchbox=\!!onepoint + \dp\scratchbox=\!!zeropoint + \unvbox\csname\@@stackbox#1\endcsname + \offinterlineskip + \allowbreak + \box\scratchbox}}}% + \vbox} + +\def\foundbox#1#2% + {\vbox + {\doifdefined{\@@stackbox#1} + {\doifdefined{\@@stacktag#2} + {\setbox\scratchbox=\vbox + {\splittopskip\!!zeropoint + \setbox0=\copy\csname\@@stackbox#1\endcsname + \dimen0=\getvalue{\@@stacktag#2}pt + \advance\dimen0 by -\!!onepoint + \setbox2=\vsplit0 to \dimen0 + \ifdim\ht0>\!!onepoint + \setbox0=\vsplit0 to \!!onepoint + \fi + \unvbox0\setbox0=\lastbox\unvbox0}% + \unvbox\scratchbox}}}} + %D \macros %D {removedepth, obeydepth} %D @@ -1654,6 +1868,42 @@ \def\obeydepth% {\par \removedepth \ifvmode \kern\dp\strutbox \fi} +%D \macros +%D {removebottomthings, removelastskip} +%D +%D A funny (but rather stupid) one, plus a redefinition. + +\def\removebottomthings% + {\dorecurse{5}{\unskip\unkern\unpenalty}} + +\def\removelastskip% \ifvmode the plain tex one \fi + {\ifvmode\ifdim\lastskip=\z@\else\vskip-\lastskip\fi\fi} + +%D \macros +%D {raisebox,lowerbox} +%D +%D Some more box stuff, related to positioning (under +%D construction). Nice stuff for a tips and tricks maps +%D article. +%D +%D \starttypen +%D \raisebox{100pt}\hbox{test} +%D \raisebox50pt\hbox{test} +%D \hsmash{\raisebox{100pt}\hbox{test}} +%D \stoptypen + +\def\doraiselowerbox#1#2% a nice trick us used to accept + {\def\next% % both direct and {} dimensions + {\dowithnextbox + {\setbox\nextbox=\hbox{#1\scratchdimen\box\nextbox}% + \ht\nextbox=\ht\strutbox + \dp\nextbox=\dp\strutbox + \box\nextbox}}% + \afterassignment\next\scratchdimen=#2} + +\def\raisebox{\doraiselowerbox\raise} +\def\lowerbox{\doraiselowerbox\raise} + % maybe some day we need this % % \def\appendvbox#1% % uses \box8 diff --git a/tex/context/base/supp-emp.tex b/tex/context/base/supp-emp.tex new file mode 100644 index 000000000..2f8a72710 --- /dev/null +++ b/tex/context/base/supp-emp.tex @@ -0,0 +1,382 @@ +%D \module +%D [ file=supp-emp, +%D version=2000.08.09, +%D title=\CONTEXT\ Support Macros, +%D subtitle=\EMTEX\ specials to \PDF\ conversion, +%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. + +%D When \THANH, the author of \PDFTEX, and I were exchanging +%D some emails on \PDFTEX\ functionality, positional +%D information popped up as potential extension. Actually, it +%D did not take that much time to cook up the basic +%D functionality and the author had implemented it before I +%D could even start to think about real advanced applications. +%D +%D I'm sure that \TEX\ programmers can spend many days on how +%D and what kind of information is needed if you want to have +%D access to positions, but since high level macros will +%D probably be used anyway, even things like multiple reference +%D points have proved to be rather unimportant at the system +%D level. +%D +%D Therefore, \PDFTEX\ provides just these three primitives: +%D +%D \starttabulatie[|l|l|] +%D \NC \type {\pdfsavepos} \NC marks the current position \NC \NR +%D \NC \type {\pdflastxpos} \NC the last marked horizontal position \NC \NR +%D \NC \type {\pdflastypos} \NC the last marked vertical position \NC \NR +%D \stoptabulatie +%D +%D Based on these three primitives, very advanced systems can +%D be build, and for some time now, \CONTEXT\ has such a +%D system in its core. However, not everyone uses \CONTEXT, so +%D we will demonstrate position tracking in generic applications. +%D +%D Because \PDFTEX\ produces its output directly, many of those +%D nice tricks provided by back||ends by means of \type +%D {\special} fail when producing \PDF\ code directly. Take for +%D instance \EMTEX\ specials. When someone sent me a mail +%D asking if \PDFTEX\ did support those specials, the original +%D answer was \citaat {no}, but in the last few years I have learned +%D that you must never underestimate \TEX's capabilities. +%D +%D I must admit that I never use those specials myself, but +%D from the way they were used in the macros I was sent, I +%D learned that they depend on the back||end's capability to +%D access the current position. For those who know \TEX\ this +%D may be bad news, since pure \TEX\ does not provide any +%D positional information. So in order to use those specials, +%D you must be sure that they are supported by every driver you +%D use. However, the good news is that \PDFTEX\ does support +%D position tracking, so here is our generic example. +%D +%D The two \EMTEX\ specials we need to implement are packaged +%D into the macros \type {\EMmoveto} and \type {\EMlineto}, +%D like: +%D +%D \starttypen +%D \def\EMmoveto{\special{em:moveto}} +%D \def\EMlineto{\special{em:lineto}} +%D \stoptypen +%D +%D They are used in macro packages to draw lines, and the +%D results are often boxes with content like the following: +%D +%D \startbuffer +%D \vbox to 2cm +%D {\offinterlineskip \EMmoveto +%D \hskip 7cm \EMlineto +%D \vskip 2cm \EMlineto +%D \vskip-2cm \EMlineto} +%D \stopbuffer +%D +%D \typebuffer +%D +%D This box will contain a triangle, and when typeset, it should +%D look like: +%D +%D \startregelcorrectie[blanko] +%D \haalbuffer +%D \stopregelcorrectie + +\ifx\dosetpositionpt\undefined % non context part + +%D These two macros can be implemented as follows. When moving +%D to a position, we only have to register the new coordinates. +%D Once they are known, we use them to draw a line and +%D afterwards we save these end coordinates as starting point +%D for the next line segment. So, at each point specified by +%D \type {\EMlineto} we need to know the coordinates. + +\def\EMmoveto% + {\EMgetposition\EMlastmovex\EMlastmovey} + +%D The primitives \type {\pdflastxpos} and \type +%D {\pdflastypos} return a number, representing the $x$ and +%D $y$ coordinate in scaled points, \TEX's smallest unit of +%D length. We need to convert this number into base points as +%D used by \POSTSCRIPT\ and \PDF. When done, we insert some +%D literal \PDF\ code into the text using \type {\pdfliteral}. +%D Here, the \type {m} means \citeer {moveto}, the \type {l} +%D means \citeer {lineto} and the \type {S} operator \citeer +%D {strokes} (draws) the line. The macro \type {\EMlinewd} +%D holds the linewidth in basepoints. + +\def\EMlinewd{.4} + +\def\EMlineto% + {\bgroup + \EMgetposition\EMlastlinex\EMlastliney + \count0=\EMlastmovex \advance\count0 by -\EMlastlinex + \count2=\EMlastmovey \advance\count2 by -\EMlastliney + \divide\count0 by 65536 + \divide\count2 by 65536 + \pdfliteral{\EMlinewd\space w 0 0 m \the\count0 \space\the\count2 \space l S}% + \global\let\EMlastmovex\EMlastlinex + \global\let\EMlastmovey\EMlastliney + \egroup} + +%D We need a fresh start, so we first set the current position +%D to zero. + +\def\resetEMspecials% + {\gdef\EMlastmovex{0}\gdef\EMlastmovey{0}} + +%D Next comes the macro that keeps track of the position. The +%D current position is marked with \type {\pdfsavepos} and its +%D coordinates are written to a file whenever the page is +%D shipped out, since \type {\write} postpones its action +%D until that moment. The file has entries like: +%D +%D \starttypen +%D \EMsetpos 1 4661756 46651918 +%D \EMsetpos 2 5000359 46990521 +%D \EMsetpos 3 4661756 46313315 +%D \EMsetpos 4 5338962 46990521 +%D \EMsetpos 5 4661756 45974712 +%D \stoptypen +%D +%D These lines are written with the command: +%D +%D \starttypen +%D \write\EMfile +%D {\EMsetpos\number\EMcounter +%D \space\number\pdflastxpos\space\number\pdflastypos}% +%D \stoptypen +%D +%D In reality the argument to \type {\write} looks slightly +%D more complicated, because we have to make sure that the +%D number of the current position is frozen and \type +%D {\EMsetpos} is not expanded. We do so by explicitly +%D expanding the number beforehand and preventing expansion of +%D \type {\EMsetpos}. + +\def\EMgetposition#1#2% + {\bgroup + \pdfsavepos + \global\advance\EMcounter by 1 + \expandafter\write\expandafter\EMfile\expandafter + {\expandafter\noexpand\expandafter\EMsetpos\number\EMcounter + \space\number\pdflastxpos\space\number\pdflastypos}% + \EMsetcounters + \xdef#1{\the\count0}% + \xdef#2{\the\count2}% + \egroup} + +%D The counter mentioned a few lines ago needs to be +%D declared before it can be used. + +\newcount\EMcounter + +%D We also need a dedicated file slot. + +\newwrite\EMfile + +%D Before we open the file for writing, we read in the data +%D written in the previous pass, but only if the file is +%D present. + +\def\EMfilename{\jobname.emp} + +\def\startEMspecials% + {\resetEMspecials + \openin\scratchread=\EMfilename \relax + \ifeof\scratchread\else \input \EMfilename \relax \fi + \closein\scratchread + \immediate\openout\EMfile=\EMfilename\relax} + +\def\stopEMspecials% + {\closeout\EMfile} + +%D Just to be sure, we test if \type {\scratchread} is defined, +%D and if not, we allocate a slot. + +\ifx\undefined\scratchread \newread\scratchread \fi + +%D This leaves us two commands. The \type {\EMsetpos} command +%D that ends up in the file stores each position in a macro. +%D When this macro is expanded, it assigns the coordinates to +%D two scratch counters. + +\def\EMsetpos#1 #2 #3 % number x y + {\expandafter\xdef\csname EM:#1\endcsname{\count0=#2 \count2=#3}} + +%D This position is recalled with its companion macro. First we +%D set the counters to zero. When the position is unknown, +%D nothing happens since the \type {\csname...} will expand to +%D \type {\relax}. + +\def\EMsetcounters% + {\count0=0 \count2=0 + \csname EM:\the\EMcounter\endcsname} + +%D These macros are rather independent of the macro package you +%D use. For instance, in \CONTEXT\ the following works well: +%D +%D \startbuffer[pos-en] +%D \setuppositioning[unit=ex] +%D \startpositioning +%D \dostepwiserecurse{-10}{10}{1} +%D {\position(0,\recurselevel){\EMmoveto} +%D \position(\recurselevel,0){\EMlineto}} +%D \stoppositioning +%D \stopbuffer +%D +%D \startbuffer[pos-nl] +%D \stelpositionerenin[eenheid=ex] +%D \startpositioneren +%D \dostepwiserecurse{-10}{10}{1} +%D {\positioneer(0,\recurselevel){\EMmoveto} +%D \positioneer(\recurselevel,0){\EMlineto}} +%D \stoppositioneren +%D \stopbuffer +%D +%D \typebuffer[pos-en] +%D +%D Here, we hook the \EMTEX\ macros into an existing text +%D positioning mechanism, which positions the commands +%D using \TEX's skips and kerns. +%D +%D \startregelcorrectie[blanko] +%D \haalbuffer[pos-nl] +%D \stopregelcorrectie +%D +%D Of course one should start and end the file with: +%D +%D \starttypen +%D \startEMspecials +%D \stopEMspecials +%D \stoptypen +%D +%D and, if needed, reset the begin position at each page using: +%D +%D \starttypen +%D \resetEMspecials +%D \stoptypen + +\fi % end of non context part + +\ifx\dosetpositionpt\undefined \else % context part + +%D A few pages ago, we mentioned that \CONTEXT\ has built||in +%D position tracking. This means that when we want to implement +%D this kind of trickery in this macro package, we can fall +%D back on existing functionality. In the following alternative +%D we will also use a few skips. This keeps the source readable +%D and \CONTEXT\ has plenty of unused registers to accomodate +%D this strategy. + +\newcount\EMcounter \def\EMvariable{EM:\the\EMcounter} + +\newskip \EMlastmovex \newskip \EMlastmovey +\newskip \EMlastlinex \newskip \EMlastliney + +\def\resetEMspecials% + {\global\EMlastmovex=0pt \global\EMlastmovey=\EMlastmovex} + +\resetEMspecials \appendtoks\resetEMspecials\to\everyshipout + +%D Watch how we reset the specials after a page is flushed. We +%D don't have to bother about files here, because saving and +%D recalling is already implemented. Although not needed, we +%D define the start||stop macros, so that \CONTEXT\ users who +%D key them in are not confronted with error messages. + +\let\startEMspecials\relax \let\stopEMspecials\relax + +\def\EMgetposition#1#2% + {\global\advance\EMcounter 1 + \setposition\EMvariable + \global#1=\POSx\EMvariable + \global#2=\POSy\EMvariable} + +\def\EMmoveto% + {\EMgetposition\EMlastmovex\EMlastmovey} + +\def\EMlineto% + {\EMgetposition\EMlastlinex\EMlastliney + \global\advance\EMlastmovex -\EMlastlinex + \global\advance\EMlastmovey -\EMlastliney + \ScaledPointsToBigPoints{\number\EMlastmovex}\EMx + \ScaledPointsToBigPoints{\number\EMlastmovey}\EMy + \pdfliteral{\EMlinewd\space w 0 0 m \EMx \space \EMy \space l S}% + \global\EMlastmovex\EMlastlinex + \global\EMlastmovey\EMlastliney} + +%D The command \type {\setposition} registers a position by +%D name (here \type {\EMvariable}), while \type {\POSx} and +%D \type {\POSy} give you access to the coordinates. +%D +%D These three commands are containes in a suite of low level +%D commands that can be used to register and get access to +%D positional information. The current mechanism is not yet +%D complete, but already provides enough hooks for advanced +%D embedded graphics. Its functionality is a natural extension +%D to the \METAPOST\ support already present in \CONTEXT. +%D Therefore, more advanced examples can be found in the +%D \METAFUN\ manual, since they fall beyond the scope of this +%D module. + +\fi % end of context part + +%D As a bonus, I will now provide a few macros that will make +%D this mechanism transparant to \DVI\ as well as \PDF\ +%D output. We will use \type {\pdfoutput} as trigger. + +\ifx\pdfoutput\undefined \chardef\pdfoutput=0 \fi + +%D We save some of the macros we defined previously: + +\let\pdfEMmoveto\EMmoveto \let\pdfstartEMspecials\startEMspecials +\let\pdfEMlineto\EMlineto \let\pdfstopEMspecials \stopEMspecials + +%D We now redefine them to support \DVI\ and \PDF. + +\def\EMmoveto{\ifcase\pdfoutput\special{em:moveto}\else\pdfEMmoveto\fi} +\def\EMlineto{\ifcase\pdfoutput\special{em:lineto}\else\pdfEMlineto\fi} + +\def\startEMspecials{\ifcase\pdfoutput\else\pdfstartEMspecials\fi} +\def\stopEMspecials {\ifcase\pdfoutput\else\pdfstopEMspecials \fi} + +%D If there is any real demand for this in \CONTEXT, I will +%D hook these macros in the special drivers, so that their +%D support becomes more natural. + +%D You may want to change the default linewidth. The following +%D macro does the job. Beware of the fact that \type +%D {\special}'s may interfere with the typesetting process. +%D +%D \starttypen +%D \setEMlinewidth{1pt} +%D \stoptypen + +\def\setEMlinewidth#1% this could be done more efficient for + {\bgroup % context alone, but it's a hack anyway + \dimen0=#1\relax + \count0=\dimen0 + \divide\count0 by 65536 + \ifcase\pdfoutput + \special{em:linewidth \the\dimen0}% + \fi + \xdef\EMlinewd{\the\count0}% + \egroup} + +%D You may wonder to what extent positional tracking is +%D \PDFTEX\ specific. In \CONTEXT, we also support position +%D tracking in \DVI\ by using specials and analyzing the \DVI\ +%D file afterwards using a \PERL\ script created by Taco +%D Hoekwater. Since many of the advanced \TEX\ features depend +%D on some kind of back||end, we don't consider it to be a +%D disadvantage. Of course, the \PDFTEX\ way is not only +%D cleaner, but also faster. It was more out of curiosity than +%D out of need that we provided the \DVI\ methods as well. +%D Also, it is always good to have more roads to reach the same +%D goal. + +\protect \endinput diff --git a/tex/context/base/supp-eps.tex b/tex/context/base/supp-eps.tex index ad16fd760..c9374b08e 100644 --- a/tex/context/base/supp-eps.tex +++ b/tex/context/base/supp-eps.tex @@ -19,7 +19,7 @@ %D were put in \type{supp-pdf}, I considered it more suitable %D to give the \EPS\ macros their own module. -\writestatus{loading}{Context Support Macros / PDF} +\writestatus{loading}{Context Support Macros / EPS} %D \macros %D {dogetEPSboundingbox} @@ -61,13 +61,17 @@ \let\EPSurx\!!zeropoint \let\MPurx\EPSurx % in fast mode we set \let\EPSury\!!zeropoint \let\MPury\EPSury % them to 0pt. -\chardef\EPSfound=0 \chardef\EPScreator=0 \chardef\EPSspecial=0 +\chardef\EPSfound =0 +\chardef\EPScreator=0 +\chardef\EPSspecial=0 +\chardef\EPSstatus =0 \def\dogetEPSboundingbox#1#2#3#4#5% {\bgroup \global\chardef\EPSfound=0 \global\chardef\EPScreator=0 \global\chardef\EPSspecial=0 + \global\chardef\EPSstatus=0 \uncatcodespecials \def\doprocessEPSline% {\expandafter\checkEPSboundingbox\fileline:. \end}% @@ -86,6 +90,7 @@ #4=\!!zeropoint #5=\!!zeropoint \fi + %\message{[bbox #1: \EPSllx\space\EPSurx\space\EPSlly\space\EPSury]}% \global\let\MPllx\EPSllx \global\let\MPlly\EPSlly \global\let\MPurx\EPSurx \global\let\MPury\EPSury} @@ -98,6 +103,8 @@ \gdef\EPScreatortag {%Creator} \gdef\EPSmetaposttag { MetaPost :. } \gdef\EPSmetapostspecialtag {%MetaPostSpecial} +\gdef\EPSmetapostspecialstag{%MetaPostSpecials} +\gdef\EPSpagetag {%Page} \egroup \long\def\checkEPSboundingbox#1#2:#3\end% @@ -118,10 +125,22 @@ \global\chardef\EPSfound=2 \dofinishfile \else\ifx\!!stringa\EPSmetapostspecialtag % only before finish! - \global\chardef\EPSspecial=1 - \fi\fi\fi\fi\fi + \global\chardef\EPSspecial=1 % ah, we've met some MP extensions + \else\ifx\!!stringa\EPSmetapostspecialstag % only before finish! + \global\chardef\EPSspecial=1 % ah, we've met some MP extensions + \else\ifx\!!stringa\EPSpagetag + \global\chardef\EPSstatus=1 % we passed MP font defs + \fi\fi\fi\fi\fi\fi\fi \else\ifnum\EPSfound>0 - \dofinishfile + \ifnum\EPScreator=1 % that is, we are dealing with MP output + \ifcase\EPSstatus + % we've run into MP fontdefs + \or + \dofinishfile + \fi + \else + \dofinishfile + \fi \fi\fi} \def\getEPSboundingbox #1 #2 #3 #4 #5\end% diff --git a/tex/context/base/supp-fil.tex b/tex/context/base/supp-fil.tex index 59e21a663..b9b517abb 100644 --- a/tex/context/base/supp-fil.tex +++ b/tex/context/base/supp-fil.tex @@ -30,7 +30,13 @@ \writestatus{loading}{Context Support Macros / Files} \unprotect - + +\ifx\undefined\f!pathseparator + \def\f!pathseparator{/} + \def\f!currentpath {.} + \def\f!parentpath {..} +\fi + %D \macros %D {normalwrite, normalimmediate} %D @@ -86,7 +92,6 @@ \def\unlinkfile#1% {\immediate\openout\scratchwrite=#1\immediate\closeout\scratchwrite} - %D \macros %D {doprocessfile,fileline,fileprocessedtrue,dofinishfile} @@ -95,7 +100,7 @@ %D line by line basis. %D %D \starttypen -%D \processfile \identifier {name} \action +%D \doprocessfile \identifier {name} \action %D \stoptypen %D %D The first argument can for instance be \type{\scratchread}. @@ -130,7 +135,7 @@ \fi} %D \macros -%D {pathplusfile,sanitizefilename} +%D {pathplusfile,assignfullfilename,sanitizefilename} %D %D Use \type{\pathplusfile} to compose a full file name, like %D in: @@ -143,6 +148,21 @@ \def\pathplusfile#1#2{#1\f!pathseparator#2} +%D This one constructs a filename from a (possible empty) +%D path and filename. % The special \type {system} is ignored. + +\def\assignfullfilename#1#2\to#3% + {\doifelsenothing{#1} + {\edef#3{#2}} + {\edef#3{#1\f!pathseparator#2}}} + +% \def\assignfullfilename#1#2\to#3% +% {\doifelsenothing{#1} +% {\edef#3{#2}} +% {\doifelse{#1}{system} % special case, honors default searching +% {\edef#3{#2}} +% {\edef#3{#1\f!pathseparator#2}}}} + %D For the moment, we limit sanitizing to taking care of %D active \type {/}. @@ -405,12 +425,27 @@ %D \starttypen %D \doifparentfileelse{filename}{yes}{no} %D \stoptypen +%D +%D Since \TEXEXEC\ (and thereby \CONTEXT) supports renaming of +%D the outputfile, we also need to check on that alternative +%D name. + +\ifx\outputfilename\undefined \def\outputfilename{\jobname} \fi + +% \def\doifparentfileelse#1#2#3% +% {\edef\!!stringa{#1}% +% \edef\!!stringb{\jobname}% +% \edef\!!stringc{\outputfilename}% +% \convertcommand\!!stringa\to\!!stringa +% \convertcommand\!!stringb\to\!!stringb +% \convertcommand\!!stringc\to\!!stringc +% \ifx\!!stringa\!!stringb#2\else +% \ifx\!!stringa\!!stringc#2\else +% #3\fi\fi} \def\doifparentfileelse#1#2#3% - {\edef\!!stringa{#1}% - \@EA\convertargument\!!stringa\to\!!stringa - \@EA\def\@EA\!!stringb\@EA{\jobname}% - \ifx\!!stringa\!!stringb#2\else#3\fi} + {\doifsamestringelse{#1}{\jobname} {#2} + {\doifsamestringelse{#1}{\outputfilename}{#2}{#3}}} % \newcounter\readingfilelevel % diff --git a/tex/context/base/supp-fun.tex b/tex/context/base/supp-fun.tex index bfddf5cd4..a2220996e 100644 --- a/tex/context/base/supp-fun.tex +++ b/tex/context/base/supp-fun.tex @@ -116,13 +116,52 @@ %D fact that the offsets depend on the design of the glyphs %D used. -\let\DroppedIndent\zeropoint \def\DroppedLines{0} +\let\DroppedIndent\!!zeropoint \def\DroppedLines{0} \def\DroppedString% {ABCDEFGHIJKLMNOPQRSTUVWXYZ} -\def\DroppedCaps#1#2#3#4#5#6#7% - {\ExpandBothAfter\doifinstringelse{#7}{\DroppedString} % +% \def\DroppedCaps#1#2#3#4#5#6#7% +% {\ExpandBothAfter\doifinstringelse{#7}{\DroppedString} % +% {\ifvmode % this one is \EveryPar save, precede by \par if needed +% \vskip#6\baselineskip +% \penalty-200 +% \vskip-#6\baselineskip +% \fi +% \ifhmode +% \hskip-\parindent +% \fi +% \setbox0=\hbox +% {\definefont[temp][#2 at #3]\temp#1{#7}\hskip#4}% +% \ifdim\dp0>\dp\strutbox % one of those Q's , will be option +% \setbox2=\hbox{\raise\dp0\hbox{\lower\dp\strutbox\copy0}}% +% \ht2=\ht0 \dp0=\dp\strutbox \setbox0=\box2 +% \fi +% \setbox0=\hbox +% {\lower#5\box0}% +% \ht0=\ht\strutbox +% \dp0=\dp\strutbox +% \edef\DroppedIndent{\the\wd0}% +% \edef\DroppedLines {\number#6}% +% \hangindent\DroppedIndent +% \hangafter-\DroppedLines +% \noindent +% \hskip-\DroppedIndent +% \vbox{\forgetall\box0}% +% \nobreak +% \ignorespaces} % Could be a one character word ! +% {\edef\DroppedIndent{0pt}% +% \edef\DroppedLines {\number\maxdimen}% +% #7}} + +\let\globaldropcaps\global % will be an option, but on by default + +\chardef\DroppedStatus=0 % 0=done 1=starting 2=doing 3=error + +\def\DroppedCaps#1#2#3#4#5#6#7% does not yet handle accented chars + {\convertargument #7\to\asciia + \convertcommand \DroppedString\to\asciib + \ExpandBothAfter\doifinstringelse{\asciia}{\asciib} {\ifvmode % this one is \EveryPar save, precede by \par if needed \vskip#6\baselineskip \penalty-200 @@ -141,19 +180,21 @@ {\lower#5\box0}% \ht0=\ht\strutbox \dp0=\dp\strutbox - \edef\DroppedIndent{\the\wd0}% - \edef\DroppedLines {\number#6}% - \hangindent\DroppedIndent - \hangafter-\DroppedLines + \globaldropcaps\edef\DroppedIndent{\the\wd0}% + \globaldropcaps\edef\DroppedLines {\number#6}% + \globaldropcaps\chardef\DroppedStatus=2 + \globaldropcaps\hangindent\DroppedIndent + \globaldropcaps\hangafter-\DroppedLines \noindent \hskip-\DroppedIndent \vbox{\forgetall\box0}% \nobreak - \ignorespaces} % Could be a one character word ! - {\edef\DroppedIndent{0pt}% - \edef\DroppedLines {\number\maxdimen}% - #7}} - + \let\next=\ignorespaces} % Could be a one character word ! + {\globaldropcaps\edef\DroppedIndent{0pt}% + \globaldropcaps\edef\DroppedLines {\number\maxdimen}% + \globaldropcaps\chardef\DroppedStatus=3 + \def\next{#7}}% + \next} %D Before we go to the next topic, we summarize this command: %D @@ -164,6 +205,66 @@ %D \stoptypen %D \macros +%D {AutoDroppedCaps, CheckDroppedCaps} +%D +%D {\em To be documented.} + +% example usage +% +% \def\bpar{\ifvmode\CheckDroppedCaps\fi} +% \def\epar{\ifhmode\par\fi\CheckDroppedCaps} + +\newcount\lastprevgraf +\newcount\droppedlines + +\def\CheckDroppedCaps% + {\global\lastprevgraf\prevgraf} + +\def\AutoDroppedCaps% will be proper core stuff since it + {\globaldropcaps\chardef\DroppedStatus=1 + \global\lastprevgraf=0 + \global\droppedlines=0 + \EveryPar{\doAutoDroppedCaps}} + +\let\AutoDroppedNext\relax + +\def\doAutoDroppedCaps% + {\ifcase\DroppedStatus % done + \let\next\relax + \or % starting + % \ifnum\lastprevgraf>0 % tricky, probably a wrong par + % \globaldropcaps\chardef\DroppedStatus=3 % and inhibits dropped + % \let\next\relax % caps after titles and more than once + % \else % so let's nill this rubishly code fragment + \def\next{\NiceDroppedCaps{}{\@@dcfont}{.125em}{\@@dcn}}% + % \fi % and hope for the best + \or % doing + \global\advance\droppedlines by \lastprevgraf + \ifnum\droppedlines=0 + \globaldropcaps\chardef\DroppedStatus=0 + \let\next\relax + \else\ifnum\droppedlines>0 + \ifnum\droppedlines<\DroppedLines\relax + \globaldropcaps\hangindent=\DroppedIndent + \globaldropcaps\hangafter=-\DroppedLines + \globaldropcaps\advance\hangafter by \droppedlines + \hskip-\parindent + \let\next\AutoDroppedNext + \else + \globaldropcaps\chardef\DroppedStatus=0 + \let\next\relax + \fi + \else + \globaldropcaps\chardef\DroppedStatus=0 + \let\next\relax + \fi\fi + \or % error + \globaldropcaps\chardef\DroppedStatus=0 + \let\next\relax + \fi + \next} + +%D \macros %D {LineDroppedCaps, NiceDroppedCaps} %D %D To save definitions, we also provide: diff --git a/tex/context/base/supp-lan.tex b/tex/context/base/supp-lan.tex index dc0ab5660..f97ac3c1f 100644 --- a/tex/context/base/supp-lan.tex +++ b/tex/context/base/supp-lan.tex @@ -508,8 +508,23 @@ \def\currentspaceskip% {\fontdimen2\font\!!plus\fontdimen3\font\!!minus\fontdimen4\font\relax} -\def\fakecompoundhyphen% - {\def|##1|{\compoundhyphen\nobreak\hskip-\currentspaceskip\allowbreak}} +% \def\fakecompoundhyphen% wrong +% {\def|##1|{\compoundhyphen\nobreak\hskip-\currentspaceskip\allowbreak}} + +\ifx\newsignal\undefined + + \let\fakecompoundhyphen\relax + +\else + + \newsignal\compoundbreakpoint + + \def\fakecompoundhyphen% + {\def|##1|% + {\doifelsenothing{##1}{\compoundhyphen}{##1}% + \kern\compoundbreakpoint\allowbreak}} + +\fi %D One of the drawbacks of this mechanism is that characters can %D be made active afterwards. The next alternative can be used @@ -623,8 +638,8 @@ %D \type{\ifnum} or \type{\ifdim} statements. %D And then came the Polish users, and who can deny them? Like -%D the German \TEX\ users demand an active \type {"}, the -%D Polish cannot do without the \type {/}. The next alternative +%D the German \TEX\ users demand an active \type {"}, some +%D Polish users like using the \type {/}. The next alternative %D is a bit slower but far the most robust alternative. As a %D bonus it also offers \type {|^|} and even \type {|||} which %D both result in a breakable|^|bar. @@ -745,11 +760,15 @@ %D arguments, which complicates things a bit. \def\@nc@{@nc@} % normal character +\def\@nn@{@nn@} % normal catcode \def\@cc@{@cc@} % compound character \def\@cs@{@cs@} % compound characters \def\installcompoundcharacter #1#2#3 #4% {{#4}} keeps move local {\setvalue{\@nc@\string#1}{\char`#1}% + \ifnum\catcode`#1=\@@active \else + \setevalue{\@nn@\string#1}{\number\catcode`#1}% new + \fi \def\!!stringa{#3}% \ifx\!!stringa\empty \setvalue{\@cc@\string#1\string#2}{{#4}}% @@ -762,6 +781,16 @@ \uppercase{\unexpanded\def~{\handlecompoundcharacter~}}% \uccode`~=\scratchcounter} +%D A compound character can be reset with the following +%D command. +%D +%D \starttypen +%D \restorecompoundcharacter / +%D \stoptypen + +\def\restorecompoundcharacter#1% new + {\catcode`#1=\getvalue{\@nn@\string#1}\relax} + %D In handling the compound characters we have to take care of %D \type{\bgroup} and \type{\egroup} tokens, so we end up with %D a multi||step interpretation macro. We look ahead for a @@ -967,8 +996,51 @@ \bgroup \catcode`\~=\active \catcode`\/=\active +% why not convert to ascii first? + +% \unexpanded\gdef\hyphenatedurl#1% {}{} handles accents +% {\bgroup +% \obeyhyphens +% \def\splitbefore##1% +% {\setbox\scratchbox=\hbox{##1{}{}}% +% \ifcase\urlsplitmode +% \box\scratchbox +% \or +% \postwordbreak\box\scratchbox\prewordbreak +% \or +% \prewordbreak\discretionary{\box\scratchbox}{}{\box\scratchbox}\prewordbreak +% \else +% \postwordbreak\box\scratchbox\prewordbreak +% \fi}% +% \def\splitafter##1% +% {\ifcase\urlsplitmode +% ##1{}{}% +% \or +% \prewordbreak\discretionary{##1{}{}}{}{##1{}{}}\prewordbreak +% \or +% \prewordbreak\discretionary{##1{}{}}{}{##1{}{}}\prewordbreak +% \else +% \prewordbreak\discretionary{}{##1{}{}}{##1{}{}}\prewordbreak +% \fi}% +% \def\flushurl% +% {\savedurl\let\savedurl\empty}% +% \def\\% +% {\spliturl\#}% +% \let\~=\tildeletter \let~=\~% +% \let\/=\slashletter \let/=\/% +% \let\savedurl\empty +% \handletokens#1\with\scanurl +% \egroup} +% +% Better (a mere copy with \dohyphens): + +\bgroup \catcode`\~=\active \catcode`\/=\active + \unexpanded\gdef\hyphenatedurl#1% {}{} handles accents {\bgroup + \ifnum\hyphenpenalty<10000 \else + \def\discretionary##1##2##3{##1\allowbreak##2}% + \fi \obeyhyphens \def\splitbefore##1% {\setbox\scratchbox=\hbox{##1{}{}}% @@ -1003,6 +1075,15 @@ \egroup +%D This would be better, but it spoils \type {\~} and so: +%D +%D \starttypen +%D \convertargument#1\to\ascii +%D \expandafter\handletokens\ascii\with\scanurl +%D \stoptypen + +\egroup + \def\scanurl#1% {\ifx#1\~% \flushurl\splitbefore\~% @@ -1048,6 +1129,22 @@ #1% \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} +%D When Joop Susan asked (on the \CONTEXT\ mailing list) how +%D to handle url's passed as argument, the following solutions +%D came to my mind: +%D +%D \starttypen +%D \def\whateverurl#1% +%D {{\def~{\string~}\useURL[dummy][#1]\goto{\url[dummy]}[URL(dummy)]}} +%D +%D \def\whateverurl#1% +%D {{\let~\tildeletter\useURL[dummy][#1]\goto{\url[dummy]}[URL(dummy)]}} +%D +%D \def\whateverurl#1% +%D {\convertargument#1\to\ascii +%D \expanded{\useURL[dummy][\ascii]}\goto{\url[dummy]}[URL(dummy)]} +%D \stoptypen + %D \macros %D {hyphenatedfile} %D @@ -1059,6 +1156,17 @@ \let\hyphenatedfile\hyphenatedurl +% to be finished +% +% \def\hyphenatedstring#1% +% {\bgroup +% \nohyphens +% \def\next##1{##1\doif{##1}{-}{\allowbreak}}% +% \handletokens#1\with\next +% \egroup} +% +% {\hsize1cm\hyphenatedstring{ABXXXXXXXXXXC-12345-12345}} + \protect \endinput diff --git a/tex/context/base/supp-mat.tex b/tex/context/base/supp-mat.tex index 810b71c02..a2a436fee 100644 --- a/tex/context/base/supp-mat.tex +++ b/tex/context/base/supp-mat.tex @@ -96,19 +96,19 @@ %D \TEX\ uses \type{^} and \type{_} for entering super- and %D subscript mode. We want however a bit more control than %D normally provided, and therefore provide \type {\super} -%D and \type{suber}. +%D and \type{\suber} (\type {\sub} is already taken). \global\let\normalsuper=^ \global\let\normalsuber=_ -\newcount\supsubmode +\newcount\supersubmode -\newevery\everysupsub \EverySupSub +\newevery\everysupersub \EverySuperSub -\appendtoks \advance\supsubmode by 1\relax \to \everysupsub +\appendtoks \advance\supersubmode by 1\relax \to \everysupersub -% \def\dodosuper#1{\normalsuper{\the\everysupsub#1}} -% \def\dodosuber#1{\normalsuber{\the\everysupsub#1}} +% \def\dodosuper#1{\normalsuper{\the\everysupersub#1}} +% \def\dodosuber#1{\normalsuber{\the\everysupersub#1}} % % \def\dosuper{\ifx\next\bgroup\expandafter\dodosuper\else\normalsuper\fi} % \def\dosuber{\ifx\next\bgroup\expandafter\dodosuber\else\normalsuber\fi} @@ -116,8 +116,8 @@ % \def\super{\futurelet\next\dosuper} % \def\suber{\futurelet\next\dosuber} -\def\super#1{\normalsuper{\the\everysupsub#1}} -\def\suber#1{\normalsuber{\the\everysupsub#1}} +\def\super#1{\normalsuper{\the\everysupersub#1}} +\def\suber#1{\normalsuber{\the\everysupersub#1}} %D \macros %D {enablesupsub} diff --git a/tex/context/base/supp-mis.tex b/tex/context/base/supp-mis.tex index 5fe26ba9a..5178da896 100644 --- a/tex/context/base/supp-mis.tex +++ b/tex/context/base/supp-mis.tex @@ -161,7 +161,7 @@ \ifnocontextobject \@@comment \do \chardef\@@comment = 14 \fi %D \macros -%D {@EA,expanded} +%D {@EA,expanded,expandoneargafter,expandtwoargsafter} %D %D Also needed: @@ -170,6 +170,12 @@ \def\expanded#1% {\edef\@@expanded{\noexpand#1}\@@expanded} +\def\expandoneargafter#1#2% + {\@EA#1\@EA{#2}} + +\def\expandtwoargsafter#1#2#3% + {\@EA\@EA\@EA#1\@EA\@EA\@EA{\@EA#2\@EA}\@EA{#3}} + %D \macros %D {everyline,EveryLine,EveryPar} %D @@ -248,7 +254,7 @@ \fi %D \macros -%D {setvalue,getvalue,letvalue,setgvalue} +%D {setvalue,setevalue,setxvalue,getvalue,letvalue,setgvalue} %D %D The next two macros expand their argument to %D \type{\argument}. The first one is used to define macro's @@ -257,9 +263,11 @@ \ifnocontextobject \setvalue \do \def\setvalue #1{\expandafter\def\csname#1\endcsname} + \def\setevalue#1{\expandafter\edef\csname#1\endcsname} + \def\setgvalue#1{\expandafter\gdef\csname#1\endcsname} + \def\setxvalue#1{\expandafter\xdef\csname#1\endcsname} \def\getvalue #1{\csname#1\endcsname} \def\letvalue #1{\expandafter\let\csname#1\endcsname} - \def\setgvalue#1{\expandafter\gdef\csname#1\endcsname} \fi @@ -309,7 +317,8 @@ \fi %D \macros -%D {withoutpt} +%D {withoutpt, +%D ScaledPointsToBigPoints,ScaledPointsToWholeBigPoints} %D %D \TEX\ lacks some real datastructure. We can however use %D \DIMENSIONS. This kind of trickery is needed when we want @@ -331,6 +340,14 @@ \scratchdimen=.996264\scratchdimen \edef#2{\withoutpt{\the\scratchdimen}}} + \def\ScaledPointsToWholeBigPoints#1#2% + {\scratchdimen=#1sp + \scratchdimen=.996264\scratchdimen + \scratchcounter=\scratchdimen + \advance\scratchcounter by 32768 + \divide\scratchcounter by 65536 + \edef#2{\the\scratchcounter}} + \fi %D \macros @@ -432,7 +449,7 @@ \fi %D \macros -%D {dostepwiserecurse} +%D {dostepwiserecurse, dorecurse, doloop, exitloop} %D %D The next loop macro is a real weak one, and does not offer %D the full \CONTEXT\ functionality, let alone nesting, but @@ -452,6 +469,57 @@ \advance\recursecounter by #3\relax \repeat} +\def\dorecurse#1% + {\dostepwiserecurse{1}{#1}{1}} + +\def\doloop% + {\dostepwiserecurse{1}{\maxdimen}{1}} + +\def\exitloop% + {\recursecounter=\maxdimen} + +%D \macros +%D {doifdefined,doifundefined, +%D doifdefinedelse,doifundefinedelse} +%D +%D These alteratives are not robust but suitable for simple +%D usage. + +\ifnocontextobject \doifdefined \do + + \def\doifdefinedelse#1#2#3% + {\expandafter\ifx\csname#1\endcsname\relax#3\else#2\fi} + + \def\doifundefinedelse#1#2#3% + {\expandafter\ifx\csname#1\endcsname\relax#2\else#3\fi} + + \def\doifdefined#1#2% + {\expandafter\ifx\csname#1\endcsname\relax\else#2\fi} + + \def\doifundefined#1#2% + {\expandafter\ifx\csname#1\endcsname\relax#2\fi} + +\fi + +%D \macros +%D {doifinstringelse} +%D +%D It seems like we end up with more and more macros here. +%D Sigh. + +\ifnocontextobject \doifinstringelse \do + + \def\p!doifinstringelse#1#2% + {\def\pp!doifinstringelse##1#1##2##3\war% + {\csname if\if##2@fals\else tru\fi e\endcsname}% + \expanded{\pp!doifinstringelse#2#1@@\noexpand\war}} + + \long\def\doifinstringelse#1#2#3#4% + {\edef\@@@instring{#1}% + \@EA\p!doifinstringelse\@EA{\@@@instring}{#2}#3\else#4\fi} + +\fi + %D \macros %D {twodigitrounding} %D @@ -459,6 +527,45 @@ \def\twodigitrounding#1{#1} +%D \macros +%D {lineheight} +%D +%D In \CONTEXT\ we have \type{\lineheight}, which in many +%D cases matches \type {\baselineskip}. + +\ifnocontextobject \lineheight \do + + \def\lineheight{\baselineskip} + +\fi + +%D \macros +%D {dohandletokens} +%D +%D The following macro is the simplified version, but good +%D enough for day to day hacks. +%D +%D \starttypen +%D \dohandletokens some text\with\somemacro +%D \stoptypen + +\ifnocontextobject \dohandletokens \do + +\def\dodohandletokens% + {\ifx\next\end \else + \docommando{\next}% + \expandafter\dohandletokens + \fi} + +\def\dohandletokens% + {\afterassignment\dodohandletokens\let\next= } + +\long\def\handletokens#1\with#2% + {\let\docommando=#2% + \dohandletokens#1\end} + +\fi + %D That's it. Please forget this junk and take a look at how %D it should be done. diff --git a/tex/context/base/supp-mpe.tex b/tex/context/base/supp-mpe.tex index 92d2e860d..d3dc45ea0 100644 --- a/tex/context/base/supp-mpe.tex +++ b/tex/context/base/supp-mpe.tex @@ -8,86 +8,98 @@ %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. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. %D This module is still experimental and deals with some %D extensions to \METAPOST. When using \POSTSCRIPT\ output, %D these extensions can be supplied by means of proper %D preamble definitions, but when producing \PDF\ we have to %D set up the appropriate datastructures ourselves. It acts as -%D a plug in into \type {supp-pdf}. As soon as we need more -%D extensions, we will generalize these macro. +%D a plug in into \type {supp-pdf}. As soon as we need more +%D extensions, we will generalize these macro. Some +%D definitions will move to the special drivers. \writestatus{loading}{MetaPost Special Extensions} %D We implement extensions by using the \METAPOST\ special %D mechanism. Opposite to \TEX's specials, the \METAPOST\ ones %D are flushed before or after the graphic data, but thereby -%D are no longer connected to a position. -%D +%D are no longer connected to a position. +%D %D We implement specials by overloading the \type {fill} %D operator. By counting the fills, we can let the converter %D treat the appropriate fill in a special way. The %D specification of the speciality can have two forms, -%D determined by the setting of a boolean variable: +%D determined by the setting of a boolean variable: %D -%D \starttypen -%D _inline_shading_ := false ; % comment like code (default) -%D _inline_shading_ := true ; % command like code -%D \stoptypen -%D -%D When the specification is embedded as comment, it looks -%D like: +%D \starttypen +%D _inline_specials_ := false ; % comment like code (default) +%D _inline_specials_ := true ; % command like code +%D \stoptypen %D -%D \starttypen -%D %%MetaPostSpecial <size> <data> <number> <identifier> -%D \stoptypen +%D When the specification is embedded as comment, it looks +%D like: %D -%D The in||line alternative is more tuned for \POSTSCRIPT, +%D \starttypen +%D %%MetaPostSpecial <size> <data> <number> <identifier> +%D \stoptypen +%D +%D The in||line alternative is more tuned for \POSTSCRIPT, %D since it permits us to define a macro \type {special}. %D -%D \starttypen +%D \starttypen %D inline : <data> <number> <identifier> <size> special -%D \stoptypen -%D +%D \stoptypen +%D %D The \type {identifier} determines what to do, and the data %D can be used to accomplish this. A type~2 shading function %D has identifier~2. Alltogether, the number of parameters is %D specified in \type {size}. The \type {number} is the number %D of the fill that needs the special treatment. For a type~2 %D and~3 shaded fill, the datablock contains the following -%D data: -%D -%D \starttypen -%D from to n inner_r g b x y outer_r g b x y -%D from to n inner_r g b x y radius outer_r g b x y radius +%D data: +%D +%D \starttypen +%D from to n inner_r g b x y outer_r g b x y +%D from to n inner_r g b x y radius outer_r g b x y radius %D \stoptypen -%D -%D The implementation below, saves the data on the stack in -%D a way similar to the macros in \type {supp-pdf.tex}, and -%D just overload a few already defined handlers. That way, -%D the existing macros are still generic. \voetnoot {Actually, -%D the macros here are just as generic.} -%D +%D +%D The implementation below saves the data on the stack in +%D a way similar to the macros in \type {supp-pdf.tex}, and +%D just overload a few already defined handlers. That way, +%D the existing macros are still generic. \voetnoot {Actually, +%D the macros here are just as generic.} +%D %D Currently the only extension concerns shading, which is %D accomplished by handling yet another value of \type -%D {\finiMPpath}. The recource disctionary is stored and -%D later picked up by the general \CONTEXT\ figure inclusion -%D macros. +%D {\finiMPpath}. The recource disctionary is stored and +%D later picked up by the general \CONTEXT\ figure inclusion +%D macros. + +\unprotect -\unprotect +%D The \type {%%MetaPostSpecials: version.revision signal} line +%D triggers this module into handling color specifications kind +%D of special. We need this safeguard for non||special +%D usage. + +\chardef\MPspecialversion = 0 % specials when >1 +\chardef\MPspecialrevision = 0 % specials when >1 +\chardef\MPspecialsignal = 0 % passed on by graphic + +\newcount\currentPDFshade % 0 % global (document wide) counter +\chardef\inlineMPspecials = 1 % only needed for stack resetting -\newcount\currentPDFshade % global count -\newcount\currentMPshade % local count -\newcount\currentMPfill % local count -\chardef\inlineMPspecials=0 % only needed for stack resetting \let\currentMPshades\empty -\def\dohandleMPspecialcomment#1 +%D This macro handles the special definitions that are +%D passed as comment. + +\def\dohandleMPspecialcomment#1 {\setMPargument{#1}% - \advance\scratchcounter by -1 - \ifcase\scratchcounter + \advance\scratchcounter by -1 + \ifcase\scratchcounter \handleMPspecialcommand \donetrue \doresetMPstack @@ -97,10 +109,10 @@ \expandafter\dohandleMPspecialcomment \fi} -\def\handleMPspecialcomment #1 % number of arguments +\def\handleMPspecialcomment #1 % number of arguments {\doresetMPstack \scratchcounter=#1\relax - \ifcase\scratchcounter % when zero, inline shading is used + \ifcase\scratchcounter % when zero, inline shading is used \chardef\inlineMPspecials=1 \let\handleMPsequence=\dohandleMPsequence \expandafter\handleMPsequence @@ -109,12 +121,41 @@ \expandafter\dohandleMPspecialcomment \fi} +%D When defined inline, we use another macro to handle the +%D definitions. Actually, this macro is called by the +%D previous ones. + +\def\handleMPspecialcommand% + {\ifcase\inlineMPspecials\or + \advance\nofMParguments by -1 % pop the size + \fi + \doifundefinedelse{\MPspecial} + {\message{[unknown \MPspecial]}} + {\getvalue{\MPspecial}}% + \ifcase\inlineMPspecials + \doresetMPstack % 0 + \else + \resetMPstack % 1 + \fi} + +%D This macro triggers special support. Currently, the +%D version and revision number are not used. Any version number +%D greater than zero will enable special support. + +\def\handleMPspecialscomment #1.#2 #3 % version.revision signal + {\doresetMPstack + \chardef\MPspecialversion =#1 + \chardef\MPspecialrevision=#2 + \chardef\MPspecialsignal =#3 + \let\handleMPsequence=\dohandleMPsequence + \handleMPsequence} + +%D In case of \PDF, we need to prepare resourcs. + \def\startMPresources% {\global\let\currentMPshades\empty - \global\currentMPfill=0 - \global\currentMPshade=0 \ifx\currentPDFresources\empty\else - \message{unused resources before shade \the\currentPDFshade}% + \message{unused resources before shade \the\currentPDFshade}% \fi \global\let\currentPDFresources\empty} @@ -130,42 +171,124 @@ {\edef\currentMPspecial{\gMPs{#1}}} \def\stopMPshading% - {\global\advance\currentPDFshade by 1 - \global\advance\currentMPshade by 1 - \setevalue{mps:Sh:\currentMPspecial}% non global !! - {\the\currentPDFshade}% - \xdef\currentMPshades% - {\currentMPshades/Sh\the\currentPDFshade\space\the\pdflastobj\space0 R }} - -\def\processMPpath% - {\global\advance\currentMPfill by 1 - \ifnum\finiMPpath=2 \ifx\currentMPshades\empty \else - \doifdefined{mps:Sh:\the\currentMPfill} - {\chardef\finiMPpath=4 \PDFcode{q /Pattern cs}}% - \fi \fi + {\global\advance\currentPDFshade by 1 + \setxvalue{obj:Sh:\currentMPspecial}% + {/Sh\the\currentPDFshade\space\the\pdflastobj\space0 R }% + \setxvalue{mps:Sh:\currentMPspecial}% + {\the\currentPDFshade}} + +%D Since colors are not subjected to transformations, we can +%D only use colors as signal. In our case, we use a dummy colored +%D path with a red color component of \type {0.n}, so \type +%D {0.001} is the first path and \type {0.010} the tenth. Since +%D \METAPOST strips trailing zeros, we have to padd the string. + +\ifx\normalhandleMPrgbcolor\undefined % in case we reload this module + + \let\normalhandleMPrgbcolor \handleMPrgbcolor + \let\normalhandleMPcmykcolor\handleMPcmykcolor + \let\normalhandleMPgraycolor\handleMPgraycolor + +\fi + +%D When we are using \CONTEXT, we will fall back to the +%D better color conversion routines. This also has the advantage +%D that we don't have to parse and convert the file. In this +%D alternative, \type {\!MP} is not (yet) supported. + +\ifCONTEXT + + \def\normalhandleMPrgbcolor% + {\dostartcolormodeR\gMPa1:\gMPa2:\gMPa3\od} + + \def\normalhandleMPcmykcolor% + {\dostartcolormodeC\gMPa1:\gMPa2:\gMPa3:\gMPa4\od} + + \def\normalhandleMPgraycolor% + {\dostartcolormodeS\gMPa1\od} + +\fi + +% In the previous macros we use the special drivers. A more +% direct approach would have been: +% +% \def\doPDFstartrgbcolormode#1#2#3% +% {\PDFcode{#1 #2 #3 rg #1 #2 #3 RG}} +% +% \def\doPDFstartcmykcolormode#1#2#3#4% +% {\PDFcode{#1 #2 #3 #4 k #1 #2 #3 #4 K}} +% +% \def\doPDFstartgraycolormode#1% +% {\PDFcode{#1 g #1 G}} +% +% \appendtoks +% \let\dostartrgbcolormode \doPDFstartrgbcolormode +% \let\dostartcmykcolormode\doPDFstartcmykcolormode +% \let\dostartgraycolormode\doPDFstartgraycolormode +% \to \everyMPtoPDFconversion + +%D Now we can handle special color signals. We only do this +%D when special are detected. + +\def\MPrgbnumber#1{\expandafter\doMPrgbnumber#1000.0000\relax} +\def\doMPrgbnumber#1.#2#3#4#5\relax{#2#3#4} + +\def\handleMPrgbcolor% + {\setMPcolor + \ifcase\MPspecialversion + \resetMPcolor\normalhandleMPrgbcolor + \else\ifnum\MPrgbnumber\lastMPrvalue=\MPspecialsignal + % consider it to be a signal + \else + \resetMPcolor\normalhandleMPrgbcolor + \fi\fi} + +\def\handleMPcmykcolor% + {\resetMPcolor\normalhandleMPcmykcolor} + +\def\handleMPgraycolor% + {\resetMPcolor\normalhandleMPgraycolor} + +\def\resetMPcolor% + {\def\lastMPrvalue{0.0}% + \def\lastMPgvalue{0.0}% + \def\lastMPbvalue{0.0}} + +\def\setMPcolor% + {\edef\lastMPrvalue{\gMPa1}% + \edef\lastMPgvalue{\gMPa2}% + \edef\lastMPbvalue{\gMPa3}} + +\resetMPcolor + +%D The path processing macro is slightly extended. + +\def\processMPpath% + {\ifcase\MPspecialversion\else + \ifnum\MPrgbnumber\lastMPrvalue=\MPspecialsignal + \scratchcounter=\MPrgbnumber\lastMPbvalue + \edef\currentMPspecial{\the\scratchcounter}% + \ifnum\finiMPpath=2 + \doifdefined{mps:Sh:\currentMPspecial} + {\edef\currentMPshade{\getvalue{obj:Sh:\currentMPspecial}}% + \doifinstringelse{\currentMPshade}{\currentMPshades} + {}{\xdef\currentMPshades{\currentMPshades\currentMPshade}}% + \chardef\finiMPpath=4 \PDFcode{q /Pattern cs}}% + \fi + \fi + \fi \flushMPpath \closeMPpath \PDFcode - {\ifcase\finiMPpath - W n\or S\or f\or B\or W n /Sh\getvalue{mps:Sh:\the\currentMPfill} sh Q% + {\ifcase\finiMPpath + W n\or S\or f\or B\or W n /Sh\getvalue{mps:Sh:\currentMPspecial} sh Q% \fi}% \let\handleMPsequence=\dohandleMPsequence \resetMPstack \nofMPsegments=0 \handleMPsequence} -\def\handleMPspecialcommand% - {\ifcase\inlineMPspecials\or - \advance\nofMParguments by -1 % pop the size - \fi - \doifundefinedelse{\MPspecial} - {\message{[unknown \MPspecial]}} - {\getvalue{\MPspecial}}% - \ifcase\inlineMPspecials - \doresetMPstack % 0 - \else - \resetMPstack % 1 - \fi} +%D Specials are define and recalled using: \def\MPspecial% {MP special \gMPs\nofMParguments} @@ -177,8 +300,8 @@ %D but users will seldom encounter those complications. Here %D we only show a few simple examples, but many other %D alternatives are possible by setting up the functions built -%D in \PDF\ in the appropriate way. -%D +%D in \PDF\ in the appropriate way. +%D %D Shading has to do with interpolation between two or more %D points or user supplied ranges. In \PDF, the specifications %D of a shade has to be encapsulated in objects and passed on @@ -186,49 +309,49 @@ %D simulate three dimensional shades as well and define simple %D functions using a limited set of \POSTSCRIPT\ primitives. %D Given the power of \METAPOST\ and these \PDF\ features, we -%D can achieve superb graphic effects. -%D +%D can achieve superb graphic effects. +%D %D Since everything is hidden in \TEX\ and \METAPOST\ graphics, -%D we can stick to high level \CONTEXT\ command, as shown in +%D we can stick to high level \CONTEXT\ command, as shown in %D the following exmples. -%D +%D %D \startbuffer %D \startuniqueMPgraphic{CircularShade} %D path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ; %D circular_shade(p,0,.2red,.9red) ; %D \stopuniqueMPgraphic -%D +%D %D \startuniqueMPgraphic{LinearShade} %D path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ; %D linear_shade(p,0,.2blue,.9blue) ; %D \stopuniqueMPgraphic -%D +%D %D \startuniqueMPgraphic{DuotoneShade} %D path p ; p := unitsquare xscaled \overlaywidth yscaled \overlayheight ; %D linear_shade(p,2,.5green,.5red) ; %D \stopuniqueMPgraphic %D \stopbuffer -%D -%D \typebuffer -%D +%D +%D \typebuffer +%D %D \haalbuffer -%D -%D These graphics can be hooked into the overlay mechanism, +%D +%D These graphics can be hooked into the overlay mechanism, %D which is available in many commands. -%D +%D %D \startbuffer %D \defineoverlay[demo 1][\uniqueMPgraphic{CircularShade}] %D \defineoverlay[demo 2][\uniqueMPgraphic {LinearShade}] %D \defineoverlay[demo 3][\uniqueMPgraphic {DuotoneShade}] %D \stopbuffer -%D -%D \typebuffer -%D +%D +%D \typebuffer +%D %D \haalbuffer -%D -%D These backgrounds can for instance be applied to \type -%D {\framed}: -%D +%D +%D These backgrounds can for instance be applied to \type +%D {\framed}: +%D %D \startbuffer %D \setupframed[breedte=3cm,hoogte=2cm,kader=uit] %D \startcombinatie[3*1] @@ -237,17 +360,17 @@ %D {\framed[achtergrond=demo 3]{\bfd \white Demo 3}} {} %D \stopcombinatie %D \stopbuffer -%D -%D \typebuffer -%D +%D +%D \typebuffer +%D %D \startregelcorrectie %D \haalbuffer %D \stopregelcorrectie -%D -%D There are a few more alternatives, determined by the second +%D +%D There are a few more alternatives, determined by the second %D parameter passed to \type {circular_shade} and alike. -%D -%D \def\SomeShade#1#2#3#4#5% +%D +%D \def\SomeShade#1#2#3#4#5% %D {\startuniqueMPgraphic{Shade-#1} %D width := \overlaywidth ; %D height := \overlayheight ; @@ -256,87 +379,87 @@ %D \stopuniqueMPgraphic %D \defineoverlay[Shade-#1][\uniqueMPgraphic{Shade-#1}]% %D \framed[achtergrond=Shade-#1,breedte=2cm,hoogte=2cm,kader=uit]{}} -%D +%D %D \startregelcorrectie %D \startcombinatie[5*1] -%D {\SomeShade{10}{circular}{0}{.3blue}{.9blue}} {circular 0} -%D {\SomeShade{11}{circular}{1}{.3blue}{.9blue}} {circular 1} -%D {\SomeShade{12}{circular}{2}{.3blue}{.9blue}} {circular 2} -%D {\SomeShade{13}{circular}{3}{.3blue}{.9blue}} {circular 3} -%D {\SomeShade{14}{circular}{4}{.3blue}{.9blue}} {circular 4} +%D {\SomeShade{10}{circular}{0}{.3blue}{.9blue}} {circular 0} +%D {\SomeShade{11}{circular}{1}{.3blue}{.9blue}} {circular 1} +%D {\SomeShade{12}{circular}{2}{.3blue}{.9blue}} {circular 2} +%D {\SomeShade{13}{circular}{3}{.3blue}{.9blue}} {circular 3} +%D {\SomeShade{14}{circular}{4}{.3blue}{.9blue}} {circular 4} %D \stopcombinatie %D \stopregelcorrectie -%D +%D %D \blanko -%D +%D %D \startregelcorrectie %D \startcombinatie[5*1] -%D {\SomeShade{20}{circular}{0}{.9green}{.3green}} {circular 0} -%D {\SomeShade{21}{circular}{1}{.9green}{.3green}} {circular 1} -%D {\SomeShade{22}{circular}{2}{.9green}{.3green}} {circular 2} -%D {\SomeShade{23}{circular}{3}{.9green}{.3green}} {circular 3} -%D {\SomeShade{24}{circular}{4}{.9green}{.3green}} {circular 4} +%D {\SomeShade{20}{circular}{0}{.9green}{.3green}} {circular 0} +%D {\SomeShade{21}{circular}{1}{.9green}{.3green}} {circular 1} +%D {\SomeShade{22}{circular}{2}{.9green}{.3green}} {circular 2} +%D {\SomeShade{23}{circular}{3}{.9green}{.3green}} {circular 3} +%D {\SomeShade{24}{circular}{4}{.9green}{.3green}} {circular 4} %D \stopcombinatie %D \stopregelcorrectie -%D +%D %D \blanko -%D +%D %D \startregelcorrectie %D \startcombinatie[4*1] -%D {\SomeShade{30}{linear}{0}{.3red}{.9red}} {linear 0} -%D {\SomeShade{31}{linear}{1}{.3red}{.9red}} {linear 1} -%D {\SomeShade{32}{linear}{2}{.3red}{.9red}} {linear 2} -%D {\SomeShade{33}{linear}{3}{.3red}{.9red}} {linear 3} +%D {\SomeShade{30}{linear}{0}{.3red}{.9red}} {linear 0} +%D {\SomeShade{31}{linear}{1}{.3red}{.9red}} {linear 1} +%D {\SomeShade{32}{linear}{2}{.3red}{.9red}} {linear 2} +%D {\SomeShade{33}{linear}{3}{.3red}{.9red}} {linear 3} %D \stopcombinatie %D \stopregelcorrectie -%D +%D %D These macros closely cooperate with the \METAPOST\ module %D \type {mp-spec.mp}, which is part of the \CONTEXT\ -%D distribution. -%D -%D The low level (\PDF) implementation is based on the \TEX\ -%D based \METAPOST\ to \PDF\ converter. Shading is supported -%D by overloading the \type {fill} operator as implemented -%D earlier. In \PDF\ type~2 and~3 shading functions are -%D specified in terms of: -%D +%D distribution. +%D +%D The low level (\PDF) implementation is based on the \TEX\ +%D based \METAPOST\ to \PDF\ converter. Shading is supported +%D by overloading the \type {fill} operator as implemented +%D earlier. In \PDF\ type~2 and~3 shading functions are +%D specified in terms of: +%D %D \starttabulatie[|Tl|l|] -%D \NC /Domain \NC sort of meeting range \NC \NR -%D \NC /C0 \NC inner shade \NC \NR -%D \NC /C1 \NC outer shade \NC \NR -%D \NC /N \NC smaller values, bigger inner circles \NC \NR +%D \NC /Domain \NC sort of meeting range \NC \NR +%D \NC /C0 \NC inner shade \NC \NR +%D \NC /C1 \NC outer shade \NC \NR +%D \NC /N \NC smaller values, bigger inner circles \NC \NR %D \stoptabulatie -\defineMPspecial{2} - {\startMPshading{14}% type 2 - \immediate\pdfobj +\defineMPspecial{2} + {\startMPshading{14}% type 2 + \immediate\pdfobj {<</FunctionType 2 - /Domain [\gMPs1 \gMPs2] - /C0 [\gMPs4 \gMPs5 \gMPs6] - /C1 [\gMPs9 \gMPs{10} \gMPs{11}] - /N \gMPs3>>}% - \immediate\pdfobj + /Domain [\gMPs1 \gMPs2] + /C0 [\gMPs4 \gMPs5 \gMPs6] + /C1 [\gMPs9 \gMPs{10} \gMPs{11}] + /N \gMPs3>>}% + \immediate\pdfobj {<</ShadingType 2 /ColorSpace /DeviceRGB /Function \the\pdflastobj\space 0 R - /Coords [\gMPs7 \gMPs8 \gMPs{12} \gMPs{13}] + /Coords [\gMPs7 \gMPs8 \gMPs{12} \gMPs{13}] /Extend [true true]>>}% \stopMPshading} -\defineMPspecial{3} - {\startMPshading{16}% type 3 - \immediate\pdfobj +\defineMPspecial{3} + {\startMPshading{16}% type 3 + \immediate\pdfobj {<</FunctionType 2 - /Domain [\gMPs1 \gMPs2] - /C0 [\gMPs4 \gMPs5 \gMPs6] - /C1 [\gMPs{10} \gMPs{11} \gMPs{12}] - /N \gMPs3>>}% - \immediate\pdfobj + /Domain [\gMPs1 \gMPs2] + /C0 [\gMPs4 \gMPs5 \gMPs6] + /C1 [\gMPs{10} \gMPs{11} \gMPs{12}] + /N \gMPs3>>}% + \immediate\pdfobj {<</ShadingType 3 /ColorSpace /DeviceRGB /Function \the\pdflastobj\space 0 R - /Coords [\gMPs7 \gMPs8 \gMPs9 \gMPs{13} \gMPs{14} \gMPs{15}] + /Coords [\gMPs7 \gMPs8 \gMPs9 \gMPs{13} \gMPs{14} \gMPs{15}] /Extend [true true]>>}% \stopMPshading} -\protect \endinput +\protect \endinput diff --git a/tex/context/base/supp-mps.tex b/tex/context/base/supp-mps.tex index 20885bebc..87af24b4a 100644 --- a/tex/context/base/supp-mps.tex +++ b/tex/context/base/supp-mps.tex @@ -8,14 +8,8 @@ %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. - -% E-tex : a primitive that tells us that \write18 works -% E-tex : \executeMetaPost filename -% ConTeXt : automatic flush at end of job - -% The MP generation support is still experimental. +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. %D \METAPOST\ is John Hobbys alternative for \METAFONT\ and %D produces superior \POSTSCRIPT\ code. In this module we @@ -63,7 +57,8 @@ %D This is implemented as: \long\def\startMPgraphic#1\stopMPgraphic% - {\startwritingMPgraphic + {\checkMPTEXgraphic{#1}% + \startwritingMPgraphic \writeMPgraphic{#1}% \stopwritingMPgraphic} @@ -72,7 +67,7 @@ %D %D If we just want to run \METAPOST\ code, that is, not to %D explictly generate a figure in terms of \type{beginfig} and -%D \type{endfig}, we can use: +%D \type{endfig}, we can use: %D %D \starttypen %D \startMPgraphic @@ -97,22 +92,24 @@ \ifCONTEXT - \long\def\dostartMPrun#1#2\stopMPrun% + \long\def\dostartMPrun#1#2\stopMPrun% {\bgroup \MPruntrue \doifsomething{#1}{\def\MPgraphicfile{#1}}% + \checkMPTEXgraphic{#2}% \startwritingMPgraphic \writeMPgraphic{#2}% \stopwritingMPgraphic \egroup} - + \def\startMPrun% {\dosinglegroupempty\dostartMPrun} \else - \long\def\startMPrun#1\stopMPrun% + \long\def\startMPrun#1\stopMPrun% {\MPruntrue + \checkMPTEXgraphic{#1}% \startwritingMPgraphic \writeMPgraphic{#1}% \stopwritingMPgraphic @@ -139,7 +136,7 @@ %D \stoptypen %D \macros -%D {ifrunMPgraphics,ifinsertMPgraphics} +%D {ifrunMPgraphics,ifrunMPTEXgraphics,ifinsertMPgraphics} %D %D These macros look a bit more complicated that one would %D expect at first sight. This is due to the two ways of @@ -147,8 +144,9 @@ %D paragraph. Which method is used, the direct or indirect %D one, depends on a boolean. -\newif\ifrunMPgraphics \runMPgraphicsfalse -\newif\ifinsertMPgraphics \insertMPgraphicstrue +\newif\ifrunMPgraphics \runMPgraphicsfalse +\newif\ifrunMPTEXgraphics \runMPTEXgraphicsfalse +\newif\ifinsertMPgraphics \insertMPgraphicstrue %D If set to true, one can do with a single pass, else one must %D process the \METAPOST\ file \type{mpgraph} between two @@ -157,8 +155,9 @@ \ifx\MPgraphicfile\undefined \def\MPgraphicfile{mp\ifMPrun run\else graph\fi} + \def\MPruntimefile{mprun} -\fi +\fi %D \macros %D {MPgraphic} @@ -167,7 +166,7 @@ %D processed at once, which means that we reuse this file many %D times. When however the execution is delayed, all graphics %D are saved in a separate figure. The current graphic is -%D characterized bij a \COUNTER. This counter is available +%D characterized bij a \COUNTER. This counter is available %D in \type{\MPgraphic}. \newcount\currentMPgraphic @@ -179,7 +178,7 @@ % %D % %D If one want to reuse grapics, one can save much redundant % %D run time by setting the next switch to true. -% +% % \newif\ifreuseMPgraphics \reuseMPgraphicstrue %D The three macros responsible for writing the graphic @@ -189,16 +188,16 @@ %D {MPinclusions, startMPinclusions, MPinitializations} %D %D One can include for instance common input commands by -%D passing them to \type{\MPinclusions}: +%D passing them to \type{\MPinclusions}: %D %D \starttypen %D \MPinclusions{input mp-mine} %D \stoptypen %D -%D The token register \type {\MPinitializations} is expanded -%D before all other inclusions. +%D The token register \type {\MPinitializations} is expanded +%D before all other inclusions. -\newtoks \MPinitializations +\newtoks \MPinitializations \long\def\startMPinclusions#1\stopMPinclusions% {\long\def\theMPinclusions% @@ -226,13 +225,18 @@ \ifx \overlayheight \undefined \def \overlayheight {3cm} \fi \ifx \overlaylinewidth \undefined \def \overlaylinewidth {0pt} \fi -\long\def\writeMPgraphic#1% - {\bgroup - \edef\overlaywidth {\overlaywidth \space}% +\def\presetMPdefinitions% + {\edef\overlaywidth {\overlaywidth \space}% \edef\overlayheight {\overlayheight \space}% \edef\overlaylinewidth {\overlaylinewidth\space}% + \edef\currentwidth {\the\hsize \space}% + \edef\currentheight {\the\vsize \space}} + +\long\def\writeMPgraphic#1% \expanded testen + {\bgroup + \presetMPdefinitions + \let\par=\space \iflongMPlines - \let\par=\empty \long\def\flush##1##2\par% {\ifx##1\relax \else \immediate\write\MPwrite{##1##2}% @@ -249,42 +253,93 @@ \fi \egroup} -%D The \type {;} aware method (the \type {\else} branch) also -%D takes care of \type {btex}||\type {etex}, \type -%D {verbatimtex}||\type {etex}. The space after \type {tex} -%D is essential, since it protects \type {text}. +%D The \type {;} aware method (the \type {\else} branch) also +%D takes care of \type {btex}||\type {etex}, \type +%D {verbatimtex}||\type {etex}. The space after \type {tex} +%D is essential, since it protects \type {text}. + +\newif\ifMPTEXgraphic \def\dowriteMPgraphicline% {\futurelet\next\dodowriteMPgraphicline} +%D A first version: +%D +%D \starttypen +%D \long\def\dodowriteMPgraphicline#1tex #2#3etex#4\MPend% +%D {\ifx\next\empty\else\ifx\next\relax\else +%D \bgroup +%D \let\par=\space +%D \ifx#2\relax +%D \immediate\write\MPwrite{#1;}% +%D \egroup +%D \else +%D \global\MPTEXgraphictrue +%D \convertargument#2#3\to\ascii +%D \immediate\write\MPwrite{#1tex \ascii etex}% +%D \egroup +%D \dowriteMPgraphicline#4tex \relax etex\MPend +%D \fi +%D \fi\fi} +%D \stoptypen + +%D The next alternative also handles inclusions well. + +\newtoks \everyMPTEXgraphic + +\long\def\checkMPTEXgraphic#1% + {\expandafter\convertargument #1\to\asciiA + \convertargument etex\to\asciiB + \convertargument text\to\asciiC + \expandtwoargsafter\doifinstringelse{\asciiB}{\asciiA} + {\global\MPTEXgraphictrue} + {\expandtwoargsafter\doifinstringelse{\asciiC}{\asciiA} + {\global\MPTEXgraphictrue} + {\global\MPTEXgraphicfalse}}} + +\def\flushMPTEXgraphic% + {\ifMPTEXgraphic \ifx\everyMPTEXgraphic\emptytoks \else + \immediate\write\MPwrite{verbatimtex \the\everyMPTEXgraphic\space etex;}% + \fi \fi} + \long\def\dodowriteMPgraphicline#1tex #2#3etex#4\MPend% {\ifx\next\empty\else\ifx\next\relax\else \bgroup - \let\par=\empty + \let\par=\space \ifx#2\relax - \immediate\write\MPwrite{#1;}% + \iflongMPlines + \immediate\write\MPwrite{#1;}% + \else + \edef\ascii{#1}% + \long\def\flush##1##2;% + {\ifx##1\relax \else + \immediate\write\MPwrite{##1##2;}% + \expandafter\flush + \fi}% + \expandafter\flush\ascii\empty;\relax;% + \fi \egroup \else \convertargument#2#3\to\ascii - \immediate\write\MPwrite{#1tex \ascii etex}% + \immediate\write\MPwrite{#1tex \ascii etex}% \egroup \dowriteMPgraphicline#4tex \relax etex\MPend \fi \fi\fi} %D This stripper is suboptimal in the sense that more -%D \type{;}'s are output than feasible. Anyhow, \METAPOST\ -%D can handle this and users may consider it being a sort -%D of error prevention bonus. +%D \type{;}'s are output than feasible. Anyhow, \METAPOST\ +%D can handle this and users may consider it being a sort +%D of error prevention bonus. %D \macros %D {everyMPgraphic} %D -%D Because some graphics interact with \TEX\ (i.e.\ \CONTEXT), we +%D Because some graphics interact with \TEX\ (i.e.\ \CONTEXT), we %D provide a hook for additional actions: \type {\everyMPgraphic}. -\bgroup -\catcode`\%=12\gdef\percentletter{%} +\bgroup +\catcode`\%=12\gdef\percentletter{%} \egroup \newtoks\everyMPgraphic @@ -293,27 +348,35 @@ {\immediate\write\MPwrite{mpgraph:=\the\currentMPgraphic;}} \def\startwritingMPgraphic% - {\ifMPrun \else + {\bgroup + \def\_{\string_}% + \def\&{\string&}% + \def\{{\iftrue \string{\else}\fi}% + \def\}{\iffalse{\else\string}\fi}% + \ifMPrun \else \allocateMPslot\currentMPgraphic \fi + \enableincludeMPgraphics \ifrunMPgraphics \the\everyMPgraphic \xdef\MPgraphic{\the\currentMPgraphic}% \immediate\openout\MPwrite=\MPgraphicfile.mp - \immediate\write\MPwrite{\percentletter\space runtime generated graphic}% + \immediate\write\MPwrite{\percentletter\space runtime generated graphics of job "\jobname"}% \writeMPgraph \setMPrandomseed - \theMPinclusions + \theMPinclusions % no reset here ! \else \xdef\MPgraphic{\the\currentMPgraphic}% + \the\everyMPgraphic \ifnum\currentMPgraphic=1 - \the\everyMPgraphic \immediate\openout\MPwrite=\MPgraphicfile.mp + \immediate\write\MPwrite{\percentletter\space collected graphics of job "\jobname"}% \writeMPgraph \setMPrandomseed - \theMPinclusions \fi + \theMPinclusions \let\theMPinclusions\relax % reset here ! \fi + \flushMPTEXgraphic \ifMPrun \else \immediate\write\MPwrite{beginfig(\the\currentMPgraphic);}% \fi @@ -321,12 +384,13 @@ \global\let\stopwritingMPgraphic=\dostopwritingMPgraphic} \def\dostopwritingMPgraphic% - {\ifMPrun \else + {\ifMPrun \else \immediate\write\MPwrite{endfig;}% \fi \ifrunMPgraphics \dodostopwritingMPgraphic - \fi} + \fi + \egroup} \def\dodostopwritingMPgraphic% {\ifnum\currentMPgraphic>0 @@ -346,8 +410,8 @@ \let\stopwritingMPgraphic=\relax \let\flushMPgraphics =\relax -%D By default each graphic gets its own slot (number). Later -%D on we will define a recycle bin. +%D By default each graphic gets its own slot (number). Later +%D on we will define a recycle bin. \def \allocateMPslot#1{\global\advance#1 by 1 } \def\deallocateMPslot#1{} @@ -355,13 +419,13 @@ %D \macros %D {setMPrandomseed} %D -%D Did you notice the random seed initialization? This is -%D needed because \METAPOST\ has a rather poor initialization, -%D which in some implementations depends on the time in -%D minutes. So, in quick successive runs, random is not that -%D random. +%D Did you notice the random seed initialization? This is +%D needed because \METAPOST\ has a rather poor initialization, +%D which in some implementations depends on the time in +%D minutes. So, in quick successive runs, random is not that +%D random. -\newif\ifsetMPrandomseed % false by default +\newif\ifsetMPrandomseed \setMPrandomseedtrue % false by default \def\setMPrandomseed% {\ifsetMPrandomseed \ifx\getrandomnumber\undefined \else @@ -369,8 +433,8 @@ \writeMPgraphic{randomseed := \localMPseed ;}% \fi\fi} -%D This feature has become optional. Thanks to Fabrice Popineau, -%D \METAPOST\ can now do a far better job! +%D This feature has become optional. Thanks to Fabrice Popineau, +%D \METAPOST\ can now do a far better job! %D \macros %D {flushMPgraphics} @@ -380,7 +444,7 @@ %D every \type{\stopMPgraphic}. Therefore we need to say: %D %D \starttypen -%D \flushMPgraphic +%D \flushMPgraphics %D \stoptypen %D %D else the file is closed without writing the \METAPOST\ end @@ -406,7 +470,8 @@ \newbox\MPgraphicbox \def\doloadcurrentMPgraphic#1% - {\loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{#1}} + {\loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{#1}% + \deallocateMPslot\currentMPgraphic} % added \ifCONTEXT \def\loadcurrentMPgraphic{\dosinglegroupempty\doloadcurrentMPgraphic} @@ -437,7 +502,7 @@ %D to be reused. When the next switch is set, graphics are %D cached. -\newif\ifuseMPbox \useMPboxtrue +\newif\ifuseMPbox \useMPboxtrue \def\douseMPbox#1% {\setobject{MP}{#1} @@ -449,49 +514,61 @@ \setgvalue{#1}% {\getobject{MP}{#1}}} +% More save is to use a number for {MP}{#1} which permits +% redefinition. I have to test it first. +% +% \newcounter\MPobjectcounter +% +% \def\douseMPbox#1% +% {\doglobal\increment\MPobjectcounter +% \setobject{MP}{\MPobjectcounter} +% \vbox +% {\forgetall +% \loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{}% +% \deallocateMPslot\currentMPgraphic +% \placeMPgraphic}% +% \setxvalue{#1}% +% {\noexpand\getobject{MP}{\MPobjectcounter}}} + \def\nouseMPbox#1% {\setxvalue{#1}% {\noexpand\forgetall \noexpand\loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{}% + \deallocateMPslot\currentMPgraphic \noexpand\placeMPgraphic}} \ifCONTEXT \else \let\douseMPbox=\nouseMPbox \fi \ifCONTEXT \else \let\doifobjectssupportedelse=\relax \fi % \long\def\startreusableMPgraphic#1#2\stopreusableMPgraphic% -% {%\reuseMPgraphicstrue -% \doifundefined{MP:#1} -% {\startMPgraphic#2\stopMPgraphic -% \doifobjectssupportedelse{}{\useMPboxfalse}% -% \ifuseMPbox -% \douseMPbox{MP:#1}% -% \else -% \nouseMPbox{MP:#1}% -% \fi}} - -%\long\def\startreusableMPgraphic#1#2\stopreusableMPgraphic% -% {\doifundefined{MP:#1} -% {\long\setgvalue{MP:#1}% +% {\ifundefined{MP:#1}% +% \long\setgvalue{MP:#1}% % {\startMPgraphic#2\stopMPgraphic -% \doifobjectssupportedelse{}{\useMPboxfalse}% +% \doifobjectssupportedelse{}{\useMPboxfalse}% % \ifuseMPbox % \douseMPbox{MP:#1}% % \else % \nouseMPbox{MP:#1}% % \fi -% \getvalue{MP:#1}}}} +% \getvalue{MP:#1}}% +% \fi} + +\long\def\handlereusableMPgraphic#1#2% + {\bgroup + \enableincludeMPgraphics + \startMPgraphic#2\stopMPgraphic + \doifobjectssupportedelse{}{\useMPboxfalse}% + \ifuseMPbox + \douseMPbox{MP:#1}% + \else + \nouseMPbox{MP:#1}% + \fi + \getvalue{MP:#1}% + \egroup} \long\def\startreusableMPgraphic#1#2\stopreusableMPgraphic% - {\ifundefined{MP:#1}% - \long\setgvalue{MP:#1}% - {\startMPgraphic#2\stopMPgraphic - \doifobjectssupportedelse{}{\useMPboxfalse}% - \ifuseMPbox - \douseMPbox{MP:#1}% - \else - \nouseMPbox{MP:#1}% - \fi - \getvalue{MP:#1}}% + {\ifundefined{MP:#1}% + \long\setgvalue{MP:#1}{\handlereusableMPgraphic{#1}{#2}}% \fi} \def\reuseMPgraphic#1% @@ -503,16 +580,58 @@ %D The every||time||it's||used original one is defined below. %D This one makes sense when the graphic uses random numbers. +\long\def\handleuseMPgraphic#1#2% + {\bgroup + \enableincludeMPgraphics + \startMPgraphic#2\stopMPgraphic + \loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{}% + \deallocateMPslot\currentMPgraphic + \placeMPgraphic + \egroup} + \long\def\startuseMPgraphic#1#2\stopuseMPgraphic% - {%\reuseMPgraphicstrue - \long\setgvalue{MP:#1}% - {\startMPgraphic#2\stopMPgraphic - \loadMPgraphic{\MPgraphicfile.\the\currentMPgraphic}{}% - \deallocateMPslot\currentMPgraphic - \placeMPgraphic}} + {\long\setgvalue{MP:#1}{\handleuseMPgraphic{#1}{#2}}} + +\long\def\startusableMPgraphic#1#2\stopusableMPgraphic% dummy + {\long\setgvalue{MP:#1}{\handleuseMPgraphic{#1}{#2}}} % unsafe {}{} \let\useMPgraphic=\reuseMPgraphic +%D \macro +%D {doifMPgraphicelse} +%D +%D For (mainly internal) pusposes we provide a test macro. + +\def\doifMPgraphicelse#1% + {\doifdefinedelse{MP:#1}} + +%D \macros +%D {includeMPgraphic} +%D +%D In a graphic one can call up another (predefined one) +%D like: +%D +%D \starttypen +%D \startuseMPgraphic{a} +%D fill fullcircle scaled 100 ; +%D \stopuseMPgraphic +%D +%D \startuseMPgraphic{b} +%D \includeMPgraphic{a} +%D fill fullsquare rotated 45 scaled 50 withcolor red ; +%D \stopuseMPgraphic +%D +%D \useMPgraphic{b} +%D \stoptypen + +\def\includeMPgraphic#1% + %{\getvalue{MP:#1}} + {\csname MP:#1\endcsname} + +\def\enableincludeMPgraphics% + {\let\handleuseMPgraphic \secondoftwoarguments + \let\handlereusableMPgraphic\secondoftwoarguments} + %D We didn't yet define the macro responsible for processing %D the graphic from within \TEX. @@ -524,11 +643,26 @@ \fi} %D \macros +%D {useMETAFUNformat} +%D +%D For faster running, one can generate a format, saying +%D +%D \startypen +%D mpost -ini context +%D \stoptypen +%D +%D (The resulting \type {mem} file should be moved to the +%D right location. Watch out for misatching \type {progname} +%D directives, since they can clutter memory. + +\newif\ifuseMETAFUNformat + +%D \macros %D {executeMetaPost, executeMETAPOST, executesystemcommand} %D %D With \type{\executeMETAPOST} being defined as: -\ifx\undefined\executeMetaPost +\ifx\undefined\executeMETAPOST \def\executeMETAPOST#1{\executesystemcommand{\executeMetaPost{#1}}} \fi @@ -539,7 +673,39 @@ \fi \ifx\undefined\executeMetaPost - \def\executeMetaPost#1{mpost #1} + + \ifx\undefined\interactionmode \chardef\interactionmode=255 \fi + +% \def\executeMPOST#1% +% {mpost +% \ifcase\interactionmode -int=batchmode \fi +% \ifuseMETAFUNformat -progname=mpost -mem=metafun \fi #1} + + \def\MPOSTbatchswitch {-int=batchmode} + \def\MPOSTformatswitch{-progname=mpost -mem=} + + \def\executeMPOST#1% + {mpost + \ifcase\interactionmode \MPOSTbatchswitch\space \fi + \ifuseMETAFUNformat \MPOSTformatswitch metafun \fi #1} + + \def\executeMPTEX#1% + {texexec + --batch \ifcase\interactionmode --logfile='mptex.log' \fi + --output=dvips + \ifuseMETAFUNformat --mpformat=metafun \fi --mptex --nomp --once #1} + + \def\executeMetaPost#1% + {\ifrunMPTEXgraphics + \ifMPTEXgraphic + \executeMPTEX{#1}% + \else + \executeMPOST{#1}% + \fi + \else + \executeMPOST{#1}% + \fi} + \fi %D \macros @@ -555,7 +721,13 @@ {\ifx\undefined\externalfigure \message{[insert file #1 here]}% \else - \externalfigure[#1][\c!type=\c!mps,\c!object=\v!nee,#2]% + \externalfigure + [#1] + [\c!type=\c!mps,\c!object=\v!nee, + \c!symbool=\v!ja,\c!reset=\v!ja, + \c!maxbreedte=,\c!maxhoogte=, + \c!kader=\v!uit,\c!achtergrond=, + #2]% \fi} \fi @@ -565,40 +737,40 @@ %D of its use can be found in the modules \type{supp-tpi} and %D \type{prag-log}. -%D This module can be used in \PLAIN\ \TEX too. When using +%D This module can be used in \PLAIN\ \TEX too. When using %D \DVIPS, just try to process: -%D +%D %D \starttypen %D \input supp-mps %D %D \runMPgraphicstrue -%D +%D %D \def\insertMPfile#1#2% %D {\special{psfile=#1}} -%D +%D %D \startuseMPgraphic{1} %D prologues := 1; %D draw (0,0) withpen pencircle scaled 100; %D \stopuseMPgraphic -%D +%D %D \useMPgraphic{1} %D \stoptypen -%D +%D %D Don't forget to enable \type{\write18}. When does not say -%D \type{\runMPgraphicstrue}, the \METAPOST\ scratch file +%D \type{\runMPgraphicstrue}, the \METAPOST\ scratch file %D must be closed by saying -%D +%D %D \starttypen %D \flushMPgraphics %D \stoptypen %D %D When using the indirect method, one has to process the file -%D \type{mpgraph.mp} between two successive \TEX\ runs. - -%D For some reason, \METAPOST\ needs the public domain \DVI\ to -%D \POSTSCRIPT\ converter \DVIPS. This symbiosis originates in -%D the need to include the fonts (glyphs) that \METAPOST\ uses -%D in the \POSTSCRIPT\ file. Driver independancy was one of my +%D \type{mpgraph.mp} between two successive \TEX\ runs. +%D +%D \METAPOST\ needs the public domain \DVI\ to \POSTSCRIPT\ +%D converter \DVIPS. This symbiosis originates in the need to +%D include the fonts (glyphs) that \METAPOST\ uses in the +%D \POSTSCRIPT\ file. Driver independancy was one of my %D prerequisites for using \METAPOST, so I decided to build %D this kind of support myself. Personally I consider driver %D dependancy a drawback for the dissemination of such a @@ -655,9 +827,9 @@ %D that handles the inclusion. The characters are in the file %D but made invisible. %D -%D In \CONTEXT\ font handling is intergrated in the figure +%D In \CONTEXT\ font handling is intergrated in the figure %D inclusion macros. A decent plain \TEX\ alternative is: -%D +%D %D \starttypen %D \def\includeMPgraphic#1% %D {\hbox\bgroup @@ -676,10 +848,10 @@ %D urx=\EPSurx\space %D ury=\EPSury\space}}% %D \egroup} -%D \stoptypen +%D \stoptypen %D -%D This macro needs \type {supp-eps.tex} and provided no -%D scaling. For \LATEX\ users the next one wil do: +%D This macro needs \type {supp-eps.tex} and provided no +%D scaling. For \LATEX\ users the next one wil do: %D %D \starttypen %D \def\includeMPgraphic#1#% @@ -688,8 +860,8 @@ %D {\includeMPfonts{##1}% %D \includegraphics[type=mps,#1]{##1}% or whatever type they use %D \egroup}% -%D \includeMPgraphics} -%D \stoptypen +%D \includeMPgraphics} +%D \stoptypen %D We scan the graphics file for the \type{fshow} operator, %D that is, lines that start with \type{(}. If found it @@ -769,7 +941,7 @@ %D {\font\temp=#2 at #3bp\temp#1} %D \stoptypen %D -%D While processing some \TUG~98 proceedings, I also had to +%D While processing some \TUG~98 proceedings, I also had to %D deal with: %D %D \starttypen @@ -777,7 +949,7 @@ %D (T) ANTTB 7.13086 nfont fshow %D \stoptypen %D -%D which comes to rounding sizes. This is something +%D which comes to rounding sizes. This is something %D experimental. \def\PSnfont{nfont} @@ -789,8 +961,8 @@ \ifdim\scratchdimen<1pt \def\size{1pt}% \else - \advance\scratchdimen by .5pt - \def\size##1.##2\relax{\def\size{##1pt}}% + \advance\scratchdimen by .5pt + \def\size##1.##2\relax{\def\size{##1pt}}% \expandafter\size\the\scratchdimen\relax \fi \else @@ -860,7 +1032,7 @@ %D saves time in a succesive passes and can't harm, simply %D because MP can generate them anew. -\def\convertMPcolorpath{} +\def\convertMPcolorpath{} \def\convertMPcolorfile{metacmyk.tmp} \def\convertMPcolors#1% @@ -935,9 +1107,9 @@ \withoutpt{\the\dimen2} \space \withoutpt{\the\dimen4} \space \withoutpt{\the\dimen6} \space setcmykcolor #4}% - \fi - \egroup - \donetrue} % needed for message + \fi + \egroup + \donetrue} % needed for message \def\handleMPcopy% {\immediate\write\scratchwrite{\fileline}} @@ -1068,7 +1240,7 @@ %D {experimental} %D %D Some experimental macros: -%D +%D %D \starttypen %D \startMPdrawing %D \stopMPdrawing @@ -1076,10 +1248,11 @@ %D \popMPdrawing %D \resetMPdrawing %D \ifMPdrawingdone +%D \getMPdrawing %D \MPdivten[number] %D \stoptypen %D -%D These macros are used in \PPCHTEX. +%D These macros are used in \PPCHTEX. \let\MPdrawingdata\empty @@ -1089,7 +1262,7 @@ \def\resetMPdrawing% {\global\let\MPdrawingdata\empty \global\MPdrawingdonefalse} - + \def\pushMPdrawing% {\pushmacro\MPdrawingdata \global\let\MPdrawingdata\empty} @@ -1097,32 +1270,27 @@ \def\popMPdrawing% {\popmacro\MPdrawingdata} -% \def\getMPdrawing% -% {\ifMPdrawingdone -% \bgroup -% \setbox0=\hbox -% {\expandafter\startMPgraphic\MPdrawingdata\stopMPgraphic -% \loadcurrentMPgraphic\empty -% \placeMPgraphic}% -% \ifMPshiftdrawing -% \dimen0=\MPllx bp -% \dimen2=\MPlly bp -% \hbox{\hskip\dimen0\raise\dimen2\box0}% -% \else -% \box0 -% \fi -% \egroup -% \fi} - \def\getMPdrawing% {\ifMPdrawingdone \expandafter\startMPgraphic\MPdrawingdata\stopMPgraphic \loadcurrentMPgraphic\empty + \deallocateMPslot\currentMPgraphic % new \placeMPgraphic \fi} -\long\def\startMPdrawing#1\stopMPdrawing% - {\long\xdef\MPdrawingdata{\MPdrawingdata#1}} +\def\startMPdrawing% + {\dosingleempty\dostartMPdrawing} + +\long\def\dostartMPdrawing[#1]#2\stopMPdrawing% + {\relax + \bgroup + \enableincludeMPgraphics + \presetMPdefinitions + \doifelse{#1}{-} + {\convertargument#2\to\asciiA} + {\long\def\asciiA{#2}}% + \long\xdef\MPdrawingdata{\MPdrawingdata\asciiA}% + \egroup} \def\MPdivten[#1]% {\@EA\@EA\@EA\doMPdivten\@EA\@EA\@EA[\@EA#1]} @@ -1147,27 +1315,29 @@ \def\dodoMPdivtenE #1#2{#1.#2} \def\dodoMPdivtenF #1{.#1} -%D \macros +%D \macros %D {startMPclip,grabMPclippath} %D -%D We can use \METAPOST\ to calculate arbitrary clipping -%D paths. Such a path is defined by (for instance): +%D We can use \METAPOST\ to calculate arbitrary clipping +%D paths. Such a path is defined by (for instance): %D %D \starttypen %D \startMPclip{window} -%D clip currentpicture to fullcircle xscaled \width yscaled \height ; +%D clip currentpicture to fullcircle xscaled \width yscaled \height ; %D \stopMPclip %D \stoptypen %D %D Such a path can be extracted (processed) by: %D -%D \starttypen -%D \grabMPpath{window}{method}{width}{height}{default path} +%D \starttypen +%D \grabMPclippath{window}{method}{width}{height}{default path} %D \stoptypen %D -%D Currently only method 1 makes sense; it produces \PDF\ -%D code. This macro only makes sense when hooked into a -%D special routine. +%D Currently only method 1 makes sense; it produces \PDF\ +%D code. This macro only makes sense when hooked into a +%D special routine. + +\let\MPclippath\empty \long\def\startMPclip#1#2\stopMPclip% {\long\setgvalue{MPC:#1}% @@ -1181,7 +1351,7 @@ {\getvalue{MPC:#1}% \setxvalue{MPC:#1}{\noexpand\xdef\noexpand\MPclippath{\MPclippath}}}% {\xdef\MPclippath{#5}}% - \ifcase#2\else + \ifcase#2\else % method 1 : \doglobal\stripcharacter urveto\from\MPclippath\to\MPclippath \doglobal\stripcharacter oveto\from\MPclippath\to\MPclippath \doglobal\stripcharacter ineto\from\MPclippath\to\MPclippath @@ -1189,27 +1359,34 @@ \egroup} %D We pose some restrictions to the \METAPOST\ code and pickup -%D the last path in the file. +%D the clip path from the file. +%D +%D We turn the slash into a comment. The \type {\hbox} grabs spaces +%D and the \type {%} triggers the grabber. Next we filter the +%D clipping path, or actually, the first path. \bgroup \catcode`\%=\@@active \catcode`\/=\@@comment -\gdef\dograbMPclippath/ / the slash is now comment - {\setbox\scratchbox=\hbox\bgroup/ / the box grabs spaces - \catcode`\%=\@@active / the % token is a trigger - \obeylines\let\obeyedline\space / lines are ignores - \def%##1newpath##2closepath##3showpage/ we only need the path - {\xdef\MPclippath{##2}\endinput}/ / and can ignore the rest +\gdef\dograbMPclippath/ + {\setbox\scratchbox=\hbox\bgroup/ + \catcode`\%=\@@active + \obeylines\let\obeyedline\space + \def\do##1newpath##2closepath##3\od/ + {\xdef\MPclippath{##2}\endinput}/ + \def%##1%%EOF/ + {\do##1newpathclosepath\od\endinput}/ \readfile{\MPgraphicfile.\the\currentMPgraphic}{}{}/ + \deallocateMPslot\currentMPgraphic / new \egroup} \egroup %D \macros %D {recycleMPslots} %D -%D When coding and embedding many \METAPOST\ figures in a -%D document, one can save quite some disk space by using -%D \PDFTEX\ and setting the next switch: +%D When coding and embedding many \METAPOST\ figures in a +%D document, one can save quite some disk space by using +%D \PDFTEX\ and setting the next switch: \newif\ifrecycleMPslots \recycleMPslotsfalse @@ -1240,10 +1417,36 @@ %\message{[MP slot - \number#1]}% \fi} -%D Experimental: +%D Experimental and overloaded later, since we need to be +%D more clever due to \METAPOST's limit of 4~open files. \def\MPdatafile% - {mp-\the\currentMPgraphic.tmp} + {mp-\the\currentMPgraphic.mpd} + +\def\getMPdata% + {\input \MPdatafile\relax} + +%D \macros +%D {MPtoks, MPbox} +%D +%D For convenience, we provide some scratch registers: + +\ifx\undefined\MPtoks \newtoks\MPtoks \fi +\ifx\undefined\MPbox \newbox \MPbox \fi + +%D \macros +%D {startMPcode} +%D +%D We can save some typing with: +%D +%D \starttypen +%D \startMPcode whatever \stopMPcode +%D \stoptypen +%D +%D this automatically places the graphic + +\long\def\startMPcode#1\stopMPcode% + {\startuseMPgraphic{@@}#1\stopuseMPgraphic\useMPgraphic{@@}} \protect diff --git a/tex/context/base/supp-pdf.tex b/tex/context/base/supp-pdf.tex index 83205eb13..559e95644 100644 --- a/tex/context/base/supp-pdf.tex +++ b/tex/context/base/supp-pdf.tex @@ -1,6 +1,6 @@ %D \module %D [ file=supp-pdf, -%D version=2000.04.28, +%D version=2000.10.14, %D title=\CONTEXT\ Support Macros, %D subtitle=\METAPOST\ to \PDF\ conversion, %D author=Hans Hagen, @@ -33,14 +33,16 @@ \unprotect -\ifx\pdfliteral\undefined - \def\PDFcode#1{\message{[ignored pdfliteral: #1]}} -\else - \let\PDFcode\pdfliteral +\ifx\PDFcode\undefined + \ifx\pdfliteral\undefined + \def\PDFcode#1{\special{PDF: #1}} + \else + \let\PDFcode\pdfliteral + \fi \fi %D \macros -%D {pdfimage,pdfimages} +%D {pdfimage,pdfimages,pdfclippedimage} %D %D Starting with pdftex version 14, images are included more %D natural to the form embedding. This enables alternative @@ -53,12 +55,21 @@ %D %D The first one replaces the pre||version||14 original, %D while the latter provides alternative images. +%D +%D The next macro is dedicated to Maarten Gelderman, who +%D needed to paste prepared \PDF\ pages into conference +%D proceedings. +%D +%D \starttypen +%D \pdfclippedimage <optional dimensions> {file} {l} {r} {t} {b} +%D \stoptypen \ifx\pdftexversion\undefined - \writestatus{\m!systems}{Why not use pdf(e)TeX binaries?} + \protect\expandafter\endinput +\fi -\else\ifnum\pdftexversion>13 +\ifnum\pdftexversion>13 \def\pdfimage#1#% {\dopdfimage{#1}} @@ -79,13 +90,33 @@ attr {/Alternates \the\pdflastobj\space0 R}{#3}% \pdfrefximage\pdflastximage} + \def\pdfclippedimage#1#% specs {file}{left}{right}{top}{bottom} + {\dopdfclippedimage{#1}} + + \def\dopdfclippedimage#1#2#3#4#5#6% + {\bgroup + \pdfximage#1{#2}% + \setbox\scratchbox=\hbox + {\pdfrefximage\pdflastximage}% + \hsize=\wd\scratchbox + \advance\hsize by -#3 + \advance\hsize by -#4 + \vsize=\ht\scratchbox + \advance\vsize by -#5 + \advance\vsize by -#6 + \setbox\scratchbox=\vbox to \vsize + {\vskip-#5\hbox to \hsize{\hskip-#3\box\scratchbox\hss}}% + \pdfxform\scratchbox + \pdfrefxform\pdflastxform + \egroup} + %D For old times sake: \let\pdfform =\pdfxform \let\pdflastform=\pdflastxform \let\pdfrefform =\pdfrefxform -\fi\fi +\fi %D \macros %D {convertPDFtoPDF} @@ -332,6 +363,7 @@ \def \PSHiResBoundingBox {HiResBoundingBox:} \def \PSExactBoundingBox {ExactBoundingBox:} \def \PSMetaPostSpecial {MetaPostSpecial:} +\def \PSMetaPostSpecials {MetaPostSpecials:} \def \PSPage {Page:} %D By the way, the \type {setcmykcolor} operator is not @@ -554,15 +586,13 @@ \PDFcode{\gMPa1 \gMPa2 \gMPa3 \gMPa4 \gMPa5 \gMPa6 cm}% \resetMPstack \else\ifx\somestring\PSsetrgbcolor - \PDFcode{\!MP{\gMPa1} \!MP{\gMPa2} \!MP{\gMPa3} rg - \!MP{\gMPa1} \!MP{\gMPa2} \!MP{\gMPa3} RG}% + \handleMPrgbcolor \resetMPstack \else\ifx\somestring\PSsetcmykcolor - \PDFcode{\!MP{\gMPa1} \!MP{\gMPa2} \!MP{\gMPa3} \!MP{\gMPa4} k - \!MP{\gMPa1} \!MP{\gMPa2} \!MP{\gMPa3} \!MP{\gMPa4} K}% + \handleMPcmykcolor \resetMPstack \else\ifx\somestring\PSsetgray - \PDFcode{\!MP{\gMPa1} g \!MP{\gMPa1} G}% + \handleMPgraycolor \resetMPstack \else\ifx\somestring\PStranslate \PDFcode{1 0 0 1 \gMPa1 \gMPa2 cm}% @@ -602,6 +632,22 @@ \fi \handleMPsequence} +%D Since colors are not sensitive to transformations, they +%D are sometimes used for signaling. Therefore, we handle them +%D separately. The next macro can be redefined if needed. + +\def\handleMPrgbcolor% + {\PDFcode{\!MP{\gMPa1} \!MP{\gMPa2} \!MP{\gMPa3} rg + \!MP{\gMPa1} \!MP{\gMPa2} \!MP{\gMPa3} RG}} + +\def\handleMPcmykcolor% + {\PDFcode{\!MP{\gMPa1} \!MP{\gMPa2} \!MP{\gMPa3} \!MP{\gMPa4} k + \!MP{\gMPa1} \!MP{\gMPa2} \!MP{\gMPa3} \!MP{\gMPa4} K}} + +\def\handleMPgraycolor% + {\PDFcode{\!MP{\gMPa1} g + \!MP{\gMPa1} G}} + %D Beginning and ending the graphics is taken care of by the %D macro \type{\handleMPgraphic}, which is redefined when %D the first graphics operator is met. @@ -624,11 +670,13 @@ \let\handleMPsequence=\finishMPgraphic \else\ifx\somestring\PSPage \let\handleMPsequence=\handleMPpage + \else\ifx\somestring\PSMetaPostSpecials + \let\handleMPsequence=\handleMPspecialscomment \else\ifx\somestring\PSMetaPostSpecial \let\handleMPsequence=\handleMPspecialcomment \else \setMPargument{#1}% kan weg - \fi\fi\fi\fi\fi\fi} + \fi\fi\fi\fi\fi\fi\fi} \let\handleMPgraphic=\handleMPbegingraphic @@ -684,6 +732,8 @@ \let\handleMPsequence=\dohandleMPsequence \handleMPsequence} +\let\handleMPspecialscomment\handleMPspecialcomment + %D We use the \type{page} comment as a signal that %D stackbuilding can be started. @@ -743,14 +793,14 @@ \else \scratchcounter=1 \def\dodo##1% - {\edef\!!stringa{##1}\ifx\!!stringa\space\char32\else##1\fi}% + {\edef\!!stringa{##1}\ifx\!!stringa\space\MPspacechar\else##1\fi}% \def\do(##1{\dodo{##1}}% - \gMPa\scratchcounter\space + \gMPa\scratchcounter\MPspacechar \let\do\relax \loop \advance\scratchcounter by 1 - \ifnum\scratchcounter<\nofMParguments - [\gMPa\scratchcounter]\space + \ifnum\scratchcounter<\nofMParguments\relax + \gMPa\scratchcounter\MPspacechar \repeat \def\do##1){\dodo{##1}}% \gMPa\scratchcounter @@ -778,6 +828,25 @@ \box\scratchbox \egroup} +%D You could consider the following definition to be the most +%D natural one. + +\def\MPspacechar% normal case + {\space} + +%D However, the following implementation is more robust, since +%D some fonts have funny visible spaces in the space slot. This +%D gives a mismatch between the space that \METAPOST\ took into +%D account and the \quote {natural} space. This only happens in +%D labels, since \type {btex}||\type {etex} thingies don't have +%D spaces. This phenomena showed up when preparing the +%D \METAFUN\ manual, where Palatino fonts are used. We can +%D safely assume that \METAPOST\ considers \type {\char32} to +%D be the space. + +\def\MPspacechar% + {\setbox\scratchbox=\hbox{\char32}\kern\wd\scratchbox}% + %D Most operators are just converted and keep their %D arguments. Dashes however need a bit different treatment, %D otherwise \PDF\ viewers complain loudly. Another @@ -1359,6 +1428,8 @@ \let\currentPDFresources\empty +\newtoks\everyMPtoPDFconversion + \def\convertMPtoPDF#1#2#3% {\bgroup \setbox\scratchbox=\vbox\bgroup @@ -1374,6 +1445,7 @@ \def\doprocessMPtoPDFfile#1#2#3% file xscale yscale {\setMPspecials + \the\everyMPtoPDFconversion \catcode`\^^M=\@@endofline \startMPscanning \let\do=\empty @@ -1406,7 +1478,7 @@ \ifcase\makeMPintoPDFobject \box\scratchbox \or - \immediate\pdfxform attr{\currentPDFresources}\scratchbox + \immediate\pdfxform resources{\currentPDFresources}\scratchbox \xdef\lastPDFMPobject{\the\pdflastxform}% \pdfrefxform\lastPDFMPobject \global\let\currentPDFresources\empty @@ -1415,6 +1487,8 @@ \fi \egroup} +% funny clip in viewer +% % \setbox\scratchbox=\vbox % {\forgetall % \dimen0=\MPllx bp @@ -1425,7 +1499,7 @@ % \wd\scratchbox=\!!zeropoint % \hbox % {\PDFcode{q \MPxscale\space 0 0 \MPyscale\space 0 0 cm}% -% \lower\MPheight\box\scratchbox +% \lower\MPshift\box\scratchbox % \PDFcode{Q}}}% %D \macros diff --git a/tex/context/base/supp-ran.tex b/tex/context/base/supp-ran.tex index efac4fa94..ec0f73f15 100644 --- a/tex/context/base/supp-ran.tex +++ b/tex/context/base/supp-ran.tex @@ -37,10 +37,9 @@ %D The randomseed can be set by: %D %D \starttypen -%D \setrandomseed{number>0] +%d \setrandomseed{number>0] %D \stoptypen - \ifx\nextrandom\undefined \readfile{random.tex} @@ -56,7 +55,8 @@ \else - \let\normalnextrandom=\nextrandom + \let\normalnextrandom = \nextrandom + \let\restorerandomseed = \relax \def\nextrandom% {\bgroup @@ -65,11 +65,28 @@ \let\month=\normalmonth \let\year =\normalyear \normalnextrandom - \global\let\nextrandom=\normalnextrandom + \gdef\nextrandom{\restorerandomseed\normalnextrandom}% \egroup} + % avoid scratch dimens 0 and 2 + + \unprotect + + \def\setrandim#1#2#3% dimen register, minimum length, maximum length + {\scratchdimen=#2\edef\!!stringa{\number\scratchdimen}% + \scratchdimen=#3\edef\!!stringb{\number\scratchdimen}% + \setrannum\ranval\!!stringa\!!stringb + #1\ranval sp\relax} + + \protect + \fi +\def\freezerandomseed% + {\xdef\restorerandomseed% + {\global\randomi\number\randomi + \global\let\noexpand\restorerandomseed\relax}} + \let\getrandomcount = \setrannum \let\getrandomdimen = \setrandim diff --git a/tex/context/base/symb-eur.tex b/tex/context/base/symb-eur.tex new file mode 100644 index 000000000..7b21ffa2e --- /dev/null +++ b/tex/context/base/symb-eur.tex @@ -0,0 +1,52 @@ +%D \module +%D [ file=symb-eur, +%D version=2000.06.22, +%D title=\CONTEXT\ Symbol Libraries, +%D subtitle=Adobe Euro Symbols, +%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. + +\definefontsynonym [EuroSerif] [eurose] +\definefontsynonym [EuroSerifBold] [euroseb] +\definefontsynonym [EuroSerifItalic] [eurosei] +\definefontsynonym [EuroSerifSlanted] [eurosei] +\definefontsynonym [EuroSerifBoldItalic] [eurosebi] +\definefontsynonym [EuroSerifBoldSlanted] [eurosebi] + +\definefontsynonym [EuroSans] [eurosa] +\definefontsynonym [EuroSansBold] [eurosab] +\definefontsynonym [EuroSansItalic] [eurosai] +\definefontsynonym [EuroSansSlanted] [eurosai] +\definefontsynonym [EuroSansBoldItalic] [eurosabi] +\definefontsynonym [EuroSansBoldSlanted] [eurosabi] + +\definefontsynonym [EuroMono] [euromo] +\definefontsynonym [EuroMonoBold] [euromob] +\definefontsynonym [EuroMonoSlanted] [euromoi] +\definefontsynonym [EuroMonoItalic] [euromoi] +\definefontsynonym [EuroMonoBoldItalic] [euromobi] +\definefontsynonym [EuroMonoBoldSlanted] [euromobi] + +\definesymbol [euro] [\getglyph{Euro}{\char160}] + +\unexpanded\def\euro{\symbol[euro]} + +%D The next table shows the complete set of symbols: +%D +%D \starttabulate[|l|c|c|c|c|c|c|] +%D \NC \NC \tex{tf} \NC \tex{bf} \NC \tex{sl} +%D \NC \tex{it} \NC \tex{bs} \NC \tex{bi} \NC\NR +%D \NC \rm Serif \NC \rm\tf\euro \NC \rm\bf\euro \NC \rm\sl\euro +%D \NC \rm\it\euro \NC \rm\bs\euro \NC \rm\bi\euro \NC\NR +%D \NC \ss Sans \NC \ss\tf\euro \NC \ss\bf\euro \NC \ss\sl\euro +%D \NC \ss\it\euro \NC \ss\bs\euro \NC \ss\bi\euro \NC\NR +%D \NC \tt Mono \NC \tt\tf\euro \NC \tt\bf\euro \NC \tt\sl\euro +%D \NC \tt\it\euro \NC \tt\bs\euro \NC \tt\bi\euro \NC\NR +%D \stoptabulate + +\endinput diff --git a/tex/context/base/symb-ini.tex b/tex/context/base/symb-ini.tex index 16a05c096..18822256e 100644 --- a/tex/context/base/symb-ini.tex +++ b/tex/context/base/symb-ini.tex @@ -41,6 +41,16 @@ 1: nacita se soubor symbolu -- \stopmessages +\startmessages italian library: symbols + title: simboli + 1: caricamento gruppo di simboli -- +\stopmessages + +\startmessages norwegian library: symbols + title: symboler + 1: leser inn symbolsett -- +\stopmessages + %D \macros %D {definesymbol, symbol} %D @@ -63,34 +73,48 @@ %D \definesymbol [level 5] [$\star$] %D \stoptypen +% ss:tag -> symbol +% ss:set:tag -> symbol out of set +% sstag -> list of symbols in set + \def\dodefinesymbol[#1][#2]% {\ifx\currentsymbolset\empty - \setvalue{\??ss#1}{#2}% + \setvalue{\??ss:#1}{#2}% \else - \doifundefinedelse{\??ss:\currentsymbolset} + \doifundefinedelse{\??ss\currentsymbolset} {\let\currentsymbollist\empty} - {\edef\currentsymbollist{\csname\??ss:\currentsymbolset\endcsname}}% + {\edef\currentsymbollist{\csname\??ss\currentsymbolset\endcsname}}% \addtocommalist{#1}\currentsymbollist - \setvalue{\??ss\currentsymbolset#1}{#2}% - \letvalue{\??ss:\currentsymbolset}\currentsymbollist + \setvalue{\??ss:\currentsymbolset:#1}{#2}% + \letvalue{\??ss\currentsymbolset}\currentsymbollist \fi} \def\definesymbol% {\dodoubleargument\dodefinesymbol} -\def\dosymbol[#1][#2]% +\unexpanded\def\symbol% % This one always gobbles spaces, + {\dodoubleempty\dosymbol} % so never change it again! + +\def\dosymbol[#1][#2]% {\ifsecondargument - \doifdefinedelse{\??ss#1#2} - {\getvalue{\??ss#1#2}} - {\doifdefinedelse{\??ss#2}{\getvalue{\??ss#2}}{#2}}% + \doifdefinedelse{\??ss:#1:#2} + {\dodosymbol{#1:#2}} + {\doifdefinedelse{\??ss:#2}{\dodosymbol{#2}}{#2}}% + \else\ifx\currentsymbolset\empty + \doifdefinedelse{\??ss:#1}{\dodosymbol{#1}}{#1}% \else - \doifdefinedelse{\??ss\currentsymbolset#1} - {\getvalue{\??ss\currentsymbolset#1}} - {\doifdefinedelse{\??ss#1}{\getvalue{\??ss#1}}{#1}}% - \fi} + \doifdefinedelse{\??ss:\currentsymbolset:#1} + {\dodosymbol{\currentsymbolset:#1}} + {\doifdefinedelse{\??ss:#1}{\dodosymbol{#1}}{#1}}% + \fi\fi} -\unexpanded\def\symbol% % This one always gobbles spaces, - {\dodoubleempty\dosymbol} % so never change it again! +\def\dodosymbol#1% + {{\the\everysymbol\getvalue{\??ss:#1}}} + +\newtoks\everysymbol + +% % % % % +% this should go in symb-fig, to be loaded after core-fig %D \macros %D {definefiguresymbol} @@ -104,13 +128,21 @@ \def\defaultsymbolfactor{10} +\def\dohandlefiguresymbol#1#2% + {\externalfigure[#1][\c!reset=\v!ja,\c!symbool=\v!ja,\c!hfactor=\defaultsymbolfactor,#2]} + +\appendtoks \resetexternalfigures \to \everysymbol + +\def\definefiguresymbol% + {\dotripleempty\dodefinefiguresymbol} + \def\dodefinefiguresymbol[#1][#2][#3]% {\ifsecondargument - \definesymbol[#1][{\externalfigure[#2][\c!symbool=\v!ja,\c!hfactor=\defaultsymbolfactor,#3]}]% + \definesymbol[#1][\dohandlefiguresymbol{#2}{#3}]% \fi} - -\def\definefiguresymbol% - {\dotripleempty\dodefinefiguresymbol} + +% but for the moment we keep it here +% % % % % % %\def\objectsymbol[#1]% % {\dopresetfieldsymbol{#1}\dogetfieldsymbol{#1}} @@ -121,8 +153,12 @@ %D A handy private one: \def\doifsymboldefinedelse#1#2#3% - {\doifdefinedelse{\??ss\currentsymbolset#1} - {#2}{\doifdefinedelse{\??ss#1}{#2}{#3}}} + {\ifx\currentsymbolset\empty + \doifdefinedelse{\??ss:#1}{#2}{#3}% + \else + \doifdefinedelse{\??ss:\currentsymbolset:#1} + {#2}{\doifdefinedelse{\??ss:#1}{#2}{#3}}% + \fi} %D \macros %D {setupsymbolset,startsymbolset} @@ -156,13 +192,15 @@ \let\currentsymbolset\empty -\def\startsymbolset[#1]% - {\def\currentsymbolset{:#1:}} +\def\startsymbolset% + {\localpushmacro\currentsymbolset + \setupsymbolset} \def\stopsymbolset% - {\let\currentsymbolset\empty} + {\localpopmacro\currentsymbolset} -\let\setupsymbolset\startsymbolset +\def\setupsymbolset[#1]% + {\def\currentsymbolset{#1}} %D \macros %D {showsymbolset} @@ -174,13 +212,13 @@ \blanko \getparameters[\??ss][\c!n=5,#2]% \setupsymbolset[#1]% - \doifdefined{\??ss:\currentsymbolset} + \doifdefined{\??ss\currentsymbolset} {\global\let\allfigures=\empty \doglobal\newcounter\figurecounter \setupcolors[\c!status=\v!start]% to prevent mps color conversion \mindermeldingen - \def\doshowsymbols% - {\expanded{\globalprocesscommalist[\getvalue{\??ss:\currentsymbolset}]\noexpand\docommando}}% + \def\doshowsymbols% global needed due to grouping in alignment + {\expanded{\globalprocesscommalist[\getvalue{\??ss\currentsymbolset}]\noexpand\docommando}}% \def\docommando##1% {\vbox {\forgetall diff --git a/tex/context/base/syst-etx.tex b/tex/context/base/syst-etx.tex new file mode 100644 index 000000000..e00eab73c --- /dev/null +++ b/tex/context/base/syst-etx.tex @@ -0,0 +1,215 @@ +\ifx\undefined\unprotect \catcode`\@=11 \fi + +%D Constants to be used with \type {\grouptype}. + +\chardef\@@bottomlevelgroup = 0 +\chardef\@@simplegroup = 1 +\chardef\@@hboxgroup = 2 +\chardef\@@adjustedhboxgroup = 3 +\chardef\@@vboxgroup = 4 +\chardef\@@vtopgroup = 5 +\chardef\@@aligngroup = 6 +\chardef\@@noaligngroup = 7 +\chardef\@@outputgroup = 8 +\chardef\@@mathgroup = 9 +\chardef\@@discretionarygroup = 10 +\chardef\@@insertgroup = 11 +\chardef\@@vcentergroup = 12 +\chardef\@@mathchoicegroup = 13 +\chardef\@@semisimplegroup = 14 +\chardef\@@mathshiftgroup = 15 +\chardef\@@mathleftgroup = 16 + +\chardef\@@vadjustgroup = \@@insertgroup + +%D Constants to be used with \type {\interactionmode}. + +\chardef\@@batchmode = 0 +\chardef\@@nonstopmode = 1 +\chardef\@@scrollmode = 2 +\chardef\@@errorstopmode = 3 + +%D Constants to be used with \type {\nodetype}. + +\chardef\@@charnode = 0 +\chardef\@@hlistnode = 1 +\chardef\@@vlistnode = 2 +\chardef\@@rulenode = 3 +\chardef\@@insertnode = 4 +\chardef\@@marknode = 5 +\chardef\@@adjustnode = 6 +\chardef\@@ligaturenode = 7 +\chardef\@@discretionarynode = 8 +\chardef\@@whatsitnode = 9 +\chardef\@@mathnode = 10 +\chardef\@@gluenode = 11 +\chardef\@@kernnode = 12 +\chardef\@@penaltynode = 13 +\chardef\@@unsetnode = 14 +\chardef\@@mathsnode = 15 + +%D Constants to be used with \type {\iftype}. + +\chardef\@@charif = 1 +\chardef\@@catif = 2 +\chardef\@@numif = 3 +\chardef\@@dimif = 4 +\chardef\@@oddif = 5 +\chardef\@@vmodeif = 6 +\chardef\@@hmodeif = 7 +\chardef\@@mmodeif = 8 +\chardef\@@innerif = 9 +\chardef\@@voidif = 10 +\chardef\@@hboxif = 11 +\chardef\@@vboxif = 12 +\chardef\@@xif = 13 +\chardef\@@eofif = 14 +\chardef\@@trueif = 15 +\chardef\@@falseif = 16 +\chardef\@@caseif = 17 +\chardef\@@definedif = 18 +\chardef\@@csnameif = 19 +\chardef\@@fontcharif = 20 + +%D Just in case we are not using \ETEX, we define some out of +%D range constants. + +\beginTEX + +\chardef\grouptype = 255 +\chardef\interactionmode = 255 +\chardef\nodetype = 255 +\chardef\iftype = 255 + +\endTEX + +%D Of course we want even bigger log files, so we copied this +%D from the \ETEX\ source files. + +\beginETEX \tracing... + +\def\tracingall% + {\tracingonline =\@ne + \tracingcommands =\thr@@ + \tracingstats =\tw@ + \tracingpages =\@ne + \tracingoutput =\@ne + \tracinglostchars =\tw@ + \tracingmacros =\tw@ + \tracingparagraphs=\@ne + \tracingrestores =\@ne + \showboxbreadth =\maxdimen + \showboxdepth =\maxdimen + \tracinggroups =\@ne + \tracingifs =\@ne + \tracingscantokens=\@ne + \tracingnesting =\@ne + \tracingassigns =\tw@ + \errorstopmode} + +\def\loggingall% + {\tracingall + \tracingonline=\z@} + +\def\tracingnone% + {\tracingassigns =\z@ + \tracingnesting =\z@ + \tracingscantokens=\z@ + \tracingifs =\z@ + \tracinggroups =\z@ + \showboxdepth =\thr@@ + \showboxbreadth =5 + \tracingrestores =\z@ + \tracingparagraphs=\z@ + \tracingmacros =\z@ + \tracinglostchars =\@ne + \tracingoutput =\z@ + \tracingpages =\z@ + \tracingstats =\z@ + \tracingcommands =\z@ + \tracingonline =\z@ } + +\endETEX + +%D Just to be sure: + +\ifx\eTeX\undefined + + \def\eTeX{$\varepsilon$-\TeX} + +\fi + +%D In \ETEX\ we have lots of registers, so we redefine a few +%D low level macros. We reserve some extra space for inserts +%D and as soon as we near the end of the first register +%D memory bank (often some 10 less than 255), we switch to the +%D slower range \@@medallocation||\@@maxallocation. + +\beginETEX \new... + +%D First we redefine the plain \TEX\ register allocation macros. + +\def\newcount {\myalloc@0\count \countdef \@@maxallocation} +\def\newdimen {\myalloc@1\dimen \dimendef \@@maxallocation} +\def\newskip {\myalloc@2\skip \skipdef \@@maxallocation} +\def\newmuskip {\myalloc@3\muskip \muskipdef \@@maxallocation} +\def\newbox {\myalloc@4\box \mathchardef\@@maxallocation} +\def\newtoks {\myalloc@5\toks \toksdef \@@maxallocation} +\def\newread {\myalloc@6\read \chardef \@@minallocation} +\def\newwrite {\myalloc@7\write \chardef \@@minallocation} +\def\newmarks {\myalloc@8\marks \mathchardef\@@maxallocation} +\def\newlanguage{\myalloc@9\language\chardef \@@minallocation} + +%D Since in \CONTEXT\ we only have one math family left we +%D redefine \type {\newfam}. + +\def\newfam#1{\chardef#1=15 } + +%D Therefore we should reset the related counter. + +\count18=1 + +%D We use some constants in the tests. + +\mathchardef\@@minallocation= 16 +\mathchardef\@@medallocation= 256 +\mathchardef\@@maxallocation=32767 + +%D I cannot imagine that more than~8 extra insert classes +%D are needed, so we say: + +\chardef\@@insallocation=8 + +%D My low level allocation macro now comes down to: + +\def\myalloc@#1#2#3#4#5% + {\global\advance\count1#1by\@ne + \ifnum\count1#1>\@@medallocation \else + \global\advance\insc@unt by -\@@insallocation + \ifnum\count1#1<\insc@unt \else + \global\count1#1=\@@medallocation % \wait + \fi + \global\advance\insc@unt by +\@@insallocation + \fi + \ifnum\count1#1>#4% + \global\count1#1=#4% + \errmessage{No room for (\string#2) \string#5}% + \fi + \allocationnumber=\count1#1% + \global#3#5=\allocationnumber + \wlog{\string#5=\string#2\the\allocationnumber}} + +\endETEX + +%D These macros can be checked by tests like: +%D +%D \starttypen +%D \let\wlog\message \dorecurse{1000}{\newcount\dummy} +%D \stoptypen + +%D A few bonus bindings. + +\let\normalprotected = \protected +\let\normalunexpanded = \unexpanded + +\ifx\undefined\unprotect \catcode`\@=12 \fi \endinput diff --git a/tex/context/base/syst-ext.tex b/tex/context/base/syst-ext.tex index 229883caf..04a118cbd 100644 --- a/tex/context/base/syst-ext.tex +++ b/tex/context/base/syst-ext.tex @@ -260,15 +260,26 @@ %D searching till it's sure that no other glue component if %D found. This search can be canceled by using \type{\relax} %D when possible and needed. +%D +%D \starttypen +%D \def\newskimen#1% +%D {\ifx#1\undefined +%D \ifnum\count11>\count12 +%D \newskip#1\relax +%D \else +%D \newdimen#1\relax +%D \fi +%D \fi} +%D \stoptypen +%D +%D In order to make this macro work in plain \TEX\ too, we +%D use the following alternative, which fools \TEX\ about +%D the new commands being \type {\outer} ones. \def\newskimen#1% {\ifx#1\undefined - \ifnum\count11>\count12 - \newskip#1\relax - \else - \newdimen#1\relax - \fi - \fi} + \csname new\ifnum\count11>\count12 skip\else dimen\fi\endcsname#1% + \fi} %D \macros %D {strippedcsname} @@ -629,31 +640,63 @@ %D The real implementation is a bit more complicated but we %D prefer something more versatile. -\def\DoWithEvery#1% - {\csname if\strippedcsname#1\endcsname \else - \edef\next% - {\@EA\noexpand\csname old\strippedcsname#1\endcsname= - {\the#1}}% - \next - \fi - \edef\next% - {\noexpand#1= - {\@EA\the\csname old\strippedcsname#1\endcsname\the\scratchtoks}}% - \next - \csname\strippedcsname#1true\endcsname} +% the old one +% +% \def\DoWithEvery#1% +% {\csname if\strippedcsname#1\endcsname \else +% \edef\next% +% {\@EA\noexpand\csname old\strippedcsname#1\endcsname= +% {\the#1}}% +% \next +% \fi +% \edef\next% +% {\noexpand#1= +% {\@EA\the\csname old\strippedcsname#1\endcsname\the\scratchtoks}}% +% \next +% \csname\strippedcsname#1true\endcsname} +% +% \def\dowithevery#1% +% {\@EA\afterassignment\csname do\strippedcsname#1\endcsname\scratchtoks} +% +% \def\newevery#1#2% +% {\ifx#1\undefined\newtoks#1\fi +% \ifx#2\relax\else\ifx#2\undefined +% \@EA\newtoks\csname old\strippedcsname#1\endcsname +% \@EA\newif \csname if\strippedcsname#1\endcsname +% \@EA\def \csname do\strippedcsname#2\endcsname{\DoWithEvery#1}% +% \def#2{\dowithevery#2}% +% \fi\fi} +% +% cleaner and more efficient \def\dowithevery#1% - {\@EA\afterassignment\csname do\strippedcsname#1\endcsname\scratchtoks} + {\def\dodowithevery% + {\ifcase\csname c\strippedcsname#1\endcsname \expandafter\chardef + \csname c\strippedcsname#1\endcsname=1 + \csname t\strippedcsname#1\endcsname=#1% + \fi + \edef\next% + {#1={\the\csname t\strippedcsname#1\endcsname\the\scratchtoks}}% + \next}% + \afterassignment\dodowithevery\scratchtoks} -\def\newevery#1#2% - {\ifx#1\undefined\newtoks#1\fi +\bgroup \let\newtoks\relax % plain safe (\outer) + +\gdef\newevery#1#2% + {\ifx#1\undefined\csname newtoks\endcsname#1\fi % plain safe (\outer) \ifx#2\relax\else\ifx#2\undefined - \@EA\newtoks\csname old\strippedcsname#1\endcsname - \@EA\newif \csname if\strippedcsname#1\endcsname - \@EA\def \csname do\strippedcsname#2\endcsname{\DoWithEvery#1}% - \def#2{\dowithevery#2}% + \expandafter\newtoks\csname t\strippedcsname#1\endcsname + \expandafter\chardef\csname c\strippedcsname#1\endcsname=0 + \def#2{\dowithevery#1}% \fi\fi} +\egroup + +%D The first \type {\outer} hack is needed to trick \TEX\ +%D into thinking that \type {\newtoks} is no outer macro, +%D the second hack is needed due to some funny interaction +%D between outer macros and \type {\if} at expansion time. + %D This one permits definitions like: \newevery \everypar \EveryPar @@ -742,25 +785,26 @@ \long\def\convertargument#1\to#2% {\long\def\convertedargument{#1}% - \dodoglobal\edef#2% - {\convertedcommand\convertedargument}} + \dodoglobal\edef#2{\convertedcommand\convertedargument}} \long\def\convertcommand#1\to#2% - {\dodoglobal\edef#2% - {\convertedcommand#1}} + {\dodoglobal\edef#2{\convertedcommand#1}} \endTEX %D In \ETEX\ we can use \type {\detokenize} and gain some %D speed, but in general far less that 1\% for \type %D {\convertargument} and nil for \type {\convertcommand}. +%D This macro is more robust than the pure \TEX\ one, +%D something I found out when primitives like \type +%D {\jobname}. \beginETEX \detokenize -\def\convertargument#1\to#2% +\long\def\convertargument#1\to#2% {\dodoglobal\edef#2{\detokenize{#1}}} -\def\convertcommand#1\to#2% +\long\def\convertcommand#1\to#2% {\@EA\dodoglobal\@EA\edef\@EA#2\@EA{\@EA\detokenize\@EA{#1}}} \endETEX @@ -777,6 +821,46 @@ %D The \type{-}, the delimiter \type{\\\\} and the the second %D argument are completely redundant. +% this does not work ok yet +% +% %D As said, the \TEX\ alternative fails on expanding primitives, +% %D like in: +% %D +% %D \starttypen +% %D \convertcommand\jobname\to\ascii +% %D \stoptypen +% %D +% %D Because these primitives convert to themselves, we can use +% %D the backslash as a signal to treat them different. At the +% %D cost of slightly more overhead we can therefore define a +% %D more robust alternative. The catcode trickery is needed to +% %D get the backslash into the test as character (and not as +% %D escape, letter or whatever code else). +% +% \beginTEX +% +% \let\dodoconvertargument\doconvertargument +% +% \bgroup +% \catcode`\*=\@@escape +% \catcode`\\=\@@other +% *gdef*doconvertargument#1% +% {*ifx#1\*else*expandafter*dodoconvertargument*fi#1} +% *egroup +% +% \endTEX + +%D \macros +%D {showvalue,showargument} +%D +%D A handy macro for testing purposes only, is the following: + +\def\showvalue#1% + {\expandafter\show\csname#1\endcsname} + +\def\showargument#1% + {\convertargument#1\to\ascii\show\ascii} + %D \macros %D {doifmeaningelse} %D @@ -797,6 +881,20 @@ \ifx\!!stringa\!!stringb#3\else#4\fi} %D \macros +%D {doifsamestringselse} +%D +%D The next comparison macro converts the arguments into +%D expanded strings. This command can be used to compare for +%D instance \type {\jobname} with a name stored in a macro. + +\def\doifsamestringelse#1#2#3#4% + {\edef\!!stringa{#1}% + \edef\!!stringb{#2}% + \convertcommand\!!stringa\to\!!stringa + \convertcommand\!!stringb\to\!!stringb + \ifx\!!stringa\!!stringb#3\else#4\fi} + +%D \macros %D {ExpandFirstAfter,ExpandSecondAfter,ExpandBothAfter} %D %D These three commands support expansion of arguments before @@ -840,11 +938,6 @@ \edef\!!stringb{#3}% \@EA#1\@EA{\@EA\!!stringa\@EA}\@EA{\!!stringb}} -% \def\ExpandSecondAfter#1#2#3% -% {\toks0={#2}% -% \edef\!!stringa{#3}% -% \@EA\@EA\@EA#1\@EA\@EA\@EA{\@EA\the\@EA\toks0\@EA}\@EA{\!!stringa}} - \def\ExpandBothAfter#1#2#3% {\edef\!!stringa{#2}% \edef\!!stringb{#3}% @@ -1844,10 +1937,12 @@ \def\replaceincommalist#1#2% #1 = commalistelement #2 = position starts at 1 {\def\doreplaceincommalist##1% {\ifnum\commalistcounter=#2\relax - \ifnum\commalistcounter=1 - \let\newcommalist\newcommalistelement - \else - \@EA\@EA\@EA\def\@EA\@EA\@EA\newcommalist\@EA\@EA\@EA{\@EA\newcommalist\@EA,\newcommalistelement}% + \ifx\newcommalistelement\empty\else + \ifnum\commalistcounter=1 + \let\newcommalist\newcommalistelement + \else + \@EA\@EA\@EA\def\@EA\@EA\@EA\newcommalist\@EA\@EA\@EA{\@EA\newcommalist\@EA,\newcommalistelement}% + \fi \fi \def\commalistelement{##1}% \else @@ -1992,17 +2087,32 @@ %D \pushmacro\macro %D \popmacro\macro %D \stoptypen +%D +%D Beware: global! \def\@s@{@s@} -\def\pushmacro#1% across groups ! +\def\globalpushmacro#1% {\@EA\doglobal\@EA\increment\csname\@s@:\string#1\endcsname \global\@EA\let\csname\csname\@s@:\string#1\endcsname:\string#1\endcsname#1} -\def\popmacro#1% +\def\globalpopmacro#1% \global\let {\global\@EA\let\@EA#1\csname\csname\@s@:\string#1\endcsname:\string#1\endcsname \@EA\doglobal\@EA\decrement\csname\@s@:\string#1\endcsname} +% this one can be used to push a value over an \egroup + +\def\localpushmacro#1% + {\@EA\doglobal\@EA\increment\csname\@s@::\string#1\endcsname + \global\@EA\let\csname\csname\@s@::\string#1\endcsname::\string#1\endcsname#1} + +\def\localpopmacro#1% \local\let + {\@EA\let\@EA#1\csname\csname\@s@::\string#1\endcsname::\string#1\endcsname + \global\@EA\decrement\csname\@s@::\string#1\endcsname} + +\let\pushmacro\globalpushmacro +\let\popmacro \globalpopmacro + %D \macros %D {setlocalhsize} %D @@ -2024,7 +2134,7 @@ \def\complexsetlocalhsize[#1]% don't change ! {\localhsize=\hsize - \advance\localhsize by -\parindent + % \advance\localhsize by -\parindent % changed anyway \advance\localhsize by -\leftskip \advance\localhsize by -\rightskip \advance\localhsize by #1\relax} @@ -2062,30 +2172,68 @@ %D The list of tokens may contain spaces, while \type{\\}, %D \type{{}} and \type{\ } are handled as space too. +% \def\dodoprocesstokens% +% {\ifx\next\lastcharacter +% \after +% \let\next=\relax +% \else\ifx\next\bgroup +% \def\next% +% {\dowithnextbox +% {\before\box\nextbox +% \let\before=\between +% \doprocesstokens} +% \hbox\bgroup}% +% \else +% \expandafter\if\space\next +% \before\white +% \else +% \before\next +% \fi +% \let\before=\between +% \let\next=\doprocesstokens +% \fi\fi +% \next} +% +% \def\doprocesstokens% the space after = is essential +% {\afterassignment\dodoprocesstokens\let\next= } +% +% \def\processtokens#1#2#3#4#5% +% {\bgroup +% \def\lastcharacter{\lastcharacter}% +% \def\space{ }% +% \let\\=\space +% \def\before{#1}% +% \def\between{#2}% +% \def\after{#3}% +% \def\white{#4}% +% \doprocesstokens#5\lastcharacter +% \egroup} + \def\dodoprocesstokens% - {\ifx\next\lastcharacter + {\ifx\nextprocessedtoken\lastcharacter \after - \let\next=\relax - \else\ifx\next\bgroup - \def\next% + \let\nextprocessedtoken=\relax + \else\ifx\nextprocessedtoken\bgroup + \def\nextprocessedtoken% {\dowithnextbox - {\before\box\nextbox - \let\before=\between + {\before{\box\nextbox}% + \let\before\between \doprocesstokens} \hbox\bgroup}% \else - \expandafter\if\space\next - \before\white + \expandafter\if\space\nextprocessedtoken + \after\white + \let\before\savedbefore \else - \before\next + \before\nextprocessedtoken + \let\before\between \fi - \let\before=\between - \let\next=\doprocesstokens + \let\nextprocessedtoken=\doprocesstokens \fi\fi - \next} + \nextprocessedtoken} \def\doprocesstokens% the space after = is essential - {\afterassignment\dodoprocesstokens\let\next= } + {\afterassignment\dodoprocesstokens\let\nextprocessedtoken= } \def\processtokens#1#2#3#4#5% {\bgroup @@ -2096,6 +2244,7 @@ \def\between{#2}% \def\after{#3}% \def\white{#4}% + \let\savedbefore\before \doprocesstokens#5\lastcharacter \egroup} @@ -2408,12 +2557,14 @@ %D %D However, we want to handle all situations, like: %D -%D \starttypen +%D \startbuffer %D \processseparatedlist[{aap noot}] [ ]{\def\xxx} \show\xxx %D \processseparatedlist[{aap} {noot}][ ]{\def\xxx} \show\xxx %D \processseparatedlist[aap {noot}] [ ]{\def\xxx} \show\xxx %D \processseparatedlist[aap noot] [ ]{\def\xxx} \show\xxx -%D \stoptypen +%D \stopbuffer +%D +%D \typebuffer \getbuffer %D %D Therefore we smuggle a \type {\relax} in front of the %D argument, which we remove afterwards. @@ -2435,6 +2586,41 @@ \def\processseparatedlist[% {\doprocessseparatedlist\relax} +%D \macros +%D {processlist} +%D +%D An even more general list processing macro is the +%D following one: +%D +%D \starttypen +%D \processlist{beginsym}{endsym}{separator}\docommando list +%D \stoptypen +%D +%D This one supports arbitrary open and close symbols as well +%D as user defined separators. +%D +%D \starttypen +%D \processlist(){=>}\docommando(a=>b=>c=>d) +%D \stoptypen + +\def\processlist#1#2#3#4% + {\def\doprocesslist##1#2% + {\def\dodoprocesslist####1####2#3% + {\ifx#2####1% + \let\dodoprocesslist\relax + \else\ifx#2####2% + \let\dodoprocesslist\relax + \else\ifx\blankspace####2% + #4{####1}% + \else + #4{####1####2}% + \fi\fi\fi + \dodoprocesslist}% + \expandafter\dodoprocesslist\gobbleoneargument##1#3#2#3}% + \def\dodoprocesslist#1% + {\doprocesslist\relax}% + \dodoprocesslist} + % %D \macros % %D {dohonorgroupedargument} % %D @@ -2468,24 +2654,26 @@ {\p!dodogetparameter[##1==\relax]}% \processcommalist[#2]\p!dogetparameter} -%D \macros -%D {DoAfterFi,DoAfterFiFi} -%D -%D Sometimes \type{\fi}'s can get into the way. We can reach -%D over such a troublemaker with: -%D -%D \starttypen -%D \DoAfterFi{some commands} -%D \DoAfterFiFi{some commands} -%D \stoptypen -%D -%D It saves us a \type{\next} construction. Skipping -%D \type{\else...\fi} is more tricky, so this one is not -%D provided. - -\def\DoAfterFi#1\fi{\fi#1} -\def\DoAfterFiFi#1\fi#2\fi{\fi\fi#1} - +% too ugly +% +% %D \macros +% %D {DoAfterFi,DoAfterFiFi} +% %D +% %D Sometimes \type{\fi}'s can get into the way. We can reach +% %D over such a troublemaker with: +% %D +% %D \starttypen +% %D \DoAfterFi{some commands} +% %D \DoAfterFiFi{some commands} +% %D \stoptypen +% %D +% %D It saves us a \type{\next} construction. Skipping +% %D \type{\else...\fi} is more tricky, so this one is not +% %D provided. +% +% \def\DoAfterFi#1\fi{\fi#1} +% \def\DoAfterFiFi#1\fi#2\fi{\fi\fi#1} + %D \macros %D {untextargument %D untexcommand} @@ -2577,7 +2765,6 @@ \def\dontleavehmode{\ifmmode\else$ $\fi} - %D \macros %D {uppercasestring,lowercasestring} %D @@ -2636,7 +2823,7 @@ %D \starttypen %D \def\dodohandletokens% %D {\ifx\next\end \else -%D \docommando\next +%D \docommando{\next}% %D \expandafter\dohandletokens %D \fi} %D @@ -2725,22 +2912,14 @@ %D %D \unprotect\haalbuffer[next]\protect %D -%D That's why we finally end up with a macro that looks ahead -%D by using an assignment, this time by using -%D \type{\futurelet}, and grabbing an argument as well. That -%D way we can handle both the sentinal and the blank space. - -\def\dodohandletokens#1% - {\ifx\next\blankspace - \dododohandletokens{ }% - \fi - \ifx#1\end \else - \dododohandletokens{#1}% - \expandafter\dohandletokens - \fi} +%D That's why we finally end up with a macro that looks +%D ahead by using an assignment, this time by using \type +%D {\futurelet}, and grabbing an argument as well. That +%D way we can handle the sentinal, a blank space and grouped +%D tokens. \def\dohandletokens% - {\futurelet\next\dodohandletokens} + {\futurelet\nexthandledtoken\dodohandletokens} \long\def\handletokens#1\with#2% {\global\let\dododohandletokens=#2% @@ -2750,20 +2929,72 @@ %D use in alignments, I decided to use another placeholder, one %D that is not sensitive to the global assignment. -%D So our example finaly shows up as: +%D This alternatives does not handle grouped tokens well, so +%D next we had (for a short moment): +%D +%D \starttypen +%D \def\dodohandletokens#1% +%D {\ifx\nexthandledtoken\blankspace +%D \dododohandletokens{ }% +%D \fi +%D \ifx#1\end \else +%D \dododohandletokens{#1}% +%D \expandafter\dohandletokens +%D \fi} +%D \stoptypen +%D +%D This one failed on a trailing space, something we +%D encounter in \JAVASCRIPT\ cleaning. +%D +%D \starttypen +%D \def\dodohandletokens#1% +%D {\ifx\nexthandledtoken\blankspace +%D \dododohandletokens{ }% +%D \fi +%D \ifx\nexthandledtoken\end \else +%D \dododohandletokens{#1}% +%D \expandafter\dohandletokens +%D \fi} +%D \stoptypen +%D +%D So, now we have: + +\def\dodohandletokens% + {\ifx\nexthandledtoken\blankspace + \def\next * {\dododohandletokens{ }\dohandletokens}% + \else\ifx\nexthandledtoken\end + \let\next\gobbletwoarguments + \else + \long\def\next *##1{\dododohandletokens{##1}\dohandletokens}% + \fi\fi + \next *} + +%D This macro is tested on: +%D +%D \def\xxx#1{[#1]} +%D +%D \startregels +%D \handletokens abc\with\xxx +%D \handletokens a b c\with\xxx +%D \handletokens a b c\with\xxx +%D \handletokens a{bc}d\with\xxx +%D \handletokens a\space bc \with\xxx +%D \stopregels +%D +%D And our previous example shows up as: %D %D \haalbuffer[example] -% %D \macros -% %D {iftrialtypesetting} -% %D -% %D The next boolean is at first sight a strange one. Sometimes -% %D one does a trial typesetting run, for instance to determine -% %D dimensions. Some mechanisms, like object inclusion, can fail -% %D on such trials. Temporary setting the next boolean to true, -% %D helps a lot. -% -% \newif\iftrialtypesetting +%D \macros +%D {iftrialtypesetting} +%D +%D The next boolean is at first sight a strange one. Sometimes +%D one does a trial typesetting run, for instance to determine +%D dimensions. Some mechanisms, like object inclusion, can fail +%D on such trials. Temporary setting the next boolean to true, +%D helps a lot. + +\newif\iftrialtypesetting %D \macros %D {startlocal, startglobal} @@ -2983,12 +3214,12 @@ %D used to select arguments. Their names explain their %D functionality. -\def\firstofoneargument #1{#1} -\def\firstoftwoarguments #1#2{#1} -\def\firstofthreearguments #1#2#3{#1} -\def\secondoftwoarguments #1#2{#2} -\def\secondofthreearguments#1#2#3{#2} -\def\thirdofthreearguments #1#2#3{#3} +\long\def\firstofoneargument #1{#1} +\long\def\firstoftwoarguments #1#2{#1} +\long\def\firstofthreearguments #1#2#3{#1} +\long\def\secondoftwoarguments #1#2{#2} +\long\def\secondofthreearguments#1#2#3{#2} +\long\def\thirdofthreearguments #1#2#3{#3} %D \macros %D {@saveprimitive} @@ -3028,13 +3259,6 @@ %D In this macro, the message only shows up when the debugging %D is turned on. -%D \macros -%D {emptytoks} -%D -%D Constant empty token register, analogous to \type {\empty}. - -\newtoks\emptytoks - %D \macros %D {@True, @False, @Not, @And} %D diff --git a/tex/context/base/syst-gen.tex b/tex/context/base/syst-gen.tex index 2d42c944d..5896bef8f 100644 --- a/tex/context/base/syst-gen.tex +++ b/tex/context/base/syst-gen.tex @@ -240,7 +240,7 @@ \newmuskip \scratchmuskip \newbox \scratchbox \newtoks \scratchtoks -\newif \ifdone +\newif \ifdone %D \macros %D {ifCONTEXT} @@ -320,6 +320,26 @@ \def\expanded#1% {\edef\@@expanded{\noexpand#1}\@@expanded} +%D \macros +%D {expandoneargafter,expandtwoargsafter} +%D +%D These two commands make macros more readable by hiding a +%D lot of \type {\expandafter}'s. They expand the arguments +%D after the first command. +%D +%D \starttypen +%D \expandoneargafter \command{\abc} +%D \expandtwoargsafter\command{\abc}{\def} +%D \stoptypen +%D +%D These commands expect the arguments to be macros. + +\def\expandoneargafter#1#2% + {\@EA#1\@EA{#2}} + +\def\expandtwoargsafter#1#2#3% + {\@EA\@EA\@EA#1\@EA\@EA\@EA{\@EA#2\@EA}\@EA{#3}} + %D \macros %D {gobbleoneargument,gobble...arguments} %D @@ -465,16 +485,15 @@ \def\resetvalue#1% {\expandafter\let\csname#1\endcsname\empty} -%D \macros -%D {showvalue,showargument} +%D \macros +%D {globallet} %D -%D A handy macro for testing purposes only, is the following: - -\def\showvalue#1% - {\expandafter\show\csname#1\endcsname} +%D In \CONTEXT\ of May 2000 using \type {\globallet} +%D instead of the two tokens will save us some +%D $300\times4=1200$ bytes of format file on a 32~bit +%D system. So: -\def\showargument#1% - {\convertargument#1\to\ascii\show\ascii} +\def\globallet{\global\let} %D \macros %D {donottest,unexpanded} @@ -493,7 +512,7 @@ %D \stoptypen %D %D This double definition can be made transparant by using -%D \type{\protecte}, as in: +%D \type{\unexpanded}, as in: %D %D \starttypen %D \unexpanded\def\somecommand{... ... ...} @@ -527,7 +546,7 @@ %D therefore explictly gobble \type{#1}. %D \macros -%D {honorunexpanded} +%D {honorunexpanded,forceunexpanded} %D %D The fact that many macros have the same prefix, could have %D a negative impact on searching in the hash table. Because @@ -549,7 +568,6 @@ \def\dosetunexpanded#1#2% {\@EA#1\@EA{\@EA#2\@EA}% \@EA{\@EA\donottest\csname\s!do\@EA\string\csname#2\endcsname\endcsname}% -% \@EA#1{\s!do\@EA\string\csname#2\endcsname}} \@EA#1\@EA{\@EA\s!do\@EA\string\csname#2\endcsname}} \def\docomunexpanded#1#2% @@ -565,15 +583,24 @@ \fi#1}% \futurelet\next\dounexpanded} -\def\honorunexpanded% +\def\honorunexpanded% for writing to a file or message {\def\donottest##1{\expandafter\gobblethreearguments\string##1}} +\def\forceunexpanded% for preventing expansion in \xdef + {\def\donottest##1% + {\expandafter\noexpand\csname\expandafter\gobblefourarguments\string##1\endcsname}} + +\def\resetunexpanded% + {\let\donottest\doprocesstest} + \endTEX \beginETEX \protected \let \unexpanded \normalprotected \let \honorunexpanded \relax +\let \forceunexpanded \relax +\let \resetunexpanded \relax \endETEX @@ -1296,14 +1323,14 @@ %D \startbuffer %D \def\dosomething#1{(#1)} %D -%D \processcommalist [\hbox{$a,b,c,d,e,f$}] \dosomething \par -%D \processcommalist [{a,b,c,d,e,f}] \dosomething \par -%D \processcommalist [{a,b,c},d,e,f] \dosomething \par -%D \processcommalist [a,b,{c,d,e},f] \dosomething \par -%D \processcommalist [a{b,c},d,e,f] \dosomething \par -%D \processcommalist [{a,b}c,d,e,f] \dosomething \par -%D \processcommalist [] \dosomething \par -%D \processcommalist [{[}] \dosomething \par +%D 1: \processcommalist [\hbox{$a,b,c,d,e,f$}] \dosomething \par +%D 2: \processcommalist [{a,b,c,d,e,f}] \dosomething \par +%D 3: \processcommalist [{a,b,c},d,e,f] \dosomething \par +%D 4: \processcommalist [a,b,{c,d,e},f] \dosomething \par +%D 5: \processcommalist [a{b,c},d,e,f] \dosomething \par +%D 6: \processcommalist [{a,b}c,d,e,f] \dosomething \par +%D 7: \processcommalist [] \dosomething \par +%D 8: \processcommalist [{[}] \dosomething \par %D \stopbuffer %D %D \typebuffer @@ -1439,11 +1466,14 @@ %D use of this macro has its limits. % why the \toks0? still needed? +% +% \def\processcommacommand[#1]% +% {\edef\commacommand{#1}% +% \toks0=\expandafter{\expandafter[\commacommand]}% +% \expandafter\processcommalist\the\toks0 } \def\processcommacommand[#1]% - {\edef\commacommand{#1}% - \toks0=\expandafter{\expandafter[\commacommand]}% - \expandafter\processcommalist\the\toks0 } + {\expanded{\processcommalist[#1]}} %D The argument to \type{\command} is not delimited. Because %D we often use \type{[]} as delimiters, we also have: @@ -1582,8 +1612,8 @@ %D \advance\processlevel by -1\relax}} %D \stoptypen %D -%D The gain of speed in the (again) next implementation is around -%D 20\%, depending on the application. +%D The gain of speed in the (again) next implementation is +%D around 20\%, depending on the application. \newcount\processlevel @@ -1854,12 +1884,6 @@ %D run time, simply because the less tokens we pass, the faster %D \TEX\ runs. So finally the definition became: -\def\p!doifinstringelse#1#2% - {\def\pp!doifinstringelse##1#1##2##3\war% - %{\csname\if##2@iffalse\else iftrue\fi\endcsname}% - {\csname if\if##2@fals\else tru\fi e\endcsname}% - \expanded{\pp!doifinstringelse#2#1@@\noexpand\war}} % expand #2 here - \long\def\doifinstringelse#1#2#3#4% {\edef\@@@instring{#1}% expand #1 here \@EA\p!doifinstringelse\@EA{\@@@instring}{#2}% @@ -1868,6 +1892,24 @@ #4% \fi} +\beginTEX + +\def\p!doifinstringelse#1#2% + {\def\pp!doifinstringelse##1#1##2##3\war% + {\csname if\if##2@fals\else tru\fi e\endcsname}% + \expanded{\pp!doifinstringelse#2#1@@\noexpand\war}} % expand #2 here + +\endTEX + +\beginETEX \unless + +\def\p!doifinstringelse#1#2% + {\def\pp!doifinstringelse##1#1##2##3\war% + {\unless\if##2@}% + \expanded{\pp!doifinstringelse#2#1@@\noexpand\war}} % expand #2 here + +\endETEX + %D The next alternative proved to be upto twice as fast on %D tasks like checking reserved words in pretty verbatim %D typesetting! This is mainly due to the fact that passing @@ -2009,7 +2051,7 @@ \def\rawprocessaction[#1]#2[#3]% {\edef\!!stringa{#1}% - \edef\!!stringb{undefined}% + \edef\!!stringb{undefined}% better \!!undefined \let\!!processaction\!!stringb \ifx\!!stringa\empty \@EA\p!rawprocessaction\@EA[\s!default][#3]% @@ -2024,6 +2066,13 @@ \!!processaction \fi} +% not needed +% +% \def\rawprocessallactionsinset[#1]#2[#3]% +% {\def\docommando##1% +% {\rawprocessaction[##1][#3]}% +% \processcommalist[#1]\docommando} + %D When we process the list \type{a,b,c,d,e}, the raw routine %D takes over 30\% less time, when we feed $20+$ character %D strings we gain about 20\%. Alternatives which use @@ -2412,6 +2461,11 @@ \toks0=\expandafter{\expandafter[\commacommand]}% \expandafter\getcommalistsize\the\toks0 } +% to be tested first +% +% \def\getcommacommandsize[#1]% +% {\expanded{\getcommalistsize[#1]}} + % \def\p!dogetfromcommalist#1% % {\advance\commalistcounter -1 % \ifcase\commalistcounter @@ -2431,10 +2485,13 @@ \commalistcounter=#3\relax \processcommalist[#1]\p!dogetfromcommalist} -\def\getfromcommacommand[#1]% why so complicated, still needed? - {\edef\commacommand{#1}% - \toks0=\expandafter{\expandafter[\commacommand]}% - \expandafter\getfromcommalist\the\toks0 } +% \def\getfromcommacommand[#1]% why so complicated, still needed? +% {\edef\commacommand{#1}% +% \toks0=\expandafter{\expandafter[\commacommand]}% +% \expandafter\getfromcommalist\the\toks0 } + +\def\getfromcommacommand[#1]% + {\expanded{\getfromcommalist[#1]}} %D Because 0, 1 and~2 are often asked for, we optimize this %D macro for those cases. The indirect call however slows @@ -2622,7 +2679,7 @@ \chardef\noexpectedarguments=0 \chardef\expectedarguments =0 -\def\dogetargument#1#2#3#4% redefined in mult-ini +\long\def\dogetargument#1#2#3#4% redefined in mult-ini {\doifnextcharelse{#1} {\let\expectedarguments\noexpectedarguments #3\dodogetargument} @@ -3066,45 +3123,92 @@ %D \macros %D {dosinglegroupempty,dodoublegroupempty,dotriplegroupempty, -%D doquadruplegroupempty} +%D doquadruplegroupempty, doquintuplegroupempty} %D %D We've already seen some commands that take care of %D optional arguments between \type{[]}. The next two commands %D handle the ones with \type{{}}. They are called as: %D %D \starttypen -%D \dosinglegroupempty \IneedONEargument -%D \dodoublegroupempty \IneedTWOarguments -%D \dotriplegroupempty \IneedTHREEarguments -%D \dotriplegroupempty \IneedFOURarguments +%D \dosinglegroupempty \ineedONEargument +%D \dodoublegroupempty \ineedTWOarguments +%D \dotriplegroupempty \ineedTHREEarguments +%D \doquadruplegroupempty \ineedFOURarguments +%D \doquintuplegroupempty \ineedFIVEarguments %D \stoptypen %D -%D where \type{\IneedONEargument} takes one and the others +%D where \type{\ineedONEargument} takes one and the others %D two and three arguments. These macro's were first needed in %D \PPCHTEX. +%D +%D \starttypen +%D \def\dogetgroupargument#1#2% redefined in mult-ini +%D {\def\nextnextargument% +%D {\ifx\nextargument\bgroup +%D \let\expectedarguments\noexpectedarguments +%D \def\nextargument{#1\dodogetargument}% +%D %\else\ifx\nextargument\lineending % this can be an option +%D % \def\nextargument{\bgroup\def\\ {\egroup\dogetgroupargument#1#2}\\}% +%D %\else\ifx\nextargument\blankspace % but it may never be default +%D % \def\nextargument{\bgroup\def\\ {\egroup\dogetgroupargument#1#2}\\}% +%D \else +%D \ifnum\expectedarguments>\noexpectedarguments +%D \writestatus +%D {setup} +%D {\the\expectedarguments\space argument(s) expected +%D in line \the\inputlineno\space}% +%D \fi +%D \let\expectedarguments\noexpectedarguments +%D \def\nextargument{#2\dodogetargument{}}% +%D \fi%\fi\fi % so let's get rid of it +%D \nextargument}% +%D \futurelet\nextargument\nextnextargument} +%D \stoptypen +%D +%D In order to catch \type {\nextargument}'s that expand to +%D \type {\if} and friends, in practice we will use a +%D slightly more complicated macro. + +\let\normalif \if +\let\normalifx \ifx +\let\normalifnum \ifnum +\let\normalifcase \ifcase +\let\normalor \or +\let\normalelse \else +\let\normalfi \fi -\def\dogetgroupargument#1#2% redefined in mult-ini - {\def\nextnextargument% - {\ifx\nextargument\bgroup +\def\beginrobusttest + {\bgroup + \let\if\relax\let\ifx\relax\let\ifnum\relax\let\ifcase\relax + \let\or\relax\let\else\relax\let\fi\relax} + +\let\endrobusttest\egroup + +\def\dogetgroupargument#1#2% + {\def\nextnextargument% + {\normalifx\nextargument\bgroup + \endrobusttest \let\expectedarguments\noexpectedarguments \def\nextargument{#1\dodogetargument}% - %\else\ifx\nextargument\lineending % this can be an option - % \def\nextargument{\bgroup\def\\ {\egroup\dogetgroupargument#1#2}\\}% - %\else\ifx\nextargument\blankspace % but it may never be default - % \def\nextargument{\bgroup\def\\ {\egroup\dogetgroupargument#1#2}\\}% - \else + %\normalelse\normalifx\nextargument\lineending % this can be an option + % \def\nextargument{\bgroup\def\\ {\egroup\dogetgroupargument#1#2}\\}% + %\normalelse\normalifx\nextargument\blankspace % but may never be default + % \def\nextargument{\bgroup\def\\ {\egroup\dogetgroupargument#1#2}\\}% + \normalelse + \endrobusttest \ifnum\expectedarguments>\noexpectedarguments \writestatus - {setup} - {\the\expectedarguments\space argument(s) expected - in line \the\inputlineno\space}% + {setup} + {\the\expectedarguments\space argument(s) expected + in line \the\inputlineno\space}% \fi \let\expectedarguments\noexpectedarguments \def\nextargument{#2\dodogetargument{}}% - \fi%\fi\fi % so let's get rid of it + \normalfi%\normalfi\normalfi % so let's get rid of it \nextargument}% + \beginrobusttest \futurelet\nextargument\nextnextargument} - + \def\dosinglegroupempty#1% {\def\dodogetargument% {#1}% @@ -3137,7 +3241,20 @@ \dogetgroupargument\secondargumenttrue\secondargumentfalse}% \dogetgroupargument\firstargumenttrue\firstargumentfalse} -%D These macros explictly take care of spaces, which means +\def\doquintuplegroupempty#1% + {\def\dodogetargument##1% + {\def\dodogetargument####1% + {\def\dodogetargument########1% + {\def\dodogetargument################1% + {\def\dodogetargument% + {#1{##1}{####1}{########1}{################1}}% + \dogetgroupargument\fifthargumenttrue\fifthargumentfalse}% + \dogetgroupargument\fourthargumenttrue\fourthargumentfalse}% + \dogetgroupargument\thirdargumenttrue\thirdargumentfalse}% + \dogetgroupargument\secondargumenttrue\secondargumentfalse}% + \dogetgroupargument\firstargumenttrue\firstargumentfalse} + +%D These macros can explictly take care of spaces, which means %D that the next definition and calls are valid: %D %D \starttypen @@ -3220,6 +3337,7 @@ % \egroup} \chardef\statuswidth=15 +\newcount\statuscounter \def\writestring% {\immediate\write16} @@ -3228,30 +3346,37 @@ {\writestring{}} \def\dosplitstatus#1% - {\advance\scratchcounter 1 - \ifnum\scratchcounter<\statuswidth - \edef\messagecontentA{\messagecontentA#1}% - \expandafter\dosplitstatus - \else + {\advance\statuscounter -1 + \ifcase\statuscounter \expandafter\nosplitstatus + \else + \@EA\scratchtoks\@EA{\the\scratchtoks#1}% + \expandafter\dosplitstatus \fi} \def\nosplitstatus#1\end% {} -\gdef\writestatus#1#2% +\def\writestatus#1#2% {\bgroup - \let\messagecontentA\empty - \edef\messagecontentB{#2}% maybe it's \the\scratchcounter - \scratchcounter=0 + \scratchtoks\emptytoks + \statuscounter=\statuswidth \expandafter\dosplitstatus#1% \space\space\space\space\space\space\space \space\space\space\space\space\space\space \space\space\space\space\space\space\end - \writestring{\messagecontentA\space:\space\messagecontentB}% + \expanded{\writestring{\the\scratchtoks\space:\space#2}}% \egroup} %D \macros +%D {emptytoks} +%D +%D For this we need an empty token register, analogous +%D to \type {\empty}. + +\newtoks\emptytoks + +%D \macros %D {debuggerinfo} %D %D For debugging purposes we can enhance macros with the diff --git a/tex/context/base/syst-new.tex b/tex/context/base/syst-new.tex index 419dcbe97..6c321f5e5 100644 --- a/tex/context/base/syst-new.tex +++ b/tex/context/base/syst-new.tex @@ -62,6 +62,14 @@ \def\doifnonzeropositiveelse#1% {\bgroup\afterassignment\dodoifnonzeropositiveelse\scratchcounter=0#1\relax\empty\end} +% here ? + +\def\dosetrawvalue#1#2#3% + {\setvalue{#1#2}{#3}} + +\def\getrawparameters% + {\dogetparameters\dosetrawvalue} + \def\splitskip#1% {\scratchskip=0pt plus 1pt minus 1pt \advance\scratchskip by #1 @@ -220,6 +228,35 @@ {\adddimenregister#1\to\scratchdimen \edef#2{\the\scratchdimen}} +%D \macros +%D {freezedimenmacro} +%D +%D This macro is use as: +%D +%D \starttypen +%D \freezedimenmacro\linkermargeafstand +%D \stoptypen + +\def\freezedimenmacro#1% + {\scratchdimen#1\edef#1{\the\scratchdimen}} + +% \newcount\rawrecursecounter +% +% \def\rawrecurselevel{\the\rawrecursecounter}% +% +% \def\dorawrecurse#1#2% +% {\rawrecursecounter=1\relax +% \let\oldrecurselevel\recurselevel +% \let\recurselevel\rawrecurselevel +% \def\dodorawrecurse% +% {\ifnum\rawrecursecounter>#1\relax +% \let\recurselevel\oldrecurselevel +% \else +% #2\advance\rawrecursecounter by 1 +% \expandafter\dodorawrecurse +% \fi}% +% \dodorawrecurse} + \protect \endinput diff --git a/tex/context/base/syst-tex.tex b/tex/context/base/syst-tex.tex index 5d0bc72c6..b231c7051 100644 --- a/tex/context/base/syst-tex.tex +++ b/tex/context/base/syst-tex.tex @@ -157,7 +157,8 @@ \gdef\dobeginETEX#1 {\egroup\immediate\write16% - {line \the\inputlineno: inserting E-TEX code \detokenize{#1}}} + %{line \the\inputlineno: inserting E-TEX code \detokenize{#1}}} + {system (E-TEX) : [line \the\inputlineno] \detokenize{#1}}} \global\let\endETEX\relax @@ -168,29 +169,29 @@ %D Well, this redefintion of \type {\input} fails on \ETEX, %D because of some \type {\cs\fi} constructs. So now we use: -\beginETEX etex.src etexdefs.lib - - \def\input#1% - {\bgroup - \skipmessage{\string\input}% - \expandafter\ifx\expandafter#1\csname l@ngdefnfile\endcsname - \let\input\egroup - \else - \def\input##1 {\egroup}% - \fi - \input} - - \normalinput etex.src \relax - \normalinput etexdefs.lib \relax - - \let\fmtversion\normalfmtversion - - \savinghyphcodes=1 - -\endETEX - -\let\normalprotected = \protected -\let\normalunexpanded = \unexpanded +% \beginETEX etex.src etexdefs.lib +% +% \def\input#1% +% {\bgroup +% \skipmessage{\string\input}% +% \expandafter\ifx\expandafter#1\csname l@ngdefnfile\endcsname +% \let\input\egroup +% \else +% \def\input##1 {\egroup}% +% \fi +% \input} +% +% \normalinput etex.src \relax +% \normalinput etexdefs.lib \relax +% +% \let\fmtversion\normalfmtversion +% +% \savinghyphcodes=1 +% +% \endETEX +% +% \let\normalprotected = \protected +% \let\normalunexpanded = \unexpanded %D We restore some redefined primitives to their old meaning. @@ -221,6 +222,10 @@ \def\wlog#1{} +% \let\normalwlog\wlog +% +% \def\wlog#1{\normalwlog{system (\string\wlog) : #1}} + %D To prevent clashes, we slightly redefine the phantom %D macros: we let them hide their behaviour by grouping. diff --git a/tex/context/base/thrd-ran.tex b/tex/context/base/thrd-ran.tex index ee3a7f6ac..24898df51 100644 --- a/tex/context/base/thrd-ran.tex +++ b/tex/context/base/thrd-ran.tex @@ -1,3 +1,7 @@ +% Since we cannot be sure that this file is available at any +% system, we have copied the original in this file. These +% macros are encapsulates and extended in supp-ran.tex. + % RANDOM.TEX v.1 (Donald Arseneau) % Generating "random" numbers in TeX. % diff --git a/tex/context/base/thrd-tab.tex b/tex/context/base/thrd-tab.tex index 1ddb11c55..d64d19436 100644 --- a/tex/context/base/thrd-tab.tex +++ b/tex/context/base/thrd-tab.tex @@ -1,3 +1,11 @@ +% Since this file is not available in every distribution, we +% have copied the original in this file. The manuals to +% Wichura's PiCTeX and TaBlE packages are not available on +% line and are distributed by respectively the TeX Users Group +% and Personal TeX Inc. Many macros of TaBlE are overloaded +% and/or extended in core-tab.tex. The extensions concern +% splitting over pages, color and consistent spacing. + % TABLE 1.0 % Copyright Michael J. Wichura August 1988 @@ -6,8 +14,6 @@ %% \input eight %% \font\csc=cmcsc10 - - % The TABLE macros are divided into sections, roughly according to % function: diff --git a/tex/context/base/typo-ini.tex b/tex/context/base/typo-ini.tex new file mode 100644 index 000000000..f6f3e88f9 --- /dev/null +++ b/tex/context/base/typo-ini.tex @@ -0,0 +1,40 @@ +%D \module +%D [ file=typo-ini, +%D version=2000.16.09, +%D title=\CONTEXT\ Typographic Macros, +%D subtitle=Initialization, +%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. + +%D Since \CONTEXT\ is dealing with typographics, isn't +%D September 2000 a bit late to start writing this module? It +%D may seem so, but since more and more languages are +%D supported, we think it is time to isolate language specific +%D typographic extensions in modules. The first language that +%D demands this is Chinese, and more will follow. + +\writestatus{loading}{Context Typographic Macros (ini)} + +\unprotect + +%D \macros +%D {ifvertical} +%D +%D The following switch can be used to signal macros that they +%D should adapt their behaviour. + +\newif\ifvertical + +%D \macros +%D {vhbox} +%D +%D A stupid but useful macro. + +\def\vhbox{\ifvertical\vbox\else\hbox\fi} + +\protect \endinput diff --git a/tex/context/base/verb-eif.tex b/tex/context/base/verb-eif.tex new file mode 100644 index 000000000..16ee611e1 --- /dev/null +++ b/tex/context/base/verb-eif.tex @@ -0,0 +1,211 @@ +%D \module +%D [ file=verb-eif, +%D version=2000.08.23, +%D title=\CONTEXT\ Verbatim Macros, +%D subtitle=Pretty Eiffel Verbatim, +%D author={Berend de Boer \& Hans Hagen}, +%D date=\currentdate, +%D copyright={Berend de Boer \& Hans Hagen}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% This module will be cleaned up a bit in the process of more +% flexible verbatim options. + +\writestatus{loading}{Context Support Macros / Pretty EIFFEL Verbatim} + +%D \startbuffer +%D \startEIFFEL +%D class TEST +%D +%D creation +%D make +%D +%D feature -- creation +%D +%D make is +%D do +%D print ("hello world") +%D end +%D +%D end +%D \stopEIFFEL +%D \stopbuffer +%D +%D +%D If a variable in a comment is quoted with `..', it is typeset +%D as a variable (common Eiffel convention for pretty typesetters): +%D +%D \startbuffer +%D \startEIFFEL +%D class TEST +%D +%D feature +%D +%D say (something: STRING) is +%D -- say `something' to stdout +%D do +%D print (something) +%D end +%D +%D end -- class TEST +%D \stopEIFFEL +%D \stopbuffer +%D +%D +%D Recommended, OOSC2 style setting is: +%D +%D \setuptyping +%D [EIFFEL] +%D [margin=1em,palet=,color=blue,style=\it,icommand=\bf,ccommand=\tf] +%D + +%D We borrow most of the macros from the \PERL\ driver. + +\ifx\undefined\setupprettyPLtype \input verb-pl \relax \fi + +\unprotect + +%D \EIFFEL\ has only the one line comment sequence \type{--}. + +\gdef\EIFsetspecials% + {\PLsetspecials + \setpretty`\#=32 + \setpretty`\{=33 \setpretty`\}=33 + \setpretty`\[=33 \setpretty`\]=33 \setpretty`\(=33 \setpretty`\)=33 + \setpretty`\;=33 \setpretty`\:=33 + \setpretty`\!=33 \setpretty`\?=33 + \setpretty`\==33 \setpretty`\~=33 \setpretty`\<=33 \setpretty`\>=33 + \setpretty`\-=33 \setpretty`\+=33 \setpretty`\/=33 \setpretty`\*=33 + \setpretty`\^=33 + \setpretty`\%=41 \setpretty`\-=45 + \setpretty`\`=81 \setpretty`\'=82 } + +\gdef\EIFsethandlers% + {\PLsethandlers + \installprettyhandler 33 \EIFtypesymbol + \installprettyhandler 45 \EIFtypefourfive + \installprettyhandler 81 \EIFtypeeightone + \installprettyhandler 82 \EIFtypeeighttwo + \installprettyhandler 90 \EIFtypenine } + +\gdef\EIFsetcontrols% + {\PLsetcontrols + \def\flushrestofverbatimline% + {\endPLtypesix + \inPLcommentfalse + \verbatimfont + \PLverbosefalse + \PLverboseskipped=0}} + +\gdef\EIFsetvariables + {\PLsetvariables} + +\gdef\setupprettyEIFtype% + {\def\prettyidentifier{EIF}% + \let\PLidentifiers=\EIFidentifiers + \let\PLvariables=\EIFvariables + \EIFsetvariables + \EIFsetcontrols + \EIFsethandlers + \EIFsetspecials + \PLsetdiagnostics} + +% symbols should appear in roman + +\gdef\EIFtypesymbol#1% + {\endPLtypesix + \ifinPLcomment + \getpretty{#1}% + \else + {\prettynaturalfont\/% + \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty}% + \fi} + +% recognize comments + +\gdef\EIFtypefourfive% + {\handlenextnextpretty\doEIFtypefourfive\PLtypefourtwo} + +\gdef\doEIFtypefourfive#1#2% + {\endPLtypesix + \getprettydata{#2}% + \ifnum\prettytype=45 + \let\next=\dodoEIFtypefourfive + \else + \let\next=\PLtypefourtwo + \fi + \next{#1}#2} + +\gdef\dodoEIFtypefourfive% #1% + {\endPLtypesix + \handlenextnextpretty\dododoEIFtypefourfive\dodododoPLtypefourfive} + +\gdef\dododoEIFtypefourfive% + {\ifnewpretty\expandafter\handlenewpretty\fi\dodododoEIFtypefourfive} + +\gdef\dodododoEIFtypefourfive#1#2% + {\ifinPLcomment + \getpretties{#1}{#2}% + \else + \ifinPLdouble + \getpretties{#1}{#2}% + \else + \global\inPLcommenttrue + \PLverbosecorrection + \def\next{\beginofpretty[\!!prettyone]\getpretties{#1}{#2}\endofpretty\prettynaturalfont}% + \expandafter\next + \fi + \fi} + +% recognize `name' in comments and format them like variables + +\gdef\EIFtypeeightone#1% + {\endPLtypesix + \ifinPLcomment + \verbatimfont + \else + \getpretty{#1}% + \fi} + +\gdef\EIFtypeeighttwo#1% + {\endPLtypesix + \ifinPLcomment + \prettynaturalfont + \else + {\prettynaturalfont\/% + \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty}% + \fi} + +% double quote + +\gdef\EIFtypenine#1% + {\endPLtypesix + \ifinPLcomment + \getpretty{#1}% + \else\ifinPLsingle + \getpretty{#1}% + \else\ifinPLdouble + \global\inPLdoublefalse + {\prettynaturalfont\/% + \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty}% + \else + \global\inPLdoubletrue + {\prettynaturalfont + \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty}% + \fi\fi\fi} + +\useprettyidentifiers \EIFidentifiers \EIFsetspecials + alias all and as check class create creation debug deferred do else + elseif end ensure expanded export external false feature from frozen + if implies indexing infix inherit inspect invariant is like local + loop not obsolete old once or prefix redefine rename require rescue + precursor retry select separate strip then true undefine unique + until variant when xor + +\useprettyidentifiers \EIFvariables \EIFsetspecials + not-yet-defined + +\protect \endinput diff --git a/tex/context/base/verb-ini.tex b/tex/context/base/verb-ini.tex index 5cc8f7676..93bf539b4 100644 --- a/tex/context/base/verb-ini.tex +++ b/tex/context/base/verb-ini.tex @@ -107,6 +107,11 @@ \def\obeyedline {\par} \def\obeyedpage {\vfill\eject} +%D Because we will introduce a status variable, we can define +%D a better \type {\obeyedspace}. + +\def\obeyedspace {\ifprocessingverbatim\hbox{ }\else\space\fi} + %D \macros %D {controlspace,setcontrolspaces} %D @@ -183,6 +188,19 @@ \egroup %D \macros +%D {processingverbatim} +%D +%D Typesetting a file in most cases results in more than one +%D page. Because we don't want problems with files that are +%D read in during the construction of the page, we set \type +%D {\ifprocessingverbatim}, so the output routine can adapt +%D its behavior. Originally we used \type {\scratchread}, but +%D because we want to support nesting, we decided to use a +%D separate input file. + +\newif\ifprocessingverbatim + +%D \macros %D {processinlineverbatim} %D %D Although the inline verbatim commands presented here will be @@ -238,6 +256,7 @@ \def\processinlineverbatim#1% {\bgroup + \processingverbatimtrue \localcatcodestrue % TeX processes paragraph's \def\endofverbatimcommand{#1\egroup}% \bgroup @@ -249,19 +268,6 @@ %D typesetting inline verbatim. %D \macros -%D {processingverbatim} -%D -%D Typesetting a file in most cases results in more than one -%D page. Because we don't want problems with files that are -%D read in during the construction of the page, we set -%D \type{\ifprocessingverbatim}, so the output routine can -%D adapt its behavior. Originally we used -%D \type{\scratchread}, but because we want to support nesting, -%D we decided to use a separate input file. - -\newif\ifprocessingverbatim - -%D \macros %D {optimizeverbatim} %D %D One day, a collegue asked me why I didn't prevent breaking @@ -286,7 +292,7 @@ %D {\nobreak\hrule width 10cm\par\penalty500} % == \nobreak %D %D \def\doverbatimgoodbreak% -%D {\nobreak\hrule width 3cm \par\penalty100} % >> \goodbreak +%D {\nobreak\hrule width 3cm \par\penalty\linepenalty} %D %D \starttypen %D test @@ -321,7 +327,7 @@ {\ifoptimizeverbatim\penalty500\fi} \def\doverbatimgoodbreak% - {\ifoptimizeverbatim\penalty100\fi} + {\ifoptimizeverbatim\penalty\linepenalty\fi} \def\doflushverbatimline% {\expandafter\dodoverbatimline\expandafter{\savedverbatimline}} @@ -475,7 +481,7 @@ %D \macros %D {eightbitcharacters, %D setcatcodes,uncatcodespecials, -%D uncatcodecharacters, +%D uncatcodecharacters,uncatcodespacetokens, %D setnaturalcatcodes} %D %D As its name says, \type{\uncatcodecharacters} resets the @@ -507,7 +513,10 @@ {\ifnum\catcode\scratchcounter=\@@letter\relax\else \catcode\scratchcounter=\@@other \fi}% - \catcode`\ =\@@space + \uncatcodespacetokens} + +\def\uncatcodespacetokens% + {\catcode`\ =\@@space \catcode`\^^L=\@@ignore \catcode`\^^M=\@@endofline \catcode`\^^?=\@@ignore} @@ -550,13 +559,16 @@ %D The previous macros call for \type{\savecatcode}, which is %D implemented as: +\def\@@aa@@{@@aa@@} +\def\@@cc@@{@@cc@@} + \newif\iflocalcatcodes \def\savecatcode% {\iflocalcatcodes \else \saverestoreactivecatcode - {\@EA\let\csname @@aa@@\the\scratchcounter\endcsname=~}% - \@EA\chardef\csname @@cc@@\the\scratchcounter\endcsname + {\@EA\let\csname\@@aa@@\the\scratchcounter\endcsname=~}% + \@EA\chardef\csname\@@cc@@\the\scratchcounter\endcsname =\catcode\scratchcounter \fi} @@ -564,9 +576,9 @@ \def\restorecatcode% {\@EA\catcode\@EA\scratchcounter\@EA= - \csname @@cc@@\the\scratchcounter\endcsname + \csname\@@cc@@\the\scratchcounter\endcsname \saverestoreactivecatcode - {\@EA\let\@EA~\@EA=\csname @@aa@@\the\scratchcounter\endcsname}} + {\@EA\let\@EA~\@EA=\csname\@@aa@@\the\scratchcounter\endcsname}} %D Especially when we enable pretty printing, we need to %D restore the meaning of active characters too. Just think of @@ -604,6 +616,22 @@ \let\endrestorecatcodes =\egroup \fi} +%D \macros +%D {makeallletter} +%D +%D With \type {\makeallletter} each character ($>0$) gets the +%D category code 12. + +% \newtoks\makeallothertoks +% +% \dorecurse{255} +% {\@EA\appendtoks\@EA\catcode\recurselevel=\@@other\to\makeallothertoks} +% +% \def\makeallother{\the\makeallothertoks} + +\def\makeallother% + {\dorecurse{255}{\catcode\recurselevel=\@@other}} + %D The main copying routine of display verbatim does an %D ordinary string||compare on the saved closing command and %D the current line. The space after \type{#1} in the @@ -784,14 +812,14 @@ \let\endoftabskipping=\relax -\def\processverbatimline#1{#1} % remove the fake grouping - \def\doprocesstabskipline#1% {\bgroup \scratchcounter=1 \dodoprocesstabskipline#1\relax\endoftabskipping \egroup} +\def\processverbatimline#1{#1} % remove the fake grouping + %D \macros %D {processfileverbatim} %D @@ -828,21 +856,36 @@ \obeypages \obeycharacters \ignoreeofs + \catcode`\^^M=\@@ignore % \par is already taken care of \openin\verbatiminput=#1\relax \skipfirstverbatimlinefalse \initializeverbatimline \def\readline% - {\read\verbatiminput to \verbatimline + {\ifx\firstverbatimfileline\empty + \read\verbatiminput to \verbatimline + \else + \let\verbatimline\firstverbatimfileline + \let\firstverbatimfileline\empty + \fi \ifeof\verbatiminput - \presetlastverbatimline - \let\readline=\relax + \ifx\lastverbatimfileline\empty + \presetlastverbatimline + \let\readline=\relax + \else % we will re-enter the \ifeof branch twice + \presetnormalverbatimline + \def\readline% + {\let\verbatimline\lastverbatimfileline + \let\lastverbatimfileline\empty}% + \fi + \else\ifx\verbatimline\empty + \presetemptyverbatimline \else\ifx\verbatimline\emptyline \presetemptyverbatimline \else\ifx\verbatimline\emptypage \presetemptyverbatimline \else \presetnormalverbatimline - \fi\fi\fi + \fi\fi\fi\fi \handleverbatimline \readline}% \ifeof\verbatiminput \else @@ -852,6 +895,24 @@ \egroup \ignorespaces} +%D \macros +%D {firstverbatimfileline, lastverbatimfileline} +%D +%D The following two macros can be set to achieve special +%D effects, like: +%D +%D \starttypen +%D \convertargument\StartFake{something}\to\firstverbatimfileline +%D \convertargument\StopFake\to\firstverbatimfileline +%D \stoptypen +%D +%D These hooks were needed for typesetting flowchart +%D definitions verbatim, since the temporary files does not +%D have the start and stop commands embedded. + +\let\firstverbatimfileline\empty +\let\lastverbatimfileline \empty + %D One can use the different \type{\obeysomething} commands to %D influence the behavior of these macro's. We use for instance %D \type{\obeycharacters} for making \type{/} an active @@ -1730,6 +1791,27 @@ \handleverbatimline% \copyverbatimline}} +%D As a bonus, we provide the next alternative, which takes +%D end tags like \type {Hello World!}. + + \def\processtaggeddisplayverbatim#1% + {\par + \let\endofdisplayverbatim\relax + \convertargument#1\to\endofverbatimcommand + \bgroup + \parindent\!!zeropoint + \ifdim\lastskip<\parskip + \removelastskip + \vskip\parskip + \fi + \parskip\!!zeropoint + \processingverbatimtrue + \verbatimfont \spaceskip=.5em \xspaceskip=\spaceskip + \global\linepartrue % needed for paragraph numbering + \setupcopyverbatim + \initializeverbatimline + \copyverbatimline} + \fi \protect diff --git a/tex/context/base/verb-pas.tex b/tex/context/base/verb-pas.tex new file mode 100644 index 000000000..4b9698022 --- /dev/null +++ b/tex/context/base/verb-pas.tex @@ -0,0 +1,266 @@ +%D \module +%D [ file=verb-pas, +%D version=1999.12.09, +%D title=\CONTEXT\ Verbatim Macros, +%D subtitle=Pretty \PASCAL\ and \MODULA\ Verbatim, +%D author=Berend de Boer, +%D date=\currentdate, +%D copyright={Berend de Boer \& Hans Hagen] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% This module will be cleaned up a bit in the process of more +% flexible verbatim options. + +\writestatus{loading}{Context Support Macros / Pretty PASCAL Verbatim} + +%D Typeset Pascal(-like) code: +%D +%D \startbuffer +%D \startPAS +%D program Hello; +%D +%D begin +%D writeln('hello world.'); +%D end. +%D \stopPAS +%D \stopbuffer +%D +%D Berend's preferences: +%D +%D \startbuffer[setup] +%D \setuptyping +%D [DELPHI] +%D [palet=,icommand=\bf,vcommand=,ccommand=\it] +%D \stopbuffer + +\ifx\undefined\setupprettyPLtype \input verb-pl \relax \fi + +\unprotect + +\doglobal\newif\ifinPASbracketcomment +\doglobal\newif\ifinPASslashstarcomment +\doglobal\newif\ifinPASslashslashcomment + + +\gdef\PASsetspecials% + {\PLsetspecials + \setpretty`\#=32 + \setpretty`\%=41 + \setpretty`\:=41 + \setpretty`\/=43 + \setpretty`\*=44 + \setpretty`\{=45 \setpretty`\}=46 } + +\gdef\PASsethandlers% + {\PLsethandlers + \installprettyhandler 43 \PAStypefourthree + \installprettyhandler 44 \PAStypefourfour + \installprettyhandler 45 \PAStypefourfive + \installprettyhandler 46 \PAStypefoursix } + +\gdef\PASsetcontrols% + {\PLsetcontrols + \def\flushrestofverbatimline% + {\endPLtypesix + \ifinPASslashslashcomment + \PASstopslashslashcomment + \fi + \PLverbosefalse + \PLverboseskipped=0}} + +\gdef\PASsetvariables + {\PLsetvariables + \global\inPASbracketcommentfalse + \global\inPASslashstarcommentfalse + \global\inPASslashslashcommentfalse} + +\gdef\setupprettyPAStype% + {\def\prettyidentifier{PAS}% + \let\PLidentifiers=\PASidentifiers + \let\PLvariables=\PASvariables + \PASsetvariables + \PASsetcontrols + \PASsethandlers + \PASsetspecials + \PLsetdiagnostics} + + +% the // and /* comments + +\gdef\PAStypefourthree% + {\handlenextnextpretty\doPAStypefourthree\PLtypefourtwo} + +\gdef\doPAStypefourthree#1#2% + {\ifinPLcomment + \let\next=\PLtypefourtwo + \else + \ifinPLsingle + \let\next=\PLtypefourtwo + \else + \getprettydata{#2}% + \ifnum\prettytype=43 + \PLverbosecorrection + \let\next=\PASstartslashslashcomment + \else\ifnum\prettytype=44 + \PLverbosecorrection + \let\next=\PASstartslashstarcomment + \else + \let\next=\PLtypefourtwo + \fi\fi + \fi + \fi + \next{#1}#2} + +\gdef\PASstartslashstarcomment#1#2% + {\global\inPLcommenttrue + \global\inPASslashstarcommenttrue + \prettynaturalfont + \beginofpretty[\!!prettyone]\getpretties{#1}{#2}\endofpretty} + +\gdef\PASstopslashstarcomment#1#2% + {\beginofpretty[\!!prettyone]\getpretties{#1}{#2}\endofpretty + \verbatimfont + \global\inPLcommentfalse + \global\inPASslashstarcommentfalse} + +\gdef\PASstartslashslashcomment#1#2% + {\global\inPLcommenttrue + \global\inPASslashslashcommenttrue + \prettynaturalfont + \beginofpretty[\!!prettyone]\getpretties{#1}{#2}\endofpretty} + +\gdef\PASstopslashslashcomment% + {\verbatimfont + \inPLcommentfalse + \inPASslashslashcommentfalse} + +% \gdef\dodoPAStypefourthree% #1% +% {\endPLtypesix +% \handlenextnextpretty\dododoPAStypefourthree\dodododoPLtypefourthree} + +% \gdef\dododoPAStypefourthree% +% {\ifnewpretty\expandafter\handlenewpretty\fi\dodododoPAStypefourthree} + +% \gdef\dodododoPAStypefourthree#1#2% +% {\ifinPLcomment +% \getpretties{#1}{#2}% +% \else +% \global\inPLcommenttrue +% \PLverbosecorrection +% \beginofpretty[\!!prettyone]\getpretties{#1}{#2}\endofpretty +% \fi} + +\gdef\PAStypefourfour% + {\handlenextnextpretty\doPAStypefourfour\PLtypefourtwo} + +\gdef\doPAStypefourfour#1#2% + {\ifinPASslashstarcomment + \getprettydata{#2}% + \ifnum\prettytype=43 + \PASstopslashstarcomment{#1}#2% + \else + \endPLtypesix + \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty + \expandafter#2% + \fi + \else + \endPLtypesix + \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty + \expandafter#2% + \fi} + + +% the { and } comments +% we assume { is closed by } and do not follow the braindead Standard +% Pascal standard in this respect +% Note: brackets are not output correctly if natural font is \tf. +% Therefore natural font is default to \tttf now (Hans is this ok??) +% You have to use postscript fonts it seems to get brackets in that case. + +\gdef\PAStypefourfive#1% + {\endPLtypesix + \ifinPLcomment + \getpretty{#1}% + \else + \ifinPLsingle + \getpretty{#1}% + \else + \global\inPLcommenttrue + \global\inPASbracketcommenttrue + \prettynaturalfont + \beginofpretty[\!!prettyone]\getpretty{#1}\endofpretty + \fi + \fi} + +\gdef\PAStypefoursix#1% + {\endPLtypesix + \ifinPASbracketcomment + \prettynaturalfont\beginofpretty[\!!prettyone]\getpretty{#1}\endofpretty + \verbatimfont + \global\inPLcommentfalse + \global\inPASbracketcommentfalse + \else + \getpretty{#1}% + \fi} + + +% Standard Pascal keywords (ISO/IEC 7185) + +\useprettyidentifiers \PASidentifiers \PASsetspecials + and array begin case const div do downto else end file + for function goto if in label mod nil not of or packed + procedure program record repeat set then to type until + var while with + +% Standard Pascal directives (ISO/IEC 7185) + +\useprettyidentifiers \PASidentifiers \PASsetspecials + forward + +% Extended Pascal keywords (ISO/IEC 10206) + +\useprettyidentifiers \PASidentifiers \PASsetspecials + and_then bindable export import module only or_else + otherwise pow protected qualified restricted + +% Extended Pascal directives (ISO/IEC 10206) + +\useprettyidentifiers \PASidentifiers \PASsetspecials + implementation interface + +% Object Pascal keywords (draft September 20, 1993) + +\useprettyidentifiers \PASidentifiers \PASsetspecials + abstract class constructor destructor inherited is + property view + +% Object Pascal directives (draft September 20, 1993) + +\useprettyidentifiers \PASidentifiers \PASsetspecials + override + +% Delphi keywords + +\useprettyidentifiers \PASidentifiers \PASsetspecials + as asm dispinterface except exports finalization finally + initialization inline library object out raise resourcestring + shl shr string threadvar try unit uses xor + +% Delphi directives +% the read and write directive have been skipped +% as they're pretty common procedure calls too + +\useprettyidentifiers \PASidentifiers \PASsetspecials + absolute assembler automated cdecl contains default dispid + dynamic external far implements index message name near + nodefault overload override package pascal private protected + public published readonly register reintroduce requires + resident safecall stdcall stored virtual writeonly + +\useprettyidentifiers \PASvariables \PASsetspecials + not-yet-defined + +\protect \endinput diff --git a/tex/context/base/verb-pl.tex b/tex/context/base/verb-pl.tex index 9ac354c7c..4495be13e 100644 --- a/tex/context/base/verb-pl.tex +++ b/tex/context/base/verb-pl.tex @@ -82,8 +82,6 @@ \PLverbosefalse \PLverboseskipped=0}} - - \gdef\setupprettyPLtype% {\def\prettyidentifier{PL}% \PLsetvariables diff --git a/tex/context/base/verb-sql.tex b/tex/context/base/verb-sql.tex index 7efd0127a..59218dc59 100644 --- a/tex/context/base/verb-sql.tex +++ b/tex/context/base/verb-sql.tex @@ -1,12 +1,15 @@ %D \module %D [ file=verb-sql, -%D version=1999.06.08, +%D version=2000.05.09, %D title=\CONTEXT\ Verbatim Macros, %D subtitle=Pretty \SQL\ Verbatim, -%D author={Berend de Boer, Hans Hagen}, +%D author={Berend de Boer \& Hans Hagen}, %D date=\currentdate, -%D copyright={Berend de Boer, Hans Hagen}] +%D copyright={Berend de Boer \& Hans Hagen}] %C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. \writestatus{loading}{Context Support Macros / Pretty SQL Verbatim} @@ -64,6 +67,7 @@ \gdef\SQLsetspecials% {\PLsetspecials \setpretty`\#=32 + \setpretty`\:=41 \setpretty`\%=41 \setpretty`\/=43 \setpretty`\*=44 @@ -83,7 +87,10 @@ {\PLsetcontrols \def\flushrestofverbatimline% {\endPLtypesix - \ifcase\SQLcommentlevel \inPLcommentfalse \fi + \ifcase\SQLcommentlevel + \inPLcommentfalse + \verbatimfont + \fi \PLverbosefalse \PLverboseskipped=0}} @@ -123,6 +130,7 @@ \gdef\SQLtogglecomment#1#2% {\ifnum\SQLcommentlevel=1 + \prettynaturalfont \beginofpretty[\!!prettyone]\getpretties{#1}{#2}\endofpretty \else \getpretties{#1}{#2}% @@ -152,7 +160,10 @@ \ifnum\prettytype=43 \SQLtogglecomment{#1}#2% \global\advance\SQLcommentlevel by -1 - \ifcase\SQLcommentlevel \global\inPLcommentfalse \fi + \ifcase\SQLcommentlevel + \global\inPLcommentfalse + \prettyverbatimfont + \fi \else \endPLtypesix \beginofpretty[\!!prettyfour]\getpretty{#1}\endofpretty @@ -190,6 +201,7 @@ \ifnaturaltextext \let\next\naturaltextext \else + \prettynaturalfont \def\next{\beginofpretty[\!!prettyone]\getpretties{#1}{#2}\endofpretty}% \fi \expandafter\next diff --git a/tex/context/base/verb-xml.tex b/tex/context/base/verb-xml.tex new file mode 100644 index 000000000..5806349bf --- /dev/null +++ b/tex/context/base/verb-xml.tex @@ -0,0 +1,409 @@ +%D \module +%D [ file=verb-xml, +%D version=2000.05.09, +%D title=\CONTEXT\ Verbatim Macros, +%D subtitle=Pretty XML verbatim, +%D author=Berend de Boer, +%D date=2000.05.08, +%D copyright={Berend de Boer \& Hans Hagen}] +%C +%C This module is part of the \CONTEXT\ macro||package and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +% This module will be cleaned up a bit in the process of more +% flexible verbatim options. + +\writestatus{loading}{Context Support Macros / Pretty XML Verbatim} + +\unprotect + +%D Formats XML more or less like XMLWriter (http://XMLwriter.net) +%D does. +%D +%D Known bugs: +%D - CDATA not handled yet. +%D +%D Expects well-formed XML. Else parsing errors may occur, because +%D this XML state machine is not robust. +%D +%D Examples: +%D +%D \startXML +%D <?xml version="1.0" encoding="ISO-8859-1" ?> +%D <!-- comment: example of a <resource> tag --> +%D <resources> +%D <resource id="5"> +%D <capacity> +%D <kind>1</kind> +%D <value>100</value> +%D </capacity> +%D </resource> +%D </resources> +%D \stopXML +%D +%D Another format: +%D +%D \startXML +%D <?xml version="1.0" encoding="ISO-8859-1" ?> +%D <address id="10"/> +%D \stopXML +%D +%D A typical setup: +%D +%D \setuptyping[XML] +%D [margin=1cm, +%D before={\switchtobodyfont[9pt]\blank[medium]}, +%D after={\switchtobodyfont[11pt]\blank[medium]}, +%D letter=\ss] +%D + +\gdef\setupprettyXMLtype% + {\def\prettyidentifier{XML}% + \XMLsetvariables + \XMLsetcontrols + \XMLsetspecials + \XMLsethandlers} + +\gdef\XMLsetvariables + {\global\inXMLpifalse + \global\inXMLtagfalse + \global\inXMLvaluefalse + \global\inXMLspecialfalse + \global\inXMLcommentfalse + \global\inXMLtagnamefalse + \global\inXMLattributefalse} + +\gdef\XMLsetcontrols% + {\saveprettycontrols + \def\obeyedspace% + {\XMLstartattribute + \oldobeyedspace}% + \def\flushrestofverbatimline% + {\endXMLtagname}% + \let\obeytabs=\ignoretabs} + +\gdef\XMLsetspecials% + {\setpretty`\<=10 \setpretty`\>=11 + \setpretty`\?=12 \setpretty`\/=13 + \setpretty`\!=14 \setpretty`\-=15 + \setpretty`\\=17 + % \setpretty`\0=17 + % \setpretty`\1=17 \setpretty`\2=17 \setpretty`\3=17 + % \setpretty`\4=17 \setpretty`\5=17 \setpretty`\6=17 + % \setpretty`\7=17 \setpretty`\8=17 \setpretty`\9=17 + \setpretty`\==16 + \setpretty`\"=20 + \setpretty`\(=30 \setpretty`\)=30 \setpretty`\,=30 + \setpretty`\*=30 \setpretty`\+=30 \setpretty`\#=30 + \setpretty`\:=30 + \setpretty`\&=40 } + +\gdef\XMLsethandlers% + {%\installprettyhandler 17 \XMLnormal + \installprettyhandler 10 \XMLwhattag + \installprettyhandler 11 \XMLstoptag + \installprettyhandler 12 \XMLtypeonetwo + \installprettyhandler 13 \XMLtypeonethree + \installprettyhandler 14 \XMLtypeonefour + \installprettyhandler 15 \XMLtypeonefive + \installprettyhandler 16 \XMLtypeonesix + \installprettyhandler 20 \XMLdoublequote + \installprettyhandler 30 \XMLtypethree + \installprettyhandler 40 \XMLampersand} + +\doglobal\newif\ifinXMLpi +\doglobal\newif\ifinXMLtag +\doglobal\newif\ifinXMLvalue +\doglobal\newif\ifinXMLspecial +\doglobal\newif\ifinXMLcomment +\doglobal\newif\ifinXMLtagname +\doglobal\newif\ifinXMLattribute + +% the list of actions to be executed per state + +% test if we have a normal tag, processing instruction or a special, +% i.e. <, <? or <! + +%\gdef\XMLnormal#1{\getpretty{#1}} + +\gdef\XMLwhattag% + {\handlenextnextpretty\XMLdowhattag\XMLstarttag} + +\gdef\XMLdowhattag#1#2% + {\ifinXMLcomment + \let\next=\getpretties + \else + \getprettydata{#2}% + \ifnum\prettytype=12 + \let\next=\XMLstartpi + \else\ifnum\prettytype=14 + \let\next=\XMLstartspecial + \else + \let\next=\XMLstarttag + \fi\fi + \fi + \next{#1}{#2}} + +% formats <? + +\gdef\XMLstartpi#1#2% + {\beginofpretty[\!!prettythree]\getpretties{#1}{#2}\endofpretty% + \beginofpretty[\!!prettyone]% + \global\inXMLtagtrue + \global\inXMLpitrue + \global\inXMLtagnametrue} + +% format <! (<!--, <!DOCTYPE, <![CDATA[ and such + +\gdef\XMLstartspecial#1#2% + {\beginofpretty[\!!prettythree]\getpretties{#1}{#2}\endofpretty% + \beginofpretty[\!!prettyone]% + \global\inXMLtagtrue + \global\inXMLspecialtrue + \global\inXMLtagnametrue} + + +% formats plain < +\gdef\XMLstarttag#1% + {\beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty + \beginofpretty[\!!prettyone]% + \global\inXMLtagtrue + \global\inXMLtagnametrue} + + +% catch > + +\gdef\XMLstoptag#1% + {\ifinXMLcomment + \getpretty{#1}% + \else + \ifinXMLvalue + \getpretty{#1}% + \else + \endXMLtagname + \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty + \doXMLstoptag + \fi + \fi} + +\gdef\doXMLstoptag% + {\global\inXMLpifalse % either end process instruction + \global\inXMLspecialfalse % or special + \global\inXMLtagfalse % and tag ends always + \global\inXMLtagnamefalse} % just to be sure + +% end typeset name of tag +% because called often, we also use it to end the default +% attribute color. + +\gdef\endXMLtagname% + {\ifinXMLtagname + \endofpretty + \inXMLtagnamefalse + \else + \XMLstopattribute + \fi} + +% start attribute formatting inside a tag if applicable + +\gdef\XMLstartattribute% + {\ifinXMLcomment + \else + \endXMLtagname + \ifinXMLtag + \doXMLstartattribute + \fi + \fi} + +\gdef\XMLstopattribute% + {\ifinXMLattribute + \endofpretty + \inXMLattributefalse + \fi} + +\gdef\doXMLstartattribute + {\inXMLattributetrue + \beginofpretty[\!!prettythree]} + +% `?' character, needed to recognize <? (see above) + +\gdef\XMLtypeonetwo% + {\endXMLtagname + \handlenextnextpretty\doXMLtypeonetwo\doXMLout} + +\gdef\doXMLtypeonetwo#1#2% + {\getprettydata{#2}% + \ifnum\prettytype=11 + \let\next=\dododoXMLtypeonetwo + \else + \let\next=\dodoXMLtypeonetwo + \fi + \next{#1}#2} + +\gdef\dodoXMLtypeonetwo#1% + {\ifinXMLcomment + \getpretty{#1}% + \else + \ifinXMLtag + \ifinXMLvalue + \getpretty{#1}% + \else + \beginofpretty[\!!prettytwo]\getpretty{#1}\endofpretty + \fi + \else + \getpretty{#1}% + \fi + \fi} + +\gdef\dododoXMLtypeonetwo#1#2% + {\ifinXMLcomment + \getpretties{#1}{#2}% + \else + \ifinXMLtag + \ifinXMLvalue + \getpretties{#1}{#2}% + \else + \beginofpretty[\!!prettythree]\getpretties{#1}{#2}\endofpretty + \doXMLstoptag + \fi + \else + \getpretties{#1}{#2}% + \fi + \fi} + +% '/' character, catch /> and </, do nothing else + +\gdef\XMLtypeonethree#1% + {\ifinXMLcomment + \getpretty{#1}% + \else + \ifinXMLtag + \ifinXMLvalue + \getpretty{#1}% + \else + \endofpretty + \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty + \beginofpretty[\!!prettyone]% + \fi + \else + \getpretty{#1}% + \fi + \fi} + +% used to parse <! + +\gdef\XMLtypeonefour#1% + {\getpretty{#1}} + +% used to parse <!-- and --> +% when <! is parsed we already assumed this is a comment +% when -- is encountered, we only need to see if --> is ahead +% so the comment can stop. + +\gdef\XMLtypeonefive% + {\endXMLtagname + \handlenextnextpretty\doXMLtypeonefive\doXMLout} + +\gdef\doXMLtypeonefive#1#2% + {\getprettydata{#2}% + \ifnum\prettytype=15 + \ifinXMLcomment + \let\next=\dodoXMLtypeonefive + \else + \ifinXMLspecial + \let\next=\startXMLcomment + \else + \let\next=\doXMLouttwo + \fi + \fi + \else + \let\next=\doXMLouttwo + \fi + \next{#1}#2} + +\gdef\startXMLcomment#1#2% + {\beginofpretty[\!!prettyfour]\getpretties{#1}{#2}% + \global\inXMLcommenttrue} + +\gdef\dodoXMLtypeonefive#1% encountered - + {\getpretty{#1}\handlenextnextpretty\dododoXMLtypeonefive\doXMLout} + +\gdef\dododoXMLtypeonefive#1#2% + {\getprettydata{#2}#1#2% + \ifnum\prettytype=11 + \endofpretty + \global\inXMLcommentfalse + \fi} + +%\gdef\doXMLout#1% +% {\getpretty{#1}} +% +%\gdef\doXMLouttwo#1#2% +% {\getpretties{#1}{#2}} + +\global\let\doXMLout \getpretty +\global\let\doXMLouttwo\getpretties + +% '=' inside tags needs to be blue + +\gdef\XMLtypeonesix#1% + {\ifinXMLtag + \endofpretty + \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty + \beginofpretty[\!!prettyone]% + \else + \getpretty{#1}% + \fi} + +% catch attribute value parts + +\gdef\XMLdoublequote#1% + {\ifinXMLcomment + \getpretty{#1}% + \else + \ifinXMLtag + \ifinXMLvalue + \global\inXMLvaluefalse + \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty + \beginofpretty[\!!prettyone]% + \else + \endofpretty + \beginofpretty[\!!prettythree]\getpretty{#1}\endofpretty + \global\inXMLvaluetrue + \fi + \else + \getpretty{#1}% + \fi + \fi} + +% symbols like `(', `)' and `,' should be green + +\gdef\XMLtypethree#1% + {\ifinXMLcomment + \getpretty{#1}% + \else + \ifinXMLtag + \endXMLtagname + \ifinXMLvalue + \getpretty{#1}% + \else + \beginofpretty[\!!prettytwo]\getpretty{#1}\endofpretty + \XMLstartattribute% again + \fi + \else + \getpretty{#1}% + \fi + \fi} + +% special characters with `&' + +\gdef\XMLampersand#1% + {\ifinXMLcomment + \getpretty{#1}% + \else + \endXMLtagname + \beginofpretty[\!!prettytwo]\getpretty{#1}\endofpretty + \fi} + +\protect \endinput diff --git a/tex/context/config/cont-cz.ini b/tex/context/config/cont-cz.ini deleted file mode 100644 index 2317e4266..000000000 --- a/tex/context/config/cont-cz.ini +++ /dev/null @@ -1,2 +0,0 @@ -\input cont-cz.tex -\endinput
\ No newline at end of file diff --git a/tex/context/config/cont-de.ini b/tex/context/config/cont-de.ini deleted file mode 100644 index f4ec36007..000000000 --- a/tex/context/config/cont-de.ini +++ /dev/null @@ -1,2 +0,0 @@ -\input cont-de.tex -\endinput
\ No newline at end of file diff --git a/tex/context/config/cont-en.ini b/tex/context/config/cont-en.ini deleted file mode 100644 index de2df5ef5..000000000 --- a/tex/context/config/cont-en.ini +++ /dev/null @@ -1,2 +0,0 @@ -\input cont-en.tex -\endinput
\ No newline at end of file diff --git a/tex/context/config/cont-nl.ini b/tex/context/config/cont-nl.ini deleted file mode 100644 index 1bd2bd47f..000000000 --- a/tex/context/config/cont-nl.ini +++ /dev/null @@ -1,2 +0,0 @@ -\input cont-nl.tex -\endinput
\ No newline at end of file diff --git a/tex/context/config/cont-uk.ini b/tex/context/config/cont-uk.ini deleted file mode 100644 index 467026bd2..000000000 --- a/tex/context/config/cont-uk.ini +++ /dev/null @@ -1,2 +0,0 @@ -\input cont-uk.tex -\endinput
\ No newline at end of file diff --git a/tex/context/config/cont-usr.tex b/tex/context/config/cont-usr.tex index 161c076c0..a02a01429 100644 --- a/tex/context/config/cont-usr.tex +++ b/tex/context/config/cont-usr.tex @@ -39,6 +39,7 @@ \definefilesynonym [lang-no.pat] [nohyph.tex] \definefilesynonym [lang-pl.pat] [plhyph.tex] \definefilesynonym [lang-pt.pat] [pthyph.tex] +\definefilesynonym [lang-ro.pat] [rohyph.tex] \definefilesynonym [lang-sk.pat] [skhyph.tex] \definefilesynonym [lang-sp.pat] [sphyph.tex] \definefilesynonym [lang-sv.pat] [sehyph.tex] @@ -46,6 +47,20 @@ \definefilesynonym [lang-uk.pat] [ukhyphen.tex] \definefilesynonym [lang-us.pat] [ushyph1.tex] +%D When the dutch spelling changed, new patterns were +%D constructed. For long these were named \type {dutch96.pat}. +%D From 2000 however, the old \type {nehyph} files were +%D replaced by \type {nehyph96.tex}. Typical something that +%D you have to find out by accident. The names of hyphenation +%D files as well as their coding is one of the dark areas of +%D \TEX\ distributions. + +\doiffileelse{nehyph96.tex} + {\definefilesynonym[lang-nl.pat][nehyph96.tex]} + {\doiffileelse{dutch96.pat} + {\definefilesynonym[lang-nl.pat][dutch96.pat]} + {\definefilesynonym[lang-nl.pat][nehyph.tex]}} + %D Pattern files are (can be) encoded! And, alas, not all %D pattern files are self contained, which is why (for the %D moment) we specify encodings here. @@ -79,8 +94,9 @@ % \installlanguage [\s!no] [\c!status=\v!start] % norwegian % \installlanguage [\s!pl] [\c!status=\v!start] % polish % \installlanguage [\s!pt] [\c!status=\v!start] % portuguese +% \installlanguage [\s!ro] [\c!status=\v!start] % romanian % \installlanguage [\s!sk] [\c!status=\v!start] % slovak -% \installlanguage [\s!sp] [\c!status=\v!start] % spanish +% \installlanguage [\s!es] [\c!status=\v!start] % spanish % \installlanguage [\s!sv] [\c!status=\v!start] % swedish % \installlanguage [\s!tr] [\c!status=\v!start] % turkish % \installlanguage [\s!uk] [\c!status=\v!start] % english uk @@ -105,8 +121,9 @@ % \setupcurrentlanguage[\s!no] % \setupcurrentlanguage[\s!pl] % \setupcurrentlanguage[\s!pt] +% \setupcurrentlanguage[\s!ro] % \setupcurrentlanguage[\s!sk] -% \setupcurrentlanguage[\s!sp] +% \setupcurrentlanguage[\s!es] % \setupcurrentlanguage[\s!sv] % \setupcurrentlanguage[\s!tr] @@ -119,6 +136,13 @@ % \definefilesynonym [font-cmr] [font-csr] % czech & slovak % \definefilesynonym [font-cmr] [font-plr] % polish +%D In some languages, compound characters, like \type {"e} +%D are used to get accented and non latin characters. + + \useencoding[fde] % german +% \useencoding[fro] % romanian +% \useencoding[fpl] % polish + %D Don't remove the next few lines. \protect \endinput diff --git a/tex/context/config/context.ini b/tex/context/config/context.ini deleted file mode 100644 index 403a3063f..000000000 --- a/tex/context/config/context.ini +++ /dev/null @@ -1,2 +0,0 @@ -\input context.tex -\endinput
\ No newline at end of file diff --git a/tex/generic/context/m-ch-de.tex b/tex/generic/context/m-ch-de.tex new file mode 100644 index 000000000..467cdc670 --- /dev/null +++ b/tex/generic/context/m-ch-de.tex @@ -0,0 +1,10 @@ +% name : PPCHTEX / german interface +% version : 1997.03.05 +% author : J. Hagen +% copyright : J. Hagen, A.F. Otten + +\chardef\interfacenumber=2 + +\input ppchtex.noc + +\endinput diff --git a/tex/generic/context/m-ch-en.tex b/tex/generic/context/m-ch-en.tex new file mode 100644 index 000000000..8c55a5669 --- /dev/null +++ b/tex/generic/context/m-ch-en.tex @@ -0,0 +1,10 @@ +% name : PPCHTEX / english interface +% version : 1997.03.05 +% author : J. Hagen +% copyright : J. Hagen, A.F. Otten + +\chardef\interfacenumber=0 + +\input ppchtex.noc + +\endinput diff --git a/tex/generic/context/m-ch-nl.tex b/tex/generic/context/m-ch-nl.tex new file mode 100644 index 000000000..c9d77733a --- /dev/null +++ b/tex/generic/context/m-ch-nl.tex @@ -0,0 +1,10 @@ +% name : PPCHTEX / english interface +% version : 1997.03.05 +% author : J. Hagen +% copyright : J. Hagen, A.F. Otten + +\chardef\interfacenumber=1 + +\input ppchtex.noc + +\endinput diff --git a/tex/generic/context/m-metapo.tex b/tex/generic/context/m-metapo.tex new file mode 100644 index 000000000..6c2fa6fee --- /dev/null +++ b/tex/generic/context/m-metapo.tex @@ -0,0 +1,89 @@ +%D \module +%D [ file=m-metapo, +%D version=1999.03.26, +%D title=\LATEX\ Modules, +%D subtitle=\METAPOST\ Inclusion, +%D author=Hans Hagen, +%D date=\currentdate, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}] +%C +%C This module is part of the \CONTEXT\ distribution and is +%C therefore copyrighted by \PRAGMA. See mreadme.pdf for +%C details. + +%D We quit when \CONTEXT\ is found and use some deep down +%D macro to trigger this: + +\ifx\undefined\dodoplaceexternalfigure \else \expandafter \endinput \fi + +%D \macros +%D {includeMPgraphics} +%D +%D This rather small \LATEX\ module is dedicated to David +%D Arnold. It takes care of including the fonts used in +%D \METAPOST\ graphics in the file. This hack is needed when +%D one uses another \DVI\ driver than \DVIPS. This module +%D falls back on the generic \CONTEXT\ support module: + +\ifx\undefined\includeMPfonts \input supp-mps.tex \relax \fi + +%D Instead of using \type {\includegraphics}, one should use its +%D little brother \type {\includeMPgraphics}. This macro takes +%D the same arguments. + +\def\includeMPgraphics#1#% + {\leavevmode\vbox\bgroup\hbox\bgroup + \def\includeMPgraphics##1% + {\includeMPfonts{##1}% + \includegraphics#1{##1}% + \egroup\egroup}% + \includeMPgraphics} + +%D An example of using this module is given below: +%D +%D \starttypen +%D \documentclass[10pt]{article} +%D +%D \usepackage{graphicx} +%D \usepackage{m-metapo} +%D +%D \begin{document} +%D \includeMPgraphics{somefile.1} +%D \includeMPgraphics[angle=90]{somefile.2} +%D \end{document} +%D \stoptypen +%D +%D This module needs \type {supp-mps} and \type {supp-mis}, +%D that both are present in the \CONTEXT\ path. +%D +%D Pleas do not forget to say \type {prologues:=2} at the +%D top of the metapost file! +%D +%D For non \LATEX\ (and \CONTEXT) users we provide an +%D alternative inclusion macro. This one has no optional +%D arguments. + +\ifx\includegraphics\undefined + + \ifx\undefined\dogetEPSboundingbox \input supp-eps.tex \relax \fi + + \def\includeMPgraphics#1% + {\hbox\bgroup + \includeMPfonts{#1}% + \dogetEPSboundingbox{#1}{\dimen2}{\dimen4}{\dimen6}{\dimen8}% + \vbox to \dimen8 + {\forgetall + \hsize\dimen6 + \vfill + \hbox to \hsize + {\special + {PSfile="#1"\space + llx=\EPSllx\space + lly=\EPSlly\space + urx=\EPSurx\space + ury=\EPSury\space}}}% + \egroup} + +\fi + +\endinput diff --git a/tex/generic/context/mptopdf.tex b/tex/generic/context/mptopdf.tex new file mode 100644 index 000000000..15c56831d --- /dev/null +++ b/tex/generic/context/mptopdf.tex @@ -0,0 +1,143 @@ +%D \module +%D [ file=mptopdf, +%D version=2000.03.27, +%D title=\METAPOST, +%D subtitle=conversion to \PDF, +%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. + +%D The file \type {mptopdf} provides a quick way to convert +%D \METAPOST\ files to \PDF\ using a slightly stripped down +%D plain \TEX, \PDFTEX, and a few \CONTEXT\ modules. +%D +%D First generate a format, which in \WEBC\ looks like: +%D +%D \starttypen +%D pdftex --ini mptopdf +%D \stoptypen +%D +%D or: +%D +%D \starttypen +%D texexec --make --tex=pdftex --format=mptopdf --alone +%D \stoptypen +%D +%D Since this conversion only works with \PDFTEX\ or \PDFETEX, +%D the session is aborted when another \TEX\ is used. When +%D finished, the resulting \type {fmt} file should be moved to +%D the right location. +%D +%D The conversion itself is accomplished by: +%D +%D \starttypen +%D pdftex &mptopdf \relax filename.number +%D \stoptypen +%D +%D The \type {\relax} is needed since we don't want to process +%D the file directly. Instead we pick up the filename using +%D \type {\everypar}. Since this file is still the first one +%D we load, although delayed, the jobname is as we expect. So, +%D at least in \WEBC, the result of the conversion comes +%D available in the file \type {filename.pdf}. This conversion +%D process is roughly compatible with: +%D +%D \starttypen +%D texexec --pdf --fig=c --result=filename filename.number +%D \stoptypen +%D +%D This uses \CONTEXT, and is therefore slower. Therefore, +%D we provide a small \PERL\ script that does a faster job, +%D using the minimal format. Given that a format is +%D generated, one can say: +%D +%D \starttypen +%D mptopdf somefile +%D mptopdf somefile.123 +%D mptopdf mp*.* +%D \stoptypen +%D +%D The results are copied into files named \type +%D {somefile-number}. This mechanism will also be available +%D in a next release of \TEXUTIL. + +%D The \TEX\ implementation is rather simple, since we use some +%D generic \CONTEXT\ modules. Because we need a few register +%D allocation macros, we preload plain \TEX. We don't load +%D fonts yet. + +\input syst-tex + +%D We check for the usage of \PDFTEX, and quit if another +%D \TEX\ is used. + +\ifx\pdfoutput\undefined + \message{Sorry, you should use pdf(e)TeX instead.} + \expandafter \endinput +\fi + +%D The conversion to \PDF\ is carried out by macros, that +%D are collected in the file: + +\input supp-pdf +\input supp-mpe + +%D We use no output routine. + +\output{} + +%D Since we need to calculate and set the bounding box, +%D we definitely don't want to indent paragraphs. + +\parindent=0pt + +%D We use \type {\everypar} to pick up the filename and +%D process the \METAPOST\ graphic. + +\everypar{\processMPfile} + +%D The main macro shows a few \PDFTEX\ primitives. The main +%D work is done by the macro \type {\convertMPtoPDF} which is +%D defined in \type supp-pdf}. This macro interprets the +%D \METAPOST\ file. Close reading of this macro will probably +%D learn a few (\PDF) tricks. Apart from some path +%D transformations, which are needed since \PDF\ has a +%D different vision on paths, the graphic is positioned in +%D such a way that accuracy in \PDF\ xforms is guaranteed. + +\def\processMPfile#1 % + {\pdfoutput=1 + \chardef\makeMPintoPDFobject=1 + \hsize=100in + \vsize=\hsize + \hoffset=-1in + \voffset=\hoffset + \setbox0=\vbox{\convertMPtoPDF{#1}{1}{1}}% + \ifdim\wd0<1in \message{[warning: width<1in]}\fi + \ifdim\ht0<1in \message{[warning: height<1in]}\fi + \pdfpageheight=\ht0 + \pdfpagewidth=\wd0 + \box0 + \bye} + +%D The \type {\chardef} forces the converter to build a so +%D called xform object. This is needed in case the graphic +%D uses special trickery, like shading. + +%D Since \ACROBAT\ has troubles with figures smaller than +%D 1~inch, we issue a warning. When embedding graphics in +%D documents, a size less that 1~inch does not harm. In +%D order to overload runtime directives in the \PDFTEX\ +%D configuration file, we set the offsets and output method +%D in the macro. +%D +%D The resulting \PDF\ file is about as efficient as such a +%D self contained file can be. However, if needed, this \PDF\ +%D file can be converted to \EPS\ using for instance the +%D \PDFTOPS\ program (in \WEBC) or \GHOSTSCRIPT. + +\dump diff --git a/tex/generic/context/ppchtex.noc b/tex/generic/context/ppchtex.noc new file mode 100644 index 000000000..81ec994e9 --- /dev/null +++ b/tex/generic/context/ppchtex.noc @@ -0,0 +1,206 @@ +%D \module +%D [ file=ppchtex (m-chemie), +%D version=1997.03.19, +%D title=\CONTEXT\ Extra Modules, +%D subtitle=\PPCHTEX\ (Plain Pictex Context cHemie \TEX), +%D author=Hans Hagen, +%D date=\huidigedatum, +%D copyright={PRAGMA / Hans Hagen \& Ton Otten}, +%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 +%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 First we load some auxiliary macro's: + +\input supp-mis.tex \let\writestatus\undefined +\input syst-gen.tex + +%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) + +\ifx\interfacenumber\undefined + \chardef\interfacenumber=0 +\fi + +\def\definesystemvariable #1 % + {\setvalue{??#1}{@@#1}} + +\def\definesystemconstant #1 % + {\setvalue{s!#1}{#1}} + +\def\definevariable #1 #2 #3 % + {\ifcase\interfacenumber + \setvalue{v!#2}{#1} + \or + \setvalue{v!#2}{#2} + \or + \setvalue{v!#2}{#3} + \fi} + +\def\defineconstant #1 #2 #3 % + {\ifcase\interfacenumber + \setvalue{c!#2}{#2} + \setvalue{c!#1}{#2} + \or + \setvalue{c!#2}{#2} + \or + \setvalue{c!#2}{#2} + \setvalue{c!#3}{#2} + \fi} + +\def\definecommand #1 #2 #3 % + {\ifcase\interfacenumber + % 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% + {} + +\def\dosetvalue#1#2#3% + {\p!doifundefined{\c!prefix!#2}% + \let\donottest=\doprocesstest + \@EA\def\csname#1#2\endcsname{#3}% + \else + \let\donottest=\doprocesstest + \@EA\def\csname#1\csname\c!prefix!#2\endcsname\endcsname{#3}% + \fi} + +\def\dosetevalue#1#2#3% + {\p!doifundefined{\c!prefix!#2}% + \let\donottest=\doprocesstest + \@EA\edef\csname#1#2\endcsname{#3}% + \else + \let\donottest=\doprocesstest + \@EA\edef\csname#1\csname\c!prefix!#2\endcsname\endcsname{#3}% + \fi} + +\def\docopyvalue#1#2#3% + {\p!doifundefined{\c!prefix!#3}% + \let\donottest=\doprocesstest + \@EA\def\csname#1#3\endcsname% + {\csname#2#3\endcsname}% + \else + \let\donottest=\doprocesstest + \@EA\def\csname#1\csname\c!prefix!#3\endcsname\endcsname% + {\csname#2\csname\c!prefix!#3\endcsname\endcsname}% + \fi} + +\def\doresetvalue#1#2% + {\dosetvalue{#1}{#2}{}} + +\def\dogetvalue#1#2% + {\csname#1\csname\c!prefix!#2\endcsname\endcsname} + +\defineconstant axis assenstelsel achsen +\defineconstant top boven oben +\defineconstant width breedte breite +\defineconstant size formaat groesse +\defineconstant number getal nummer +\defineconstant height hoogte hoehe +\defineconstant frame kader rahmen +\defineconstant bodyfont korps fliesstext +\defineconstant style letter schriftstil +\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 status status status +\defineconstant text tekst text +\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 intext intekst imtext +\definevariable small klein klein +\definevariable medium middel mittel +\definevariable fit passend passend +\definevariable start start start +\definevariable stop stop stop +\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 bottext ondertekst textunter +\definecommand midtext middentekst textmitte + +\protect + +%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. + +\unprotect + +\ifx\bodyfontsize\undefined + \ifx\f@size\undefined + \ifx\@ptsize\undefined + \setupchemical[\c!korps=11pt] + \else + \setupchemical[\c!korps=1\@ptsize pt] + \fi + \else + \setupchemical[\c!korps=\f@size pt] + \fi +\else + \setupchemical[\c!korps=\bodyfontsize] +\fi + +\ifx\mathrm\undefined + \setupchemical[\c!letter=\rm] +\else + \setupchemical[\c!letter=\mathrm] +\fi + +\ifx\outputresolution\undefined + \setupchemical[\c!resolutie=300] +\else + \setupchemical[\c!resolutie=\outputresolution] +\fi + +\protect + +\endinput diff --git a/tex/latex/context/m-ch-de.sty b/tex/latex/context/m-ch-de.sty new file mode 100644 index 000000000..d52078728 --- /dev/null +++ b/tex/latex/context/m-ch-de.sty @@ -0,0 +1 @@ +\input m-ch-de.tex \relax \endinput diff --git a/tex/latex/context/m-ch-en.sty b/tex/latex/context/m-ch-en.sty new file mode 100644 index 000000000..ba5a5e16c --- /dev/null +++ b/tex/latex/context/m-ch-en.sty @@ -0,0 +1 @@ +\input m-ch-en.tex \relax \endinput diff --git a/tex/latex/context/m-ch-nl.sty b/tex/latex/context/m-ch-nl.sty new file mode 100644 index 000000000..492f5efd3 --- /dev/null +++ b/tex/latex/context/m-ch-nl.sty @@ -0,0 +1 @@ +\input m-ch-nl.tex \relax \endinput diff --git a/tex/latex/context/m-metapo.sty b/tex/latex/context/m-metapo.sty new file mode 100644 index 000000000..1df781eae --- /dev/null +++ b/tex/latex/context/m-metapo.sty @@ -0,0 +1 @@ +\input m-metapo.tex \relax \endinput diff --git a/tex/latex/context/m-pictex.sty b/tex/latex/context/m-pictex.sty new file mode 100644 index 000000000..da9c18ed7 --- /dev/null +++ b/tex/latex/context/m-pictex.sty @@ -0,0 +1 @@ +\input m-pictex.tex \relax \endinput |