summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/cont-new.tex78
-rw-r--r--tex/context/base/context.tex2
-rw-r--r--tex/context/base/core-fig.tex7
-rw-r--r--tex/context/base/core-fil.tex6
-rw-r--r--tex/context/base/core-grd.tex24
-rw-r--r--tex/context/base/lang-ger.tex6
-rw-r--r--tex/context/base/math-tex.tex11
-rw-r--r--tex/context/interface/keys-cz.xml2
-rw-r--r--tex/context/interface/keys-de.xml2
-rw-r--r--tex/context/interface/keys-en.xml2
-rw-r--r--tex/context/interface/keys-it.xml2
-rw-r--r--tex/context/interface/keys-nl.xml2
-rw-r--r--tex/context/interface/keys-ro.xml2
13 files changed, 125 insertions, 21 deletions
diff --git a/tex/context/base/cont-new.tex b/tex/context/base/cont-new.tex
index d23c29afb..1f3afbc26 100644
--- a/tex/context/base/cont-new.tex
+++ b/tex/context/base/cont-new.tex
@@ -24,6 +24,84 @@
\writestatus{\m!systems}{beware: some patches loaded from cont-new.tex}
+% supp-fil.tex
+
+\let\preprocessfile\gobbleoneargument
+
+\def\dodoreadfile % we provide hooks, for instance for \enableXML
+ {\ifconditional\trackfilenames
+ \setxvalue{fn..\trackedfilename}{\readfilename}%
+ \fi
+ \preprocessfile\readfilename % new
+ \the\everybeforereadfile
+ \normalinput\readfilename\relax
+ \the\everyafterreadfile}
+
+% core-fil.tex
+
+% \let\checkpreprocessor\relax
+%
+% \appendtoks\relax{\appendtoks \checkpreprocessor \to \everyjob}\to\everydump
+
+% core-job.tex
+
+\definesystemvariable {fz} % file preprocessing
+
+\definefileconstant {prepprefix} {prep-}
+
+\chardef\preprocessmode\zerocount
+
+\def\processlocalfile#1#2%
+ {% #1=\readlocfile|\readsetfile{dir} #2=filename
+ % #1{#2}\donothing\donothing
+ \chardef\preprocessmode\plusone
+ #1{#2}\donothing{\readfile{#2}\donothing\donothing}}
+
+\let\oldfilename\empty
+\let\newfilename\empty
+
+\def\preprocessfile#1%
+ {\ifcase\preprocessmode\else
+ \chardef\preprocessmode\zerocount % one time shot
+ \doifsomething{\filepreprocessor}
+ {\def\oldfilename{#1}%
+ \splitfilename\oldfilename % whatever path
+ \ifx\splitofftype\empty
+ \let\splitofftype\c!tex
+ \edef\oldfilename{\oldfilename.\splitofftype}%
+ \fi
+ \edef\newfilename{\f!prepprefix\splitoffname.\splitofftype}% local path
+ \doifundefined{fp..\oldfilename}
+ {\doifmode{\systemmodeprefix\v!first}
+ {\bgroup
+ \enableXML
+ \let\executeXMLentity\expandedXMLentity
+ \defineXMLentity[gt]\lettermore
+ \defineXMLentity[lt]\letterless
+ \writestatus\m!systems{\filepreprocessor}%
+ \executesystemcommand{\filepreprocessor}%
+ \egroup}%
+ \setxvalue{fp..\oldfilename}{\newfilename}}%
+ \let#1\newfilename}%
+ \fi}
+
+\def\filepreprocessor{\XMLflush{ctx:preprocessor}}
+
+\defineXMLenvironment[ctx:job] \startXMLignore \stopXMLignore
+\defineXMLgsave [ctx:preprocessor]
+\defineXMLargument [ctx:message] {\writestatus\m!systems}
+\defineXMLentity [ctx:oldfilename] \oldfilename
+\defineXMLentity [ctx:newfilename] \newfilename
+
+\def\checkpreprocessor
+ {\global\let\checkpreprocessor\empty
+ \processXMLfilegrouped{./\jobname.ctx}%
+ \doifsomething\filepreprocessor
+ {\chardef\preprocessmode\plusone
+ \preprocessfile\inputfilename
+ \endinput
+ \normalinput\inputfilename\relax}}
+
% The following may be a solution for the fact that one cannot
% change catcodes of characters like : and ; inside an environment.
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex
index 171305424..0443fbf80 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.07.30}
+\def\contextversion{2005.08.01}
%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-fig.tex b/tex/context/base/core-fig.tex
index 5ca9989d6..ed0a87d2e 100644
--- a/tex/context/base/core-fig.tex
+++ b/tex/context/base/core-fig.tex
@@ -731,7 +731,12 @@
\or % globaal
\let\figurepathlist\@@exdirectory
\or % lokaal,globaal / non empty gebied
- \edef\figurepathlist{\f!currentpath\ifx\@@exdirectory\empty\else,\@@exdirectory\fi}%
+ % was:
+ % \edef\figurepathlist{\f!currentpath\ifx\@@exdirectory\empty\else,\@@exdirectory\fi}%
+ % but test is to weak (can be empty \allinputpaths)
+ \doifelsenothing\@@exdirectory
+ {\edef\figurepathlist{\f!currentpath}}%
+ {\edef\figurepathlist{\f!currentpath,\@@exdirectory}}%
\fi
\ExpandBothAfter\doifinset\v!default\@@exlocation
{\edef\figurepathlist{\figurepathlist,}}% default tex path search
diff --git a/tex/context/base/core-fil.tex b/tex/context/base/core-fil.tex
index 0663a6a8d..b6d535b11 100644
--- a/tex/context/base/core-fil.tex
+++ b/tex/context/base/core-fil.tex
@@ -257,6 +257,12 @@
\fi
#1}
+%D Experimental:
+
+\let\checkpreprocessor\relax
+
+\appendtoks\relax{\appendtoks \checkpreprocessor \to \everyjob}\to\everydump
+
%D To be documented and probably moved
\def\documentresources{\@@erurl}
diff --git a/tex/context/base/core-grd.tex b/tex/context/base/core-grd.tex
index 929ee06a4..f36aa020e 100644
--- a/tex/context/base/core-grd.tex
+++ b/tex/context/base/core-grd.tex
@@ -810,24 +810,24 @@
\expanded{\processallactionsinset[#1]}
[\v!standard=>,
\v!normal=>, % to be sure
- \v!yes=>, % to be sure
- \v!top=>\gridwarning+\positiveextrasnap\extrasnapbefore,
- \v!bottom=>\gridwarning+\positiveextrasnap\extrasnapafter,
+ \v!yes=>, % to be sure
+ \v!top=>\gridwarning+\positiveextrasnap\extrasnapbefore,
+ \v!bottom=>\gridwarning+\positiveextrasnap\extrasnapafter,
\v!both=>\positiveextrasnap\extrasnaparound,
- -\v!top=>\gridwarning-\negativeextrasnap\extrasnapbefore,
- -\v!bottom=>\gridwarning-\negativeextrasnap\extrasnapafter,
+ -\v!top=>\gridwarning-\negativeextrasnap\extrasnapbefore,
+ -\v!bottom=>\gridwarning-\negativeextrasnap\extrasnapafter,
-\v!both=>\negativeextrasnap\extrasnaparound,
\v!text=>\global\chardef\@@alignsnapmethod\plusone, % accurate calculations
- \v!page=>\global\chardef\@@alignsnap1, % topskip
- \v!high=>\global\chardef\@@alignsnap2,
- \v!middle=>\global\chardef\@@alignsnap3,
+ \v!page=>\global\chardef\@@alignsnap1, % topskip
+ \v!high=>\global\chardef\@@alignsnap2,
+ \v!middle=>\global\chardef\@@alignsnap3,
\v!low=>\global\chardef\@@alignsnap4,
- \v!fit=>\global\chardef\@@alignsnapbox1, % new
- \v!broad=>\global\chardef\@@alignsnapbox2, % new
+ \v!fit=>\global\chardef\@@alignsnapbox1, % new
+ \v!broad=>\global\chardef\@@alignsnapbox2, % new
\v!depth=>\global\chardef\@@alignsnapdepth1, % new
\v!line=>\global\chardef\@@alignsnapbox3
-% \global\chardef\@@alignsnapdepth1
- \global\chardef\@@alignsnap4,
+% \global\chardef\@@alignsnapdepth1
+ \global\chardef\@@alignsnap4,
\v!reset=>\positiveextrasnap\extrasnapreset,
\v!none=>\global\chardef\@@alignsnap0
\global\chardef\@@alignsnapbox0,
diff --git a/tex/context/base/lang-ger.tex b/tex/context/base/lang-ger.tex
index 509dbafd5..919748c69 100644
--- a/tex/context/base/lang-ger.tex
+++ b/tex/context/base/lang-ger.tex
@@ -673,7 +673,7 @@
\else\ifcase\lastdigit{#1}%
\ordinalstr{th}%
\or % 1
- \ordinalstr{rst}%
+ \ordinalstr{st}%
\or % 2
\ordinalstr{nd}%
\or % 3
@@ -682,6 +682,10 @@
\ordinalstr{th}%
\fi\fi}
+% \def\enordinaldaynumber#1%
+% {#1\ordinalstr{\ifnum\lasttwodigits{#1}=11 th\else\ifcase\lastdigit{#1}
+% th\or st\or nd\or rd\else th\fi\fi}}
+
\def\nlordinaldaynumber#1%
{#1\highordinalstr{e}}
diff --git a/tex/context/base/math-tex.tex b/tex/context/base/math-tex.tex
index 16601c1b2..5df4d0c9a 100644
--- a/tex/context/base/math-tex.tex
+++ b/tex/context/base/math-tex.tex
@@ -456,6 +456,17 @@
\stopmathcollection
+%D For brooks:
+%D
+%D \starttyping
+%D $\sqrt[3]{10}$
+%D \stoptyping
+
+\let\normalsqrt \sqrt % just set to: \dohandlemathtoken {sqrt}
+\def\notsosqrt [#1]{\root#1\of}
+
+\def\sqrt{\doifnextcharelse[\notsosqrt\normalsqrt}
+
\def\PLAINbig {\@@dobig{0.85}}
\def\PLAINBig {\@@dobig{1.15}}
\def\PLAINbigg{\@@dobig{1.45}}
diff --git a/tex/context/interface/keys-cz.xml b/tex/context/interface/keys-cz.xml
index f94c1a0f7..9bc4753d6 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.07.30">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="cz" version="2005.08.01">
<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 7c1bd3b63..6093c7b95 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.07.30">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="de" version="2005.08.01">
<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 b58087107..163aa3ece 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.07.30">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="en" version="2005.08.01">
<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 79b82bba1..583c89b9f 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.07.30">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="it" version="2005.08.01">
<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 32f053d32..b4d6ed9be 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.07.30">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="nl" version="2005.08.01">
<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 7258a1b9a..9b3442f4f 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.07.30">
+<cd:interface xmlns:cd="http://www.pragma-ade.com/commands" name="context" language="ro" version="2005.08.01">
<cd:variables>
<cd:variable name="one" value="unu"/>