summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElie Roux <elie.roux@telecom-bretagne.eu>2013-05-11 18:42:26 +0200
committerElie Roux <elie.roux@telecom-bretagne.eu>2013-05-11 18:42:26 +0200
commitafd1f72fe35da0060ca940dcc3840d78567d61a5 (patch)
treebe3f31a1b42a828c3ec765f349ca9118667ce46a
parentb11b21c3e541f869509124917399c048e196780b (diff)
downloadluatexbase-afd1f72fe35da0060ca940dcc3840d78567d61a5.tar.gz
Now all luatexbase modules are identified through provides_module()
-rw-r--r--NEWS5
-rw-r--r--luatexbase-attr.dtx51
-rw-r--r--luatexbase-cctb.dtx21
-rw-r--r--luatexbase-loader.dtx4
-rw-r--r--luatexbase-mcb.dtx12
-rw-r--r--luatexbase-modutils.dtx15
-rw-r--r--luatexbase.dtx8
7 files changed, 61 insertions, 55 deletions
diff --git a/NEWS b/NEWS
index cb40459..9ad27e2 100644
--- a/NEWS
+++ b/NEWS
@@ -1,8 +1,9 @@
Changes in the luatexbase package/bundle
-2013/05/04 v0.6
+2013/05/11 v0.6
all
- move away from the module() function (deprecated in Lua 5.2)
+ - attr, loader and cctb now use provides_module
attr
- hack to make luatexbase and luatex.sty compatible for attribute
allocation (same thing should be done for catcodetables)
@@ -32,7 +33,7 @@
- fixing a bug printing "luatexbase-attr" in all documents
in plain TeX
-2011/00/24 v0.4
+2011/05/24 v0.4
cctb
- implement catcode table stacks à la luatex.sty
- fix \CatcodeTableLaTeX(Package): 10 (newline aka ^^J) was catcoded
diff --git a/luatexbase-attr.dtx b/luatexbase-attr.dtx
index aa5e987..d19240b 100644
--- a/luatexbase-attr.dtx
+++ b/luatexbase-attr.dtx
@@ -2,6 +2,7 @@
%
% 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.
%
@@ -109,7 +110,7 @@ See the aforementioned source file(s) for copyright and licensing information.
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \pkdate{luatexbase-attr}{v0.4 2011-05-24}
+% \pkdate{luatexbase-attr}{v0.6 2013-05-11}
%
% \maketitle
%
@@ -230,7 +231,7 @@ See the aforementioned source file(s) for copyright and licensing information.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-attr}[2011/05/24 v0.4 Attributes allocation for LuaTeX]
+\x{luatexbase-attr}[2013/05/11 v0.6 Attributes allocation for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
@@ -261,14 +262,17 @@ See the aforementioned source file(s) for copyright and licensing information.
%
% \subsubsection{Primitives needed}
%
-% Load \pk{luatexbase-compat}.
+% First load \pk{luatexbase-modutils} (hence \pk{luatexbase-loader}
+% and \pk{luatexbase-compat}), and make sure \pk{luatex.sty} is loaded too.
%
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
- \input luatexbase-compat.sty
+ \input luatexbase-modutils.sty
+ \input luatex.sty
\else
- \RequirePackage{luatexbase-compat}
+ \RequirePackage{luatexbase-modutils}
+ \RequirePackage{luatex}
\fi
% \end{macrocode}
%
@@ -282,18 +286,7 @@ See the aforementioned source file(s) for copyright and licensing information.
%
% \subsubsection{Load supporting Lua module}
%
-% First load \pk{luatexbase-loader} (hence \pk{luatexbase-compat}), then
-% the supporting Lua module. We make sure \verb|luatex.sty| is loaded.
-%
% \begin{macrocode}
-\begingroup\expandafter\expandafter\expandafter\endgroup
-\expandafter\ifx\csname RequirePackage\endcsname\relax
- \input luatexbase-loader.sty
- \input luatex.sty
-\else
- \RequirePackage{luatexbase-loader}
- \RequirePackage{luatex}
-\fi
\luatexbase@directlua{require('luatexbase.attr')}
% \end{macrocode}
%
@@ -360,23 +353,15 @@ local user_defined_t = nodesubtype"user_defined"
local unassociated = "__unassociated"
luatexbase = luatexbase or { }
local luatexbase = luatexbase
-% \end{macrocode}
-%
-% We improvise a basic logging facility.
-%
-% \begin{macrocode}
-local reporter = function (log, category, ...)
- if log == true then
- texiowrite_nl("log", "("..category..") ")
- texiowrite("log", stringformat(...))
- else
- texiowrite_nl("("..category..") ")
- texiowrite(stringformat(...))
- end
-end
-local warning = function (...) reporter (false, "warning", ...) end
------ info = function (...) reporter (false, "info", ...) end
-local log = function (...) reporter (true, "log", ...) end
+local err, warning, info, log = luatexbase.provides_module({
+ name = "luatexbase-attr",
+ version = 0.6,
+ date = "2013/05/11",
+ description = "Attributes allocation for LuaTeX",
+ author = "Elie Roux, Manuel Pegourie-Gonnard and Philipp Gesang",
+ copyright = "Elie Roux, Manuel Pegourie-Gonnard and Philipp Gesang",
+ license = "CC0",
+})
% \end{macrocode}
%
% This table holds the values of the allocated attributes, indexed by name.
diff --git a/luatexbase-cctb.dtx b/luatexbase-cctb.dtx
index 1e95379..4b15776 100644
--- a/luatexbase-cctb.dtx
+++ b/luatexbase-cctb.dtx
@@ -109,7 +109,7 @@ See the aforementioned source file(s) for copyright and licensing information.
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \pkdate{luatexbase-cctb}{v0.4 2011-05-24}
+% \pkdate{luatexbase-cctb}{v0.6 2013-05-11}
%
% \maketitle
%
@@ -325,7 +325,7 @@ See the aforementioned source file(s) for copyright and licensing information.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-cctb}[2011/05/24 v0.4 Catcodetable allocation for LuaTeX]
+\x{luatexbase-cctb}[2013/05/11 v0.6 Catcodetable allocation for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
@@ -356,15 +356,15 @@ See the aforementioned source file(s) for copyright and licensing information.
%
% \subsubsection{Load supporting Lua module}
%
-% First load \pk{luatexbase-loader} (hence \pk{luatexbase-compat}), then
-% the supporting Lua module.
+% First load \pk{luatexbase-modutils} (hence \pk{luatexbase-loader}
+% and \pk{luatexbase-compat}), then the supporting Lua module.
%
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
- \input luatexbase-loader.sty
+ \input luatexbase-modutils.sty
\else
- \RequirePackage{luatexbase-loader}
+ \RequirePackage{luatexbase-modutils}
\fi
\luatexbase@directlua{require('luatexbase.cctb')}
% \end{macrocode}
@@ -651,6 +651,15 @@ See the aforementioned source file(s) for copyright and licensing information.
%<*luamodule>
luatexbase = luatexbase or { }
local luatexbase = luatexbase
+luatexbase.provides_module({
+ name = "luatexbase-cctb",
+ version = 0.6,
+ date = "2013/05/11",
+ description = "Catcodetable allocation for LuaTeX",
+ author = "Heiko Oberdiek, Elie Roux and Manuel Pegourie-Gonnard",
+ copyright = "Heiko Oberdiek, Elie Roux and Manuel Pegourie-Gonnard",
+ license = "CC0",
+})
% \end{macrocode}
%
% The number associated to a CS name is remembered in the |catcodetables|
diff --git a/luatexbase-loader.dtx b/luatexbase-loader.dtx
index 11918a3..c4bd008 100644
--- a/luatexbase-loader.dtx
+++ b/luatexbase-loader.dtx
@@ -112,7 +112,7 @@ See the aforementioned source file(s) for copyright and licensing information.
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \pkdate{luatexbase-loader}{v0.5 2013-04-13}
+% \pkdate{luatexbase-loader}{v0.6 2013-05-11}
%
% \maketitle
%
@@ -208,7 +208,7 @@ See the aforementioned source file(s) for copyright and licensing information.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-loader}[2013/04/13 v0.5 Lua module loader for LuaTeX]
+\x{luatexbase-loader}[2013/05/11 v0.6 Lua module loader for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
diff --git a/luatexbase-mcb.dtx b/luatexbase-mcb.dtx
index 0c04d4d..b0ae1c9 100644
--- a/luatexbase-mcb.dtx
+++ b/luatexbase-mcb.dtx
@@ -115,7 +115,7 @@ See the aforementioned source file(s) for copyright and licensing information.
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \pkdate{luatexbase-mcb}{2013/04/13 v0.5}
+% \pkdate{luatexbase-mcb}{2013/05/11 v0.6}
%
% \maketitle
%
@@ -332,7 +332,7 @@ See the aforementioned source file(s) for copyright and licensing information.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-mcb}[2013/04/13 v0.5 Callback management for LuaTeX]
+\x{luatexbase-mcb}[2013/05/11 v0.6 Callback management for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
@@ -363,8 +363,8 @@ See the aforementioned source file(s) for copyright and licensing information.
%
% \subsubsection{Load supporting Lua module}
%
-% First load \pk{luatexbase-loader} (hence \pk{luatexbase-compat}), then
-% the supporting Lua module.
+% First load \pk{luatexbase-modutils} (hence \pk{luatexbase-loader}
+% and \pk{luatexbase-compat}), then the supporting Lua module.
%
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
@@ -396,8 +396,8 @@ luatexbase = luatexbase or { }
local luatexbase = luatexbase
local err, warning, info, log = luatexbase.provides_module({
name = "luatexbase-mcb",
- version = 0.5,
- date = "2013/04/13",
+ version = 0.6,
+ date = "2013/05/11",
description = "register several functions in a callback",
author = "Hans Hagen, Elie Roux, Manuel Pegourie-Gonnard and Philipp Gesang",
copyright = "Hans Hagen, Elie Roux, Manuel Pegourie-Gonnard and Philipp Gesang",
diff --git a/luatexbase-modutils.dtx b/luatexbase-modutils.dtx
index cd1458a..f411e46 100644
--- a/luatexbase-modutils.dtx
+++ b/luatexbase-modutils.dtx
@@ -111,7 +111,7 @@ See the aforementioned source file(s) for copyright and licensing information.
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \pkdate{luatexbase-modutils}{v0.6 2013-05-04}
+% \pkdate{luatexbase-modutils}{v0.6 2013-05-11}
%
% \maketitle
%
@@ -343,7 +343,7 @@ See the aforementioned source file(s) for copyright and licensing information.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase-modutils}[2013/04/13 v0.5 Module utilities for LuaTeX]
+\x{luatexbase-modutils}[2013/05/11 v0.6 Module utilities for LuaTeX]
% \end{macrocode}
%
% Make sure \luatex is used.
@@ -685,6 +685,17 @@ end
luatexbase.is_module_loaded = is_module_loaded
% \end{macrocode}
%
+% We provide the module, for version checking.
+%
+% \begin{macrocode}
+provides_module({
+ name = 'luatexbase-modutils',
+ date = '2013/05/11',
+ version = 0.6,
+ description = 'Module utilities for LuaTeX',
+})
+% \end{macrocode}
+%
% \begin{macrocode}
%</luamodule>
% \end{macrocode}
diff --git a/luatexbase.dtx b/luatexbase.dtx
index 2849818..f0ba25d 100644
--- a/luatexbase.dtx
+++ b/luatexbase.dtx
@@ -93,7 +93,7 @@ See the aforementioned source file(s) for copyright and licensing information.
% Grave accent \` Left brace \{ Vertical bar \|
% Right brace \} Tilde \~}
%
-% \pkdate{luatexbase}{v0.6 2013-05-04}
+% \pkdate{luatexbase}{v0.6 2013-05-11}
%
% \maketitle
%
@@ -214,7 +214,7 @@ See the aforementioned source file(s) for copyright and licensing information.
\let\x\ProvidesPackage
\fi
\expandafter\endgroup
-\x{luatexbase}[2013/05/04 v0.6 Module utilities for LuaTeX]
+\x{luatexbase}[2013/05/11 v0.6 Resource management for the LuaTeX macro programmer]
% \end{macrocode}
%
% Make sure \luatex is used.
@@ -264,20 +264,20 @@ See the aforementioned source file(s) for copyright and licensing information.
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
\input luatexbase-compat.sty
+ \input luatexbase-modutils.sty
\input luatexbase-loader.sty
\input luatexbase-regs.sty
\input luatexbase-attr.sty
\input luatexbase-cctb.sty
\input luatexbase-mcb.sty
- \input luatexbase-modutils.sty
\else
\RequirePackage{luatexbase-compat}
+ \RequirePackage{luatexbase-modutils}
\RequirePackage{luatexbase-loader}
\RequirePackage{luatexbase-regs}
\RequirePackage{luatexbase-attr}
\RequirePackage{luatexbase-cctb}
\RequirePackage{luatexbase-mcb}
- \RequirePackage{luatexbase-modutils}
\fi
% \end{macrocode}
%