summaryrefslogtreecommitdiff
path: root/tex
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2011-01-31 00:32:49 +0200
committerMarius <mariausol@gmail.com>2011-01-31 00:32:49 +0200
commit92a06ce8d76164f206e5580404cc0d4bd8b4e5c6 (patch)
treeb5e945546c54d781dd6005ea6c7aee097df03014 /tex
parent7304dfcc22a783bf84643199b28ed3c18047fb1a (diff)
downloadcontext-92a06ce8d76164f206e5580404cc0d4bd8b4e5c6.tar.gz
beta 2011.01.25 13:17
Diffstat (limited to 'tex')
-rw-r--r--tex/context/base/back-pdf.mkiv10
-rw-r--r--tex/context/base/catc-ini.mkiv19
-rw-r--r--tex/context/base/cont-new.mkii2
-rw-r--r--tex/context/base/cont-new.mkiv2
-rw-r--r--tex/context/base/context.mkii2
-rw-r--r--tex/context/base/context.mkiv2
-rw-r--r--tex/context/base/core-def.mkiv1
-rw-r--r--tex/context/base/core-job.mkiv3
-rw-r--r--tex/context/base/math-ini.mkiv4
-rw-r--r--tex/context/base/mult-cld.lua30
-rw-r--r--tex/context/base/pack-obj.mkiv4
-rw-r--r--tex/context/base/syst-aux.mkiv30
-rw-r--r--tex/context/base/type-ini.mkiv65
-rw-r--r--tex/context/base/type-set.mkiv12
-rw-r--r--tex/generic/context/luatex-fonts-merged.lua2
15 files changed, 101 insertions, 87 deletions
diff --git a/tex/context/base/back-pdf.mkiv b/tex/context/base/back-pdf.mkiv
index 1a99a91a2..e0b1b46e6 100644
--- a/tex/context/base/back-pdf.mkiv
+++ b/tex/context/base/back-pdf.mkiv
@@ -110,16 +110,6 @@
\pdfbackendsetinfo{ConTeXt.Url} {www.pragma-ade.com}%
\to \everylastbackendshipout
-%D Unfortunately this is still needed (also for \METAPOST\ to
-%D \PDF\ converter):
-
-% \def\doresetmapfilelist
-% {\global\let\doresetmapfilelist\relax
-% \pdfmapfile{original-empty.map}}
-%
-% \appendtoksonce \loadallfontmapfiles \to \pdfbackendeveryxform
-% \appendtoksonce \loadallfontmapfiles \to \pdfbackendeveryximage
-
%D Transformations. Some day we will use primitives (once they're fixed).
\def\dostartrotation#1% grouped
diff --git a/tex/context/base/catc-ini.mkiv b/tex/context/base/catc-ini.mkiv
index fbc8630de..56a8f87e1 100644
--- a/tex/context/base/catc-ini.mkiv
+++ b/tex/context/base/catc-ini.mkiv
@@ -247,16 +247,19 @@
%D what the next macros do. Saving the catcodes can be
%D disabled by saying \type{\localcatcodestrue}.
+% quite likely we will define \unexpanded earlier on so
+% that \normalprotected will go
+
\let\savedcatcodetable\relax
\newcount\catcoderestorelevel
-\def\pushcatcodetable
+\normalprotected\def\pushcatcodetable
{\advance\catcoderestorelevel\plusone
\tracepushcatcodetable
\expandafter\chardef\csname scct:\number\catcoderestorelevel\endcsname\currentcatcodetable}
-\def\popcatcodetable
+\normalprotected\def\popcatcodetable
{\ifcase\catcoderestorelevel
\showcatcodenestingerror
\else
@@ -265,22 +268,22 @@
\advance\catcoderestorelevel\minusone
\fi}
-\def\showcatcodenestingerror % can be overloaded
+\normalprotected\def\showcatcodenestingerror % can be overloaded
{\immediate\write16{}%
\immediate\write16{Fatal error: catcode push/pop mismatch. Fix this!}\wait\end
\immediate\write16{}}
-\def\restorecatcodes % takes previous level
+\normalprotected\def\restorecatcodes % takes previous level
{\ifnum\catcoderestorelevel>\plusone
\expandafter\catcodetable\csname scct:\number\numexpr\catcoderestorelevel-1\relax\endcsname
\fi}
\newtoks\everycatcodetable
-\def\setcatcodetable#1%
- {\catcodetable#1%
- \the\everycatcodetable
- \tracesetcatcodetable}
+\normalprotected\def\setcatcodetable#1%
+ {\catcodetable#1%
+ \the\everycatcodetable
+ \tracesetcatcodetable}
\def\dotracecatcodetable#1{\immediate\write16{[#1]}}
diff --git a/tex/context/base/cont-new.mkii b/tex/context/base/cont-new.mkii
index 755f8235e..8b2b65fa2 100644
--- a/tex/context/base/cont-new.mkii
+++ b/tex/context/base/cont-new.mkii
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2011.01.25 11:01}
+\newcontextversion{2011.01.25 13:17}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/cont-new.mkiv b/tex/context/base/cont-new.mkiv
index 6db57c392..7da6d1e78 100644
--- a/tex/context/base/cont-new.mkiv
+++ b/tex/context/base/cont-new.mkiv
@@ -11,7 +11,7 @@
%C therefore copyrighted by \PRAGMA. See mreadme.pdf for
%C details.
-\newcontextversion{2011.01.25 11:01}
+\newcontextversion{2011.01.25 13:17}
%D This file is loaded at runtime, thereby providing an
%D excellent place for hacks, patches, extensions and new
diff --git a/tex/context/base/context.mkii b/tex/context/base/context.mkii
index beea4baae..346b2dc78 100644
--- a/tex/context/base/context.mkii
+++ b/tex/context/base/context.mkii
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2011.01.25 11:01}
+\edef\contextversion{2011.01.25 13:17}
%D For those who want to use this:
diff --git a/tex/context/base/context.mkiv b/tex/context/base/context.mkiv
index 28359819d..76ef63028 100644
--- a/tex/context/base/context.mkiv
+++ b/tex/context/base/context.mkiv
@@ -20,7 +20,7 @@
%D your styles an modules.
\edef\contextformat {\jobname}
-\edef\contextversion{2011.01.25 11:01}
+\edef\contextversion{2011.01.25 13:17}
%D For those who want to use this:
diff --git a/tex/context/base/core-def.mkiv b/tex/context/base/core-def.mkiv
index 44e59ecae..fd91cddf6 100644
--- a/tex/context/base/core-def.mkiv
+++ b/tex/context/base/core-def.mkiv
@@ -31,6 +31,7 @@
\ifdefined\thirdstagepreloadfonts \else \let\thirdstagepreloadfonts \relax \fi
\ifdefined\fourthstagepreloadfonts \else \let\fourthstagepreloadfonts\relax \fi
+%prependtoks \preloadtypescript \to \everyjob
\appendtoks \showcontextbanner \to \everyjob
\appendtoks \initializenewlinechar \to \everyjob
\appendtoks \calculatecurrenttime \to \everyjob
diff --git a/tex/context/base/core-job.mkiv b/tex/context/base/core-job.mkiv
index ad75cd079..4f4636ba9 100644
--- a/tex/context/base/core-job.mkiv
+++ b/tex/context/base/core-job.mkiv
@@ -68,8 +68,7 @@
{\readsysfile{#1.\mksuffix}{\showmessage\m!systems2{#1.\mksuffix}}\donothing}
\def\loadsystemfiles
- {\reportprotectionstate
- \doloadsystemfile\f!newfilename % new code, to be integrated at some point, plus fixes posted on the list
+ {\doloadsystemfile\f!newfilename % new code, to be integrated at some point, plus fixes posted on the list
\doloadsystemfile\f!locfilename % new code, somewhat experimental, not distributed (outside the dev group)
\doloadsystemfile\f!expfilename % new code, very experimental, can be engine specific, mostly for me only
\doloadsystemfile\f!sysfilename} % local settings, but probably not that good an idea to use
diff --git a/tex/context/base/math-ini.mkiv b/tex/context/base/math-ini.mkiv
index 07a93d548..5b017e055 100644
--- a/tex/context/base/math-ini.mkiv
+++ b/tex/context/base/math-ini.mkiv
@@ -414,12 +414,14 @@
\egroup
\appendtoks
+ \setfalse\knuthmode
\catcode\underscoreasciicode\othercatcode
\catcode\circumflexasciicode\othercatcode
\catcode\ampersandasciicode \othercatcode
\to \everynonknuthmode
\appendtoks
+ \settrue\knuthmode
\catcode\underscoreasciicode\subscriptcatcode
\catcode\circumflexasciicode\superscriptcatcode
\catcode\ampersandasciicode \alignmentcatcode
@@ -459,7 +461,7 @@
\unexpanded\def\stopasciimode
{\popcatcodetable
- \donknuthmode}
+ \ifconditional\knuthmode\else\donknuthmode\fi}
%D Needed for unicode:
diff --git a/tex/context/base/mult-cld.lua b/tex/context/base/mult-cld.lua
index 24660b3a4..08446a7ca 100644
--- a/tex/context/base/mult-cld.lua
+++ b/tex/context/base/mult-cld.lua
@@ -148,17 +148,6 @@ function context.popcatcodes()
contentcatcodes = currentcatcodes
end
-function context.unprotect()
- insert(catcodestack,currentcatcodes)
- currentcatcodes = prtcatcodes
- contentcatcodes = currentcatcodes
-end
-
-function context.protect()
- currentcatcodes = remove(catcodestack) or currentcatcodes
- contentcatcodes = currentcatcodes
-end
-
function tex.fprint(...) -- goodie
texsprint(currentcatcodes,format(...))
end
@@ -397,6 +386,25 @@ local defaultcaller = caller
setmetatable(context, { __index = indexer, __call = caller } )
+-- now we tweak unprotect and protect
+
+function context.unprotect()
+ -- at the lua end
+ insert(catcodestack,currentcatcodes)
+ currentcatcodes = prtcatcodes
+ contentcatcodes = currentcatcodes
+ -- at the tex end
+ flush("\\unprotect")
+end
+
+function context.protect()
+ -- at the tex end
+ flush("\\protect")
+ -- at the lua end
+ currentcatcodes = remove(catcodestack) or currentcatcodes
+ contentcatcodes = currentcatcodes
+end
+
-- logging
local trace_stack = { }
diff --git a/tex/context/base/pack-obj.mkiv b/tex/context/base/pack-obj.mkiv
index e2620955d..6af439021 100644
--- a/tex/context/base/pack-obj.mkiv
+++ b/tex/context/base/pack-obj.mkiv
@@ -90,6 +90,8 @@
% end
% \stopluacode
%
+% \unprotect
+%
% \newbox \objectbox
% \newtoks \everyobject
% \newif \ifinobject
@@ -101,7 +103,7 @@
%
% \def\objectoffset{1cm}
%
-% \everyobject{\the\everyPDFxform}
+% \everyobject{\the\pdfbackendeveryxform}
%
% \let\doresetobjects\relax
%
diff --git a/tex/context/base/syst-aux.mkiv b/tex/context/base/syst-aux.mkiv
index e12951fa4..c2a47b828 100644
--- a/tex/context/base/syst-aux.mkiv
+++ b/tex/context/base/syst-aux.mkiv
@@ -37,7 +37,20 @@
\unprotect
-\let\reportprotectionstate\relax
+%D \macros
+%D {unexpanded}
+%D
+%D Because we use this module only in \MKIV, we have removed the
+%D old protection code.
+%D
+%D \starttyping
+%D \unexpanded\def\somecommand{... ... ...}
+%D \stoptyping
+%D
+%D This overloads the \ETEX\ primitive but as we already had an \MKII\
+%D solution we keep the same name for a similar mechanism.
+
+\let\unexpanded\normalprotected
%D \macros
%D {doifolderversionelse}
@@ -454,21 +467,6 @@
\def\globallet{\global\let} \let\glet\globallet
%D \macros
-%D {unexpanded}
-%D
-%D Because we use this module only in \MKIV, we have removed the
-%D old protection code.
-%D
-%D \starttyping
-%D \unexpanded\def\somecommand{... ... ...}
-%D \stoptyping
-%D
-%D This overloads the \ETEX\ primitive but as we already had an \MKII\
-%D solution we keep the same name for a similar mechanism.
-
-\let\unexpanded\normalprotected
-
-%D \macros
%D {doifundefined,doifdefined,
%D doifundefinedelse,doifdefinedelse,
%D doifalldefinedelse}
diff --git a/tex/context/base/type-ini.mkiv b/tex/context/base/type-ini.mkiv
index fce3cd816..298618a4a 100644
--- a/tex/context/base/type-ini.mkiv
+++ b/tex/context/base/type-ini.mkiv
@@ -132,11 +132,31 @@
\def\preloadtypescripts{\ifproductionrun\settrue\preloadingtypescripts\fi}
+\prependtoks
+ \preloadtypescripts
+\to \everyjob
+
+% \long\def\xxstarttypescript#1\stoptypescript
+% {\global\loadedtypescripts\@EA{\the\loadedtypescripts\starttypescript#1\stoptypescript}}
+%
+% \long\def\xxstarttypescriptcollection#1\stoptypescriptcollection
+% {\global\loadedtypescripts\@EA{\the\loadedtypescripts\starttypescriptcollection#1\stoptypescriptcollection}}
+
+\newcount\nofpreloadedtypescripts % it's faster to append references than blobs
+
\long\def\xxstarttypescript#1\stoptypescript
- {\global\loadedtypescripts\@EA{\the\loadedtypescripts\starttypescript#1\stoptypescript}}
+ {\global\advance\nofpreloadedtypescripts\plusone
+ \edef\currentpreloadedtypescript{\??ts:\the\nofpreloadedtypescripts}%
+ \setgvalue\currentpreloadedtypescript{\starttypescript#1\stoptypescript}%
+ %\global\loadedtypescripts\@EAEAEA{\@EA\the\@EA\loadedtypescripts\@EA\getvalue\@EA{\currentpreloadedtypescript}}}
+ \normalexpanded{\global\loadedtypescripts{\the\@EA\loadedtypescripts\noexpand\csname\currentpreloadedtypescript\endcsname}}}
\long\def\xxstarttypescriptcollection#1\stoptypescriptcollection
- {\global\loadedtypescripts\@EA{\the\loadedtypescripts\starttypescriptcollection#1\stoptypescriptcollection}}
+ {\global\advance\nofpreloadedtypescripts\plusone
+ \edef\currentpreloadedtypescript{\??ts:\the\nofpreloadedtypescripts}%
+ \setgvalue\currentpreloadedtypescript{\starttypescriptcollection#1\stoptypescriptcollection}%
+ %\global\loadedtypescripts\@EAEAEA{\@EA\the\@EA\loadedtypescripts\@EA\getvalue\@EA{\currentpreloadedtypescript}}}
+ \normalexpanded{\global\loadedtypescripts{\the\@EA\loadedtypescripts\noexpand\csname\currentpreloadedtypescript\endcsname}}}
\def\dododousetypescriptfile#1%
{\setfalse\quittingtypescript
@@ -169,17 +189,17 @@
\egroup
\expandafter\let\csname\??ts:\c!file:\currenttypefile\endcsname\loadedtypescripts}
-% \def\doprocesstypescriptfile
-% {\ctxlua{commands.doprocesstypescriptfile("\currenttypefile")}}
-
\def\doprocesstypescriptfile
- {\startreadingfile
- \pushendofline
- \unprotect
- \readfile{\currenttypefile.\mksuffix}\donothing{\readfile\currenttypefile\donothing\donothing}%
- \protect
- \popendofline
- \stopreadingfile}
+ {\ctxlua{commands.doprocesstypescriptfile("\currenttypefile")}}
+
+% \def\doprocesstypescriptfile
+% {\startreadingfile
+% \pushendofline
+% \unprotect
+% \readfile{\currenttypefile.\mksuffix}\donothing{\readfile\currenttypefile\donothing\donothing}%
+% \protect
+% \popendofline
+% \stopreadingfile}
\def\usetypescriptonce
{\dotripleempty\dousetypescriptonce}
@@ -344,14 +364,6 @@
\def\doloadmapline [#1][#2]{\ctxlua{fonts.map.loadline("#1","#2")}}
\def\forgetmapfiles {\ctxlua{fonts.map.reset()}}
-\let\loadallfontmapfiles\relax
-\let\allfontmapsfiles \empty
-\let\preloadmapfile \loadmapfile
-\let\resetmapfiles \forgetmapfiles
-\let\disablemapfiles \forgetmapfiles
-
-\newif\ifautoloadmapfiles
-
% \appendtoks
% \pdfmapfile{}% somehow does not work at the lua end
% \to \everyjob
@@ -481,14 +493,13 @@
\fi \fi \fi
\ifmmode\mr\else\tf\fi} % needed ?
-% \def\usetypefile[#1]% recurses on path ! % no storage? obsolete?
-% %{\edef\currenttypefile{\f!typeprefix#1}%
-% {\edef\currenttypefile{#1}%
-% \ctxlua{commands.doprocesstypescriptfile("\currenttypefile")}}
+% \def\usetypefile[#1]% recurses on path !
+% {\edef\currenttypefile{\f!typeprefix#1}%
+% \readfile{\currenttypefile.\mksuffix}\donothing{\readfile\currenttypefile\donothing\donothing}}
-\def\usetypefile[#1]% recurses on path !
- {\edef\currenttypefile{\f!typeprefix#1}%
- \readfile{\currenttypefile.\mksuffix}\donothing{\readfile\currenttypefile\donothing\donothing}}
+\def\usetypefile[#1]% recurses on path ! % no storage? obsolete?
+ {\edef\currenttypefile{#1}%
+ \ctxlua{commands.doprocesstypescriptfile("\currenttypefile")}}
%D For Taco:
%D
diff --git a/tex/context/base/type-set.mkiv b/tex/context/base/type-set.mkiv
index b25fe5ad9..89dd68a8f 100644
--- a/tex/context/base/type-set.mkiv
+++ b/tex/context/base/type-set.mkiv
@@ -67,11 +67,11 @@
%definefontsynonym [SansCaps] [SansBold]
\stopsetups
-%usetypescriptfile[type-def] % preloaded in main context.mkiv file
-%usetypescriptfile[type-lua] % preloaded in main context.mkiv file
-%usetypescriptfile[type-tmf] % replaced by otf (mkiv) en one (mkii)
-\usetypescriptfile[type-siz]
-\usetypescriptfile[type-otf]
-\usetypescriptfile[type-loc]
+%usetypescriptfile[def] % preloaded in main context.mkiv file
+%usetypescriptfile[lua] % preloaded in main context.mkiv file
+%usetypescriptfile[tmf] % replaced by otf (mkiv) en one (mkii)
+\usetypescriptfile[siz]
+\usetypescriptfile[otf]
+\usetypescriptfile[loc]
\protect \endinput
diff --git a/tex/generic/context/luatex-fonts-merged.lua b/tex/generic/context/luatex-fonts-merged.lua
index 8e441b525..c8f8a6f7a 100644
--- a/tex/generic/context/luatex-fonts-merged.lua
+++ b/tex/generic/context/luatex-fonts-merged.lua
@@ -1,6 +1,6 @@
-- merged file : luatex-fonts-merged.lua
-- parent file : luatex-fonts.lua
--- merge date : 01/25/11 11:01:19
+-- merge date : 01/25/11 13:17:26
do -- begin closure to overcome local limits and interference