summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/Changes30
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/TODO38
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-attr.pdfbin333770 -> 442757 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-cctb.pdfbin371644 -> 498825 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-compat.pdfbin426564 -> 497667 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-loader.pdfbin379444 -> 443842 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-mcb.pdfbin420027 -> 513883 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-modutils.pdfbin430256 -> 501606 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase-regs.pdfbin376490 -> 487025 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/luatexbase.pdfbin321874 -> 408215 bytes
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-attr-latex.tex5
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-attr-plain.tex5
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-base-latex.tex2
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-base-plain.tex2
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-cctb-latex.tex5
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-cctb-plain.tex5
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-compat-latex.tex5
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-compat-plain.tex5
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-loader-latex.tex5
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-loader-plain.tex5
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-loader.lua5
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-loader.sub.lua5
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-mcb-latex.tex5
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-mcb-plain.tex5
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-mcb.lua5
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-modutils-latex.tex5
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-modutils-plain.tex5
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-modutils.lua5
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-regs-latex.tex5
-rw-r--r--Master/texmf-dist/doc/luatex/luatexbase/test-regs-plain.tex5
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/Makefile25
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase-attr.dtx74
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx314
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase-compat.dtx98
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase-loader.dtx204
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase-mcb.dtx83
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase-modutils.dtx79
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase-regs.dtx82
-rw-r--r--Master/texmf-dist/source/luatex/luatexbase/luatexbase.dtx125
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/attr.lua5
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/cctb.lua5
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/luatexbase-attr.sty62
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/luatexbase-cctb.sty126
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/luatexbase-compat.sty53
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/luatexbase-loader.sty59
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/luatexbase-mcb.sty56
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/luatexbase-modutils.sty61
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/luatexbase-regs.sty63
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/luatexbase.loader.lua44
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/luatexbase.sty58
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/mcb.lua17
-rw-r--r--Master/texmf-dist/tex/luatex/luatexbase/modutils.lua9
52 files changed, 1017 insertions, 847 deletions
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/Changes b/Master/texmf-dist/doc/luatex/luatexbase/Changes
index d9e2a0ee286..76894008bcf 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/Changes
+++ b/Master/texmf-dist/doc/luatex/luatexbase/Changes
@@ -1,14 +1,38 @@
Changes in the luatexbase package/bundle
-The [BI] tag signals backward-incompatible changes.
-Starting with v0.3, the only possible source of such changes is the upcoming
-merge with luatex.sty. Afterwards, no other BI change is to be expected.
+2013/04/13 v0.5
+ all
+ - input luatex.sty before doing anything, as luatex.sty
+ breaks if loaded after luatexbase
+ mcb and loader
+ - compatibility with Lua 5.2 (LuaTeX >= 0.74)
+ loader
+ - fix an important bug making the kpse lua loader never used,
+ it should make package searching a bit faster.
+ - dropping support for LuaTeX < 0.45.
+ - small improvement to make x.y.lua look for x/y.lua, not
+ x/y/lua.
+ modutils
+ - fixing a bug printing "luatexbase-attr" in all documents
+ in plain TeX
+
+2011/00/24 v0.4
+ cctb
+ - implement catcode table stacks à la luatex.sty
+ - fix \CatcodeTableLaTeX(Package): 10 (newline aka ^^J) was catcoded
+ 15 instead of 12
+ - rename \setcatcoderange to \SetCatcodeRange (the old name remains
+ for compatibility but will be removed in the next version)
+ luatex 0.5
+ - new package replacing luatex.sty from the oberdiek bundle
+ (see luatex.pdf for details)
2011/05/21 v0.31
attr
- Bugfix: \unsetluatexattribute didn't work (reported by Dohyun Kim)
2010/10/10 v0.3
+ [BI] marks backward-incompatible changes
all not using LuaTeX results in an error (formerly a warning)
modutils
- [BI] \luatexUseModule and \luatexRequireModule replaced by
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/TODO b/Master/texmf-dist/doc/luatex/luatexbase/TODO
index 40cded71548..6205464bb50 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/TODO
+++ b/Master/texmf-dist/doc/luatex/luatexbase/TODO
@@ -1,48 +1,50 @@
Next actions
------------
-1. Do the catcode table stack à la luatex.sty.
-2. Merge with luatex.sty (inc test suite).
-3. Coordinate release with Heiko.
+- Coordinate release with Heiko (luatex-loader?)
-test suite
-----------
+all
+---
+- use infwarerr
+- use ltxcmds?
+- \lltxb as a prefix means nothing
- regression checks on the results of the tests (sed+diff the log)
+ or generalise use of qstest
- add debug messages to be used in the test suite?
-- import test files from luatex.sty
-
-luatex.sty
-----------
-
-- do it (depends on cctb update)
-- provide \newcatcodetable & all for now, used in l3luatex.sty (to be
- investigated), with a depcracation warning
+- mark all occurences of version-dependent stuff in the code
+- quit using module() in favor of locals
+- support the syntax foo = require"foo" in modutils? How?
compat
------
-- clarify doc/comments about relying on etex/pdf primitives
-- import some error checking from Heiko's \LuT@MakeLuatexPrimitive
+- import some error checking from Heiko's \LuT@MakeLuatexPrimitive?
modutils
--------
-- make `\listfiles` show Lua modules?
+- make `\listfiles` show Lua modules? or provide \listluafiles for that
cctb
----
-- stack à la luatex.sty
- support for unicode-letters?
mcb
---
- add an analogue of `callback.find()`, see #4
+- revise priority system: use real numbers and don't change them
+- provide a list()?
+- allow temporary disabling of callbacks
+- do something with open_read_file etc
+- make callback.register = luatexbase_add_to_callback
+- check if there are functions in the callbacks before luatexbase is loaded
+ and import them
bytecode registers
------------------
-- create submodule for that
+- create submodule for that (really? is it useful at all?)
- only lua interface, most probably
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-attr.pdf b/Master/texmf-dist/doc/luatex/luatexbase/luatexbase-attr.pdf
index 8a3708bba1a..feea83dc841 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 74fc6322f67..bf930733a05 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 d309c959af2..93806faf68a 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 bdcba9f045b..6f2756530e2 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 5cf9dd7fb3d..41825701624 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 f2d07b1edbf..48dcf7a2794 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 66b78007591..dfd7aeec340 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
index 60242a46280..ce8391ac0b4 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/luatexbase.pdf
+++ 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 701a922f45d..4904a085974 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-attr-latex.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-attr-latex.tex
@@ -6,10 +6,7 @@
%%
%% luatexbase-attr.dtx (with options: `testlatex')
%%
-%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
-%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-attr.dtx' for details.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
\RequirePackage{luatexbase-attr}
\newluatexattribute\testattr
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 ae136ccaae8..5d8d2026929 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-attr-plain.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-attr-plain.tex
@@ -6,10 +6,7 @@
%%
%% luatexbase-attr.dtx (with options: `testplain')
%%
-%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
-%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-attr.dtx' for details.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
\input luatexbase-attr.sty
\newluatexattribute\testattr
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-base-latex.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-base-latex.tex
index 867eb32dfdc..f543bb11ab4 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-base-latex.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-base-latex.tex
@@ -6,7 +6,7 @@
%%
%% luatexbase.dtx (with options: `testlatex')
%%
-%% See source file 'luatexbase.dtx' for licence and contact information.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
\RequirePackage{luatexbase}
\stop
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-base-plain.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-base-plain.tex
index 2af3f60e23d..5167d5b00e4 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-base-plain.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-base-plain.tex
@@ -6,7 +6,7 @@
%%
%% luatexbase.dtx (with options: `testplain')
%%
-%% See source file 'luatexbase.dtx' for licence and contact information.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
\input luatexbase.sty
\bye
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-cctb-latex.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-cctb-latex.tex
index 30a40e32f90..da360ddb585 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-cctb-latex.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-cctb-latex.tex
@@ -6,10 +6,7 @@
%%
%% luatexbase-cctb.dtx (with options: `testlatex')
%%
-%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
-%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-cctb.dtx' for details.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
\catcode00 15
\RequirePackage{luatexbase-cctb}
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-cctb-plain.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-cctb-plain.tex
index fbd96601dfe..ae37b2a0425 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-cctb-plain.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-cctb-plain.tex
@@ -6,10 +6,7 @@
%%
%% luatexbase-cctb.dtx (with options: `testplain')
%%
-%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
-%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-cctb.dtx' for details.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
\catcode00 15
\input luatexbase-cctb.sty
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-compat-latex.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-compat-latex.tex
index 42cf198ac55..d6e53db0037 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-compat-latex.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-compat-latex.tex
@@ -6,10 +6,7 @@
%%
%% luatexbase-compat.dtx (with options: `testlatex')
%%
-%% Written in 2010 by Manuel Pegourie-Gonnard.
-%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-compat.dtx' for details.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
\RequirePackage{luatexbase-compat}
\catcode64 11
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-compat-plain.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-compat-plain.tex
index 63de4caa7c3..e60b83bfaff 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-compat-plain.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-compat-plain.tex
@@ -6,10 +6,7 @@
%%
%% luatexbase-compat.dtx (with options: `testplain')
%%
-%% Written in 2010 by Manuel Pegourie-Gonnard.
-%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-compat.dtx' for details.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
\input luatexbase-compat.sty
\catcode64 11
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-loader-latex.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-loader-latex.tex
index 67164f890a4..bc76deccfb2 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-loader-latex.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-loader-latex.tex
@@ -6,10 +6,7 @@
%%
%% luatexbase-loader.dtx (with options: `testlatex')
%%
-%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
-%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-loader.dtx' for details.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
\RequirePackage{luatexbase-loader}
\catcode64 11
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-loader-plain.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-loader-plain.tex
index 87d93aa86f7..996ccd9b129 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-loader-plain.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-loader-plain.tex
@@ -6,10 +6,7 @@
%%
%% luatexbase-loader.dtx (with options: `testplain')
%%
-%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
-%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-loader.dtx' for details.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
\input luatexbase-loader.sty
\catcode64 11
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-loader.lua b/Master/texmf-dist/doc/luatex/luatexbase/test-loader.lua
index 7917a288f58..7aee8008ed7 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-loader.lua
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-loader.lua
@@ -6,10 +6,7 @@
--
-- luatexbase-loader.dtx (with options: `testdummy')
--
--- Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
---
--- This work is under the CC0 license.
--- See source file 'luatexbase-loader.dtx' for details.
+-- See the aforementioned source file(s) for copyright and licensing information.
--
return true
--
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-loader.sub.lua b/Master/texmf-dist/doc/luatex/luatexbase/test-loader.sub.lua
index f8a868ee817..8c9c9b34365 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-loader.sub.lua
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-loader.sub.lua
@@ -6,10 +6,7 @@
--
-- luatexbase-loader.dtx (with options: `testdummy')
--
--- Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
---
--- This work is under the CC0 license.
--- See source file 'luatexbase-loader.dtx' for details.
+-- See the aforementioned source file(s) for copyright and licensing information.
--
return true
--
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-mcb-latex.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-mcb-latex.tex
index 8a242cbb08b..a8527067a18 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-mcb-latex.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-mcb-latex.tex
@@ -6,10 +6,7 @@
%%
%% luatexbase-mcb.dtx (with options: `testlatex')
%%
-%% Copyright (C) 2009 by Elie Roux <elie.roux@telecom-bretagne.eu>
-%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-mcb.dtx' for details.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
\RequirePackage{luatexbase-mcb}
\catcode 64 11
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-mcb-plain.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-mcb-plain.tex
index d98dd536ec7..7108e4910d6 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-mcb-plain.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-mcb-plain.tex
@@ -6,10 +6,7 @@
%%
%% luatexbase-mcb.dtx (with options: `testplain')
%%
-%% Copyright (C) 2009 by Elie Roux <elie.roux@telecom-bretagne.eu>
-%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-mcb.dtx' for details.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
\input luatexbase-mcb.sty
\catcode 64 11
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-mcb.lua b/Master/texmf-dist/doc/luatex/luatexbase/test-mcb.lua
index c760299d844..6172127059d 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-mcb.lua
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-mcb.lua
@@ -6,10 +6,7 @@
--
-- luatexbase-mcb.dtx (with options: `testlua')
--
--- Copyright (C) 2009 by Elie Roux <elie.roux@telecom-bretagne.eu>
---
--- This work is under the CC0 license.
--- See source file 'luatexbase-mcb.dtx' for details.
+-- See the aforementioned source file(s) for copyright and licensing information.
--
local msg = texio.write_nl
local function sample(head,...)
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 4e583d54ac4..ec25bb52afa 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-latex.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-latex.tex
@@ -6,10 +6,7 @@
%%
%% luatexbase-modutils.dtx (with options: `testlatex')
%%
-%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
-%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-modutils.dtx' for details.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
\RequirePackage{luatexbase-modutils}
\RequireLuaModule{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 9e256822c7f..1829334411e 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-plain.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-modutils-plain.tex
@@ -6,10 +6,7 @@
%%
%% luatexbase-modutils.dtx (with options: `testplain')
%%
-%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
-%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-modutils.dtx' for details.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
\input luatexbase-modutils.sty
\RequireLuaModule{test-modutils}
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-modutils.lua b/Master/texmf-dist/doc/luatex/luatexbase/test-modutils.lua
index 14218185f60..f12d755ad14 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-modutils.lua
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-modutils.lua
@@ -6,10 +6,7 @@
--
-- luatexbase-modutils.dtx (with options: `testdummy')
--
--- Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
---
--- This work is under the CC0 license.
--- See source file 'luatexbase-modutils.dtx' for details.
+-- See the aforementioned source file(s) for copyright and licensing information.
--
local err, warn, info, log = luatexbase.provides_module {
name = 'test-modutils',
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-regs-latex.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-regs-latex.tex
index 6a0ec8c8baa..db8f9a83e0c 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-regs-latex.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-regs-latex.tex
@@ -6,10 +6,7 @@
%%
%% luatexbase-regs.dtx (with options: `testlatex')
%%
-%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
-%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-regs.dtx' for details.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
\RequirePackage{luatexbase-regs}
\def\checkregister#1{%
diff --git a/Master/texmf-dist/doc/luatex/luatexbase/test-regs-plain.tex b/Master/texmf-dist/doc/luatex/luatexbase/test-regs-plain.tex
index 81581305bd2..bc51cf58e32 100644
--- a/Master/texmf-dist/doc/luatex/luatexbase/test-regs-plain.tex
+++ b/Master/texmf-dist/doc/luatex/luatexbase/test-regs-plain.tex
@@ -6,10 +6,7 @@
%%
%% luatexbase-regs.dtx (with options: `testplain')
%%
-%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
-%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-regs.dtx' for details.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
\input luatexbase-regs.sty
\def\checkregister#1{%
diff --git a/Master/texmf-dist/source/luatex/luatexbase/Makefile b/Master/texmf-dist/source/luatex/luatexbase/Makefile
index 03784a546cd..6fdc7fb4693 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/Makefile
+++ b/Master/texmf-dist/source/luatex/luatexbase/Makefile
@@ -1,7 +1,7 @@
# Makefile for luatexbase
NAME = luatexbase
-DTX = $(wildcard *.dtx)
+DTX = $(wildcard luatexbase*.dtx)
DOC = $(patsubst %.dtx, %.pdf, $(DTX))
DTXSTY = lltxb-dtxstyle.tex
@@ -23,8 +23,13 @@ UNPACKED_MODUTILS = luatexbase-modutils.sty modutils.lua test-modutils.lua \
UNPACKED_COMPAT = luatexbase-compat.sty \
test-compat-plain.tex test-compat-latex.tex
UNPACKED_BASE = luatexbase.sty test-base-plain.tex test-base-latex.tex
+UNPACKED_LUATEX = luatex.sty test-luatex1.tex test-luatex2.tex \
+ test-luatex3.tex test-luatex4.tex test-luatex5.tex
UNPACKED = $(UNPACKED_MCB) $(UNPACKED_REGS) $(UNPACKED_ATTR) $(UNPACKED_CCTB) \
$(UNPACKED_LOADER) $(UNPACKED_MODUTILS) $(UNPACKED_COMPAT) \
+ $(UNPACKED_BASE) $(UNPACKED_LUATEX)
+UNPACKEDTL = $(UNPACKED_MCB) $(UNPACKED_REGS) $(UNPACKED_ATTR) $(UNPACKED_CCTB) \
+ $(UNPACKED_LOADER) $(UNPACKED_MODUTILS) $(UNPACKED_COMPAT) \
$(UNPACKED_BASE)
COMPILED = $(DOC)
GENERATED = $(COMPILED) $(UNPACKED)
@@ -36,8 +41,8 @@ TMP_LOADER = $(TEST_LOADER).tex
TEST_MCB = test-mcb-aux.tex
# Files grouped by installation location
-RUNFILES = $(filter-out test-%, $(UNPACKED))
-DOCFILES = $(DOC) $(filter test-%, $(UNPACKED)) README TODO Changes
+RUNFILES = $(filter-out test-%, $(UNPACKEDTL))
+DOCFILES = $(DOC) $(filter test-%, $(UNPACKEDTL)) README TODO Changes
SRCFILES = $(DTX) Makefile
# The following definitions should be equivalent
@@ -67,7 +72,7 @@ DO_LATEXMK = latexmk -pdf -silent $< >/dev/null
# Main targets definition
all: $(GENERATED)
check: check-regs check-attr check-cctb check-loader check-modutils check-mcb \
- check-compat check-base
+ check-compat check-base check-luatex
doc: $(COMPILED)
unpack: $(UNPACKED)
ctan: check $(CTAN_ZIP)
@@ -82,7 +87,7 @@ luatexbase.%.lua: %.lua
$(UNPACKED_MCB): luatexbase-mcb.dtx
$(DO_TEX)
- echo \\\\relax > $(TEST_MCB)
+ echo "\\\relax" > $(TEST_MCB)
$(UNPACKED_REGS): luatexbase-regs.dtx
$(DO_TEX)
@@ -105,6 +110,9 @@ $(UNPACKED_COMPAT): luatexbase-compat.dtx
$(UNPACKED_BASE): luatexbase.dtx
$(DO_TEX)
+$(UNPACKED_LUATEX): luatex.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
@@ -138,6 +146,13 @@ check-base: $(UNPACKED_BASE)
luatex --interaction=batchmode test-base-plain.tex >/dev/null
lualatex --interaction=batchmode test-base-latex.tex >/dev/null
+check-luatex: install-runfiles
+ $(TESTENV) luatex --interaction=batchmode test-luatex1.tex >/dev/null
+ $(TESTENV) lualatex --interaction=batchmode test-luatex2.tex >/dev/null
+ #$(TESTENV) lualatex --interaction=batchmode test-luatex3.tex >/dev/null
+ $(TESTENV) lualatex --interaction=batchmode test-luatex4.tex >/dev/null
+ $(TESTENV) luatex --interaction=batchmode test-luatex5.tex >/dev/null
+
$(CTAN_ZIP): $(SOURCE) $(COMPILED) $(TDS_ZIP)
@echo "Making $@ for CTAN upload."
@$(RM) -- $@
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-attr.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-attr.dtx
index 78602d36e26..923ad973e64 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-attr.dtx
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-attr.dtx
@@ -1,8 +1,7 @@
% \iffalse meta-comment
%
-% Written in 2009, 2010 by Manuel Pégourié-Gonnard and Élie Roux.
-% <mpg@elzevir.fr>
-% <elie.roux@telecom-bretagne.eu>
+% Copyright 2009, 2010 by Élie Roux <elie.roux@telecom-bretagne.eu>
+% Copyright 2010, 2011 by Manuel Pégourié-Gonnard <mpg@elzevir.fr>
%
% This work is under the CC0 license.
%
@@ -35,10 +34,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 the aforementioned source file(s) for copyright and licensing information.
\endpreamble
@@ -113,7 +109,7 @@ See source file '\inFileName' for details.
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \pkdate{luatexbase-attr}{v0.31 2011-05-21}
+% \pkdate{luatexbase-attr}{v0.4 2011-05-24}
%
% \maketitle
%
@@ -180,48 +176,48 @@ See source file '\inFileName' for details.
%
% \subsubsection{Preliminaries}
%
-% Reload protection, especially for \plaintex.
-%
-% \begin{macrocode}
- \csname lltxb@attr@loaded\endcsname
-\expandafter\let\csname lltxb@attr@loaded\endcsname\endinput
-% \end{macrocode}
-%
-% Catcode defenses.
+% Catcode defenses and reload protection.
%
% \begin{macrocode}
-\begingroup
+\begingroup\catcode61\catcode48\catcode32=10\relax% = and space
\catcode123 1 % {
\catcode125 2 % }
\catcode 35 6 % #
- \toks0{}%
- \def\x{}%
+ \toks0\expandafter{\expandafter\endlinechar\the\endlinechar}%
+ \edef\x{\endlinechar13}%
\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 13 5 % carriage return
+ \y 61 12 % =
+ \y 32 10 % space
+ \y 123 1 % {
+ \y 125 2 % }
+ \y 35 6 % #
+ \y 64 11 % @ (letter)
+ \y 10 12 % new line ^^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 58 12 % :
\y 60 12 % <
- \y 61 12 % =
- \y 64 11 % @ (letter)
\y 62 12 % >
- \y 95 12 % _ (other)
+ \y 91 12 % [
+ \y 93 12 % ]
+ \y 94 7 % ^
+ \y 95 8 % _
\y 96 12 % `
- \edef\y#1{\endgroup\edef#1{\the\toks0\relax}\x}%
-\expandafter\y\csname lltxb@attr@AtEnd\endcsname
+ \toks0\expandafter{\the\toks0 \relax\noexpand\endinput}%
+ \edef\y#1{\noexpand\expandafter\endgroup%
+ \noexpand\ifx#1\relax \edef#1{\the\toks0}\x\relax%
+ \noexpand\else \noexpand\expandafter\noexpand\endinput%
+ \noexpand\fi}%
+\expandafter\y\csname luatexbase@attr@sty@endinput\endcsname%
% \end{macrocode}
%
% Package declaration.
@@ -234,7 +230,7 @@ See source file '\inFileName' for details.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-attr}[2011/05/21 v0.31 Attributes allocation for LuaTeX]
+\x{luatexbase-attr}[2011/05/24 v0.4 Attributes allocation for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
@@ -259,8 +255,7 @@ See source file '\inFileName' for details.
This package can only be used with the LuaTeX engine^^J%
(command `lualatex' or `luatex').^^J%
Package loading has been stopped to prevent additional errors.}
- \lltxb@attr@AtEnd
- \expandafter\endinput
+ \expandafter\luatexbase@attr@sty@endinput%
\fi
% \end{macrocode}
%
@@ -320,14 +315,13 @@ See source file '\inFileName' for details.
\fi}
% \end{macrocode}
%
-% Helper macro |\unsetluatexattribute|: wrapper around the Lua function.
+% Helper macro |\unsetluatexattribute|.
%
% \begin{macrocode}
+\newcount\lltxb@attr@unsetvalue
+\lltxb@attr@unsetvalue=\ifnum\luatexversion<37 -1\else -2147483647\fi\relax
\def\unsetluatexattribute#1{%
- \begingroup\escapechar\m@ne \edef\x{\endgroup
- \noexpand\luatexbase@directlua{%
- luatexbase.unset_attribute("\luatexluaescapestring{\string#1}")}%
- }\x}
+ #1\lltxb@attr@unsetvalue}
% \end{macrocode}
%
% And now the trivial helper macro.
@@ -340,7 +334,7 @@ See source file '\inFileName' for details.
% That's all folks!
%
% \begin{macrocode}
-\lltxb@attr@AtEnd
+\luatexbase@attr@sty@endinput%
%</texpackage>
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx
index b3172c06e24..f869c5bfa3d 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-cctb.dtx
@@ -1,8 +1,7 @@
% \iffalse meta-comment
%
-% Written in 2009, 2010 by Manuel Pégourié-Gonnard and Élie Roux.
-% <mpg@elzevir.fr>
-% <elie.roux@telecom-bretagne.eu>
+% Copyright 2009, 2010 by Élie Roux <elie.roux@telecom-bretagne.eu>
+% Copyright 2010, 2011 by Manuel Pégourié-Gonnard <mpg@elzevir.fr>
%
% This work is under the CC0 license.
%
@@ -35,10 +34,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 the aforementioned source file(s) for copyright and licensing information.
\endpreamble
@@ -113,27 +109,30 @@ See source file '\inFileName' for details.
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \pkdate{luatexbase-cctb}{v0.3 2010-05-27}
+% \pkdate{luatexbase-cctb}{v0.4 2011-05-24}
%
% \maketitle
%
% \begin{abstract}
% In addition to the registers existing in \tex and \etex, \luatex introduces
% a new concept: catcode tables. This package takes care of catcode table
-% allocation just like Plain TeX and LaTeX do for other registers.
+% allocation just like Plain TeX and LaTeX do for other registers. It also
+% provides a few handy macros from common use cases.
% \end{abstract}
%
% \tableofcontents
%
% \section{Documentation}
%
+% \subsection{Allocation and setting}
+%
% The main macro defined here is |\newluatexcatcodetable|. It behaves the same
-% as |\newbox|. Additonally, the newly allocated catcode table is initialised
+% as |\newbox|. Additionally, the newly allocated catcode table is initialised
% to the catcodes of Ini\tex. In order to help you define the catcode tables
% (once they are allocated), two helper macros are available.
%
% \begin{quote}
-% \cs{setcatcoderange}\marg{from}\marg{to}\marg{value}
+% \cs{SetCatcodeRange}\marg{from}\marg{to}\marg{value}
% \end{quote}
% Set all characters code in the range \meta{from}--\meta{to} to the given
% catcode \meta{value}.
@@ -144,9 +143,10 @@ See source file '\inFileName' for details.
% Set a previously allocated \meta{table} to the catcodes given by executing
% \meta{catcode statements}. Note that \meta{table} must not be the current
% active catcode table. You may, however, load another catcode table in your
-% \meta{catcode statements}.
+% \meta{catcode statements} (if you don't, then the current catcodes will be
+% used as a basis).
%
-% For your convenience, a few catcode tables are prefined:
+% For your convenience, a few catcode tables are predefined:
% \begin{itemize}
% \item |\CatcodeTableIniTeX|: Ini\tex catcodes.
% \item |\CatcodeTableString|: the catcode regime used by |\string| and
@@ -161,14 +161,28 @@ See source file '\inFileName' for details.
% |\endlinechar| is not adjusted (it should be 32).
% \end{itemize}
%
-% Various Lua function accept a catcode table number as argument. In order to
-% use them, the package writer needs to know the number of an allocated
-% catcode table. Since |\chardef| is used for the definition of the control
-% sequence, this is rather easy to do. However, for extra ease of use, the
-% numbers are also directly accessible from Lua as the value of the table
-% |luatexbase.catcodetables|, whose keys is the name of the control sequence
-% (without any leading backslash). Moreover, nickames are available for the
-% predefined catcode tables:
+% \subsection{Access from Lua}
+%
+% Various Lua functions, such as |tex.print| accept a catcode table number as
+% argument. In order to use in Lua the catcode tables allocated in \tex, the
+% package writer needs to know their number. Since |\chardef| is used for the
+% definition of the control sequence, this is rather easy to do. However, for
+% extra ease of use, the numbers are also directly accessible from Lua as the
+% value of the table |luatexbase.catcodetables|, whose keys is the name of the
+% control sequence (without any leading backslash). For example, after
+% \begin{quote}
+% |\newluatexcatcodetable\mycatcodes|
+% \end{quote}
+% the variable |luatexbase.catcodetables.mycatcodes| will hold the number of
+% the catcode table |\mycatcodes|. You will usually want to do
+% \begin{quote}
+% |local mycatcodes = luatexbase.catcodetables.mycatcodes|
+% \end{quote}
+% at the beginning of your Lua module (assuming it is loaded after the catcode
+% table has been allocated) and then use |tex.print(mycatcodes, ...)| in the
+% rest of your Lua code.
+%
+% Also, nicknames are available for the predefined catcode tables:
% \begin{itemize}
% \item |CatcodeTableIniTeX| = |ini|,
% \item |CatcodeTableString| = |string|,
@@ -178,6 +192,76 @@ See source file '\inFileName' for details.
% \item |CatcodeTableExpl| = |expl| = |expl3|,
% \end{itemize}
%
+% \subsection{High-level stack interface}
+%
+% In many situations, you want to ensure a proper set of catcodes for some
+% time, then go back to the previous catcodes without using a group. The
+% obvious use case is a package, which may be loaded while unexpected
+% catcodes are active. A pair of macros is provided to deal precisely with
+% this situation.
+% \begin{quote}
+% \cs{BeginCatcodeRegime}\marg{catcode table}\\
+% \meta{code}\\
+% \cs{EndCatcodeRegime}
+% \end{quote}
+% \cs{BeginCatcodeRegime} remembers the current catcode table, then
+% initializes a new one with a copy of the \meta{catcode table} given (so that
+% this table is not changed by anything in \meta{code}), and makes it the
+% active table. \cs{EndCatcodeRegime} restores the previous catcode table.
+%
+% For example, a \latex package might do:
+% \begin{quote}
+% |\BeginCatcodeRegime\CatcodeTableLaTeXAtLetter|\\
+% |% package code|\\
+% |\EndCatcodeRegime|
+% \end{quote}
+% Every catcode change made in the package code will be lost avec
+% \cs{EndCatcodeRegime}; if you want them to survive, please use
+% \cs{AtEndOfPackage} or \cs{AtBeginDocument}.
+%
+% By the way, you may add catcode statements in the argument of
+% \cs{BeginCatcodeRegime} after the name of a catcode table. So the first line
+% of the previous example is equivalent to
+% \begin{quote}
+% |\BeginCatcodeRegime{\CatcodeTableLaTeX \makeatletter}|
+% \end{quote}
+%
+% \subsection{Low-level stack interface}
+%
+% The previous macros use internally two stacks : the first on holds the
+% numbers of the active catcodes tables, so remembering the current table
+% means pushing its number on the stack, and restoring the previously active
+% table means popping it off the stack. This is done with:
+% \begin{quote}
+% \cs{PushCatcodeTableNumStack}\\
+% \cs{PopCatcodeTableNumStack}
+% \end{quote}
+% Note that \cs{PushCatcodeTableNumStack} doesn't change current catcodes
+% but \cs{PopCatcodeTableNumStack} does.
+%
+% The second stack consists of temporary tables, mainly used to hold copies of
+% existing tables. A temporary table are allocated with
+% \cs{IncCatcodeTableStack}, accessed with \cs{CatcodeTableStack} and the
+% freed with \cs{DecCatcodeTableStack}, none of which changes the current
+% table.
+%
+% As an illustration, \cs{BeginCatcodeRegime} does
+% \begin{quote}
+% |\PushCatcodeTableNumStack|\\
+% |\IncCatcodeTableStack|\\
+% |\setluatexcatcodetable\CatcodeTableStack{\luatexcatcodetable#1}%|\\
+% |\luatexcatcodetable\CatcodeTableStack|
+% \end{quote}
+% and \cs{EndCatcodeRegime} is defined as
+% \begin{quote}
+% |\DecCatcodeTableStack|\\
+% |\PopCatcodeTableNumStack|
+% \end{quote}
+%
+% If you choose to use this low-level interface, it is your responsibility to
+% ensure proper balancing of push-pop and inc-dec, as well as making sure that
+% a temporary table is never used after it has been freed.
+%
% \section{Implementation}
%
% \subsection{\tex package}
@@ -188,48 +272,47 @@ See source file '\inFileName' for details.
%
% \subsubsection{Preliminaries}
%
-% Reload protection, especially for \plaintex.
-%
-% \begin{macrocode}
- \csname lltxb@cctb@loaded\endcsname
-\expandafter\let\csname lltxb@cctb@loaded\endcsname\endinput
-% \end{macrocode}
-%
-% Catcode defenses.
+% Catcode defenses and reload protection.
%
% \begin{macrocode}
-\begingroup
+\begingroup\catcode61\catcode48\catcode32=10\relax% = and space
\catcode123 1 % {
\catcode125 2 % }
\catcode 35 6 % #
- \toks0{}%
- \def\x{}%
+ \toks0\expandafter{\expandafter\endlinechar\the\endlinechar}%
+ \edef\x{\endlinechar13}%
\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 13 5 % carriage return
+ \y 61 12 % =
+ \y 32 10 % space
+ \y 123 1 % {
+ \y 125 2 % }
+ \y 35 6 % #
+ \y 64 11 % @ (letter)
+ \y 10 12 % new line ^^J
\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 58 12 % :
\y 60 12 % <
- \y 61 12 % =
- \y 64 11 % @ (letter)
\y 62 12 % >
- \y 95 12 % _ (other)
+ \y 91 12 % [
+ \y 93 12 % ]
+ \y 94 7 % ^
+ \y 95 8 % _
\y 96 12 % `
- \edef\y#1{\endgroup\edef#1{\the\toks0\relax}\x}%
-\expandafter\y\csname lltxb@cctb@AtEnd\endcsname
+ \toks0\expandafter{\the\toks0 \relax\noexpand\endinput}%
+ \edef\y#1{\noexpand\expandafter\endgroup%
+ \noexpand\ifx#1\relax \edef#1{\the\toks0}\x\relax%
+ \noexpand\else \noexpand\expandafter\noexpand\endinput%
+ \noexpand\fi}%
+\expandafter\y\csname luatexbase@cctb@sty@endinput\endcsname%
% \end{macrocode}
%
% Package declaration.
@@ -242,7 +325,7 @@ See source file '\inFileName' for details.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-cctb}[2010/10/10 v0.3 Catcodetable allocation for LuaTeX]
+\x{luatexbase-cctb}[2011/05/24 v0.4 Catcodetable allocation for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
@@ -263,12 +346,11 @@ See source file '\inFileName' for details.
\let\x\PackageError
\fi
\expandafter\endgroup
- \x{luatexbase-attr}{LuaTeX is required for this package. Aborting.}{%
+ \x{luatexbase-cctb}{LuaTeX is required for this package. Aborting.}{%
This package can only be used with the LuaTeX engine^^J%
(command `lualatex' or `luatex').^^J%
Package loading has been stopped to prevent additional errors.}
- \lltxb@cctb@AtEnd
- \expandafter\endinput
+ \expandafter\luatexbase@cctb@sty@endinput%
\fi
% \end{macrocode}
%
@@ -299,15 +381,21 @@ See source file '\inFileName' for details.
\luatexbase@ensure@primitive{savecatcodetable}
% \end{macrocode}
%
-% \subsubsection{User macros}
+% \subsubsection{Allocation and temporary tables}
%
-% The allocation macro. Allocate tables starting with 1, since table 0 is
-% the default table. Allocate only odd numbers to allow using even numbers
-% as a stack.
+% Counters for the allocated and temporary tables.
%
% \begin{macrocode}
\newcount\lltxb@catcodetable@alloc
\lltxb@catcodetable@alloc\m@ne
+\newcount\CatcodeTableStack
+\CatcodeTableStack\z@
+% \end{macrocode}
+%
+% The allocation macro. Allocate only odd numbers to allow using even
+% numbers for temporary tables.
+%
+% \begin{macrocode}
\def\newluatexcatcodetable#1{%
\ifnum\lltxb@catcodetable@alloc<65535\relax
\global\advance\lltxb@catcodetable@alloc\tw@
@@ -324,6 +412,30 @@ See source file '\inFileName' for details.
\fi}
% \end{macrocode}
%
+% Allocate a new temporary table, using even numbers.
+%
+% \begin{macrocode}
+\def\IncCatcodeTableStack{%
+ \ifnum\CatcodeTableStack<65534\relax
+ \global\advance\CatcodeTableStack\tw@
+ \else
+ \errmessage{CatcodeTableStack overflow}%
+ \fi}
+% \end{macrocode}
+%
+% Free a temporary table.
+%
+% \begin{macrocode}
+\def\DecCatcodeTableStack{%
+ \ifnum\CatcodeTableStack>\z@
+ \global\advance\CatcodeTableStack-2\relax
+ \else
+ \errmessage{CatcodeTableStack underflow}%
+ \fi}
+% \end{macrocode}
+%
+% \subsubsection{Setting catcode tables}
+%
% A small patch to get two new counters in Plain too.
%
% \begin{macrocode}
@@ -338,7 +450,7 @@ See source file '\inFileName' for details.
% Set the catcodes for a range of characters.
%
% \begin{macrocode}
-\def\setcatcoderange#1#2#3{%
+\def\SetCatcodeRange#1#2#3{%
\edef\luaSCR@temp{%
\noexpand\@tempcnta=\the\@tempcnta
\noexpand\@tempcntb=\the\@tempcntb
@@ -354,6 +466,29 @@ See source file '\inFileName' for details.
\luaSCR@temp}
% \end{macrocode}
%
+% Make \cs{SetCatcodeRange} available with its old name.
+%
+% \begin{macrocode}
+\def\lltxb@synonym#1#2{%
+ \def#1{%
+ \begingroup
+ \ifdefined\PackageWarning
+ \let\x\PackageWarning
+ \else
+ \def\x####1####2{%
+ \begingroup \endlinechar10
+ \message{Package ####1 warning: ####2}%
+ \endgroup}
+ \fi
+ \expandafter\endgroup
+ \x{luatex}{\string#1 is deprecated^^J%
+ and will be removed in the next version of the package.^^J%
+ Please use \string#2 instead.}
+ \let#1#2%
+ #1}}
+\lltxb@synonym \setcatcoderange \SetCatcodeRange
+% \end{macrocode}
+%
% Set a catcode table.
%
% \begin{macrocode}
@@ -381,8 +516,8 @@ See source file '\inFileName' for details.
\catcode0 12 % nul
\catcode13 12 % carriage return
\catcode37 12 % percent
- \setcatcoderange{65}{90}{12}% A-Z
- \setcatcoderange{97}{122}{12}% a-z
+ \SetCatcodeRange{65}{90}{12}% A-Z
+ \SetCatcodeRange{97}{122}{12}% a-z
\catcode92 12 % backslash
\catcode127 12 }
% \end{macrocode}
@@ -400,8 +535,9 @@ See source file '\inFileName' for details.
\newluatexcatcodetable\CatcodeTableLaTeX
\setluatexcatcodetable\CatcodeTableLaTeX{%
\luatexcatcodetable\CatcodeTableIniTeX
- \setcatcoderange{0}{31}{15}%
+ \SetCatcodeRange{0}{31}{15}%
\catcode9 10 % tab
+ \catcode10 12 % newline
\catcode12 13 % form feed
\catcode13 5 % carriage return
\catcode35 6 % hash
@@ -436,16 +572,76 @@ See source file '\inFileName' for details.
}
% \end{macrocode}
%
-% Finally do the shortcuts.
+% Now do the shortcuts.
%
% \begin{macrocode}
\luatexbase@directlua{luatexbase.catcodetable_do_shortcuts()}
% \end{macrocode}
%
+% \subsubsection{Catcode table number stack and regimes}
+%
+% The stack is implemented as a list of (brace-enclosed) \tex arguments.
+% Initially, in contains only $0$, the number of the active table when
+% \luatex starts.
+%
+% \begin{macrocode}
+\def\lltxb@cctb@numstack{0}
+% \end{macrocode}
+%
+% Pushing a number on the stack actually means adding it to the beginning
+% of the list (ie, unshifting it).
+%
+% \begin{macrocode}
+\def\PushCatcodeTableNumStack{%
+ \xdef\lltxb@cctb@numstack{{\the\luatexcatcodetable}\lltxb@cctb@numstack}}
+% \end{macrocode}
+%
+% Popping a number off the stack means shifting it.
+%
+% \begin{macrocode}
+\def\PopCatcodeTableNumStack{%
+ \expandafter\lltxb@cctb@numstack@pop\lltxb@cctb@numstack\@nil}
+\def\lltxb@cctb@numstack@pop#1#2\@nil{%
+ \ifx\empty#2\empty
+ \begingroup
+ \ifdefined\PackageWarning
+ \let\x\PackageWarning
+ \else
+ \def\x####1####2{%
+ \begingroup \endlinechar10
+ \message{Package ####1 warning: ####2}%
+ \endgroup}%
+ \fi
+ \expandafter\endgroup
+ \x{luatexbase-cctb}{Popping from an empty CatcodeTableNumStack}%
+ \luatexcatcodetable\z@
+ \else
+ \gdef\lltxb@cctb@numstack{#2}%
+ \luatexcatcodetable#1\relax
+ \fi}
+% \end{macrocode}
+%
+% Now the catcode regime pseudo-environment as presented in the
+% documentation.
+%
+% \begin{macrocode}
+\def\BeginCatcodeRegime#1{%
+ \PushCatcodeTableNumStack
+ \IncCatcodeTableStack
+ \setluatexcatcodetable\CatcodeTableStack{\luatexcatcodetable#1}%
+ \luatexcatcodetable\CatcodeTableStack}
+% \end{macrocode}
+%
+% \begin{macrocode}
+\def\EndCatcodeRegime{%
+ \DecCatcodeTableStack
+ \PopCatcodeTableNumStack}
+% \end{macrocode}
+%
% That's all, folks!
%
% \begin{macrocode}
-\lltxb@cctb@AtEnd
+\luatexbase@cctb@sty@endinput%
%</texpackage>
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-compat.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-compat.dtx
index e518e0d6695..4da25225890 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-compat.dtx
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-compat.dtx
@@ -1,7 +1,6 @@
% \iffalse meta-comment
%
-% Written in 2010 by Manuel Pégourié-Gonnard.
-% <mpg@elzevir.fr>
+% Copyright 2010, 2011 by Manuel Pégourié-Gonnard <mpg@elzevir.fr>
%
% This work is under the CC0 license.
%
@@ -15,11 +14,6 @@
% Documentation:
% pdflatex luatexbase-compat.dtx
%
-% The class ltxdoc loads the configuration file ltxdoc.cfg
-% if available. Here you can specify further options, e.g.
-% use A4 as paper format:
-% \PassOptionsToClass{a4paper}{article}
-%
%<*ignore>
\begingroup
\def\x{LaTeX2e}%
@@ -37,10 +31,7 @@
\preamble
-Written in 2010 by Manuel Pegourie-Gonnard.
-
-This work is under the CC0 license.
-See source file '\inFileName' for details.
+See the aforementioned source file(s) for copyright and licensing information.
\endpreamble
@@ -102,15 +93,20 @@ See source file '\inFileName' for details.
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \pkdate{luatexbase-compat}{2010/10/10 v0.3}
+% \pkdate{luatexbase-compat}{2011/05/24 v0.4}
%
% \maketitle
%
% \begin{abstract}
% The \luatex manual is very clear: everything may change. This package
% provides tools to help package writers deal with the changes. It helps
-% supporting \luatex versions down to 0.25.4, and is regularly tested with
-% \luatex 0.40.6 (\texlive 2009) and from trunk.
+% supporting \luatex versions down to 0.25.4, and is tested with
+% \luatex 0.40.6 (\texlive 2009), \luatex 0.60.2 (\texlive 2010) and current
+% beta versions.
+%
+% The supported formats are Plain and \latex adapted for \luatex as provided
+% by \texlive and MiK\tex (see \file{lualatex-doc.pdf} section~4 for details
+% about these formats).
% \end{abstract}
%
% \tableofcontents
@@ -119,7 +115,8 @@ See source file '\inFileName' for details.
%
% Three problems are currently addressed by this package: changes in the
% syntax of |\directlua|, version information, and variable policies for
-% primitives activation and naming (in \luatex itself as well as in \texlive).
+% primitives activation and naming (in \luatex itself as well as in the
+% formats provided by distributions).
%
% \medskip
%
@@ -132,8 +129,8 @@ See source file '\inFileName' for details.
%
% This package provides a macro |\luatexbase@directlua| that expands to
% |\directlua0| on \luatex 0.35 and lower (where the number is mandatory), and
-% to |\directlua| otherwise. It is a macro in both case so that the number of
-% expansion steps remains constant.
+% to |\directlua| otherwise. It is a macro in both cases so that it always
+% expands in exactly two steps.
%
% \medskip
%
@@ -161,16 +158,16 @@ See source file '\inFileName' for details.
% So, starting with \texlive 2009, the situation is clear: the prefixed
% version of the \luatex primitives is always available. But in earlier
% versions (\texlive 2008, \luatex 0.25.4) those primitives were available
-% only with their natural names. Also, it is theoretically possible, however
-% unlikely, that the prefixed primitives are not available for some reason.
+% only with their natural names. The primitives provided by \etex and pdf\tex
+% on the other hand, are always available.
%
% \begin{quote}
% \cs{luatexbase@ensure@primitive}\marg{name}
% \end{quote}
% The tool provided to deal with that is \cs{luatexbase@ensure@primitive},
-% whose argument is a primitive name (without a leading backslash nor any
-% |luatex| prefix, eg just |{latelua}|). It makes sure that the primitive gets
-% available as \cs{luatex\meta{name}}.
+% whose argument is a \luatex primitive name (without a leading backslash nor
+% any |luatex| prefix, eg just |{latelua}|). It makes sure that the primitive
+% gets available as \cs{luatex\meta{name}}.
%
% \textbf{Warning.} In particular circumstances, this macro may fail silently
% for primitives whose natural name starts with |luatex|, hence such
@@ -189,7 +186,7 @@ See source file '\inFileName' for details.
% to use (except |\directlua| again).
%
% This package doesn't try to activate every primitive, since it would require
-% and extensive list of primitives for each version of \luatex, so it seems
+% an extensive list of primitives for each version of \luatex, so it seems
% simpler to leave that burden on package writers.
%
% \section{Implementation}
@@ -200,48 +197,46 @@ See source file '\inFileName' for details.
%
% \subsection{Preliminaries}
%
-% Reload protection, especially for \plaintex.
-%
-% \begin{macrocode}
- \csname lltxb@compat@loaded\endcsname
-\expandafter\let\csname lltxb@compat@loaded\endcsname\endinput
-% \end{macrocode}
-%
-% Catcode defenses.
+% Catcode defenses and reload protection.
%
% \begin{macrocode}
-\begingroup
+\begingroup\catcode61\catcode48\catcode32=10\relax% = and space
\catcode123 1 % {
\catcode125 2 % }
\catcode 35 6 % #
- \toks0{}%
- \def\x{}%
+ \toks0\expandafter{\expandafter\endlinechar\the\endlinechar}%
+ \edef\x{\endlinechar13}%
\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 13 5 % carriage return
+ \y 61 12 % =
+ \y 32 10 % space
+ \y 123 1 % {
+ \y 125 2 % }
+ \y 35 6 % #
+ \y 64 11 % @ (letter)
+ \y 10 12 % new line ^^J
\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 58 12 % :
\y 60 12 % <
- \y 61 12 % =
- \y 64 11 % @ (letter)
- \y 62 12 % >
- \y 95 12 % _ (other)
+ \y 91 12 % [
+ \y 93 12 % ]
+ \y 94 7 % ^
\y 96 12 % `
- \edef\y#1{\endgroup\edef#1{\the\toks0\relax}\x}%
-\expandafter\y\csname lltxb@compat@AtEnd\endcsname
+ \toks0\expandafter{\the\toks0 \relax\noexpand\endinput}%
+ \edef\y#1{\noexpand\expandafter\endgroup%
+ \noexpand\ifx#1\relax \edef#1{\the\toks0}\x\relax%
+ \noexpand\else \noexpand\expandafter\noexpand\endinput%
+ \noexpand\fi}%
+\expandafter\y\csname luatexbase@compat@sty@endinput\endcsname%
% \end{macrocode}
%
% Package declaration.
@@ -254,7 +249,7 @@ See source file '\inFileName' for details.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-compat}[2010/10/10 v0.3 Compatibility tools for LuaTeX]
+\x{luatexbase-compat}[2011/05/24 v0.4 Compatibility tools for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
@@ -275,12 +270,11 @@ See source file '\inFileName' for details.
\let\x\PackageError
\fi
\expandafter\endgroup
- \x{luatexbase-attr}{LuaTeX is required for this package. Aborting.}{%
+ \x{luatexbase-compat}{LuaTeX is required for this package. Aborting.}{%
This package can only be used with the LuaTeX engine^^J%
(command `lualatex' or `luatex').^^J%
Package loading has been stopped to prevent additional errors.}
- \lltxb@compat@AtEnd
- \expandafter\endinput
+ \expandafter\luatexbase@compat@sty@endinput%
\fi
% \end{macrocode}
%
@@ -381,7 +375,7 @@ See source file '\inFileName' for details.
% That's all folks!
%
% \begin{macrocode}
-\lltxb@compat@AtEnd
+\luatexbase@compat@sty@endinput%
%</texpackage>
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-loader.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-loader.dtx
index 9d57ac57c86..77b9b9b7773 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-loader.dtx
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-loader.dtx
@@ -1,8 +1,7 @@
% \iffalse meta-comment
%
-% Written in 2009, 2010 by Manuel Pégourié-Gonnard and Élie Roux.
-% <mpg@elzevir.fr>
-% <elie.roux@telecom-bretagne.eu>
+% Copyright 2009-2013 by Élie Roux <elie.roux@telecom-bretagne.eu>
+% Copyright 2010, 2011 by Manuel Pégourié-Gonnard <mpg@elzevir.fr>
%
% This work is under the CC0 license.
%
@@ -35,10 +34,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 the aforementioned source file(s) for copyright and licensing information.
\endpreamble
@@ -116,16 +112,15 @@ See source file '\inFileName' for details.
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \pkdate{luatexbase-loader}{v0.3 2010-05-27}
+% \pkdate{luatexbase-loader}{v0.5 2013-04-13}
%
-% \maketitle
+% \maketitle
%
% \begin{abstract}
% Lua modules are loaded using the |require()| function which, similarly to
-% \tex's |\input|, takes care of locating the file and load it, but also makes
-% a few supplementary checks, for example to avoid loading the same module
-% twice. This package adapts the way the files are searched in order to
-% accommodate the TDS as well as usual Lua naming conventions.
+% \tex's |\input|, takes care of locating the file to be loaded. This package
+% adapts the way the files are searched in order to accommodate the TDS as
+% well as usual Lua naming conventions.
%
% For higher-level functions related to Lua modules, see
% \href{file:luatexbase-modutils.pdf}{\pk{luatexbase-modutils}}, which also
@@ -134,33 +129,22 @@ See source file '\inFileName' for details.
%
% \section{Documentation}
%
-% Starting with \luatex 0.45.0, |require()| uses Kpathsea for file searching
+% Starting with \luatex 0.45, |require()| uses Kpathsea for file searching
% when the library is initialised (which is always the case in \tex mode,
-% unless explicitly disabled by the user). However, it does not respect the
-% Lua convention that |require("foo.bar")| should look for |foo/bar.lua|.
-% \footnote{Support for that has been added in rev 3558 of \luatex, currently
-% unreleased but probably part of \luatex 0.54.} This package implements such
-% behaviour.
-%
-% More precisely, it implements a new kpse searcher that looks for file
-% |foo/bar| using Kpathsea with the format |lua| (that is, search along
-% |LUAINPUTS| and try the following extensions: |.luc|, |.luctex|, |.texluc|,
-% |.lua|, |.luatex|, |.texlua|). If this search fails, it falls back to
-% |foo.bar| (along the same path with the same extensions).
-%
-% Also, older versions of \luatex, such as 0.25.4 (\texlive 2008), don't know
-% about the |lua| format for kpse searching. So, an emulator for this function
-% is provided. The emulator is not perfect, in particular it may find more
-% results than the normal |lua| format search.\footnote{An may also fail to
-% find the file in particular cases, see comments in the implementation for
-% details.} In order to ensure more homogeneous results across versions, this
-% emulator is used as a fall-back when the real |lua| format search doesn't
-% find any result.
-%
-% Finally, a combined version of this new kpse searcher and the original
-% function at |package.loaders[2]| (using first the new loader, then the old
-% one if the new doesn't return any result) is installed as
-% |package.loaders[2]|.
+% unless explicitly disabled by the user). However, it did not respect the
+% Lua convention that |require("foo.bar")| should look for |foo/bar.lua| until
+% version 0.60. \luatex 0.74 ships with Lua 5.2 that has a different loading
+% system.
+%
+% The aim of this package is to have a coherent behaviour between versions of
+% LuaTeX, and to get the loaded file's name printed in the output (\LaTeX
+% style). The first versions did ensure backward compatibilty to \luatex 0.25
+% but as \luatex development is quite fast, this version supports only \luatex
+% 0.45 and higher.
+%
+% More precisely, when asked for |foo.bar| (or |foo.bar.lua|), it first looks
+% for file |foo/bar| using Kpathsea with the format |lua|, and then for
+% |foo.bar|, removing the possible extension.
%
% \section{Implementation}
%
@@ -172,48 +156,46 @@ See source file '\inFileName' for details.
%
% \subsubsection{Preliminaries}
%
-% Reload protection, especially for \plaintex.
-%
-% \begin{macrocode}
- \csname lltxb@loader@loaded\endcsname
-\expandafter\let\csname lltxb@loader@loaded\endcsname\endinput
-% \end{macrocode}
-%
-% Catcode defenses.
+% Catcode defenses and reload protection.
%
% \begin{macrocode}
-\begingroup
+\begingroup\catcode61\catcode48\catcode32=10\relax% = and space
\catcode123 1 % {
\catcode125 2 % }
\catcode 35 6 % #
- \toks0{}%
- \def\x{}%
+ \toks0\expandafter{\expandafter\endlinechar\the\endlinechar}%
+ \edef\x{\endlinechar13}%
\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 13 5 % carriage return
+ \y 61 12 % =
+ \y 32 10 % space
+ \y 123 1 % {
+ \y 125 2 % }
+ \y 35 6 % #
+ \y 64 11 % @ (letter)
+ \y 10 12 % new line ^^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 58 12 % :
+ \y 91 12 % [
+ \y 93 12 % ]
+ \y 94 7 % ^
+ \y 95 8 % _
\y 96 12 % `
- \edef\y#1{\endgroup\edef#1{\the\toks0\relax}\x}%
-\expandafter\y\csname lltxb@loader@AtEnd\endcsname
+ \toks0\expandafter{\the\toks0 \relax\noexpand\endinput}%
+ \edef\y#1{\noexpand\expandafter\endgroup%
+ \noexpand\ifx#1\relax \edef#1{\the\toks0}\x\relax%
+ \noexpand\else \noexpand\expandafter\noexpand\endinput%
+ \noexpand\fi}%
+\expandafter\y\csname luatexbase@loader@sty@endinput\endcsname%
% \end{macrocode}
%
% Package declaration.
@@ -226,7 +208,7 @@ See source file '\inFileName' for details.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-loader}[2010/10/10 v0.3 Lua module loader for LuaTeX]
+\x{luatexbase-loader}[2013/04/13 v0.5 Lua module loader for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
@@ -247,12 +229,11 @@ See source file '\inFileName' for details.
\let\x\PackageError
\fi
\expandafter\endgroup
- \x{luatexbase-attr}{LuaTeX is required for this package. Aborting.}{%
+ \x{luatexbase-loader}{LuaTeX is required for this package. Aborting.}{%
This package can only be used with the LuaTeX engine^^J%
(command `lualatex' or `luatex').^^J%
Package loading has been stopped to prevent additional errors.}
- \lltxb@loader@AtEnd
- \expandafter\endinput
+ \expandafter\luatexbase@loader@sty@endinput%
\fi
% \end{macrocode}
%
@@ -276,8 +257,8 @@ See source file '\inFileName' for details.
% \begin{macrocode}
\luatexbase@directlua{%
local file = "luatexbase.loader.lua"
- local path = assert(kpse.find_file(file, 'tex'),
- "File '"..file.."' no found")
+ local path = assert(kpse.find_file(file, 'lua'),
+ "File '"..file.."' not found")
texio.write_nl("("..path..")")
dofile(path)}
% \end{macrocode}
@@ -285,7 +266,7 @@ See source file '\inFileName' for details.
% That's all, folks!
%
% \begin{macrocode}
-\lltxb@loader@AtEnd
+\luatexbase@loader@sty@endinput%
%</texpackage>
% \end{macrocode}
%
@@ -296,13 +277,18 @@ See source file '\inFileName' for details.
module('luatexbase', package.seeall)
% \end{macrocode}
%
+% Just in case it's called from a \TeX Lua script...
+%
+% \begin{macrocode}
+kpse.set_program_name("luatex")
+% \end{macrocode}
+%
% Emulate (approximatively) kpse's lua format search. More precisely,
% combine the search path of |texmfscripts| and |tex| in order to
% approximate |LUAINPUTS|. But we need to handle suffixes ourselves.
%
% |lua_suffixes| is taken verbatim from Kpathsea's source
-% (\file{tex-file.c}, constant |LUA_SUFFIXES|),\footnote{Unchanged since
-% 2007-07-06, last checked 2010-05-10.}.
+% (\file{tex-file.c}, constant |LUA_SUFFIXES|).\footnote{Last checked 2013-04-12.}
%
% \begin{macrocode}
local lua_suffixes = {
@@ -318,76 +304,42 @@ local function ends_with(suffix, name)
end
% \end{macrocode}
%
-% The search function first builds the list of filenames to be search. For
-% the lua format, kpse always adds a suffix if no (known) suffix is
-% present, so we do the same.
+% Auxiliary function for suffixes: returns the basename of a file if it end
+% by one of the suffixes.
%
% \begin{macrocode}
-function find_file_lua_emul(name)
- local search_list = {}
+local function basename(name)
for _, suffix in ipairs(lua_suffixes) do
if ends_with(suffix, name) then
- search_list = { name }
- break
- else
- table.insert(search_list, name..suffix)
- end
- end
-% \end{macrocode}
-%
-% Now look for each file in this list.
-%
-% \begin{macrocode}
- for _, search_name in ipairs(search_list) do
- local f = kpse.find_file(search_name, 'texmfscripts')
- or kpse.find_file(search_name, 'tex')
-% \end{macrocode}
-%
-% There is a problem with using the |tex| search format: kpse will try to
-% add suffixes from the |TEX_SUFFIXES| list, which may lead to problems
-% if a file like \meta{name}|.lua.tex| exists. We prevent that by checking if
-% the file found ends with the required name. So \meta{name}|.lua| will
-% still be hidden by \meta{name}.|lua.tex| but it seems less bad not to
-% find it than to return an incorrect result.
-%
-% \begin{macrocode}
- if f and ends_with(search_name, f) then
- return f
+ return name:sub(1, -(suffix:len()+1))
end
end
+ return name
end
% \end{macrocode}
%
-% If lua search format is available, use it with emulation as a fall-back,
-% or just use emulation.
-%
-% \begin{macrocode}
-local find_file_lua
-if pcall('kpse.find_file', 'dummy', 'lua') then
- find_file_lua = function (name)
- return kpse.find_file(name, 'lua') or find_file_lua_emul(name)
- end
-else
- find_file_lua = function (name)
- return find_file_lua_emul(name)
- end
-end
-% \end{macrocode}
-%
-% Find the full path corresponding to a module name.
+% The main function, emulating the behaviour of |packages.searchers[2]|,
+% with a small improvement that eliminates the possible extension.
%
% \begin{macrocode}
local function find_module_file(mod)
- return find_file_lua(mod:gsub('%.', '/'), 'lua')
- or find_file_lua(mod, 'lua')
+ local compat = basename(mod):gsub('%.', '/')
+ return kpse.find_file(compat, 'lua') or kpse.find_file(mod, 'lua')
end
% \end{macrocode}
%
% Combined searcher, using primarily the new kpse searcher, and the
-% original as a fall-back.
+% original as a fall-back. Starting from \luatex 0.75, Lua 5.2 is used. Among
+% the changes, |package.loaders| is renamed as |package.searchers|.
+%
+% The main improvement is thus the printing of the filename in the output.
%
% \begin{macrocode}
-local package_loader_two = package.loaders[2]
+local package_loader_two
+if not package.searchers then
+ package.searchers = package.loaders
+end
+package_loader_two = package.searchers[2]
local function load_module(mod)
local file = find_module_file(mod)
if not file then
@@ -413,7 +365,7 @@ end
% Finally install this combined loader as loader 2.
%
% \begin{macrocode}
-package.loaders[2] = load_module
+package.searchers[2] = load_module
%</luamodule>
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-mcb.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-mcb.dtx
index b944cd261e4..8b99a5257c7 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-mcb.dtx
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-mcb.dtx
@@ -1,8 +1,8 @@
% \iffalse meta-comment
%
-% Written in 2009, 2010 by Manuel Pégourié-Gonnard and Élie Roux.
-% <mpg@elzevir.fr>
-% <elie.roux@telecom-bretagne.eu>
+% Copyright 2009, 2010 by Élie Roux <elie.roux@telecom-bretagne.eu>
+% Copyright 2010, 2011 by Manuel Pégourié-Gonnard <mpg@elzevir.fr>
+% Copyright 2013 by Philipp Gesang <philipp.gesang@alumni.uni-heidelberg.de>
%
% This work is under the CC0 license.
%
@@ -35,10 +35,7 @@
\preamble
-Copyright (C) 2009 by Elie Roux <elie.roux@telecom-bretagne.eu>
-
-This work is under the CC0 license.
-See source file '\inFileName' for details.
+See the aforementioned source file(s) for copyright and licensing information.
\endpreamble
@@ -118,7 +115,7 @@ See source file '\inFileName' for details.
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \pkdate{luatexbase-mcb}{2010/10/10 v0.3}
+% \pkdate{luatexbase-mcb}{2013/04/13 v0.5}
%
% \maketitle
%
@@ -286,48 +283,43 @@ See source file '\inFileName' for details.
%
% \subsubsection{Preliminaries}
%
-% Reload protection, especially for \plaintex.
-%
-% \begin{macrocode}
- \csname lltxb@mcb@loaded\endcsname
-\expandafter\let\csname lltxb@mcb@loaded\endcsname\endinput
-% \end{macrocode}
-%
-% Catcode defenses.
+% Catcode defenses and reload protection.
%
% \begin{macrocode}
-\begingroup
+\begingroup\catcode61\catcode48\catcode32=10\relax% = and space
\catcode123 1 % {
\catcode125 2 % }
\catcode 35 6 % #
- \toks0{}%
- \def\x{}%
+ \toks0\expandafter{\expandafter\endlinechar\the\endlinechar}%
+ \edef\x{\endlinechar13}%
\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 13 5 % carriage return
+ \y 61 12 % =
+ \y 32 10 % space
+ \y 123 1 % {
+ \y 125 2 % }
+ \y 35 6 % #
+ \y 64 11 % @ (letter)
+ \y 10 12 % new line ^^J
\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 58 12 % :
+ \y 91 12 % [
+ \y 93 12 % ]
+ \y 94 7 % ^
\y 96 12 % `
- \edef\y#1{\endgroup\edef#1{\the\toks0\relax}\x}%
-\expandafter\y\csname lltxb@mcb@AtEnd\endcsname
+ \toks0\expandafter{\the\toks0 \relax\noexpand\endinput}%
+ \edef\y#1{\noexpand\expandafter\endgroup%
+ \noexpand\ifx#1\relax \edef#1{\the\toks0}\x\relax%
+ \noexpand\else \noexpand\expandafter\noexpand\endinput%
+ \noexpand\fi}%
+\expandafter\y\csname luatexbase@mcb@sty@endinput\endcsname%
% \end{macrocode}
%
% Package declaration.
@@ -340,7 +332,7 @@ See source file '\inFileName' for details.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-mcb}[2010/10/10 v0.3 Callback management for LuaTeX]
+\x{luatexbase-mcb}[2013/04/13 v0.5 Callback management for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
@@ -361,12 +353,11 @@ See source file '\inFileName' for details.
\let\x\PackageError
\fi
\expandafter\endgroup
- \x{luatexbase-attr}{LuaTeX is required for this package. Aborting.}{%
+ \x{luatexbase-mcb}{LuaTeX is required for this package. Aborting.}{%
This package can only be used with the LuaTeX engine^^J%
(command `lualatex' or `luatex').^^J%
Package loading has been stopped to prevent additional errors.}
- \lltxb@mcb@AtEnd
- \expandafter\endinput
+ \expandafter\luatexbase@mcb@sty@endinput%
\fi
% \end{macrocode}
%
@@ -388,7 +379,7 @@ See source file '\inFileName' for details.
% That's all folks!
%
% \begin{macrocode}
-\lltxb@mcb@AtEnd
+\luatexbase@mcb@sty@endinput%
%</texpackage>
% \end{macrocode}
%
@@ -404,11 +395,11 @@ See source file '\inFileName' for details.
module('luatexbase', package.seeall)
local err, warning, info = luatexbase.provides_module({
name = "luatexbase-mcb",
- version = 0.2,
- date = "2010/05/12",
+ version = 0.5,
+ date = "2013/04/13",
description = "register several functions in a callback",
- author = "Hans Hagen, Elie Roux and Manuel Pegourie-Gonnard",
- copyright = "Hans Hagen, Elie Roux and Manuel Pegourie-Gonnard",
+ author = "Hans Hagen, Elie Roux, Manuel Pegourie-Gonnard and Philipp Gesang",
+ copyright = "Hans Hagen, Elie Roux, Manuel Pegourie-Gonnard and Philipp Gesang",
license = "CC0",
})
% \end{macrocode}
@@ -569,7 +560,7 @@ local function listhandler (name)
for _, f in ipairs(callbacklist[name]) do
ret = f.func(head, ...)
if ret == false then
- warn("function '%s' returned false\nin callback '%s'",
+ warning("function '%s' returned false\nin callback '%s'",
f.description, name)
break
end
@@ -743,7 +734,7 @@ function remove_from_callback (name, description)
end
table.remove(l, index)
info("removing '%s'\nfrom '%s'", description, name)
- if table.maxn(l) == 0 then
+ if #l == 0 then
callbacklist[name] = nil
if not lua_callbacks_defaults[name] then
register_callback(name, nil)
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-modutils.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-modutils.dtx
index 81394be2f93..6f500da0acd 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-modutils.dtx
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-modutils.dtx
@@ -1,8 +1,7 @@
% \iffalse meta-comment
%
-% Written in 2009, 2010 by Manuel Pégourié-Gonnard and Élie Roux.
-% <mpg@elzevir.fr>
-% <elie.roux@telecom-bretagne.eu>
+% Copyright 2009-2013 by Élie Roux <elie.roux@telecom-bretagne.eu>
+% Copyright 2010, 2011 by Manuel Pégourié-Gonnard <mpg@elzevir.fr>
%
% This work is under the CC0 license.
%
@@ -35,10 +34,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 the aforementioned source file(s) for copyright and licensing information.
\endpreamble
@@ -115,7 +111,7 @@ See source file '\inFileName' for details.
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \pkdate{luatexbase-modutils}{v0.2 2010-05-12}
+% \pkdate{luatexbase-modutils}{v0.5 2013-04-13}
%
% \maketitle
%
@@ -297,48 +293,46 @@ See source file '\inFileName' for details.
%
% \subsubsection{Preliminaries}
%
-% Reload protection, especially for \plaintex.
-%
-% \begin{macrocode}
- \csname lltxb@modutils@loaded\endcsname
-\expandafter\let\csname lltxb@modutils@loaded\endcsname\endinput
-% \end{macrocode}
-%
-% Catcode defenses.
+% Catcode defenses and reload protection.
%
% \begin{macrocode}
-\begingroup
+\begingroup\catcode61\catcode48\catcode32=10\relax% = and space
\catcode123 1 % {
\catcode125 2 % }
\catcode 35 6 % #
- \toks0{}%
- \def\x{}%
+ \toks0\expandafter{\expandafter\endlinechar\the\endlinechar}%
+ \edef\x{\endlinechar13}%
\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 13 5 % carriage return
+ \y 61 12 % =
+ \y 32 10 % space
+ \y 123 1 % {
+ \y 125 2 % }
+ \y 35 6 % #
+ \y 64 11 % @ (letter)
+ \y 10 12 % new line ^^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 58 12 % :
+ \y 91 12 % [
+ \y 93 12 % ]
+ \y 94 7 % ^
+ \y 95 8 % _
\y 96 12 % `
- \edef\y#1{\endgroup\edef#1{\the\toks0\relax}\x}%
-\expandafter\y\csname lltxb@modutils@AtEnd\endcsname
+ \toks0\expandafter{\the\toks0 \relax\noexpand\endinput}%
+ \edef\y#1{\noexpand\expandafter\endgroup%
+ \noexpand\ifx#1\relax \edef#1{\the\toks0}\x\relax%
+ \noexpand\else \noexpand\expandafter\noexpand\endinput%
+ \noexpand\fi}%
+\expandafter\y\csname luatexbase@modutils@sty@endinput\endcsname%
% \end{macrocode}
%
% Package declaration.
@@ -351,7 +345,7 @@ See source file '\inFileName' for details.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-modutils}[2010/10/10 v0.3 Module utilities for LuaTeX]
+\x{luatexbase-modutils}[2013/04/13 v0.5 Module utilities for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
@@ -372,12 +366,11 @@ See source file '\inFileName' for details.
\let\x\PackageError
\fi
\expandafter\endgroup
- \x{luatexbase-attr}{LuaTeX is required for this package. Aborting.}{%
+ \x{luatexbase-modutils}{LuaTeX is required for this package. Aborting.}{%
This package can only be used with the LuaTeX engine^^J%
(command `lualatex' or `luatex').^^J%
Package loading has been stopped to prevent additional errors.}
- \lltxb@modutils@AtEnd
- \expandafter\endinput
+ \expandafter\luatexbase@modutils@sty@endinput%
\fi
% \end{macrocode}
%
@@ -385,10 +378,10 @@ See source file '\inFileName' for details.
% supporting Lua module and make sure |luaescapestring| is available.
%
% \begin{macrocode}
-\ifdefined\RequirePackage
- \RequirePackage{luatexbase-loader}
-\else
+\expandafter\ifx\csname RequirePackage\endcsname\relax
\input luatexbase-loader.sty
+\else
+ \RequirePackage{luatexbase-loader}
\fi
\luatexbase@directlua{require('luatexbase.modutils')}
\luatexbase@ensure@primitive{luaescapestring}
@@ -456,7 +449,7 @@ See source file '\inFileName' for details.
% \end{macrocode}
%
% \begin{macrocode}
-\lltxb@modutils@AtEnd
+\luatexbase@modutils@sty@endinput%
%</texpackage>
% \end{macrocode}
%
@@ -481,7 +474,7 @@ local modules = modules or {}
%
% \begin{macrocode}
local function date_to_int(date)
- numbers = string.gsub(date, "(%d+)/(%d+)/(%d+)", "%1%2%3")
+ local numbers = string.gsub(date, "(%d+)/(%d+)/(%d+)", "%1%2%3")
return tonumber(numbers)
end
% \end{macrocode}
@@ -559,7 +552,7 @@ function require_module(name, req_date)
local info = modules[name]
if not info then
warn("module '%s' was not properly identified", name)
- elseif version then
+ elseif req_date and info.version then
if not (info.date and date_to_int(info.date) > date_to_int(req_date))
then
warn("module '%s' required in version '%s'\n"
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-regs.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-regs.dtx
index 079b0045fba..f3a29a85868 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase-regs.dtx
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase-regs.dtx
@@ -1,8 +1,7 @@
% \iffalse meta-comment
%
-% Written in 2009, 2010 by Manuel Pégourié-Gonnard and Élie Roux.
-% <mpg@elzevir.fr>
-% <elie.roux@telecom-bretagne.eu>
+% Copyright 2009, 2010 by Élie Roux <elie.roux@telecom-bretagne.eu>
+% Copyright 2010, 2011 by Manuel Pégourié-Gonnard <mpg@elzevir.fr>
%
% This work is under the CC0 license.
%
@@ -16,11 +15,6 @@
% Documentation:
% pdflatex luatexbase-regs.dtx
%
-% The class ltxdoc loads the configuration file ltxdoc.cfg
-% if available. Here you can specify further options, e.g.
-% use A4 as paper format:
-% \PassOptionsToClass{a4paper}{article}
-%
%<*ignore>
\begingroup
\def\x{LaTeX2e}%
@@ -38,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 the aforementioned source file(s) for copyright and licensing information.
\endpreamble
@@ -103,7 +94,7 @@ See source file '\inFileName' for details.
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \pkdate{luatexbase-regs}{2010/10/10 v0.3}
+% \pkdate{luatexbase-regs}{2011/05/24 v0.4}
%
% \maketitle
%
@@ -153,48 +144,50 @@ See source file '\inFileName' for details.
%
% \subsection{Preliminaries}
%
-% Reload protection, especially for \plaintex.
-%
-% \begin{macrocode}
- \csname lltxb@regs@loaded\endcsname
-\expandafter\let\csname lltxb@regs@loaded\endcsname\endinput
-% \end{macrocode}
-%
-% Catcode defenses.
+% Catcode defenses and reload protection.
%
% \begin{macrocode}
-\begingroup
+\begingroup\catcode61\catcode48\catcode32=10\relax% = and space
\catcode123 1 % {
\catcode125 2 % }
\catcode 35 6 % #
- \toks0{}%
- \def\x{}%
+ \toks0\expandafter{\expandafter\endlinechar\the\endlinechar}%
+ \edef\x{\endlinechar13}%
\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 13 5 % carriage return
+ \y 61 12 % =
+ \y 32 10 % space
+ \y 123 1 % {
+ \y 125 2 % }
+ \y 35 6 % #
+ \y 64 11 % @ (letter)
+ \y 10 12 % new line ^^J
+ \y 33 12 % !
+ \y 36 3 % $ $ (in etex.sty)
\y 39 12 % '
\y 40 12 % (
\y 41 12 % )
- \y 42 12 % *
- \y 43 12 % +
- \y 44 12 % ,
+ \y 42 12 % * (in etex.sty)
+ \y 43 12 % + (in etex.sty)
+ \y 44 12 % , (in etex.sty)
\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 58 12 % :
+ \y 60 12 % < (in etex.sty)
+ \y 62 12 % > (in etex.sty)
+ \y 91 12 % [
+ \y 93 12 % ]
+ \y 94 7 % ^
\y 96 12 % `
- \edef\y#1{\endgroup\edef#1{\the\toks0\relax}\x}%
-\expandafter\y\csname lltxb@regs@AtEnd\endcsname
+ \toks0\expandafter{\the\toks0 \relax\noexpand\endinput}%
+ \edef\y#1{\noexpand\expandafter\endgroup%
+ \noexpand\ifx#1\relax \edef#1{\the\toks0}\x\relax%
+ \noexpand\else \noexpand\expandafter\noexpand\endinput%
+ \noexpand\fi}%
+\expandafter\y\csname luatexbase@regs@sty@endinput\endcsname%
% \end{macrocode}
%
% Package declaration.
@@ -207,7 +200,7 @@ See source file '\inFileName' for details.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-regs}[2010/10/10 v0.3 Registers allocation for LuaTeX]
+\x{luatexbase-regs}[2011/05/24 v0.4 Registers allocation for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
@@ -228,12 +221,11 @@ See source file '\inFileName' for details.
\let\x\PackageError
\fi
\expandafter\endgroup
- \x{luatexbase-attr}{LuaTeX is required for this package. Aborting.}{%
+ \x{luatexbase-regs}{LuaTeX is required for this package. Aborting.}{%
This package can only be used with the LuaTeX engine^^J%
(command `lualatex' or `luatex').^^J%
Package loading has been stopped to prevent additional errors.}
- \lltxb@regs@AtEnd
- \expandafter\endinput
+ \expandafter\luatexbase@regs@sty@endinput%
\fi
% \end{macrocode}
%
@@ -415,7 +407,7 @@ See source file '\inFileName' for details.
% That's all folks!
%
% \begin{macrocode}
-\lltxb@regs@AtEnd
+\luatexbase@regs@sty@endinput%
%</texpackage>
% \end{macrocode}
%
diff --git a/Master/texmf-dist/source/luatex/luatexbase/luatexbase.dtx b/Master/texmf-dist/source/luatex/luatexbase/luatexbase.dtx
index 9014b2ac84a..49b0c07749c 100644
--- a/Master/texmf-dist/source/luatex/luatexbase/luatexbase.dtx
+++ b/Master/texmf-dist/source/luatex/luatexbase/luatexbase.dtx
@@ -1,8 +1,7 @@
% \iffalse meta-comment
%
-% Written in 2009, 2010 by Manuel Pégourié-Gonnard and Élie Roux.
-% <mpg@elzevir.fr>
-% <elie.roux@telecom-bretagne.eu>
+% Copyright 2009-2013 by Élie Roux <elie.roux@telecom-bretagne.eu>
+% Copyright 2010, 2011 by Manuel Pégourié-Gonnard <mpg@elzevir.fr>
%
% This work is under the CC0 license.
%
@@ -32,7 +31,7 @@
\preamble
-See source file '\inFileName' for licence and contact information.
+See the aforementioned source file(s) for copyright and licensing information.
\endpreamble
@@ -67,6 +66,7 @@ See source file '\inFileName' for licence and contact information.
%<*driver>
\documentclass{ltxdoc}
\input{lltxb-dtxstyle}
+\luatexbasetrue
\newcommand\subpk[1]{%
\item[\href{luatexbase-#1.pdf}{luatexbase-#1}\normalfont:]}
\begin{document}
@@ -93,7 +93,7 @@ See source file '\inFileName' for licence and contact information.
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \pkdate{luatexbase}{v0.3 2010-05-27}
+% \pkdate{luatexbase}{v0.5 2013-04-13}
%
% \maketitle
%
@@ -122,14 +122,40 @@ See source file '\inFileName' for licence and contact information.
% \subpk{modutils} Lua module declaration, including version checks.
% \end{description}
%
-% The package is mostly stable: it is unlikely that backward-incompatible
-% changes will be made in the future, other than necessary for merging with
-% \pk{luatex.sty}, with which a few sub-packages strongly overlap. If they do
-% happen, such changes will be announced on the development list, and clearly
-% identified in the \file{Changes} file.
-%
-% All sub-packages are tested with \luatex 0.25.4 to 0.60.x and formats based
-% on \plaintex or \latex, as included in \texlive 2008, 2009, and 2010.
+% This package collection is considered stable: no backward-incompatible
+% change should happen in the future, except the removal of the deprecated
+% commands (currently only \cs{setcatcoderange}). It works with the Plain and
+% \latex formats adapted for \luatex as provided by \texlive and MiK\tex.
+% Currently the oldest version supported is 0.40.6 with formats from
+% \texlive 2009 and greater.
+%
+% \subsection{History}
+%
+% The first package for managing \luatex's new resources was the \pk{luatex}
+% package by Heiko Oberdiek. Later, \'Elie Roux wrote \pk{luatextra} which
+% reprised many features of \pk{luatex} with little extensions to some of them
+% and added independant low-level features (currently found in the
+% \pk{modutils} and \pk{mcb} subpackages), as well as user-level things.
+% Later, \pk{luatexbase} was created by Manuel P\'egouri\'e-Gonnard by isolating
+% the general low-level features of \pk{luatextra}, and later expanding on
+% them.
+%
+% For some time there was two conflicting packages controling access to
+% \luatex's resources: \pk{luatex} and \pk{luatexbase}, neither of which was a
+% subset of the other, and with small differences in their overlapping parts
+% (mainly macro names).
+%
+% Then \pk{luatexbase} was expanded by absorbing the features of \pk{luatex}
+% that were previously missing (essentially the advanced scheme for catcode
+% table management). It currently provides the \pk{luatex} package as a
+% wrapper around the relevant subpackages, so that the two are no longer in
+% conflict.
+%
+% \medskip
+%
+% For a detailled history of changes in \pk{luatexbase} since its split from
+% \pk{luatextra}, see the \file{Changes} file in the distribution. For even
+% more details, see the git history.
%
% \section{Implementation}
%
@@ -139,48 +165,43 @@ See source file '\inFileName' for licence and contact information.
%
% \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.
+% Catcode defenses and reload protection.
%
% \begin{macrocode}
-\begingroup
+\begingroup\catcode61\catcode48\catcode32=10\relax% = and space
\catcode123 1 % {
\catcode125 2 % }
\catcode 35 6 % #
- \toks0{}%
- \def\x{}%
+ \toks0\expandafter{\expandafter\endlinechar\the\endlinechar}%
+ \edef\x{\endlinechar13}%
\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 13 5 % carriage return
+ \y 61 12 % =
+ \y 32 10 % space
+ \y 123 1 % {
+ \y 125 2 % }
+ \y 35 6 % #
+ \y 64 11 % @ (letter)
+ \y 10 12 % new line ^^J
\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 58 12 % :
+ \y 91 12 % [
+ \y 93 12 % ]
+ \y 94 7 % ^
\y 96 12 % `
- \edef\y#1{\endgroup\edef#1{\the\toks0\relax}\x}%
-\expandafter\y\csname lltxb@core@AtEnd\endcsname
+ \toks0\expandafter{\the\toks0 \relax\noexpand\endinput}%
+ \edef\y#1{\noexpand\expandafter\endgroup%
+ \noexpand\ifx#1\relax \edef#1{\the\toks0}\x\relax%
+ \noexpand\else \noexpand\expandafter\noexpand\endinput%
+ \noexpand\fi}%
+\expandafter\y\csname luatexbase@sty@endinput\endcsname%
% \end{macrocode}
%
% Package declaration.
@@ -193,7 +214,7 @@ See source file '\inFileName' for licence and contact information.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase}[2010/10/06 v0.3 Module utilities for LuaTeX]
+\x{luatexbase}[2013/04/13 v0.5 Module utilities for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
@@ -214,12 +235,26 @@ See source file '\inFileName' for licence and contact information.
\let\x\PackageError
\fi
\expandafter\endgroup
- \x{luatexbase-attr}{LuaTeX is required for this package. Aborting.}{%
+ \x{luatexbase}{LuaTeX is required for this package. Aborting.}{%
This package can only be used with the LuaTeX engine^^J%
(command `lualatex' or `luatex').^^J%
Package loading has been stopped to prevent additional errors.}
- \lltxb@core@AtEnd
- \expandafter\endinput
+ \expandafter\luatexbase@sty@endinput%
+\fi
+% \end{macrocode}
+%
+% %\subsection{luatex.sty compatibility}
+%
+% Currently, |luatex.sty| has to be loaded before luatexbase, otherwise it
+% raises an error, as the same names are used between luatexbase and luatex.
+%
+% This is a quite strange situation, but we hope to clarify it.
+%
+% \begin{macrocode}
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input luatex.sty
+\else
+ \RequirePackage{luatex}
\fi
% \end{macrocode}
%
@@ -249,7 +284,7 @@ See source file '\inFileName' for licence and contact information.
% This is the end, my friend\dots the end.
%
% \begin{macrocode}
-\lltxb@core@AtEnd
+\luatexbase@sty@endinput%
%</texpackage>
% \end{macrocode}
%
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/attr.lua b/Master/texmf-dist/tex/luatex/luatexbase/attr.lua
index 74ecd6ac07f..e21e47d0c11 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/attr.lua
+++ b/Master/texmf-dist/tex/luatex/luatexbase/attr.lua
@@ -6,10 +6,7 @@
--
-- luatexbase-attr.dtx (with options: `luamodule')
--
--- Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
---
--- This work is under the CC0 license.
--- See source file 'luatexbase-attr.dtx' for details.
+-- See the aforementioned source file(s) for copyright and licensing information.
--
module('luatexbase', package.seeall)
attributes = {}
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/cctb.lua b/Master/texmf-dist/tex/luatex/luatexbase/cctb.lua
index 8d02dbb9b8e..30ebd6aef33 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/cctb.lua
+++ b/Master/texmf-dist/tex/luatex/luatexbase/cctb.lua
@@ -6,10 +6,7 @@
--
-- luatexbase-cctb.dtx (with options: `luamodule')
--
--- Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
---
--- This work is under the CC0 license.
--- See source file 'luatexbase-cctb.dtx' for details.
+-- See the aforementioned source file(s) for copyright and licensing information.
--
module('luatexbase', package.seeall)
catcodetables = {}
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-attr.sty b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-attr.sty
index 28e7ef3d983..fb0ab68989c 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-attr.sty
+++ b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-attr.sty
@@ -6,53 +6,57 @@
%%
%% luatexbase-attr.dtx (with options: `texpackage')
%%
-%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-attr.dtx' for details.
-%%
- \csname lltxb@attr@loaded\endcsname
-\expandafter\let\csname lltxb@attr@loaded\endcsname\endinput
-\begingroup
+\begingroup\catcode61\catcode48\catcode32=10\relax% = and space
\catcode123 1 % {
\catcode125 2 % }
\catcode 35 6 % #
- \toks0{}%
- \def\x{}%
+ \toks0\expandafter{\expandafter\endlinechar\the\endlinechar}%
+ \edef\x{\endlinechar13}%
\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 13 5 % carriage return
+ \y 61 12 % =
+ \y 32 10 % space
+ \y 123 1 % {
+ \y 125 2 % }
+ \y 35 6 % #
+ \y 64 11 % @ (letter)
+ \y 10 12 % new line ^^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 58 12 % :
\y 60 12 % <
- \y 61 12 % =
- \y 64 11 % @ (letter)
\y 62 12 % >
- \y 95 12 % _ (other)
+ \y 91 12 % [
+ \y 93 12 % ]
+ \y 94 7 % ^
+ \y 95 8 % _
\y 96 12 % `
- \edef\y#1{\endgroup\edef#1{\the\toks0\relax}\x}%
-\expandafter\y\csname lltxb@attr@AtEnd\endcsname
+ \toks0\expandafter{\the\toks0 \relax\noexpand\endinput}%
+ \edef\y#1{\noexpand\expandafter\endgroup%
+ \noexpand\ifx#1\relax \edef#1{\the\toks0}\x\relax%
+ \noexpand\else \noexpand\expandafter\noexpand\endinput%
+ \noexpand\fi}%
+\expandafter\y\csname luatexbase@attr@sty@endinput\endcsname%
\begingroup
\expandafter\ifx\csname ProvidesPackage\endcsname\relax
- \def\x#1[#2]{\immediate\write16{Package: #1 #2}}
+ \def\x#1[#2]{%
+ %\immediate\write16{Package: #1 #2}}
+ }
\else
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-attr}[2011/05/21 v0.31 Attributes allocation for LuaTeX]
+\x{luatexbase-attr}[2011/05/24 v0.4 Attributes allocation for LuaTeX]
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input ifluatex.sty
@@ -72,8 +76,7 @@
This package can only be used with the LuaTeX engine^^J%
(command `lualatex' or `luatex').^^J%
Package loading has been stopped to prevent additional errors.}
- \lltxb@attr@AtEnd
- \expandafter\endinput
+ \expandafter\luatexbase@attr@sty@endinput%
\fi
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
@@ -102,14 +105,13 @@
\else
\errmessage{No room for a new \string\attribute}%
\fi}
+\newcount\lltxb@attr@unsetvalue
+\lltxb@attr@unsetvalue=\ifnum\luatexversion<37 -1\else -2147483647\fi\relax
\def\unsetluatexattribute#1{%
- \begingroup\escapechar\m@ne \edef\x{\endgroup
- \noexpand\luatexbase@directlua{%
- luatexbase.unset_attribute("\luatexluaescapestring{\string#1}")}%
- }\x}
+ #1\lltxb@attr@unsetvalue}
\def\setluatexattribute#1#2{%
#1=\numexpr#2\relax}
-\lltxb@attr@AtEnd
+\luatexbase@attr@sty@endinput%
\endinput
%%
%% End of file `luatexbase-attr.sty'.
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-cctb.sty b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-cctb.sty
index 091cc315e14..74a8e27e0a0 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-cctb.sty
+++ b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-cctb.sty
@@ -6,45 +6,46 @@
%%
%% luatexbase-cctb.dtx (with options: `texpackage')
%%
-%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-cctb.dtx' for details.
-%%
- \csname lltxb@cctb@loaded\endcsname
-\expandafter\let\csname lltxb@cctb@loaded\endcsname\endinput
-\begingroup
+\begingroup\catcode61\catcode48\catcode32=10\relax% = and space
\catcode123 1 % {
\catcode125 2 % }
\catcode 35 6 % #
- \toks0{}%
- \def\x{}%
+ \toks0\expandafter{\expandafter\endlinechar\the\endlinechar}%
+ \edef\x{\endlinechar13}%
\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 13 5 % carriage return
+ \y 61 12 % =
+ \y 32 10 % space
+ \y 123 1 % {
+ \y 125 2 % }
+ \y 35 6 % #
+ \y 64 11 % @ (letter)
+ \y 10 12 % new line ^^J
\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 58 12 % :
\y 60 12 % <
- \y 61 12 % =
- \y 64 11 % @ (letter)
\y 62 12 % >
- \y 95 12 % _ (other)
+ \y 91 12 % [
+ \y 93 12 % ]
+ \y 94 7 % ^
+ \y 95 8 % _
\y 96 12 % `
- \edef\y#1{\endgroup\edef#1{\the\toks0\relax}\x}%
-\expandafter\y\csname lltxb@cctb@AtEnd\endcsname
+ \toks0\expandafter{\the\toks0 \relax\noexpand\endinput}%
+ \edef\y#1{\noexpand\expandafter\endgroup%
+ \noexpand\ifx#1\relax \edef#1{\the\toks0}\x\relax%
+ \noexpand\else \noexpand\expandafter\noexpand\endinput%
+ \noexpand\fi}%
+\expandafter\y\csname luatexbase@cctb@sty@endinput\endcsname%
\begingroup
\expandafter\ifx\csname ProvidesPackage\endcsname\relax
\def\x#1[#2]{\immediate\write16{Package: #1 #2}}
@@ -52,7 +53,7 @@
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-cctb}[2010/10/10 v0.3 Catcodetable allocation for LuaTeX]
+\x{luatexbase-cctb}[2011/05/24 v0.4 Catcodetable allocation for LuaTeX]
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input ifluatex.sty
@@ -68,12 +69,11 @@
\let\x\PackageError
\fi
\expandafter\endgroup
- \x{luatexbase-attr}{LuaTeX is required for this package. Aborting.}{%
+ \x{luatexbase-cctb}{LuaTeX is required for this package. Aborting.}{%
This package can only be used with the LuaTeX engine^^J%
(command `lualatex' or `luatex').^^J%
Package loading has been stopped to prevent additional errors.}
- \lltxb@cctb@AtEnd
- \expandafter\endinput
+ \expandafter\luatexbase@cctb@sty@endinput%
\fi
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
@@ -88,6 +88,8 @@
\luatexbase@ensure@primitive{savecatcodetable}
\newcount\lltxb@catcodetable@alloc
\lltxb@catcodetable@alloc\m@ne
+\newcount\CatcodeTableStack
+\CatcodeTableStack\z@
\def\newluatexcatcodetable#1{%
\ifnum\lltxb@catcodetable@alloc<65535\relax
\global\advance\lltxb@catcodetable@alloc\tw@
@@ -102,13 +104,25 @@
\else
\errmessage{No room for a new \string\luatexcatcodetable}%
\fi}
+\def\IncCatcodeTableStack{%
+ \ifnum\CatcodeTableStack<65534\relax
+ \global\advance\CatcodeTableStack\tw@
+ \else
+ \errmessage{CatcodeTableStack overflow}%
+ \fi}
+\def\DecCatcodeTableStack{%
+ \ifnum\CatcodeTableStack>\z@
+ \global\advance\CatcodeTableStack-2\relax
+ \else
+ \errmessage{CatcodeTableStack underflow}%
+ \fi}
\expandafter\ifx\csname @tempcnta\endcsname\relax
\csname newcount\endcsname\@tempcnta
\fi
\expandafter\ifx\csname @tempcntb\endcsname\relax
\csname newcount\endcsname\@tempcntb
\fi
-\def\setcatcoderange#1#2#3{%
+\def\SetCatcodeRange#1#2#3{%
\edef\luaSCR@temp{%
\noexpand\@tempcnta=\the\@tempcnta
\noexpand\@tempcntb=\the\@tempcntb
@@ -122,6 +136,24 @@
\advance\@tempcnta\@ne
\repeat
\luaSCR@temp}
+\def\lltxb@synonym#1#2{%
+ \def#1{%
+ \begingroup
+ \ifdefined\PackageWarning
+ \let\x\PackageWarning
+ \else
+ \def\x####1####2{%
+ \begingroup \endlinechar10
+ \message{Package ####1 warning: ####2}%
+ \endgroup}
+ \fi
+ \expandafter\endgroup
+ \x{luatex}{\string#1 is deprecated^^J%
+ and will be removed in the next version of the package.^^J%
+ Please use \string#2 instead.}
+ \let#1#2%
+ #1}}
+\lltxb@synonym \setcatcoderange \SetCatcodeRange
\def\setluatexcatcodetable#1#2{%
\begingroup
#2%
@@ -134,8 +166,8 @@
\catcode0 12 % nul
\catcode13 12 % carriage return
\catcode37 12 % percent
- \setcatcoderange{65}{90}{12}% A-Z
- \setcatcoderange{97}{122}{12}% a-z
+ \SetCatcodeRange{65}{90}{12}% A-Z
+ \SetCatcodeRange{97}{122}{12}% a-z
\catcode92 12 % backslash
\catcode127 12 }
\newluatexcatcodetable\CatcodeTableOther
@@ -145,8 +177,9 @@
\newluatexcatcodetable\CatcodeTableLaTeX
\setluatexcatcodetable\CatcodeTableLaTeX{%
\luatexcatcodetable\CatcodeTableIniTeX
- \setcatcoderange{0}{31}{15}%
+ \SetCatcodeRange{0}{31}{15}%
\catcode9 10 % tab
+ \catcode10 12 % newline
\catcode12 13 % form feed
\catcode13 5 % carriage return
\catcode35 6 % hash
@@ -172,7 +205,38 @@
\catcode58 11 % colon letter
}
\luatexbase@directlua{luatexbase.catcodetable_do_shortcuts()}
-\lltxb@cctb@AtEnd
+\def\lltxb@cctb@numstack{0}
+\def\PushCatcodeTableNumStack{%
+ \xdef\lltxb@cctb@numstack{{\the\luatexcatcodetable}\lltxb@cctb@numstack}}
+\def\PopCatcodeTableNumStack{%
+ \expandafter\lltxb@cctb@numstack@pop\lltxb@cctb@numstack\@nil}
+\def\lltxb@cctb@numstack@pop#1#2\@nil{%
+ \ifx\empty#2\empty
+ \begingroup
+ \ifdefined\PackageWarning
+ \let\x\PackageWarning
+ \else
+ \def\x####1####2{%
+ \begingroup \endlinechar10
+ \message{Package ####1 warning: ####2}%
+ \endgroup}%
+ \fi
+ \expandafter\endgroup
+ \x{luatexbase-cctb}{Popping from an empty CatcodeTableNumStack}%
+ \luatexcatcodetable\z@
+ \else
+ \gdef\lltxb@cctb@numstack{#2}%
+ \luatexcatcodetable#1\relax
+ \fi}
+\def\BeginCatcodeRegime#1{%
+ \PushCatcodeTableNumStack
+ \IncCatcodeTableStack
+ \setluatexcatcodetable\CatcodeTableStack{\luatexcatcodetable#1}%
+ \luatexcatcodetable\CatcodeTableStack}
+\def\EndCatcodeRegime{%
+ \DecCatcodeTableStack
+ \PopCatcodeTableNumStack}
+\luatexbase@cctb@sty@endinput%
\endinput
%%
%% End of file `luatexbase-cctb.sty'.
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-compat.sty b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-compat.sty
index 88a58875fd7..43852a72b1d 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-compat.sty
+++ b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-compat.sty
@@ -6,45 +6,45 @@
%%
%% luatexbase-compat.dtx (with options: `texpackage')
%%
-%% Written in 2010 by Manuel Pegourie-Gonnard.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-compat.dtx' for details.
-%%
- \csname lltxb@compat@loaded\endcsname
-\expandafter\let\csname lltxb@compat@loaded\endcsname\endinput
-\begingroup
+\begingroup\catcode61\catcode48\catcode32=10\relax% = and space
\catcode123 1 % {
\catcode125 2 % }
\catcode 35 6 % #
- \toks0{}%
- \def\x{}%
+ \toks0\expandafter{\expandafter\endlinechar\the\endlinechar}%
+ \edef\x{\endlinechar13}%
\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 13 5 % carriage return
+ \y 61 12 % =
+ \y 32 10 % space
+ \y 123 1 % {
+ \y 125 2 % }
+ \y 35 6 % #
+ \y 64 11 % @ (letter)
+ \y 10 12 % new line ^^J
\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 58 12 % :
\y 60 12 % <
- \y 61 12 % =
- \y 64 11 % @ (letter)
- \y 62 12 % >
- \y 95 12 % _ (other)
+ \y 91 12 % [
+ \y 93 12 % ]
+ \y 94 7 % ^
\y 96 12 % `
- \edef\y#1{\endgroup\edef#1{\the\toks0\relax}\x}%
-\expandafter\y\csname lltxb@compat@AtEnd\endcsname
+ \toks0\expandafter{\the\toks0 \relax\noexpand\endinput}%
+ \edef\y#1{\noexpand\expandafter\endgroup%
+ \noexpand\ifx#1\relax \edef#1{\the\toks0}\x\relax%
+ \noexpand\else \noexpand\expandafter\noexpand\endinput%
+ \noexpand\fi}%
+\expandafter\y\csname luatexbase@compat@sty@endinput\endcsname%
\begingroup
\expandafter\ifx\csname ProvidesPackage\endcsname\relax
\def\x#1[#2]{\immediate\write16{Package: #1 #2}}
@@ -52,7 +52,7 @@
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-compat}[2010/10/10 v0.3 Compatibility tools for LuaTeX]
+\x{luatexbase-compat}[2011/05/24 v0.4 Compatibility tools for LuaTeX]
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input ifluatex.sty
@@ -68,12 +68,11 @@
\let\x\PackageError
\fi
\expandafter\endgroup
- \x{luatexbase-attr}{LuaTeX is required for this package. Aborting.}{%
+ \x{luatexbase-compat}{LuaTeX is required for this package. Aborting.}{%
This package can only be used with the LuaTeX engine^^J%
(command `lualatex' or `luatex').^^J%
Package loading has been stopped to prevent additional errors.}
- \lltxb@compat@AtEnd
- \expandafter\endinput
+ \expandafter\luatexbase@compat@sty@endinput%
\fi
\begingroup
\expandafter\ifx\csname newcommand\endcsname\relax
@@ -130,7 +129,7 @@
\toks0\expandafter{\the\toks0\expandafter{\the\toks2}}
\expandafter\endgroup
\the\toks0
-\lltxb@compat@AtEnd
+\luatexbase@compat@sty@endinput%
\endinput
%%
%% End of file `luatexbase-compat.sty'.
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-loader.sty b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-loader.sty
index 787dea8e1c0..ca165aa32a7 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-loader.sty
+++ b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-loader.sty
@@ -6,45 +6,45 @@
%%
%% luatexbase-loader.dtx (with options: `texpackage')
%%
-%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-loader.dtx' for details.
-%%
- \csname lltxb@loader@loaded\endcsname
-\expandafter\let\csname lltxb@loader@loaded\endcsname\endinput
-\begingroup
+\begingroup\catcode61\catcode48\catcode32=10\relax% = and space
\catcode123 1 % {
\catcode125 2 % }
\catcode 35 6 % #
- \toks0{}%
- \def\x{}%
+ \toks0\expandafter{\expandafter\endlinechar\the\endlinechar}%
+ \edef\x{\endlinechar13}%
\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 13 5 % carriage return
+ \y 61 12 % =
+ \y 32 10 % space
+ \y 123 1 % {
+ \y 125 2 % }
+ \y 35 6 % #
+ \y 64 11 % @ (letter)
+ \y 10 12 % new line ^^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 58 12 % :
+ \y 91 12 % [
+ \y 93 12 % ]
+ \y 94 7 % ^
+ \y 95 8 % _
\y 96 12 % `
- \edef\y#1{\endgroup\edef#1{\the\toks0\relax}\x}%
-\expandafter\y\csname lltxb@loader@AtEnd\endcsname
+ \toks0\expandafter{\the\toks0 \relax\noexpand\endinput}%
+ \edef\y#1{\noexpand\expandafter\endgroup%
+ \noexpand\ifx#1\relax \edef#1{\the\toks0}\x\relax%
+ \noexpand\else \noexpand\expandafter\noexpand\endinput%
+ \noexpand\fi}%
+\expandafter\y\csname luatexbase@loader@sty@endinput\endcsname%
\begingroup
\expandafter\ifx\csname ProvidesPackage\endcsname\relax
\def\x#1[#2]{\immediate\write16{Package: #1 #2}}
@@ -52,7 +52,7 @@
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-loader}[2010/10/10 v0.3 Lua module loader for LuaTeX]
+\x{luatexbase-loader}[2013/04/13 v0.5 Lua module loader for LuaTeX]
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input ifluatex.sty
@@ -68,12 +68,11 @@
\let\x\PackageError
\fi
\expandafter\endgroup
- \x{luatexbase-attr}{LuaTeX is required for this package. Aborting.}{%
+ \x{luatexbase-loader}{LuaTeX is required for this package. Aborting.}{%
This package can only be used with the LuaTeX engine^^J%
(command `lualatex' or `luatex').^^J%
Package loading has been stopped to prevent additional errors.}
- \lltxb@loader@AtEnd
- \expandafter\endinput
+ \expandafter\luatexbase@loader@sty@endinput%
\fi
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
@@ -83,11 +82,11 @@
\fi
\luatexbase@directlua{%
local file = "luatexbase.loader.lua"
- local path = assert(kpse.find_file(file, 'tex'),
- "File '"..file.."' no found")
+ local path = assert(kpse.find_file(file, 'lua'),
+ "File '"..file.."' not found")
texio.write_nl("("..path..")")
dofile(path)}
-\lltxb@loader@AtEnd
+\luatexbase@loader@sty@endinput%
\endinput
%%
%% End of file `luatexbase-loader.sty'.
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-mcb.sty b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-mcb.sty
index 08d1dcf6524..36bcc79c7ca 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-mcb.sty
+++ b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-mcb.sty
@@ -6,45 +6,42 @@
%%
%% luatexbase-mcb.dtx (with options: `texpackage')
%%
-%% Copyright (C) 2009 by Elie Roux <elie.roux@telecom-bretagne.eu>
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-mcb.dtx' for details.
-%%
- \csname lltxb@mcb@loaded\endcsname
-\expandafter\let\csname lltxb@mcb@loaded\endcsname\endinput
-\begingroup
+\begingroup\catcode61\catcode48\catcode32=10\relax% = and space
\catcode123 1 % {
\catcode125 2 % }
\catcode 35 6 % #
- \toks0{}%
- \def\x{}%
+ \toks0\expandafter{\expandafter\endlinechar\the\endlinechar}%
+ \edef\x{\endlinechar13}%
\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 13 5 % carriage return
+ \y 61 12 % =
+ \y 32 10 % space
+ \y 123 1 % {
+ \y 125 2 % }
+ \y 35 6 % #
+ \y 64 11 % @ (letter)
+ \y 10 12 % new line ^^J
\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 58 12 % :
+ \y 91 12 % [
+ \y 93 12 % ]
+ \y 94 7 % ^
\y 96 12 % `
- \edef\y#1{\endgroup\edef#1{\the\toks0\relax}\x}%
-\expandafter\y\csname lltxb@mcb@AtEnd\endcsname
+ \toks0\expandafter{\the\toks0 \relax\noexpand\endinput}%
+ \edef\y#1{\noexpand\expandafter\endgroup%
+ \noexpand\ifx#1\relax \edef#1{\the\toks0}\x\relax%
+ \noexpand\else \noexpand\expandafter\noexpand\endinput%
+ \noexpand\fi}%
+\expandafter\y\csname luatexbase@mcb@sty@endinput\endcsname%
\begingroup
\expandafter\ifx\csname ProvidesPackage\endcsname\relax
\def\x#1[#2]{\immediate\write16{Package: #1 #2}}
@@ -52,7 +49,7 @@
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-mcb}[2010/10/10 v0.3 Callback management for LuaTeX]
+\x{luatexbase-mcb}[2013/04/13 v0.5 Callback management for LuaTeX]
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input ifluatex.sty
@@ -68,12 +65,11 @@
\let\x\PackageError
\fi
\expandafter\endgroup
- \x{luatexbase-attr}{LuaTeX is required for this package. Aborting.}{%
+ \x{luatexbase-mcb}{LuaTeX is required for this package. Aborting.}{%
This package can only be used with the LuaTeX engine^^J%
(command `lualatex' or `luatex').^^J%
Package loading has been stopped to prevent additional errors.}
- \lltxb@mcb@AtEnd
- \expandafter\endinput
+ \expandafter\luatexbase@mcb@sty@endinput%
\fi
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
@@ -82,7 +78,7 @@
\RequirePackage{luatexbase-modutils}
\fi
\luatexbase@directlua{require('luatexbase.mcb')}
-\lltxb@mcb@AtEnd
+\luatexbase@mcb@sty@endinput%
\endinput
%%
%% End of file `luatexbase-mcb.sty'.
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-modutils.sty b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-modutils.sty
index d9f7e287f5c..d2a9eafee1c 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-modutils.sty
+++ b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-modutils.sty
@@ -6,45 +6,45 @@
%%
%% luatexbase-modutils.dtx (with options: `texpackage')
%%
-%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-modutils.dtx' for details.
-%%
- \csname lltxb@modutils@loaded\endcsname
-\expandafter\let\csname lltxb@modutils@loaded\endcsname\endinput
-\begingroup
+\begingroup\catcode61\catcode48\catcode32=10\relax% = and space
\catcode123 1 % {
\catcode125 2 % }
\catcode 35 6 % #
- \toks0{}%
- \def\x{}%
+ \toks0\expandafter{\expandafter\endlinechar\the\endlinechar}%
+ \edef\x{\endlinechar13}%
\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 13 5 % carriage return
+ \y 61 12 % =
+ \y 32 10 % space
+ \y 123 1 % {
+ \y 125 2 % }
+ \y 35 6 % #
+ \y 64 11 % @ (letter)
+ \y 10 12 % new line ^^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 58 12 % :
+ \y 91 12 % [
+ \y 93 12 % ]
+ \y 94 7 % ^
+ \y 95 8 % _
\y 96 12 % `
- \edef\y#1{\endgroup\edef#1{\the\toks0\relax}\x}%
-\expandafter\y\csname lltxb@modutils@AtEnd\endcsname
+ \toks0\expandafter{\the\toks0 \relax\noexpand\endinput}%
+ \edef\y#1{\noexpand\expandafter\endgroup%
+ \noexpand\ifx#1\relax \edef#1{\the\toks0}\x\relax%
+ \noexpand\else \noexpand\expandafter\noexpand\endinput%
+ \noexpand\fi}%
+\expandafter\y\csname luatexbase@modutils@sty@endinput\endcsname%
\begingroup
\expandafter\ifx\csname ProvidesPackage\endcsname\relax
\def\x#1[#2]{\immediate\write16{Package: #1 #2}}
@@ -52,7 +52,7 @@
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-modutils}[2010/10/10 v0.3 Module utilities for LuaTeX]
+\x{luatexbase-modutils}[2013/04/13 v0.5 Module utilities for LuaTeX]
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input ifluatex.sty
@@ -68,17 +68,16 @@
\let\x\PackageError
\fi
\expandafter\endgroup
- \x{luatexbase-attr}{LuaTeX is required for this package. Aborting.}{%
+ \x{luatexbase-modutils}{LuaTeX is required for this package. Aborting.}{%
This package can only be used with the LuaTeX engine^^J%
(command `lualatex' or `luatex').^^J%
Package loading has been stopped to prevent additional errors.}
- \lltxb@modutils@AtEnd
- \expandafter\endinput
+ \expandafter\luatexbase@modutils@sty@endinput%
\fi
-\ifdefined\RequirePackage
- \RequirePackage{luatexbase-loader}
-\else
+\expandafter\ifx\csname RequirePackage\endcsname\relax
\input luatexbase-loader.sty
+\else
+ \RequirePackage{luatexbase-loader}
\fi
\luatexbase@directlua{require('luatexbase.modutils')}
\luatexbase@ensure@primitive{luaescapestring}
@@ -127,7 +126,7 @@
\expandafter\ifx\expandafter\/\detokenize{#2}\/\else
, "\luatexluaescapestring{#2}"
\fi)}}
-\lltxb@modutils@AtEnd
+\luatexbase@modutils@sty@endinput%
\endinput
%%
%% End of file `luatexbase-modutils.sty'.
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-regs.sty b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-regs.sty
index aca0843da93..968e0f6e6d6 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-regs.sty
+++ b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase-regs.sty
@@ -6,45 +6,49 @@
%%
%% luatexbase-regs.dtx (with options: `texpackage')
%%
-%% Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
-%% This work is under the CC0 license.
-%% See source file 'luatexbase-regs.dtx' for details.
-%%
- \csname lltxb@regs@loaded\endcsname
-\expandafter\let\csname lltxb@regs@loaded\endcsname\endinput
-\begingroup
+\begingroup\catcode61\catcode48\catcode32=10\relax% = and space
\catcode123 1 % {
\catcode125 2 % }
\catcode 35 6 % #
- \toks0{}%
- \def\x{}%
+ \toks0\expandafter{\expandafter\endlinechar\the\endlinechar}%
+ \edef\x{\endlinechar13}%
\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 13 5 % carriage return
+ \y 61 12 % =
+ \y 32 10 % space
+ \y 123 1 % {
+ \y 125 2 % }
+ \y 35 6 % #
+ \y 64 11 % @ (letter)
+ \y 10 12 % new line ^^J
+ \y 33 12 % !
+ \y 36 3 % $ $ (in etex.sty)
\y 39 12 % '
\y 40 12 % (
\y 41 12 % )
- \y 42 12 % *
- \y 43 12 % +
- \y 44 12 % ,
+ \y 42 12 % * (in etex.sty)
+ \y 43 12 % + (in etex.sty)
+ \y 44 12 % , (in etex.sty)
\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 58 12 % :
+ \y 60 12 % < (in etex.sty)
+ \y 62 12 % > (in etex.sty)
+ \y 91 12 % [
+ \y 93 12 % ]
+ \y 94 7 % ^
\y 96 12 % `
- \edef\y#1{\endgroup\edef#1{\the\toks0\relax}\x}%
-\expandafter\y\csname lltxb@regs@AtEnd\endcsname
+ \toks0\expandafter{\the\toks0 \relax\noexpand\endinput}%
+ \edef\y#1{\noexpand\expandafter\endgroup%
+ \noexpand\ifx#1\relax \edef#1{\the\toks0}\x\relax%
+ \noexpand\else \noexpand\expandafter\noexpand\endinput%
+ \noexpand\fi}%
+\expandafter\y\csname luatexbase@regs@sty@endinput\endcsname%
\begingroup
\expandafter\ifx\csname ProvidesPackage\endcsname\relax
\def\x#1[#2]{\immediate\write16{Package: #1 #2}}
@@ -52,7 +56,7 @@
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-regs}[2010/10/10 v0.3 Registers allocation for LuaTeX]
+\x{luatexbase-regs}[2011/05/24 v0.4 Registers allocation for LuaTeX]
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input ifluatex.sty
@@ -68,12 +72,11 @@
\let\x\PackageError
\fi
\expandafter\endgroup
- \x{luatexbase-attr}{LuaTeX is required for this package. Aborting.}{%
+ \x{luatexbase-regs}{LuaTeX is required for this package. Aborting.}{%
This package can only be used with the LuaTeX engine^^J%
(command `lualatex' or `luatex').^^J%
Package loading has been stopped to prevent additional errors.}
- \lltxb@regs@AtEnd
- \expandafter\endinput
+ \expandafter\luatexbase@regs@sty@endinput%
\fi
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax \else
@@ -176,7 +179,7 @@
\expandafter\let\csname newskip\endcsname\globskip
\expandafter\let\csname newbox\endcsname\globbox
\fi
-\lltxb@regs@AtEnd
+\luatexbase@regs@sty@endinput%
\endinput
%%
%% End of file `luatexbase-regs.sty'.
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase.loader.lua b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase.loader.lua
index d4f30a16ed1..c10febfda88 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase.loader.lua
+++ b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase.loader.lua
@@ -6,51 +6,33 @@
--
-- luatexbase-loader.dtx (with options: `luamodule')
--
--- Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
---
--- This work is under the CC0 license.
--- See source file 'luatexbase-loader.dtx' for details.
+-- See the aforementioned source file(s) for copyright and licensing information.
--
module('luatexbase', package.seeall)
+kpse.set_program_name("luatex")
local lua_suffixes = {
".luc", ".luctex", ".texluc", ".lua", ".luatex", ".texlua",
}
local function ends_with(suffix, name)
return name:sub(-suffix:len()) == suffix
end
-function find_file_lua_emul(name)
- local search_list = {}
+local function basename(name)
for _, suffix in ipairs(lua_suffixes) do
if ends_with(suffix, name) then
- search_list = { name }
- break
- else
- table.insert(search_list, name..suffix)
- end
- end
- for _, search_name in ipairs(search_list) do
- local f = kpse.find_file(search_name, 'texmfscripts')
- or kpse.find_file(search_name, 'tex')
- if f and ends_with(search_name, f) then
- return f
+ return name:sub(1, -(suffix:len()+1))
end
end
-end
-local find_file_lua
-if pcall('kpse.find_file', 'dummy', 'lua') then
- find_file_lua = function (name)
- return kpse.find_file(name, 'lua') or find_file_lua_emul(name)
- end
-else
- find_file_lua = function (name)
- return find_file_lua_emul(name)
- end
+ return name
end
local function find_module_file(mod)
- return find_file_lua(mod:gsub('%.', '/'), 'lua')
- or find_file_lua(mod, 'lua')
+ local compat = basename(mod):gsub('%.', '/')
+ return kpse.find_file(compat, 'lua') or kpse.find_file(mod, 'lua')
+end
+local package_loader_two
+if not package.searchers then
+ package.searchers = package.loaders
end
-local package_loader_two = package.loaders[2]
+package_loader_two = package.searchers[2]
local function load_module(mod)
local file = find_module_file(mod)
if not file then
@@ -71,6 +53,6 @@ local function load_module(mod)
texio.write_nl("("..file..")")
return loader
end
-package.loaders[2] = load_module
+package.searchers[2] = load_module
--
-- End of File `luatexbase.loader.lua'.
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase.sty b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase.sty
index a2aa1091aa9..5960b44bda7 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/luatexbase.sty
+++ b/Master/texmf-dist/tex/luatex/luatexbase/luatexbase.sty
@@ -6,42 +6,42 @@
%%
%% luatexbase.dtx (with options: `texpackage')
%%
-%% See source file 'luatexbase.dtx' for licence and contact information.
+%% See the aforementioned source file(s) for copyright and licensing information.
%%
- \csname lltxb@core@loaded\endcsname
-\expandafter\let\csname lltxb@core@loaded\endcsname\endinput
-\begingroup
+\begingroup\catcode61\catcode48\catcode32=10\relax% = and space
\catcode123 1 % {
\catcode125 2 % }
\catcode 35 6 % #
- \toks0{}%
- \def\x{}%
+ \toks0\expandafter{\expandafter\endlinechar\the\endlinechar}%
+ \edef\x{\endlinechar13}%
\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 13 5 % carriage return
+ \y 61 12 % =
+ \y 32 10 % space
+ \y 123 1 % {
+ \y 125 2 % }
+ \y 35 6 % #
+ \y 64 11 % @ (letter)
+ \y 10 12 % new line ^^J
\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 58 12 % :
+ \y 91 12 % [
+ \y 93 12 % ]
+ \y 94 7 % ^
\y 96 12 % `
- \edef\y#1{\endgroup\edef#1{\the\toks0\relax}\x}%
-\expandafter\y\csname lltxb@core@AtEnd\endcsname
+ \toks0\expandafter{\the\toks0 \relax\noexpand\endinput}%
+ \edef\y#1{\noexpand\expandafter\endgroup%
+ \noexpand\ifx#1\relax \edef#1{\the\toks0}\x\relax%
+ \noexpand\else \noexpand\expandafter\noexpand\endinput%
+ \noexpand\fi}%
+\expandafter\y\csname luatexbase@sty@endinput\endcsname%
\begingroup
\expandafter\ifx\csname ProvidesPackage\endcsname\relax
\def\x#1[#2]{\immediate\write16{Package: #1 #2}}
@@ -49,7 +49,7 @@
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase}[2010/10/06 v0.3 Module utilities for LuaTeX]
+\x{luatexbase}[2013/04/13 v0.5 Module utilities for LuaTeX]
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input ifluatex.sty
@@ -65,12 +65,16 @@
\let\x\PackageError
\fi
\expandafter\endgroup
- \x{luatexbase-attr}{LuaTeX is required for this package. Aborting.}{%
+ \x{luatexbase}{LuaTeX is required for this package. Aborting.}{%
This package can only be used with the LuaTeX engine^^J%
(command `lualatex' or `luatex').^^J%
Package loading has been stopped to prevent additional errors.}
- \lltxb@core@AtEnd
- \expandafter\endinput
+ \expandafter\luatexbase@sty@endinput%
+\fi
+\expandafter\ifx\csname RequirePackage\endcsname\relax
+ \input luatex.sty
+\else
+ \RequirePackage{luatex}
\fi
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
@@ -90,7 +94,7 @@
\RequirePackage{luatexbase-mcb}
\RequirePackage{luatexbase-modutils}
\fi
-\lltxb@core@AtEnd
+\luatexbase@sty@endinput%
\endinput
%%
%% End of file `luatexbase.sty'.
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/mcb.lua b/Master/texmf-dist/tex/luatex/luatexbase/mcb.lua
index 2b65b90a22d..08dc3a2abe4 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/mcb.lua
+++ b/Master/texmf-dist/tex/luatex/luatexbase/mcb.lua
@@ -6,19 +6,16 @@
--
-- luatexbase-mcb.dtx (with options: `lua')
--
--- Copyright (C) 2009 by Elie Roux <elie.roux@telecom-bretagne.eu>
---
--- This work is under the CC0 license.
--- See source file 'luatexbase-mcb.dtx' for details.
+-- See the aforementioned source file(s) for copyright and licensing information.
--
module('luatexbase', package.seeall)
local err, warning, info = luatexbase.provides_module({
name = "luatexbase-mcb",
- version = 0.2,
- date = "2010/05/12",
+ version = 0.5,
+ date = "2013/04/13",
description = "register several functions in a callback",
- author = "Hans Hagen, Elie Roux and Manuel Pegourie-Gonnard",
- copyright = "Hans Hagen, Elie Roux and Manuel Pegourie-Gonnard",
+ author = "Hans Hagen, Elie Roux, Manuel Pegourie-Gonnard and Philipp Gesang",
+ copyright = "Hans Hagen, Elie Roux, Manuel Pegourie-Gonnard and Philipp Gesang",
license = "CC0",
})
local callbacklist = callbacklist or { }
@@ -95,7 +92,7 @@ local function listhandler (name)
for _, f in ipairs(callbacklist[name]) do
ret = f.func(head, ...)
if ret == false then
- warn("function '%s' returned false\nin callback '%s'",
+ warning("function '%s' returned false\nin callback '%s'",
f.description, name)
break
end
@@ -212,7 +209,7 @@ function remove_from_callback (name, description)
end
table.remove(l, index)
info("removing '%s'\nfrom '%s'", description, name)
- if table.maxn(l) == 0 then
+ if #l == 0 then
callbacklist[name] = nil
if not lua_callbacks_defaults[name] then
register_callback(name, nil)
diff --git a/Master/texmf-dist/tex/luatex/luatexbase/modutils.lua b/Master/texmf-dist/tex/luatex/luatexbase/modutils.lua
index 40063557c8b..d3a4d541e1e 100644
--- a/Master/texmf-dist/tex/luatex/luatexbase/modutils.lua
+++ b/Master/texmf-dist/tex/luatex/luatexbase/modutils.lua
@@ -6,15 +6,12 @@
--
-- luatexbase-modutils.dtx (with options: `luamodule')
--
--- Written in 2009, 2010 by Manuel Pegourie-Gonnard and Elie Roux.
---
--- This work is under the CC0 license.
--- See source file 'luatexbase-modutils.dtx' for details.
+-- See the aforementioned source file(s) for copyright and licensing information.
--
module("luatexbase", package.seeall)
local modules = modules or {}
local function date_to_int(date)
- numbers = string.gsub(date, "(%d+)/(%d+)/(%d+)", "%1%2%3")
+ local numbers = string.gsub(date, "(%d+)/(%d+)/(%d+)", "%1%2%3")
return tonumber(numbers)
end
local function msg_format(msg_type, mod_name, ...)
@@ -53,7 +50,7 @@ function require_module(name, req_date)
local info = modules[name]
if not info then
warn("module '%s' was not properly identified", name)
- elseif version then
+ elseif req_date and info.version then
if not (info.date and date_to_int(info.date) > date_to_int(req_date))
then
warn("module '%s' required in version '%s'\n"