From 2ed4d98b8bd2764d725131e7b73daceb496b68dd Mon Sep 17 00:00:00 2001 From: Elie Roux Date: Mon, 6 May 2013 09:54:48 +0200 Subject: Updating doc --- Changes | 3 +++ TODO | 3 ++- luatexbase-modutils.dtx | 25 +++++++------------------ 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/Changes b/Changes index 8e7fc21..cb40459 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ Changes in the luatexbase package/bundle 2013/05/04 v0.6 + all + - move away from the module() function (deprecated in Lua 5.2) attr - hack to make luatexbase and luatex.sty compatible for attribute allocation (same thing should be done for catcodetables) @@ -8,6 +10,7 @@ modutils - adding functions to check the availability and version of a module - fixing small error in module date requirement + - update documentation to reflect the move from module() loader - do not output included file paths when called by texlua mcb diff --git a/TODO b/TODO index 65e80cc..1f36826 100644 --- a/TODO +++ b/TODO @@ -29,6 +29,7 @@ cctb ---- - support for unicode-letters? +- make the functions compatible with luatex.sty mcb --- @@ -38,7 +39,7 @@ mcb - provide a list()? - allow temporary disabling of callbacks - do something with open_read_file etc -- make callback.register = luatexbase_add_to_callback +- make callback.register = luatexbase_add_to_callback? - check if there are functions in the callbacks before luatexbase is loaded and import them diff --git a/luatexbase-modutils.dtx b/luatexbase-modutils.dtx index 1a50f24..d4dbef0 100644 --- a/luatexbase-modutils.dtx +++ b/luatexbase-modutils.dtx @@ -144,17 +144,10 @@ See the aforementioned source file(s) for copyright and licensing information. % % \medskip % -% It is important to notice that Lua's standard function |module()| is -% completely orthogonal with the present package. It has nothing to do with -% identification and deals only with namespaces: more precisely, it -% modifies the current environment. So, you should continue to -% use it normally regardless of whether you chose to use this package's -% features for identification. -% -% It is recommended to always use |module()| or any other method that ensure -% the global name space remains clean. For example, you may heavily use the -% |local| keyword and explicitly qualify the name of every non-local symbol. -% Chapter 15 of \href{http://www.lua.org/pil/}{Programming in Lua, 1st ed.} +% It is important to note that Lua's unction |module()| is deprecated in +% Lua 5.2 and should be avoided. For examples of good practices for creating +% modules, see section~\ref{template}. Chapter 15 +% of \href{http://www.lua.org/pil/15.html}{Programming in Lua, 3rd ed.} % discusses various methods for managing packages. % % \subsection{\tex macros} @@ -232,18 +225,14 @@ See the aforementioned source file(s) for copyright and licensing information. % \begin{qcode} % local module_info = luatexbase.get_module_info(\meta{name}) % local version = luatexbase.get_module_version(\meta{name}) +% local date = luatexbase.get_module_date(\meta{name}) +% local date_int = luatexbase.get_module_date_int(\meta{name}) % local is_loaded = luatexbase.is_module_loaded(\meta{name}) % \end{qcode} % These functions check for the availability or version of a module, and can % even return a copy of the |module_info| table. % -% \subsection{Templates} -% -% Let me emphasize again that, while |luatexbase.require_module()| is meant to -% be used as a replacement for |require()|, the function -% |luatexbase.provides_module()| \emph{is not} a replacement for |module()|: -% they just don't do the same thing (declaring information vs changing the -% current name space). +% \subsection{Templates}\label{template} % % Now, here is a module header template showing all the recommended elements: % \begin{verbatim} -- cgit v1.2.3