summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/luatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-05-21 22:12:49 +0000
committerKarl Berry <karl@freefriends.org>2011-05-21 22:12:49 +0000
commitc77ea47d64e7856e33d80fe8e6c63fbe955261e1 (patch)
tree0d9e240e4c72916ab362f33fe73537c7a4945dd4 /Master/texmf-dist/source/luatex
parentbe7e56a1469601d92ef4a30a8b9caf3335b05393 (diff)
luatexbase (21may11)
git-svn-id: svn://tug.org/texlive/trunk@22560 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/luatex')
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase-attr.dtx22
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx21
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase-compat.dtx2
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase.dtx5
4 files changed, 20 insertions, 30 deletions
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-attr.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-attr.dtx
index d377f7c619f..78602d36e26 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-attr.dtx
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-attr.dtx
@@ -113,7 +113,7 @@ See source file '\inFileName' for details.
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \pkdate{luatexbase-attr}{v0.3 2010-05-27}
+% \pkdate{luatexbase-attr}{v0.31 2011-05-21}
%
% \maketitle
%
@@ -152,12 +152,12 @@ See source file '\inFileName' for details.
% as |tex.atrribute.fooattr|, but not the attribute number).
%
% There are several ways to work around this. For example, it is possible to
-% extract the number at any time from the |\meaning| of |\foobar|.
+% extract the number at any time from the |\meaning| of |\fooattr|.
% Alternatively, one could look at |\the\allocationnumber| just after the
% definition of |\fooattr| and remember it in a Lua variable. For your
% convenience, this is automatically done by |\newluatexattribute|: the number
% is remembered in a dedicated Lua table so that you can get it as
-% |luatexbase.attributes.foobar| (mind the absence of backslash here) at any
+% |luatexbase.attributes.fooattr| (mind the absence of backslash here) at any
% time.
%
% Also, two Lua functions are provided that are analogous to the above \tex
@@ -234,7 +234,7 @@ See source file '\inFileName' for details.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-attr}[2010/10/10 v0.3 Attributes allocation for LuaTeX]
+\x{luatexbase-attr}[2011/05/21 v0.31 Attributes allocation for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
@@ -324,10 +324,10 @@ See source file '\inFileName' for details.
%
% \begin{macrocode}
\def\unsetluatexattribute#1{%
- \begingroup\escapechar\m@ne
- \luatexbase@directlua{%
- luatexbase.unset_attribute("\luatexluaescapestring{\string#1}")}%
- \endgroup}
+ \begingroup\escapechar\m@ne \edef\x{\endgroup
+ \noexpand\luatexbase@directlua{%
+ luatexbase.unset_attribute("\luatexluaescapestring{\string#1}")}%
+ }\x}
% \end{macrocode}
%
% And now the trivial helper macro.
@@ -399,8 +399,8 @@ end
% \section{Test files}
%
% The tests done are very basic: we just make sure that the package loads
-% correctly and the macros don't generate any error, under both LaTeX en
-% Plain TeX. We also check that the attribute's number is remembered well,
+% correctly and the macros don't generate any error, under both \latex and
+% Plain \tex. We also check that the attribute's number is remembered well,
% independently of the current value of |\escapechar|.
%
% \begin{macrocode}
@@ -409,7 +409,9 @@ end
%<*testplain,testlatex>
\newluatexattribute\testattr
\setluatexattribute\testattr{1}
+\ifnum\testattr=1 \else \ERROR \fi
\unsetluatexattribute\testattr
+\ifnum\testattr<0 \else \ERROR \fi
\catcode64 11
\luatexbase@directlua{assert(luatexbase.attributes.testattr)}
\luatexbase@directlua{luatexbase.new_attribute('luatestattr')}
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx
index c60cdc0c709..b3172c06e24 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx
@@ -289,18 +289,8 @@ See source file '\inFileName' for details.
%
% \subsubsection{Primitives needed}
%
-% Load \pk{luatexbase-compat}.
-%
-% \begin{macrocode}
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname RequirePackage\endcsname\relax
- \input luatexbase-compat.sty
-\else
- \RequirePackage{luatexbase-compat}
-\fi
-% \end{macrocode}
-%
-% Make sure the primitives we need are available.
+% \pk{luatexbase-compat} is already loaded; just make sure the primitives
+% we need are available.
%
% \begin{macrocode}
\luatexbase@ensure@primitive{luaescapestring}
@@ -312,14 +302,15 @@ See source file '\inFileName' for details.
% \subsubsection{User macros}
%
% The allocation macro. Allocate tables starting with 1, since table 0 is
-% reserved for IniTeX catcodes by LuaTeX.
+% the default table. Allocate only odd numbers to allow using even numbers
+% as a stack.
%
% \begin{macrocode}
\newcount\lltxb@catcodetable@alloc
-\lltxb@catcodetable@alloc\z@
+\lltxb@catcodetable@alloc\m@ne
\def\newluatexcatcodetable#1{%
\ifnum\lltxb@catcodetable@alloc<65535\relax
- \global\advance\lltxb@catcodetable@alloc\@ne
+ \global\advance\lltxb@catcodetable@alloc\tw@
\allocationnumber\lltxb@catcodetable@alloc
\global\chardef#1\allocationnumber
\luatexinitcatcodetable\allocationnumber
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-compat.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-compat.dtx
index e7d29b2b107..e518e0d6695 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-compat.dtx
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-compat.dtx
@@ -369,7 +369,7 @@ See source file '\inFileName' for details.
%
% \begin{macrocode}
\x{%
- \luatexbase@directlua{tex.enableprimitives('luatex', '#1')}}
+ \luatexbase@directlua{tex.enableprimitives('luatex', {'#1'})}}
\fi
\x{%
\fi}
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase.dtx
index 405e72007de..9014b2ac84a 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase.dtx
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase.dtx
@@ -32,10 +32,7 @@
\preamble
-Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
-
-This work is under the CC0 license.
-See source file '\inFileName' for details.
+See source file '\inFileName' for licence and contact information.
\endpreamble