diff options
author | Hans Hagen <pragma@wxs.nl> | 2005-02-15 00:00:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2005-02-15 00:00:00 +0100 |
commit | aaa7edbe0c0f7f2b864d4b97cd2db088d96cbae5 (patch) | |
tree | 8f91a59248739c1e4a30ccc51e3b952f091faed7 | |
parent | d909306dc001ba4d17a31200f3b794dbd9e06783 (diff) | |
download | context-aaa7edbe0c0f7f2b864d4b97cd2db088d96cbae5.tar.gz |
stable 2005.02.15
-rw-r--r-- | tex/context/base/context.tex | 2 | ||||
-rw-r--r-- | tex/context/base/core-fil.tex | 19 | ||||
-rw-r--r-- | tex/context/base/core-spa.tex | 6 | ||||
-rw-r--r-- | tex/context/base/enco-ini.tex | 61 | ||||
-rw-r--r-- | tex/context/base/lang-ctx.tex | 8 | ||||
-rw-r--r-- | tex/context/base/lang-dis.tex | 123 | ||||
-rw-r--r-- | tex/context/base/lang-ini.tex | 43 | ||||
-rw-r--r-- | tex/context/base/m-layout.tex | 36 | ||||
-rw-r--r-- | tex/context/base/supp-fil.tex | 39 | ||||
-rw-r--r-- | tex/context/interface/keys-cz.xml | 2 | ||||
-rw-r--r-- | tex/context/interface/keys-de.xml | 2 | ||||
-rw-r--r-- | tex/context/interface/keys-en.xml | 2 | ||||
-rw-r--r-- | tex/context/interface/keys-it.xml | 2 | ||||
-rw-r--r-- | tex/context/interface/keys-nl.xml | 2 | ||||
-rw-r--r-- | tex/context/interface/keys-ro.xml | 2 |
15 files changed, 139 insertions, 210 deletions
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex index a81897071..0e6bbb714 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -31,7 +31,7 @@ %D 2004.8.30 the low level interface is english. Watch out and adapt %D your styles an modules. -\def\contextversion{2005.02.14} +\def\contextversion{2005.02.15} %D Welcome to the main module. When this module is ran through %D \type{initex} or \type {tex -i} or \type {whatevertex} using diff --git a/tex/context/base/core-fil.tex b/tex/context/base/core-fil.tex index 4bfdff2c0..07adb3c3a 100644 --- a/tex/context/base/core-fil.tex +++ b/tex/context/base/core-fil.tex @@ -83,14 +83,6 @@ \def\definefilesynonym {\dodoubleempty\dodefinefilesynonym} -% \def\dodefinefilesynonym[#1][#2]% -% {\doifdefined{\??fs#1} -% {\doifnotvalue{\??fs#1}{#2} -% {\showmessage\m!files1{#1 (#2),\getvalue{\??fs#1}}}}% -% \doifelse{#1}{#2} -% {\letbeundefined{\??fs#1}{#2}} -% {\setevalue{\??fs#1}{#2}}} - \def\dodefinefilesynonym[#1][#2]% {\ifundefined{\??fs#1}\else \doifnotvalue{\??fs#1}{#2}{\showmessage\m!files1{#1 (#2),\getvalue{\??fs#1}}}% @@ -98,6 +90,17 @@ \doifelse{#1}{#2}{\letbeundefined{\??fs#1}{#2}}{\setevalue{\??fs#1}{#2}}} %D \macros +%D {definefilefallback} + +\def\definefilefallback + {\dodoubleargument\dodefinefilefallback} + +\def\dodefinefilefallback[#1][#2]% + {\doifnotfile{#1} + {\def\docommand##1{\doiffile{##1}{\definefilesynonym[#1][##1]\quitcommalist}}% + \processcommalist[#2]\docommand}} + +%D \macros %D {truefilename} %D %D At the system level such a filename can be called upon by diff --git a/tex/context/base/core-spa.tex b/tex/context/base/core-spa.tex index c3ae6dc3a..0334320b8 100644 --- a/tex/context/base/core-spa.tex +++ b/tex/context/base/core-spa.tex @@ -4031,11 +4031,11 @@ [ \v!reset=>\global\chardef\everyparagraphintro\zerocount \global\everyfirstparagraphintro\emptytoks \global\everynextparagraphintro \emptytoks, - \v!first=>\global\chardef\everyparagraphintro\plusone + \v!first=>\global\chardef\everyparagraphintro\plusone \doglobal\appendtoks#2\to\everyfirstparagraphintro, - \v!next=>\ifcase\everyparagraphintro\global\chardef\everyparagraphintro\plusone\fi + \v!next=>\ifcase\everyparagraphintro\global\chardef\everyparagraphintro\plusone\fi \doglobal\appendtoks#2\to\everynextparagraphintro, - \v!each=>\ifcase\everyparagraphintro\global\chardef\everyparagraphintro\plustwo\fi + \v!each=>\ifcase\everyparagraphintro\global\chardef\everyparagraphintro\plustwo\fi \doglobal\appendtoks#2\to\everyfirstparagraphintro \doglobal\appendtoks#2\to\everynextparagraphintro]} diff --git a/tex/context/base/enco-ini.tex b/tex/context/base/enco-ini.tex index 79649501d..68b4e34c8 100644 --- a/tex/context/base/enco-ini.tex +++ b/tex/context/base/enco-ini.tex @@ -496,11 +496,11 @@ % faster: \def\resetcaserange #1 to #2 - {\setmappingtoks - \dostepwiserecurse{#1}{#2}\plusone - {\edef\@@expanded{\recurselevel\space}% - \mappingtoks\@EA\@EA\@EA{\@EA\the\@EA\mappingtoks\@EA\setcasemap\@@expanded 0 0 }}% - \ignorespaces} + {\setmappingtoks + \dostepwiserecurse{#1}{#2}\plusone + {\edef\@@expanded{\recurselevel\space}% + \mappingtoks\@EA\@EA\@EA{\@EA\the\@EA\mappingtoks\@EA\setcasemap\@@expanded 0 0 }}% + \ignorespaces} \beginETEX @@ -930,34 +930,53 @@ %D In patterns, characters have to be bytes. These will be %D mapped onto the compact pattern arrays. +\let\normalpatterns \patterns +\let\normalhyphenation\hyphenation + \def\patternchar#1 {\rawcharacter{#1}} % space is part of character definition ! \ifx \enablepatterntokens\undefined \def\handlepatterntoken#1]{\csname#1\endcsname} \fi -\def\startpatternaccents#1#2% % used grouped - {\bgroup - \let\char\patternchar - \doifelsenothing{#1}{\enableencoding[ec]}{\enableencoding[#1]}% - \doifelsenothing{#2}{\enablemapping [ec]}{\enablemapping [#2]}% - \ifx \enablepatterntokens\undefined +% we need to postpone catcode changes, e.g. hr patterns +% have \catcode" -> which fails when " is letter + +\def\pathypsettings + {\ifx \enablepatterntokens\undefined \defineactivecharacter [ {\handlepatterntoken}% \else \enablepatterntokens \fi - \ifx \enablepatternxml\undefined \else - \enablepatternxml - \fi - \catcode16 =\@@letter\lccode16=16 % brrr, extra quote in ec (turkish) - \catcode17 =\@@letter\lccode17=17 % brrr, extra quote in ec (turkish) - \catcode`\"=\@@letter\lccode`\"=`\" - \catcode`\'=\@@letter\lccode`\'=`\' - \catcode`\-=\@@letter\lccode`\-=`\- + \lccode16=16 % brrr, extra quote in ec (turkish) + \lccode17=17 % brrr, extra quote in ec (turkish) + \lccode`\-=`\- + \lccode`\'=`\' + \lccode`\"=`\" + \relax} + +\def\patterns {\pathypsettings\normalpatterns } +\def\hyphenation{\pathypsettings\normalhyphenation} + +\def\startpatternloading#1#2#3% % we should use \everypatternloading + {\startreadingfile + \bgroup + % let's get rid of interfering stuff + \let\everyjob\scratchtoks + \let\message \gobbleoneargument + % we want direct characters + \let\char\patternchar + \doifelsenothing{#2}{\enableencoding[ec]}{\enableencoding[#2]}% + \doifelsenothing{#3}{\enablemapping [ec]}{\enablemapping [#3]}% + \expanded{\doifinstring{\f!languageprefix}{#1}} + {\ifx \enablepatternxml\undefined \else + \enablepatternxml + \fi}% \let\dohandleaccent\normaldohandleaccent} -\def\stoppatternaccents - {\egroup} +\def\stoppatternloading + {\egroup + \stopreadingfile} \def\definecharacter#1 #2 % {\ifundefined{#1}\setvalue{#1}{\dohandlecharacter{#1}}\fi diff --git a/tex/context/base/lang-ctx.tex b/tex/context/base/lang-ctx.tex index 2bf6460dc..4973a1f84 100644 --- a/tex/context/base/lang-ctx.tex +++ b/tex/context/base/lang-ctx.tex @@ -22,14 +22,6 @@ %D \starttyping %D ctxtools --pattern --all %D \stoptyping -%D -%D Later we will provide utf specific patterns. - -%D Todo: - -\definefilesynonym [lang-ru.pat] [ruenhyph.tex] -\definefilesynonym [lang-ua.pat] [ukrenhyp.tex] -\definefilesynonym [lang-af.pat] [lang-nl.pat] %D In order to get 8 bit characters hyphenated, we need to load %D patterns under the right circumstances. In some countries, more diff --git a/tex/context/base/lang-dis.tex b/tex/context/base/lang-dis.tex index 4c5785acc..13b6d9193 100644 --- a/tex/context/base/lang-dis.tex +++ b/tex/context/base/lang-dis.tex @@ -17,104 +17,41 @@ \writestatus{loading}{Context Language Macros / Distribution Patterns} -\doiffileelse{lang-en.pat} \endinput \donothing - -\unprotect - %D Hyphenation patterns are normally sought in filed named %D \type {lang-xx.pat}. When present on the system, those %D patterns take precedence. This list will be adapted to %D the actual situation, given that it's noticed. -\definefilesynonym [lang-ca.pat] [cahyph.tex] -\definefilesynonym [lang-da.pat] [dkhyph.tex] -\definefilesynonym [lang-de.pat] [dehyphn.tex] -\definefilesynonym [lang-es.pat] [eshyph.tex] -\definefilesynonym [lang-fi.pat] [fihyph.tex] -\definefilesynonym [lang-fr.pat] [frhyph.tex] -\definefilesynonym [lang-hr.pat] [hrhyph.tex] -\definefilesynonym [lang-hu.pat] [huhyph.tex] -\definefilesynonym [lang-it.pat] [ithyph.tex] -\definefilesynonym [lang-la.pat] [lahyph7.tex] -\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-ru.pat] [ruenhyph.tex] % sic: ruen -\definefilesynonym [lang-sl.pat] [sihyph.tex] % sic: sl/si -\definefilesynonym [lang-sv.pat] [svhyph.tex] % was [sehyph.tex] -\definefilesynonym [lang-tr.pat] [tkhyph.tex] % was [trhyph.tex] -\definefilesynonym [lang-ua.pat] [ukrenhyp.tex] % sic ukren - -\definefilesynonym [lang-uk.pat] [ukhyphen.tex] % symbolic name, see below - -\definefilesynonym [lang-nl.pat] [nlhyphen.tex] % symbolic name, see below -\definefilesynonym [lang-af.pat] [nlhyphen.tex] % symbolic name, see below - -\definefilesynonym [lang-en.pat] [ushyphen.tex] % symbolic name, see below -\definefilesynonym [lang-us.pat] [ushyphen.tex] % symbolic name, see below - -%definefilesynonym [czhyph.pat] [czhyphen.tex] % safeguard -%definefilesynonym [skhyph.pat] [skhyphen.tex] % safeguard - -\definefilesynonym [lang-cz.pat] [czhyphen.tex] % in a different part of the tree, sigh -\definefilesynonym [lang-sk.pat] [skhyphen.tex] % in a different part of the tree, sigh - -%definefilesynonym [lang-cz.hyp] [czhyphen.ex] % in a different part of the tree, sigh -%definefilesynonym [lang-sk.hyp] [skhyphen.ex] % in a different part of the tree, sigh - -\definefilesynonym [lang-deo.pat] [dehypht.tex] % old german patterns - -%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[nlhyphen.tex][nehyph96.tex]} -{\doiffileelse{dutch96.pat} {\definefilesynonym[nlhyphen.tex][dutch96.pat]} - {\definefilesynonym[nlhyphen.tex][nehyph.tex]}} - -%D Ah, something changed in 2003 with respect to ushyph.tex, so let's -%D fall back when needed. I first noticed this during a workshop at the -%D practical tex conference 2004 in sf. Yet another proof of a mess in -%D filenames. So, we now use \type {ushyphen} as name and do some -%D searching. -%D -%D Well, it happened again, this time in 2004/2005. We're now back at -%D \type {hyphen.tex}. At the same time the uk patterns have changed. It -%D clearly demonstrates that those taking care of patterns don't think -%D generic and completely trust this aliasses mechanism in kpse. It's about -%D time that \CONTEXT\ starts shipping its own pattern files again in order -%D to get around this everlasting mess. - - \doiffileelse{hyphen.tex} {\definefilesynonym[ushyphen.tex][hyphen.tex] } -{\doiffileelse{ushyph.tex} {\definefilesynonym[ushyphen.tex][ushyph.tex] } -{\doiffileelse{ushyph1.tex} {\definefilesynonym[ushyphen.tex][ushyph1.tex]} -{\doiffileelse{ushyph2.tex} {\definefilesynonym[ushyphen.tex][ushyph2.tex]}}}} - - \doiffileelse{ukhyph.tex} {\definefilesynonym[ukhyphen.tex][ukhyph.tex] } -{\doiffileelse{ukhyph1.tex} {\definefilesynonym[ukhyphen.tex][ukhyph1.tex]} -{\doiffileelse{ukhyph2.tex} {\definefilesynonym[ukhyphen.tex][ukhyph2.tex]} - {\definefilesynonym[ukhyphen.tex][hyphen.tex] }}} - -%D In order to get 8 bit characters hyphenated, we need to load -%D patterns under the right circumstances. In some countries, more -%D than one font encoding is in use. I can add more defaults here -%D if users let me know what encoding they use. - -\installlanguage [\s!nl] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}] -\installlanguage [\s!fr] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}] -\installlanguage [\s!de] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}] -\installlanguage [\s!it] [\s!mapping={texnansi,ec},\s!encoding={texnansi,ec}] - -\installlanguage [\s!hr] [\s!mapping=ec,\s!encoding=ec] % no il2, misses cacute characters +\unprotect -\installlanguage [\s!pl] [\s!mapping={pl0,ec},\s!encoding={pl0,ec}] -\installlanguage [\s!cz] [\s!mapping={il2,ec},\s!encoding={il2,ec}] -\installlanguage [\s!sk] [\s!mapping={il2,ec},\s!encoding={il2,ec}] -\installlanguage [\s!sl] [\s!mapping={il2,ec},\s!encoding={il2,ec}] +\definefilefallback [lang-ca.pat] [cahyph.tex] +\definefilefallback [lang-da.pat] [dkhyph.tex] +\definefilefallback [lang-de.pat] [dehyphn.tex] +\definefilefallback [lang-es.pat] [eshyph.tex] +\definefilefallback [lang-fi.pat] [fihyph.tex] +\definefilefallback [lang-fr.pat] [frhyph.tex] +\definefilefallback [lang-hr.pat] [hrhyph.tex] +\definefilefallback [lang-hu.pat] [huhyph.tex] +\definefilefallback [lang-it.pat] [ithyph.tex] +\definefilefallback [lang-la.pat] [lahyph7.tex] +\definefilefallback [lang-no.pat] [nohyph.tex] +\definefilefallback [lang-pl.pat] [plhyph.tex] +\definefilefallback [lang-pt.pat] [pthyph.tex] +\definefilefallback [lang-ro.pat] [rohyph.tex] +\definefilefallback [lang-ru.pat] [ruenhyph.tex] +\definefilefallback [lang-sl.pat] [sihyph.tex,slhyph.tex] +\definefilefallback [lang-sv.pat] [svhyph.tex,sehyph.tex] +\definefilefallback [lang-tr.pat] [tkhyph.tex,trhyph.tex] +\definefilefallback [lang-ua.pat] [ukrenhyp.tex] +\definefilefallback [lang-uk.pat] [ukhyph.tex,ukhyph1.tex,ukhyph2.tex,hyphen.tex] +\definefilefallback [lang-us.pat] [hyphen.tex,ushyph.tex,ushyph1.tex,ushyph2.tex] +\definefilefallback [lang-nl.pat] [nehyph96.tex,dutch96.pat,nehyph.tex] +\definefilefallback [lang-cz.pat] [czhyphen.tex,czhyph.pat] +\definefilefallback [lang-sk.pat] [skhyphen.tex,skhyph.pat] +\definefilefallback [lang-deo.pat] [dehypht.tex] + +\definefilesynonym [lang-af.pat] [lang-nl.pat] +\definefilesynonym [lang-en.pat] [lang-us.pat] +\definefilesynonym [lang-en.hyp] [lang-us.hyp] \protect \endinput diff --git a/tex/context/base/lang-ini.tex b/tex/context/base/lang-ini.tex index 7bbd3cd32..8bc7c83c2 100644 --- a/tex/context/base/lang-ini.tex +++ b/tex/context/base/lang-ini.tex @@ -312,8 +312,6 @@ \dodoloadpatterns{#1}{#2}{}{}% \fi} -\let\normalpatterns\patterns - \def\dodoloadpatterns#1#2#3#4% beware, loaded language also incr {\normallanguage\loadedlanguage % when not really needed \bgroup @@ -322,12 +320,12 @@ % \doifnothing\currentencoding{\let\currentencoding\s!default}% % \doifnothing\currentmapping {\let\currentmapping \s!default}% % better: -\let\synchronizepatterns\relax \let\enabledmapping\empty % needed? + \let\synchronizepatterns\relax % needed? + \let\enabledmapping \empty % needed? \doifelsenothing{#3}{\enableencoding[\s!default]}{\enableencoding[#3]}% \doifelsenothing{#4}{\enablemapping [\s!default]}{\enablemapping [#4]}% \ifundefined{\??la\??la:\currentencoding:\currentmapping:#2}% \let\showpatterns\relax - \scratchtoks\everyjob % we don't want additional junk put there, is saving needed? \edef\alreadyloadedlanguage {\executeifdefined{\??la\??la:\currentencoding:\currentmapping:\truefilename{\f!languageprefix#2.\f!patternsextension}}\empty}% \edef\alreadyloadedlanguage @@ -335,29 +333,21 @@ \ifx\alreadyloadedlanguage\empty \letgvalue{\??la\??la:\currentencoding:\currentmapping:#2}\loadedlanguage \doifundefined{\??la\??la:\s!default:\s!default:#2}{\letgvalue{\??la\??la:\s!default:\s!default:#2}\loadedlanguage}% fall back - \startreadingfile - \startpatternaccents{#3}{#4}% - \readsysfile{\truefilename{\f!languageprefix#2.\f!patternsextension}} - {\setxvalue{\??la#1\s!patterns}{#2}% - \setxvalue{\??la\??la:\currentencoding:\currentmapping:\truefilename{\f!languageprefix#2.\f!patternsextension}}{\number\loadedlanguage}% - \xdef\preloadedpmessage{\preloadedpmessage\showpatterns{#2}{\number\normallanguage}{\currentencoding}{\currentmapping}}% - \doglobal\addtocommalist{#2}\preloadedpatterns - \showmessage\m!linguals1{#2,#1,\loadedlanguage,\currentencoding,\currentmapping}} - {\readsysfile{\f!languageprefix#2.\f!patternsextension} - {\setxvalue{\??la#1\s!patterns}{#2}% - \setxvalue{\??la\??la:\currentencoding:\currentmapping:\f!languageprefix#2.\f!patternsextension}{\number\loadedlanguage}% - \xdef\preloadedpmessage{\preloadedpmessage\showpatterns{#2}{\number\normallanguage}{\currentencoding}{\currentmapping}}% - \doglobal\addtocommalist{#2}\preloadedpatterns - \showmessage\m!linguals1{#2,#1,\loadedlanguage,\currentencoding,\currentmapping}} - {\showmessage\m!linguals2{#2,#1,\loadedlanguage,\currentencoding,\currentmapping,\f!languageprefix#2.\f!patternsextension,\truefilename{\f!languageprefix#2.\f!patternsextension}}}}% - \readsysfile{\truefilename{\f!languageprefix#2.\f!hyphensextension}} - {\showmessage\m!linguals3{#2,#1,\loadedlanguage,\currentencoding,\currentmapping}} - {\readsysfile{\f!languageprefix#2.\f!hyphensextension} - {\showmessage\m!linguals3{#2,#1,\loadedlanguage,\currentencoding,\currentmapping}} - {\showmessage\m!linguals4{#2,#1,\loadedlanguage,\currentencoding,\currentmapping}}}% + \startpatternloading{\truefilename{\f!languageprefix#2.\f!patternsextension}}{#3}{#4}% + \readsysfile{\truefilename{\f!languageprefix#2.\f!patternsextension}} + {\setxvalue{\??la#1\s!patterns}{#2}% + \setxvalue{\??la\??la:\currentencoding:\currentmapping:\truefilename{\f!languageprefix#2.\f!patternsextension}}{\number\loadedlanguage}% + \xdef\preloadedpmessage{\preloadedpmessage\showpatterns{#2}{\number\normallanguage}{\currentencoding}{\currentmapping}}% + \doglobal\addtocommalist{#2}\preloadedpatterns + \showmessage\m!linguals1{#2,#1,\loadedlanguage,\currentencoding,\currentmapping}} + {\showmessage\m!linguals2{#2,#1,\loadedlanguage,\currentencoding,\currentmapping,\f!languageprefix#2.\f!patternsextension,\truefilename{\f!languageprefix#2.\f!patternsextension}}}% + \stoppatternloading + \startpatternloading{\truefilename{\f!languageprefix#2.\f!hyphensextension}}{#3}{#4}% + \readsysfile{\truefilename{\f!languageprefix#2.\f!hyphensextension}} + {\showmessage\m!linguals3{#2,#1,\loadedlanguage,\currentencoding,\currentmapping}} + {\showmessage\m!linguals4{#2,#1,\loadedlanguage,\currentencoding,\currentmapping}}% + \stoppatternloading \doglobal\increment\loadedlanguage - \stoppatternaccents - \stopreadingfile % \stopencoding \else % optimization, introduced 2004.08.24, while sorting out changes in tl \letgvalue{\??la\??la:\currentencoding:\currentmapping:#2}\alreadyloadedlanguage @@ -367,7 +357,6 @@ \doglobal\addtocommalist{#2}\preloadedpatterns \showmessage\m!linguals1{#2,#1,[\alreadyloadedlanguage],\currentencoding,\currentmapping}% \fi - \global\everyjob\scratchtoks \fi \egroup} diff --git a/tex/context/base/m-layout.tex b/tex/context/base/m-layout.tex index b896d5226..0ee71da47 100644 --- a/tex/context/base/m-layout.tex +++ b/tex/context/base/m-layout.tex @@ -20,43 +20,43 @@ \unprotect -% \def\layouthwratio{\withoutpt\the\dimexpr(8\paperheight/\dimexpr(\paperwidth/ 8192))} -% \def\layouthwratio{\withoutpt\the\dimexpr(4\paperheight/\dimexpr(\paperwidth/16384))} -% \def\layouthwratio{\withoutpt\the\dimexpr(2\paperheight/\dimexpr(\paperwidth/32768))} +% \def\layouthwratio{\withoutpt\the\dimexpr8\paperheight/\dimexpr(\paperwidth/ 8192)\relax} +% \def\layouthwratio{\withoutpt\the\dimexpr4\paperheight/\dimexpr(\paperwidth/16384)\relax} +% \def\layouthwratio{\withoutpt\the\dimexpr2\paperheight/\dimexpr(\paperwidth/32768)\relax} \def\layouthwratio - {\withoutpt\the\dimexpr(2\paperheight/(\paperwidth/32768))} + {\withoutpt\the\dimexpr2\paperheight/(\paperwidth/32768)\relax} \def\layouthfheight - {\dimexpr(\layoutparameter\c!header+\layoutparameter\c!headerdistance+ - \layoutparameter\c!footer +\layoutparameter\c!footerdistance )} + {\dimexpr\layoutparameter\c!header+\layoutparameter\c!headerdistance+ + \layoutparameter\c!footer+\layoutparameter\c!footerdistance\relax} \startsetups[preset-1] - \xdef\layoutwidth {\dimexpr(\layoutparameter\c!width)} - \gdef\layoutheight{\dimexpr(\layouthwratio\dimexpr(\layoutwidth)+\layouthfheight)} + \xdef\layoutwidth {\dimexpr\layoutparameter\c!width\relax} + \gdef\layoutheight{\dimexpr\layouthwratio\dimexpr\layoutwidth\relax+\layouthfheight\relax} \stopsetups \definelayout [preset-1-1] [\c!preset=preset-1, - \c!backspace=\dimexpr((\paperwidth-\layoutwidth)/2), - \c!width=\dimexpr(2\paperwidth/3), - \c!cutspace=\dimexpr((\paperwidth-\layoutwidth)/2), - \c!margin=\dimexpr((\paperwidth-\layoutwidth)/3), + \c!backspace=\dimexpr(\paperwidth-\layoutwidth)/2\relax, + \c!width=\dimexpr2\paperwidth/3\relax, + \c!cutspace=\dimexpr(\paperwidth-\layoutwidth)/2\relax, + \c!margin=\dimexpr(\paperwidth-\layoutwidth)/3\relax, \c!header=2\lineheight, \c!headerdistance=\lineheight, \c!height=\v!middle, % \layoutheight \c!footerdistance=\layoutparameter\c!headerdistance, % \lineheight, \c!footer=\layoutparameter\c!header, % 2\lineheight, - \c!topspace=\dimexpr(1\dimexpr(\paperheight-(\layoutheight+\layouthfheight))/3), - \c!bottomspace=\dimexpr(2\dimexpr(\paperheight-(\layoutheight+\layouthfheight))/3)] + \c!topspace=\dimexpr1\dimexpr\paperheight-(\layoutheight+\layouthfheight)\relax/3\relax, + \c!bottomspace=\dimexpr2\dimexpr\paperheight-(\layoutheight+\layouthfheight)\relax/3\relax] \startsetups[preset-2] - \gdef\layouthstep{\dimexpr(\paperwidth /\layoutparameter\c!columns)} - \gdef\layoutvstep{\dimexpr(\paperheight/\layoutparameter\c!columns)} + \gdef\layouthstep{\dimexpr\paperwidth /\layoutparameter\c!columns\relax} + \gdef\layoutvstep{\dimexpr\paperheight/\layoutparameter\c!columns\relax} \stopsetups @@ -73,8 +73,8 @@ \c!height=\v!middle, % \layoutheight \c!footerdistance=\layoutparameter\c!headerdistance, \c!footer=\layoutparameter\c!header, - \c!topspace=\dimexpr(\layoutvstep-\layoutparameter\c!header-\layoutparameter\c!headerdistance), - \c!bottomspace=\dimexpr(2\layoutvstep-\layoutparameter\c!header-\layoutparameter\c!headerdistance)] + \c!topspace=\dimexpr\layoutvstep-\layoutparameter\c!header-\layoutparameter\c!headerdistance\relax, + \c!bottomspace=\dimexpr(2\layoutvstep)-\layoutparameter\c!header-\layoutparameter\c!headerdistance\relax] \definelayout [preset-2-2] diff --git a/tex/context/base/supp-fil.tex b/tex/context/base/supp-fil.tex index 87ff1e9b5..20c25b2fc 100644 --- a/tex/context/base/supp-fil.tex +++ b/tex/context/base/supp-fil.tex @@ -115,17 +115,17 @@ \def\writeln#1{\write#1{}} -%D New! - \def\doiffileexistselse#1% - {\immediate\openin\scratchread=#1\relax - \ifeof\scratchread - \immediate\closein\scratchread - \expandafter\secondoftwoarguments - \else - \immediate\closein\scratchread - \expandafter\firstoftwoarguments - \fi} + {\doifelsenothing{#1} + {\secondoftwoarguments} + {\immediate\openin\scratchread=#1\relax + \ifeof\scratchread + \immediate\closein\scratchread + \expandafter\secondoftwoarguments + \else + \immediate\closein\scratchread + \expandafter\firstoftwoarguments + \fi}} %D \macros %D {doprocessfile,fileline,fileprocessedtrue,dofinishfile} @@ -485,27 +485,16 @@ %D implementation method. %D %D \starttyping -%D \doiffileelse {filename} {before loading} {not found} +%D \doiffileelse {filename} {found} {not found} %D \stoptyping %D -%D We use \type{\next} here, because we want to close the -%D file first. We also provide the alternatives: -%D %D \starttyping %D \doiflocfileelse {filename} {before loading} {not found} %D \stoptyping -\def\doiffileelse#1% - {\doifelsenothing{#1} - {\secondoftwoarguments} - {\immediate\openin\scratchread=#1\relax - \ifeof\scratchread - \immediate\closein\scratchread - \expandafter\secondoftwoarguments - \else - \immediate\closein\scratchread - \expandafter\firstoftwoarguments - \fi}} +\def\doiffileelse {\doiffileexistselse} +\def\doiffile #1{\doiffileexistselse{#1}\firstofoneargument\gobbleoneargument} +\def\doifnotfile #1{\doiffileexistselse{#1}\gobbleoneargument\firstofoneargument} \def\doiflocfileelse#1% {\makelocreadfilename{#1}% diff --git a/tex/context/interface/keys-cz.xml b/tex/context/interface/keys-cz.xml index f990a6773..4a127c09d 100644 --- a/tex/context/interface/keys-cz.xml +++ b/tex/context/interface/keys-cz.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> -<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2005.02.14"> +<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2005.02.15"> <cd:variables> <cd:variable name="one" value="jedna"/> diff --git a/tex/context/interface/keys-de.xml b/tex/context/interface/keys-de.xml index 41a52009a..d36caa062 100644 --- a/tex/context/interface/keys-de.xml +++ b/tex/context/interface/keys-de.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> -<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2005.02.14"> +<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2005.02.15"> <cd:variables> <cd:variable name="one" value="eins"/> diff --git a/tex/context/interface/keys-en.xml b/tex/context/interface/keys-en.xml index 16d1e0b45..b2adc88a0 100644 --- a/tex/context/interface/keys-en.xml +++ b/tex/context/interface/keys-en.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> -<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2005.02.14"> +<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2005.02.15"> <cd:variables> <cd:variable name="one" value="one"/> diff --git a/tex/context/interface/keys-it.xml b/tex/context/interface/keys-it.xml index 8300c632c..6a17ff71b 100644 --- a/tex/context/interface/keys-it.xml +++ b/tex/context/interface/keys-it.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> -<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2005.02.14"> +<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2005.02.15"> <cd:variables> <cd:variable name="one" value="uno"/> diff --git a/tex/context/interface/keys-nl.xml b/tex/context/interface/keys-nl.xml index 8784a3236..b558c3c80 100644 --- a/tex/context/interface/keys-nl.xml +++ b/tex/context/interface/keys-nl.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> -<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2005.02.14"> +<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2005.02.15"> <cd:variables> <cd:variable name="one" value="een"/> diff --git a/tex/context/interface/keys-ro.xml b/tex/context/interface/keys-ro.xml index 1d3a1d797..29bc8ee47 100644 --- a/tex/context/interface/keys-ro.xml +++ b/tex/context/interface/keys-ro.xml @@ -1,6 +1,6 @@ <?xml version="1.0"?> -<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2005.02.14"> +<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2005.02.15"> <cd:variables> <cd:variable name="one" value="unu"/> |