summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/oberdiek/luatex.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/generic/oberdiek/luatex.sty')
-rw-r--r--Master/texmf-dist/tex/generic/oberdiek/luatex.sty116
1 files changed, 89 insertions, 27 deletions
diff --git a/Master/texmf-dist/tex/generic/oberdiek/luatex.sty b/Master/texmf-dist/tex/generic/oberdiek/luatex.sty
index a9b10049cf0..8e81486371c 100644
--- a/Master/texmf-dist/tex/generic/oberdiek/luatex.sty
+++ b/Master/texmf-dist/tex/generic/oberdiek/luatex.sty
@@ -8,7 +8,7 @@
%%
%% This is a generated file.
%%
-%% Copyright (C) 2007, 2009 by
+%% Copyright (C) 2007, 2009, 2010 by
%% Heiko Oberdiek <heiko.oberdiek at googlemail.com>
%%
%% This work may be distributed and/or modified under the
@@ -94,7 +94,7 @@
\fi
\expandafter\x\csname ver@luatex.sty\endcsname
\ProvidesPackage{luatex}%
- [2009/12/02 v0.3 LuaTeX basic definition package (HO)]
+ [2010/03/09 v0.4 LuaTeX basic definition package (HO)]
\begingroup
\catcode123 1 % {
\catcode125 2 % }
@@ -151,6 +151,80 @@
\LuT@AtEnd
\expandafter\endinput
\fi
+\ifnum\luatexversion<36 %
+ \def\LuT@MakePrimitive#1{%
+ \expandafter\let\csname luatex#1\expandafter\endcsname
+ \csname #1\endcsname
+ }%
+\else
+ \def\LuT@MakeLuatexPrimitive#1{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname luatex#1\endcsname\relax
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname #1\endcsname\relax
+ \else
+ \expandafter\let
+ \csname luatex#1\expandafter\endcsname
+ \csname #1\endcsname
+ \fi
+ \fi
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname luatex#1\endcsname\relax
+ \begingroup
+ \expandafter\let\csname luatex#1\endcsname\@undefined
+ \ifnum0%
+ \directlua{%
+ if tex.enableprimitives then %
+ tex.enableprimitives('luatex',{'#1'})%
+ tex.print('1')%
+ end%
+ }%
+ \expandafter\ifx\csname luatex#1\endcsname\relax\else1\fi
+ =11 %
+ \global\expandafter\let
+ \csname luatex#1\expandafter\endcsname
+ \csname luatex#1\endcsname
+ \else
+ \@PackageError{luatex}{%
+ tex.enableprimitives failed for `#1'%
+ }\@ehc
+ \fi
+ \endgroup
+ \fi
+ }%
+ \def\LuT@MakePrimitive#1{%
+ \begingroup\expandafter\expandafter\expandafter\endgroup
+ \expandafter\ifx\csname#1\endcsname\relax
+ \begingroup
+ \expandafter\let\csname#1\endcsname\@undefined
+ \ifnum0%
+ \directlua{%
+ if tex.enableprimitives then %
+ tex.enableprimitives('',{'#1'})%
+ tex.print('1')%
+ end%
+ }%
+ \expandafter\ifx\csname#1\endcsname\relax\else1\fi
+ =11 %
+ \global\expandafter\let
+ \csname#1\expandafter\endcsname
+ \csname#1\endcsname
+ \else
+ \@PackageError{luatex}{%
+ tex.enableprimitives failed for `#1'%
+ }\@ehc
+ \fi
+ \endgroup
+ \fi
+ }%
+\fi
+\LuT@MakeLuatexPrimitive{attribute}
+\LuT@MakeLuatexPrimitive{attributedef}
+\LuT@MakeLuatexPrimitive{catcodetable}
+\LuT@MakeLuatexPrimitive{initcatcodetable}
+\LuT@MakeLuatexPrimitive{luaescapestring}
+\LuT@MakeLuatexPrimitive{savecatcodetable}
+\LuT@MakePrimitive{numexpr}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
\else
@@ -265,25 +339,13 @@
\else
\def\LuT@newcommand{\newcommand*}%
\fi
-\newcount\LuT@AllocLuaState
-\LuT@AllocLuaState=\z@
-\LuT@newcommand\newluastate[1]{%
- \ifnum\LuT@AllocLuaState<65535 %
- \global\advance\LuT@AllocLuaState\@ne
- \allocationnumber\LuT@AllocLuaState
- \global\chardef#1=\allocationnumber
- \wlog{\string#1=\string\luastate\the\allocationnumber}%
- \else
- \errmessage{No room for a new \string\luastate}%
- \fi
-}
\newcount\LuT@AllocAttribute
\LuT@AllocAttribute=\m@ne
\LuT@newcommand\newattribute[1]{%
\ifnum\LuT@AllocAttribute<65535 %
\global\advance\LuT@AllocAttribute\@ne
\allocationnumber\LuT@AllocAttribute
- \global\attributedef#1=\allocationnumber
+ \global\luatexattributedef#1=\allocationnumber
\unsetattribute{#1}%
\wlog{\string#1=\string\attribute\the\allocationnumber}%
\else
@@ -358,11 +420,11 @@
\newcatcodetable\CatcodeTableString
\newcatcodetable\CatcodeTableOther
\newcatcodetable\CatcodeTableLaTeX
-\initcatcodetable\CatcodeTableIniTeX
+\luatexinitcatcodetable\CatcodeTableIniTeX
\begingroup
\def\@makeother#1{\catcode#1=12\relax}%
\@firstofone{%
- \catcodetable\CatcodeTableIniTeX
+ \luatexcatcodetable\CatcodeTableIniTeX
\begingroup
\SetCatcodeRange{0}{8}{15}%
\catcode9=10 % tab
@@ -378,7 +440,7 @@
\catcode125=2 % brace right
\catcode126=13 % tilde
\catcode127=15 %
- \savecatcodetable\CatcodeTableLaTeX
+ \luatexsavecatcodetable\CatcodeTableLaTeX
\endgroup
\@makeother{0}% nul
\@makeother{13}% carriage return
@@ -387,24 +449,24 @@
\@makeother{127}%
\SetCatcodeRange{65}{90}{12}% A-Z
\SetCatcodeRange{97}{122}{12}% a-z
- \savecatcodetable\CatcodeTableString
+ \luatexsavecatcodetable\CatcodeTableString
\@makeother{32}% space
- \savecatcodetable\CatcodeTableOther
+ \luatexsavecatcodetable\CatcodeTableOther
\endgroup
}%
\def\LuT@NumStackEmpty{0}
\let\LuT@NumStack\LuT@NumStackEmpty
\LuT@newcommand\PushCatcodeTableNumStack[0]{%
\xdef\LuT@NumStack{%
- {\the\catcodetable}\LuT@NumStack
+ {\the\luatexcatcodetable}\LuT@NumStack
}%
}
\LuT@newcommand\PopCatcodeTableNumStack[0]{%
\ifx\LuT@NumStack\LuT@NumStackEmpty
\@PackageWarning{luatex}{Empty catcode table number stack}%
- \catcodetable\z@
+ \luatexcatcodetable\z@
\else
- \catcodetable=\expandafter\@car\LuT@NumStack\@nil\relax
+ \luatexcatcodetable=\expandafter\@car\LuT@NumStack\@nil\relax
\xdef\LuT@NumStack{%
\expandafter\@cdr\LuT@NumStack\@nil
}%
@@ -412,10 +474,10 @@
}
\LuT@newcommand\BeginCatcodeRegime[1]{%
\PushCatcodeTableNumStack
- \catcodetable=\numexpr#1\relax
+ \luatexcatcodetable=\numexpr#1\relax
\IncCatcodeTableStack
- \savecatcodetable\CatcodeTableStack
- \catcodetable\CatcodeTableStack
+ \luatexsavecatcodetable\CatcodeTableStack
+ \luatexcatcodetable\CatcodeTableStack
}
\LuT@newcommand\EndCatcodeRegime[0]{%
\DecCatcodeTableStack
@@ -425,7 +487,7 @@
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input luatex-loader.sty\relax
\else
- \RequirePackage{luatex-loader}[2009/12/02]%
+ \RequirePackage{luatex-loader}[2010/03/09]%
\fi
\LuT@AtEnd
\endinput