summaryrefslogtreecommitdiff
path: root/Master/texmf-dist
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-05-28 15:54:16 +0000
committerKarl Berry <karl@freefriends.org>2010-05-28 15:54:16 +0000
commit7db7ee076f98cc2b3dca7228ae0e38ba4e88715a (patch)
treec15a7028a935446f0d5dcce2b5008a6f24e2242f /Master/texmf-dist
parentae29f8fd830ee6798b80ee088fdd0c92b1a215f4 (diff)
luatexbase update (27may10)
git-svn-id: svn://tug.org/texlive/trunk@18560 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/Changes9
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/README62
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/TODO8
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-attr.pdfbin335649 -> 333439 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-cctb.pdfbin412485 -> 390338 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-compat.pdfbin448554 -> 427424 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-loader.pdfbin418835 -> 398869 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-mcb.pdfbin371371 -> 347918 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-modutils.pdfbin441531 -> 416756 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-regs.pdfbin397080 -> 376902 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase.pdfbin0 -> 318257 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-attr-latex.tex2
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-attr-plain.tex2
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-modutils-latex.tex1
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-modutils-plain.tex1
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/Makefile7
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase-attr.dtx93
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx4
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase-compat.dtx4
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase-loader.dtx4
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase-mcb.dtx4
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase-modutils.dtx9
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase-regs.dtx4
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase.dtx260
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/attr.lua23
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/luatexbase-attr.sty26
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/luatexbase-cctb.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/luatexbase-compat.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/luatexbase-loader.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/luatexbase-mcb.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/luatexbase-modutils.sty4
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/luatexbase-regs.sty2
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/luatexbase.sty92
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/modutils.lua2
34 files changed, 523 insertions, 108 deletions
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/Changes b/Master/texmf-dist/doc/luatex/luatexbase/Changes
index 8e3be94fc07..ce253fecdde 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/Changes
+++ b/Master/texmf-dist/doc/luatex/luatexbase/Changes
@@ -1,5 +1,14 @@
Changes in the luatexbase package/bundle
+2010/05/27 v0.2a
+ attr
+ - allocate from 1 to avoid problems with some external code
+ - provide a Lua interface: new_attribute() and unset_attribute().
+ modutils
+ - fix bug with module require_module()-ed many times.
+ luatexbase
+ - new, loads: compat,loader,regs,attr,cctb.
+
Summary of backwards-incompatible interface changes between 0.1 and 0.2:
- Lua objects are now in table luatexbase, not luatextra.
- Lua tables tex.attributenumber and tex.catcodetablenumber are not
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/README b/Master/texmf-dist/doc/luatex/luatexbase/README
index 100f8c584ac..f81c990bdce 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/README
+++ b/Master/texmf-dist/doc/luatex/luatexbase/README
@@ -1,56 +1,46 @@
The luatexbase generic bundle
-luatexbase provides basic resource management, similar to the way TeX
-resources are handled by Plain TeX and LaTeX, for new resources introduced by
-LuaTeX.
+The bundle provides basic facilities for LuaTeX macro programmers, mostly
+resource allocation and convenience packages. Provided are:
-Each resource is handled in a separate package.
+– luatexbase-compat: compatibility helpers;
+– luatexbase-loader: Lua module loading;
+– luatexbase-regs: allocation of registers and the like;
+– luatexbase-attr: attribute allocation;
+– luatexbase-cctb: catcode table allocation;
+– luatexbase-modutils: Lua module declaration; and
+- luatexbase-mcb: callbacks extensions.
-The resources considered are:
-- registers (\count, \box, etc.) -> luatexbase-regs
-- Lua module loading -> luatexbase-loader
-- \attribute's -> luatexbase-attr
-- \catcodetable's -> luatexbase-cctb
-- Lua callbacks -> luamcallbacks
-
-Additional convenience packages:
-- Lua module declaration -> luatexbase-modutils
-- compatibility helpers -> luatexbase-compat
-
-WARNING: these packages are subject to change or even be merged or disappear in
-the near future!
+Additionally, a `luatexbase' package loads all of the above in one step (and
+does nothing else) for your convenience.
Installation
------------
Here are the recommended installation methods (preferred first).
-(Methods "commented out" are not available right now.)
-% 1. If you are using TeX Live 2009 or later, use 'tlmgr install luatexbase'.
-% Alternatively, try your (TeX or Linux) distribution's package management system.
-%
-% 2. a. Grab luatextra.tds.zip on the CTAN.
-% b. Unzip it at the root of one or your TDS trees.
-% c. You may need to update some filename database after this, see your TeX
-% distribution's manual for details.
+1. If you are using TeX Live 2010 or later, use 'tlmgr install luatexbase'.
+Alternatively, try your (TeX or Linux) distribution's package management system.
+
+2. a. Grab luatextra.tds.zip on the CTAN.
+ b. Unzip it at the root of one or your TDS trees.
+ c. You may need to update some filename database after this, see your TeX
+ distribution's manual for details. (Hint: with TeX Live, run 'mktexlsr';
+ with MikTeX, look for "Refresh FNDB" in the MikTeX menu.)
3. a. Grab the sources from CTAN or github.
b. Run 'make install TEXMFROOT=/path/to/texmf'.
+ (Warning: 'make install' without giving a TEXMFROOT will
+ put files in './texmf', which is probably not what you want.)
c. See 2c.
-4. Try to figure it out by looking at the Makefile and comments in the sources.
-
-
License
-------
-This work and the derived files are under the Creative Commons CC0 license.
-
-See the full text at
-
-http://creativecommons.org/publicdomain/zero/1.0/legalcode
-
-and a FAQ at
+This work and the derived files are under the Creative Commons CC0 license,
+which is as close to public domain as possible in the country of the authors.
+See the full text [1] or the FAQ [2].
-http://wiki.creativecommons.org/CC0
+[1]: http://creativecommons.org/publicdomain/zero/1.0/legalcode
+[2]: http://wiki.creativecommons.org/CC0
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/TODO b/Master/texmf-dist/doc/luatex/luatexbase/TODO
index 556c5d2ea5c..a7e62206c71 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/TODO
+++ b/Master/texmf-dist/doc/luatex/luatexbase/TODO
@@ -1,4 +1,4 @@
-loader: kpse emulation is still wrong, see kpathsea's manual 4.2
+attr: \newluatexattribute -> \newattribute
modutils
--------
@@ -20,12 +20,6 @@ mcb
- General review of code and comments.
- Update user documentation.
-luatexbase
-----------
-
-- create it, make it load the others (except maybe mcb for now)
-- create general documentation
-
afterwards
----------
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-attr.pdf b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-attr.pdf
index 8179ad2e487..ce5cc04ccf0 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-attr.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-attr.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-cctb.pdf b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-cctb.pdf
index e992827b145..1a6ff2fbea8 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-cctb.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-cctb.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-compat.pdf b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-compat.pdf
index 62b82063c26..eea31071cdc 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-compat.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-compat.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-loader.pdf b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-loader.pdf
index 13591dc9363..12268eac2e8 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-loader.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-loader.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-mcb.pdf b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-mcb.pdf
index c61b6c3b41c..ab8c549c8fe 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-mcb.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-mcb.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-modutils.pdf b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-modutils.pdf
index b0ff8000350..94c2f8a4f06 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-modutils.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-modutils.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-regs.pdf b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-regs.pdf
index 83b38997629..9d132c31e05 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-regs.pdf
+++ b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-regs.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase.pdf b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase.pdf
new file mode 100644
index 00000000000..7e58d051e10
--- /dev/null
+++ b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-attr-latex.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-attr-latex.tex
index ac9bb4d7905..0885e7a2122 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-attr-latex.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-attr-latex.tex
@@ -17,6 +17,8 @@
\unsetluatexattribute\testattr
\catcode64 11
\luatexbase@directlua{assert(luatexbase.attributes.testattr)}
+\luatexbase@directlua{luatexbase.new_attribute('luatestattr')}
+\luatexbase@directlua{assert(luatexbase.attributes.luatestattr)}
\begingroup
\escapechar64
\newluatexattribute\anotherattr
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-attr-plain.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-attr-plain.tex
index b3a376474b1..050d53dfa1a 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-attr-plain.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-attr-plain.tex
@@ -17,6 +17,8 @@
\unsetluatexattribute\testattr
\catcode64 11
\luatexbase@directlua{assert(luatexbase.attributes.testattr)}
+\luatexbase@directlua{luatexbase.new_attribute('luatestattr')}
+\luatexbase@directlua{assert(luatexbase.attributes.luatestattr)}
\begingroup
\escapechar64
\newluatexattribute\anotherattr
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-latex.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-latex.tex
index 4785b3ac422..ece22be054b 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-latex.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-latex.tex
@@ -12,6 +12,7 @@
%% See source file 'luatexbase-modutils.dtx' for details.
%%
\RequirePackage{luatexbase-modutils}
+\luatexUseModule{test-modutils}
\luatexRequireModule
[1970/01/01]
{test-modutils}
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-plain.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-plain.tex
index 4f3f564e8a9..f00ecc41b8d 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-plain.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-plain.tex
@@ -12,6 +12,7 @@
%% See source file 'luatexbase-modutils.dtx' for details.
%%
\input luatexbase-modutils.sty
+\luatexUseModule{test-modutils}
\luatexRequireModule
{test-modutils}
{1970/01/01}
diff --git a/Master/texmf-dist/source/luatex/luatexbase/Makefile b/Master/texmf-dist/source/luatex/luatexbase/Makefile
index 4f018590786..8c82909d79f 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/Makefile
+++ b/Master/texmf-dist/source/luatex/luatexbase/Makefile
@@ -21,8 +21,10 @@ UNPACKED_MODUTILS = luatexbase-modutils.sty modutils.lua test-modutils.lua \
test-modutils-plain.tex test-modutils-latex.tex
UNPACKED_COMPAT = luatexbase-compat.sty \
test-compat-plain.tex test-compat-latex.tex
+UNPACKED_CORE = luatexbase.sty
UNPACKED = $(UNPACKED_MCB) $(UNPACKED_REGS) $(UNPACKED_ATTR) $(UNPACKED_CCTB) \
- $(UNPACKED_LOADER) $(UNPACKED_MODUTILS) $(UNPACKED_COMPAT)
+ $(UNPACKED_LOADER) $(UNPACKED_MODUTILS) $(UNPACKED_COMPAT) \
+ $(UNPACKED_CORE)
COMPILED = $(DOC)
GENERATED = $(COMPILED) $(UNPACKED)
SOURCE = $(DTX) $(DTXSTY) README TODO Changes Makefile
@@ -101,6 +103,9 @@ $(UNPACKED_MODUTILS): luatexbase-modutils.dtx
$(UNPACKED_COMPAT): luatexbase-compat.dtx
$(DO_TEX)
+$(UNPACKED_CORE): luatexbase.dtx
+ $(DO_TEX)
+
check-regs: $(UNPACKED_REGS)
luatex --interaction=batchmode test-regs-plain.tex >/dev/null
lualatex --interaction=batchmode test-regs-latex.tex >/dev/null
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-attr.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-attr.dtx
index cf310d06570..5847daec422 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-attr.dtx
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-attr.dtx
@@ -114,7 +114,7 @@ See source file '\inFileName' for details.
% Right brace \} Tilde \~}
%
% \title{The \pk{luatexbase-attr} package}
-% \date{v0.2 2010-05-12}
+% \date{v0.2a 2010-05-27}
% \author{%
% Manuel P\'egouri\'e-Gonnard \\ \email{mpg@elzevir.fr} \and
% \'Elie Roux \\ \email{elie.roux@telecom-bretagne.eu}}
@@ -124,17 +124,20 @@ See source file '\inFileName' for details.
% \begin{abstract}
% In addition to the registers existing in \tex and \etex, \luatex introduces
% a new concept: attributes. This package takes care of attribute allocation
-% just like Plain TeX and LaTeX do for other registers.
+% just like Plain TeX and LaTeX do for other registers, and also provides a
+% Lua interface.
% \end{abstract}
%
% \tableofcontents
%
% \section{Documentation}
%
+% \subsection{\tex interface}
+%
% The main macro defined here is |\newluatexattribute|. It behaves in the same
% way as |\newcount|. There are also two helper macros: |\setluatexattibute|
% sets an attribute's value (locally, but you can use |\global| in front of
-% it). |\unsetluatexattribute| unsets an atribute by giving it a special
+% it). |\unsetluatexattribute| unsets an attribute by giving it a special
% value, depending on \luatex's version; you should always use this macro
% in order to be sure the correct special value for your version of \luatex is
% used.
@@ -143,6 +146,8 @@ See source file '\inFileName' for details.
% allocate an attribute the way you can locally allocate a counter using
% \file{etex.sty}'s |\loccount|, so no corresponding macro is defined.
%
+% \subsection{Lua interface}
+%
% The various Lua functions for manipulating attributes use a number to
% designate the attribute. Hence, package writers need a way to know the
% number of the attribute associated to |\fooattr| assuming it was defined
@@ -159,6 +164,16 @@ See source file '\inFileName' for details.
% |luatexbase.attributes.foobar| (mind the absence of backslash here) at any
% time.
%
+% Also, two Lua functions are provided that are analogous to the above \tex
+% macros (actually, the macros are wrappers around the functions):
+% |luatexbase.new_attributes|\parg{name} allocates a new attribute, without
+% defining a corresponding \tex control sequence (only an entry in
+% |luatexbase.attributes| is created. It usually returns the number of the
+% allocated attribute. If room is missing, it raises an error, unless the
+% second argument (optional) is not false, in which case it returns -1.
+%
+% |luatexbase.unset_attribute|\parg{name} unsets an existing attribute.
+%
% \section{Implementation}
%
% \subsection{\tex package}
@@ -223,7 +238,7 @@ See source file '\inFileName' for details.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-attr}[2010/05/12 v0.2 Attributes allocation for LuaTeX]
+\x{luatexbase-attr}[2010/05/27 v0.2a Attributes allocation for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
@@ -288,36 +303,32 @@ See source file '\inFileName' for details.
%
% \subsection{User macros}
%
-% The allocaton macro.
+% The allocaton macro is merely a wrapper around the Lua function, but
+% handles error and logging in \tex, for consistency with other allocation
+% macros.
%
% \begin{macrocode}
-\newcount\lltxb@attribute@alloc
-\lltxb@attribute@alloc\m@ne
\def\newluatexattribute#1{%
- \ifnum\lltxb@attribute@alloc<65535\relax
- \global\advance\lltxb@attribute@alloc\@ne
- \allocationnumber\lltxb@attribute@alloc
+ \begingroup\escapechar\m@ne \expandafter\expandafter\expandafter
+ \endgroup \expandafter\expandafter\expandafter
+ \allocationnumber \luatexbase@directlua{tex.write(
+ luatexbase.new_attribute("\luatexluaescapestring{\string#1}", true))}%
+ \ifnum\allocationnumber>\m@ne
\global\luatexattributedef#1=\allocationnumber
- \unsetluatexattribute#1%
- \begingroup\escapechar\m@ne
- \luatexbase@directlua{luatexbase.attributedef_from_tex(
- '\luatexluaescapestring{\string#1}', '\number\allocationnumber')}%
- \endgroup
\wlog{\string#1=\string\luatexattribute\the\allocationnumber}%
\else
\errmessage{No room for a new \string\attribute}%
\fi}
% \end{macrocode}
%
-% Helper macro |\unsetluatexattribute|: depends on \luatex's version.
+% Helper macro |\unsetluatexattribute|: wrapper around the Lua function.
%
% \begin{macrocode}
\def\unsetluatexattribute#1{%
- \ifnum\luatexversion<37\relax
- #1=-1\relax
- \else
- #1=-"7FFFFFFF\relax
- \fi}
+ \begingroup\escapechar\m@ne
+ \luatexbase@directlua{%
+ luatexbase.unset_attribute("\luatexluaescapestring{\string#1}")}%
+ \endgroup}
% \end{macrocode}
%
% And now the trivial helper macro.
@@ -341,12 +352,44 @@ See source file '\inFileName' for details.
module('luatexbase', package.seeall)
% \end{macrocode}
%
-% Record the allocation number in a Lua table.
+% This table holds the values of the allocated attributes, indexed by name.
%
% \begin{macrocode}
attributes = {}
-function attributedef_from_tex(name, number)
- attributes[name] = tonumber(number)
+% \end{macrocode}
+%
+% The allocaton function. Unlike other registers, allocate starting from 1.
+% Some code (eg, font handling coming from Con\tex{}t) behaves strangely
+% with \verb+\attribute0+ and since there is plenty of room here, it
+% doesn't seem bad to ``loose'' one item in order to avoid this problem.
+%
+% \begin{macrocode}
+local last_alloc = 0
+function new_attribute(name, silent)
+ if last_alloc >= 65535 then
+ if silent then
+ return -1
+ else
+ error("No room for a new \\attribute", 1)
+ end
+ end
+ last_alloc = last_alloc + 1
+ attributes[name] = last_alloc
+ unset_attribute(name)
+ if not silent then
+ texio.write_nl('log', string.format(
+ 'luatexbase.attributes[%q] = %d', name, last_alloc))
+ end
+ return last_alloc
+end
+% \end{macrocode}
+%
+% Unset an attribute the correct way depending on \luatex's version.
+%
+% \begin{macrocode}
+local unset_value = (luatexbase.luatexversion < 37) and -1 or -2147483647
+function unset_attribute(name)
+ tex.setattribute(attributes[name], unset_value)
end
% \end{macrocode}
%
@@ -370,6 +413,8 @@ end
\unsetluatexattribute\testattr
\catcode64 11
\luatexbase@directlua{assert(luatexbase.attributes.testattr)}
+\luatexbase@directlua{luatexbase.new_attribute('luatestattr')}
+\luatexbase@directlua{assert(luatexbase.attributes.luatestattr)}
\begingroup
\escapechar64
\newluatexattribute\anotherattr
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx
index 141f1203bef..4b7b8c64231 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx
@@ -114,7 +114,7 @@ See source file '\inFileName' for details.
% Right brace \} Tilde \~}
%
% \title{The \pk{luatexbase-cctb} package}
-% \date{v0.2 2010-05-12}
+% \date{v0.2a 2010-05-27}
% \author{%
% Manuel P\'egouri\'e-Gonnard \\ \texttt{mpg@elzevir.fr} \and
% \'Elie Roux \\ \texttt{elie.roux@telecom-bretagne.eu}}
@@ -246,7 +246,7 @@ See source file '\inFileName' for details.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-cctb}[2010/05/11 v0.2 Catcodetable allocation for LuaTeX]
+\x{luatexbase-cctb}[2010/05/27 v0.2a Catcodetable allocation for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-compat.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-compat.dtx
index dbff084195c..f4a903b74be 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-compat.dtx
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-compat.dtx
@@ -103,7 +103,7 @@ See source file '\inFileName' for details.
% Right brace \} Tilde \~}
%
% \title{The \pk{luatexbase-compat} package}
-% \date{v0.2 2010/05/12}
+% \date{v0.2a 2010/05/27}
% \author{%
% Manuel P\'egouri\'e-Gonnard \\ \email{mpg@elzevir.fr} \and
% \'Elie Roux \\ \email{elie.roux@telecom-bretagne.eu}}
@@ -258,7 +258,7 @@ See source file '\inFileName' for details.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-compat}[2010/05/12 v0.2 Compatibility tools for LuaTeX]
+\x{luatexbase-compat}[2010/05/27 v0.2a Compatibility tools for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-loader.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-loader.dtx
index 8fe81acb6d5..bd900c26969 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-loader.dtx
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-loader.dtx
@@ -117,7 +117,7 @@ See source file '\inFileName' for details.
% Right brace \} Tilde \~}
%
% \title{The \pk{luatexbase-loader} package}
-% \date{v0.2 2010-05-12}
+% \date{v0.2a 2010-05-27}
% \author{%
% Manuel P\'egouri\'e-Gonnard \\ \texttt{mpg@elzevir.fr} \and
% \'Elie Roux \\ \texttt{elie.roux@telecom-bretagne.eu}}
@@ -230,7 +230,7 @@ See source file '\inFileName' for details.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-loader}[2010/05/12 v0.2 Lua module loader for LuaTeX]
+\x{luatexbase-loader}[2010/05/27 v0.2a Lua module loader for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-mcb.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-mcb.dtx
index f30753c737f..86a4788d2be 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-mcb.dtx
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-mcb.dtx
@@ -114,7 +114,7 @@ See source file '\inFileName' for details.
% Right brace \} Tilde \~}
%
% \title{The \textsf{luatexbase-mcb} package}
-% \date{2010/05/12 v0.2}
+% \date{2010/05/27 v0.2a}
% \author{%
% Manuel P\'egouri\'e-Gonnard \\ \email{mpg@elzevir.fr} \and
% \'Elie Roux \\ \email{elie.roux@telecom-bretagne.eu}}
@@ -241,7 +241,7 @@ See source file '\inFileName' for details.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-mcb}[2010/05/12 v0.2 Callback management for LuaTeX]
+\x{luatexbase-mcb}[2010/05/27 v0.2a Callback management for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-modutils.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-modutils.dtx
index 9c2936f4ce8..dd5b118f9aa 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-modutils.dtx
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-modutils.dtx
@@ -263,7 +263,7 @@ See source file '\inFileName' for details.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-modutils}[2010/05/12 v0.2 Module utilities for LuaTeX]
+\x{luatexbase-modutils}[2010/05/27 v0.2a Module utilities for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
@@ -315,7 +315,7 @@ See source file '\inFileName' for details.
%
% \begin{macrocode}
\def\luatexUseModule#1{\luatexbase@directlua{%
- luatexbase.use_module("\luatexluescapestring{#1}")}}
+ luatexbase.use_module("\luatexluaescapestring{#1}")}}
% \end{macrocode}
%
% Interface to |require_module()| with syntax depending on the format.
@@ -486,7 +486,7 @@ function provides_module(mod)
end
requiredversion = requiredversions[mod.name]
if requiredversion then
- if requiredversion.type == date
+ if requiredversion.type == date
and requiredversion.version > datetonumber(mod.date) then
err("loading module %s in version %s, "
.."but version %s was required",
@@ -498,7 +498,7 @@ function provides_module(mod)
mod.name, mod.version, requiredversion.orig)
end
end
- modules[mod.name] = module
+ modules[mod.name] = mod
texio.write_nl('log', string.format("Lua module: %s %s v%.02f %s\n",
mod.name, mod.date, mod.version, mod.description))
end
@@ -531,6 +531,7 @@ luatexbase.provides_module {
%<testplain>\input luatexbase-modutils.sty
%<testlatex>\RequirePackage{luatexbase-modutils}
%<*testplain,testlatex>
+\luatexUseModule{test-modutils}
\luatexRequireModule
%<testlatex>[1970/01/01]
{test-modutils}
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-regs.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-regs.dtx
index 313af007c97..08d1060ab23 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-regs.dtx
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-regs.dtx
@@ -104,7 +104,7 @@ See source file '\inFileName' for details.
% Right brace \} Tilde \~}
%
% \title{The \pk{luatexbase-regs} package}
-% \date{v0.2 2010/05/12}
+% \date{v0.2a 2010/05/27}
% \author{%
% Manuel P\'egouri\'e-Gonnard \\ \email{mpg@elzevir.fr} \and
% \'Elie Roux \\ \email{elie.roux@telecom-bretagne.eu}}
@@ -211,7 +211,7 @@ See source file '\inFileName' for details.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-regs}[2010/05/12 v0.2 Registers allocation for LuaTeX]
+\x{luatexbase-regs}[2010/05/27 v0.2a Registers allocation for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase.dtx
new file mode 100644
index 00000000000..f2859128497
--- /dev/null
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase.dtx
@@ -0,0 +1,260 @@
+% \iffalse meta-comment
+%
+% Written in 2009, 2010 by Manuel Pégourié-Gonnard and Élie Roux.
+% <mpg@elzevir.fr>
+% <elie.roux@telecom-bretagne.eu>
+%
+% This work is under the CC0 license.
+%
+% This work consists of the main source file luatexbase.dtx
+% and the derived files
+% luatexbase.sty
+%
+% Unpacking:
+% tex luatexbase.dtx
+% Documentation:
+% pdflatex luatexbase.dtx
+%
+%<*ignore>
+\begingroup
+ \def\x{LaTeX2e}%
+\expandafter\endgroup
+\ifcase 0\ifx\install y1\fi\expandafter
+ \ifx\csname processbatchFile\endcsname\relax\else1\fi
+ \ifx\fmtname\x\else 1\fi\relax
+\else\csname fi\endcsname
+%</ignore>
+%<*install>
+\input docstrip.tex
+
+\keepsilent
+\askforoverwritefalse
+
+\let\MetaPrefix\relax
+
+\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.
+
+\endpreamble
+
+\generate{%
+ \usedir{tex/luatex/luatexbase}%
+ \file{luatexbase.sty}{\from{luatexbase.dtx}{texpackage}}%
+}
+
+\obeyspaces
+\Msg{************************************************************************}
+\Msg{*}
+\Msg{* To finish the installation you have to move the following}
+\Msg{* files into a directory searched by TeX:}
+\Msg{*}
+\Msg{* luatexbase.sty}
+\Msg{*}
+\Msg{* Happy TeXing!}
+\Msg{*}
+\Msg{************************************************************************}
+
+\endbatchfile
+%</install>
+%<*ignore>
+\fi
+%</ignore>
+%<*driver>
+\documentclass{ltxdoc}
+\input{lltxb-dtxstyle}
+\newcommand\subpk[1]{%
+ \item[\href{luatexbase-#1.pdf}{luatexbase-#1}\normalfont:]}
+\begin{document}
+ \DocInput{luatexbase.dtx}%
+\end{document}
+%</driver>
+% \fi
+%
+% \CheckSum{0}
+%
+% \CharacterTable
+% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+% Digits \0\1\2\3\4\5\6\7\8\9
+% Exclamation \! Double quote \" Hash (number) \#
+% Dollar \$ Percent \% Ampersand \&
+% Acute accent \' Left paren \( Right paren \)
+% Asterisk \* Plus \+ Comma \,
+% Minus \- Point \. Solidus \/
+% Colon \: Semicolon \; Less than \<
+% Equals \= Greater than \> Question mark \?
+% Commercial at \@ Left bracket \[ Backslash \\
+% Right bracket \] Circumflex \^ Underscore \_
+% Grave accent \` Left brace \{ Vertical bar \|
+% Right brace \} Tilde \~}
+%
+% \title{The \pk{luatexbase} package}
+% \date{v0.2a 2010-05-27}
+% \author{%
+% Manuel P\'egouri\'e-Gonnard \\ \email{mpg@elzevir.fr} \and
+% \'Elie Roux \\ \email{elie.roux@telecom-bretagne.eu}}
+%
+% \maketitle
+%
+% \begin{abstract}
+% This convenience package loads all of the (stable) packages in the
+% \pk{luatexbase} bundle.
+% \end{abstract}
+%
+% \tableofcontents
+%
+% \section{Documentation}
+%
+% The \pk{luatexbase} package loads the following packages:
+% \begin{description}
+% \subpk{compat} compatibility helpers for \verb+\directlua+, primitive
+% names and version information from Lua.
+% \subpk{loader} extension of \luatex's Lua module loader (since version
+% 0.60.0, this is more of a compatibility layer for older versions than a
+% real extension).
+% \subpk{regs} extented allocation scheme for registers and the like,
+% \emph{\`a la} \pk{etex}.
+% \subpk{cctb} catcode table allocation.
+% \subpk{attr} attribute allocation.
+% \end{description}
+%
+% These packages are almost stable: it is unlikely that backward-incompatible
+% changes will be made in the future (other than necessary for merging with
+% \pk{luatex.sty}, which strongly overlaps with the above). If they happen,
+% such changes will be announced on \email{lualatex-dev@tug.org} before they
+% are pushed to the master branch and then CTAN.
+%
+% Other packages included in the bundle, but currently not loaded by the
+% present package, are:
+% \begin{description}
+% \subpk{modutils} Lua module declaration, including version checks.
+% \subpk{mcb} callbacks extensions allowing to register many functions in a
+% single callback, and declare new callbacks for packages.
+% \end{description}
+%
+% All packages in this bundle are supposed to work with \luatex 0.25.4 to
+% 0.60.x, with formats based on \plaintex or \latex, as included in \texlive
+% 2008, 2009, and 2010.
+%
+% \section{Implementation}
+%
+% \begin{macrocode}
+%<*texpackage>
+% \end{macrocode}
+%
+% \subsection{Preliminaries}
+%
+% Reload protection, especially for \plaintex.
+%
+% \begin{macrocode}
+ \csname lltxb@core@loaded\endcsname
+\expandafter\let\csname lltxb@core@loaded\endcsname\endinput
+% \end{macrocode}
+%
+% Catcode defenses.
+%
+% \begin{macrocode}
+\begingroup
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \catcode 35 6 % #
+ \toks0{}%
+ \def\x{}%
+ \def\y#1 #2 {%
+ \toks0\expandafter{\the\toks0 \catcode#1 \the\catcode#1}%
+ \edef\x{\x \catcode#1 #2}}%
+ \y 123 1 % {
+ \y 125 2 % }
+ \y 35 6 % #
+ \y 10 12 % ^^J
+ \y 34 12 % "
+ \y 36 3 % $ $
+ \y 39 12 % '
+ \y 40 12 % (
+ \y 41 12 % )
+ \y 42 12 % *
+ \y 43 12 % +
+ \y 44 12 % ,
+ \y 45 12 % -
+ \y 46 12 % .
+ \y 47 12 % /
+ \y 60 12 % <
+ \y 61 12 % =
+ \y 64 11 % @ (letter)
+ \y 62 12 % >
+ \y 95 12 % _ (other)
+ \y 96 12 % `
+ \edef\y#1{\endgroup\edef#1{\the\toks0\relax}\x}%
+\expandafter\y\csname lltxb@core@AtEnd\endcsname
+% \end{macrocode}
+%
+% Package declaration.
+%
+% \begin{macrocode}
+\begingroup
+ \expandafter\ifx\csname ProvidesPackage\endcsname\relax
+ \def\x#1[#2]{\immediate\write16{Package: #1 #2}}
+ \else
+ \let\x\ProvidesPackage
+ \fi
+\expandafter\endgroup
+\x{luatexbase}[2010/05/27 v0.2a Module utilities for LuaTeX]
+% \end{macrocode}
+%
+% Make sure \luatex is used.
+%
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input ifluatex.sty
+\else
+ \RequirePackage{ifluatex}
+\fi
+\ifluatex\else
+ \begingroup
+ \expandafter\ifx\csname PackageWarningNoLine\endcsname\relax
+ \def\x#1#2{\begingroup\newlinechar10
+ \immediate\write16{Package #1 warning: #2}\endgroup}
+ \else
+ \let\x\PackageWarningNoLine
+ \fi
+ \expandafter\endgroup
+ \x{luatexbase}{LuaTeX is required for this package. Aborting.}
+ \lltxb@core@AtEnd
+ \expandafter\endinput
+\fi
+% \end{macrocode}
+%
+% \subsection{Packages loading}
+%
+% \begin{macrocode}
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input luatexbase-compat.sty
+ \input luatexbase-loader.sty
+ \input luatexbase-regs.sty
+ \input luatexbase-attr.sty
+ \input luatexbase-cctb.sty
+\else
+ \RequirePackage{luatexbase-compat}
+ \RequirePackage{luatexbase-loader}
+ \RequirePackage{luatexbase-regs}
+ \RequirePackage{luatexbase-attr}
+ \RequirePackage{luatexbase-cctb}
+\fi
+% \end{macrocode}
+%
+% This is the end, my friend\dots the end.
+%
+% \begin{macrocode}
+\lltxb@core@AtEnd
+%</texpackage>
+% \end{macrocode}
+%
+%
+% \Finale
+\endinput
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/attr.lua b/Master/texmf-dist/tex/luatex/luatexbase/attr.lua
index f794e350812..74ecd6ac07f 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/attr.lua
+++ b/Master/texmf-dist/tex/luatex/luatexbase/attr.lua
@@ -13,8 +13,27 @@
--
module('luatexbase', package.seeall)
attributes = {}
-function attributedef_from_tex(name, number)
- attributes[name] = tonumber(number)
+local last_alloc = 0
+function new_attribute(name, silent)
+ if last_alloc >= 65535 then
+ if silent then
+ return -1
+ else
+ error("No room for a new \\attribute", 1)
+ end
+ end
+ last_alloc = last_alloc + 1
+ attributes[name] = last_alloc
+ unset_attribute(name)
+ if not silent then
+ texio.write_nl('log', string.format(
+ 'luatexbase.attributes[%q] = %d', name, last_alloc))
+ end
+ return last_alloc
+end
+local unset_value = (luatexbase.luatexversion < 37) and -1 or -2147483647
+function unset_attribute(name)
+ tex.setattribute(attributes[name], unset_value)
end
--
-- End of File `attr.lua'.
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-attr.sty b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-attr.sty
index d839e544bb3..5a78ea8a4fa 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-attr.sty
+++ b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-attr.sty
@@ -52,7 +52,7 @@
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-attr}[2010/05/12 v0.2 Attributes allocation for LuaTeX]
+\x{luatexbase-attr}[2010/05/27 v0.2a Attributes allocation for LuaTeX]
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input ifluatex.sty
@@ -88,28 +88,22 @@
\RequirePackage{luatexbase-loader}
\fi
\luatexbase@directlua{require('luatexbase.attr')}
-\newcount\lltxb@attribute@alloc
-\lltxb@attribute@alloc\m@ne
\def\newluatexattribute#1{%
- \ifnum\lltxb@attribute@alloc<65535\relax
- \global\advance\lltxb@attribute@alloc\@ne
- \allocationnumber\lltxb@attribute@alloc
+ \begingroup\escapechar\m@ne \expandafter\expandafter\expandafter
+ \endgroup \expandafter\expandafter\expandafter
+ \allocationnumber \luatexbase@directlua{tex.write(
+ luatexbase.new_attribute("\luatexluaescapestring{\string#1}", true))}%
+ \ifnum\allocationnumber>\m@ne
\global\luatexattributedef#1=\allocationnumber
- \unsetluatexattribute#1%
- \begingroup\escapechar\m@ne
- \luatexbase@directlua{luatexbase.attributedef_from_tex(
- '\luatexluaescapestring{\string#1}', '\number\allocationnumber')}%
- \endgroup
\wlog{\string#1=\string\luatexattribute\the\allocationnumber}%
\else
\errmessage{No room for a new \string\attribute}%
\fi}
\def\unsetluatexattribute#1{%
- \ifnum\luatexversion<37\relax
- #1=-1\relax
- \else
- #1=-"7FFFFFFF\relax
- \fi}
+ \begingroup\escapechar\m@ne
+ \luatexbase@directlua{%
+ luatexbase.unset_attribute("\luatexluaescapestring{\string#1}")}%
+ \endgroup}
\def\setluatexattribute#1#2{%
#1=\numexpr#2\relax}
\lltxb@attr@AtEnd
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-cctb.sty b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-cctb.sty
index ce4cbeda89e..d526f2f46a6 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-cctb.sty
+++ b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-cctb.sty
@@ -52,7 +52,7 @@
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-cctb}[2010/05/11 v0.2 Catcodetable allocation for LuaTeX]
+\x{luatexbase-cctb}[2010/05/27 v0.2a Catcodetable allocation for LuaTeX]
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input ifluatex.sty
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-compat.sty b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-compat.sty
index 672645ee0c1..be5d4e8ac3a 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-compat.sty
+++ b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-compat.sty
@@ -52,7 +52,7 @@
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-compat}[2010/05/12 v0.2 Compatibility tools for LuaTeX]
+\x{luatexbase-compat}[2010/05/27 v0.2a Compatibility tools for LuaTeX]
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input ifluatex.sty
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-loader.sty b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-loader.sty
index f6c300e445f..1609aba726e 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-loader.sty
+++ b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-loader.sty
@@ -52,7 +52,7 @@
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-loader}[2010/05/12 v0.2 Lua module loader for LuaTeX]
+\x{luatexbase-loader}[2010/05/27 v0.2a Lua module loader for LuaTeX]
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input ifluatex.sty
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-mcb.sty b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-mcb.sty
index f761f74a575..0fcd35fc4b9 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-mcb.sty
+++ b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-mcb.sty
@@ -52,7 +52,7 @@
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-mcb}[2010/05/12 v0.2 Callback management for LuaTeX]
+\x{luatexbase-mcb}[2010/05/27 v0.2a Callback management for LuaTeX]
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input ifluatex.sty
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-modutils.sty b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-modutils.sty
index 0d46d515b2f..c33ae6a1c61 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-modutils.sty
+++ b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-modutils.sty
@@ -52,7 +52,7 @@
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-modutils}[2010/05/12 v0.2 Module utilities for LuaTeX]
+\x{luatexbase-modutils}[2010/05/27 v0.2a Module utilities for LuaTeX]
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input ifluatex.sty
@@ -81,7 +81,7 @@
\luatexbase@directlua{require('luatexbase.modutils')}
\luatexbase@ensure@primitive{luaescapestring}
\def\luatexUseModule#1{\luatexbase@directlua{%
- luatexbase.use_module("\luatexluescapestring{#1}")}}
+ luatexbase.use_module("\luatexluaescapestring{#1}")}}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname newcommand\endcsname\relax
\def\luatexRequireModule#1#2{%
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-regs.sty b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-regs.sty
index 7e91965b5cf..816ddd411b1 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-regs.sty
+++ b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-regs.sty
@@ -52,7 +52,7 @@
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-regs}[2010/05/12 v0.2 Registers allocation for LuaTeX]
+\x{luatexbase-regs}[2010/05/27 v0.2a Registers allocation for LuaTeX]
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input ifluatex.sty
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase.sty b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase.sty
new file mode 100644
index 00000000000..bb66eef832f
--- /dev/null
+++ b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase.sty
@@ -0,0 +1,92 @@
+\MetaPrefix
+\MetaPrefix This is file `luatexbase.sty',
+\MetaPrefix generated with the docstrip utility.
+\MetaPrefix
+\MetaPrefix The original source files were:
+\MetaPrefix
+\MetaPrefix luatexbase.dtx (with options: `texpackage')
+\MetaPrefix
+\MetaPrefix Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
+\MetaPrefix
+\MetaPrefix This work is under the CC0 license.
+\MetaPrefix See source file 'luatexbase.dtx' for details.
+\MetaPrefix
+ \csname lltxb@core@loaded\endcsname
+\expandafter\let\csname lltxb@core@loaded\endcsname\endinput
+\begingroup
+ \catcode123 1 % {
+ \catcode125 2 % }
+ \catcode 35 6 % #
+ \toks0{}%
+ \def\x{}%
+ \def\y#1 #2 {%
+ \toks0\expandafter{\the\toks0 \catcode#1 \the\catcode#1}%
+ \edef\x{\x \catcode#1 #2}}%
+ \y 123 1 % {
+ \y 125 2 % }
+ \y 35 6 % #
+ \y 10 12 % ^^J
+ \y 34 12 % "
+ \y 36 3 % $ $
+ \y 39 12 % '
+ \y 40 12 % (
+ \y 41 12 % )
+ \y 42 12 % *
+ \y 43 12 % +
+ \y 44 12 % ,
+ \y 45 12 % -
+ \y 46 12 % .
+ \y 47 12 % /
+ \y 60 12 % <
+ \y 61 12 % =
+ \y 64 11 % @ (letter)
+ \y 62 12 % >
+ \y 95 12 % _ (other)
+ \y 96 12 % `
+ \edef\y#1{\endgroup\edef#1{\the\toks0\relax}\x}%
+\expandafter\y\csname lltxb@core@AtEnd\endcsname
+\begingroup
+ \expandafter\ifx\csname ProvidesPackage\endcsname\relax
+ \def\x#1[#2]{\immediate\write16{Package: #1 #2}}
+ \else
+ \let\x\ProvidesPackage
+ \fi
+\expandafter\endgroup
+\x{luatexbase}[2010/05/27 v0.2a Module utilities for LuaTeX]
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input ifluatex.sty
+\else
+ \RequirePackage{ifluatex}
+\fi
+\ifluatex\else
+ \begingroup
+ \expandafter\ifx\csname PackageWarningNoLine\endcsname\relax
+ \def\x#1#2{\begingroup\newlinechar10
+ \immediate\write16{Package #1 warning: #2}\endgroup}
+ \else
+ \let\x\PackageWarningNoLine
+ \fi
+ \expandafter\endgroup
+ \x{luatexbase}{LuaTeX is required for this package. Aborting.}
+ \lltxb@core@AtEnd
+ \expandafter\endinput
+\fi
+\begingroup\expandafter\expandafter\expandafter\endgroup
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input luatexbase-compat.sty
+ \input luatexbase-loader.sty
+ \input luatexbase-regs.sty
+ \input luatexbase-attr.sty
+ \input luatexbase-cctb.sty
+\else
+ \RequirePackage{luatexbase-compat}
+ \RequirePackage{luatexbase-loader}
+ \RequirePackage{luatexbase-regs}
+ \RequirePackage{luatexbase-attr}
+ \RequirePackage{luatexbase-cctb}
+\fi
+\lltxb@core@AtEnd
+\endinput
+%%
+%% End of file `luatexbase.sty'.
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/modutils.lua b/Master/texmf-dist/tex/luatex/luatexbase/modutils.lua
index 5abf32c2a3b..64b420c12cb 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/modutils.lua
+++ b/Master/texmf-dist/tex/luatex/luatexbase/modutils.lua
@@ -107,7 +107,7 @@ function provides_module(mod)
mod.name, mod.version, requiredversion.orig)
end
end
- modules[mod.name] = module
+ modules[mod.name] = mod
texio.write_nl('log', string.format("Lua module: %s %s v%.02f %s\n",
mod.name, mod.date, mod.version, mod.description))
end