summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-04-16 23:18:46 +0000
committerKarl Berry <karl@freefriends.org>2013-04-16 23:18:46 +0000
commite98415162564ae457e889ba3693366cf5e225c1d (patch)
treedde41e4620f265c89f5c0b83afe0047daaf1bf11 /Master/texmf-dist/tex/luatex
parente5075a6fd92f1543d3dccdfcdb7a2260b0a0aaf4 (diff)
luatexbase (16apr13)
git-svn-id: svn://tug.org/texlive/trunk@29986 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex')
-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
13 files changed, 327 insertions, 291 deletions
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"