diff options
author | Hans Hagen <pragma@wxs.nl> | 2007-01-12 15:56:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2007-01-12 15:56:00 +0100 |
commit | ef711d047d8d3e8d2cfb53e4c42b170365c06b84 (patch) | |
tree | 852e27402e9cfe63c8edf45f54cc0273abf54368 /tex/context/base/context.tex | |
parent | 4b886e1937606a539d02dafab04a2f5e399d7ca3 (diff) | |
download | context-ef711d047d8d3e8d2cfb53e4c42b170365c06b84.tar.gz |
stable 2007.01.12 15:56
Diffstat (limited to 'tex/context/base/context.tex')
-rw-r--r-- | tex/context/base/context.tex | 35 |
1 files changed, 28 insertions, 7 deletions
diff --git a/tex/context/base/context.tex b/tex/context/base/context.tex index 051b0f72d..00a2cb83d 100644 --- a/tex/context/base/context.tex +++ b/tex/context/base/context.tex @@ -42,7 +42,7 @@ %D your styles an modules. \edef\contextformat {\jobname} -\edef\contextversion{2007.01.10 11:18} +\edef\contextversion{2007.01.12 15:56} %D For those who want to use this: @@ -66,23 +66,44 @@ \ifx\normalinput\undefined \let\normalinput\input \fi -\edef\mksuffix {mk\ifx\directlua\undefined ii\else iv\fi} +% trick: + +\ifx\directlua\undefined + \chardef\contextmarkmode = 2 +\else + \chardef\contextmarkmode = \directlua 0 { do + if arg then + local mkii = 4 + for k,v in pairs(arg) do + if v == "--mkii" then mkii = 2 break end + end + tex.sprint(mkii) + else + tex.sprint(2) + end + end } + % \ifnum\contextmarkmode=2 + % \immediate\write16{} + % \immediate\write16{>> Quitting LuaTeX, test mode only! <<} + % \immediate\write16{} + % \def\next{\errorstopmode \dump \endinput} + % \expandafter \expandafter \expandafter \next + % \fi +\fi \def\loadcorefile#1{\normalinput#1\relax} \def\loadmarkfile#1{\normalinput#1.\mksuffix\relax} -\ifx\directlua\undefined - \def\loadmarkivfile#1{} \let\loadmarkiifile\loadcorefile +\ifnum\contextmarkmode=4 + \def\loadmarkiifile#1{} \let\loadmarkivfile\loadcorefile \edef\mksuffix {mkiv} \edef\contextmark{MKIV} \else - \def\loadmarkiifile#1{} \let\loadmarkivfile\loadcorefile + \def\loadmarkivfile#1{} \let\loadmarkiifile\loadcorefile \edef\mksuffix {mkii} \edef\contextmark{MKII} \fi \let\loadmkiifile\loadmarkiifile \let\loadmkivfile\loadmarkivfile \let\loadmkfile \loadmarkfile -\edef\contextmark{MK \ifx\directlua\undefined II\else IV\fi} - %D Welcome to the main module. When this module is ran through %D \type{initex} or \type {tex -i} or \type {whatevertex} using %D \type{whatever switch}, the \CONTEXT\ format file is |