summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes12
-rw-r--r--Makefile9
-rw-r--r--TODO4
-rw-r--r--lltxb-dtxstyle.tex6
-rw-r--r--luatexbase-loader.dtx15
-rw-r--r--luatexbase-mcb.dtx12
-rw-r--r--luatexbase-modutils.dtx6
-rw-r--r--luatexbase.dtx19
8 files changed, 62 insertions, 21 deletions
diff --git a/Changes b/Changes
index e3a7959..7b39c55 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,15 @@
Changes in the luatexbase package/bundle
+2013/04/22 v0.6
+ loader
+ - do not output included file paths when called by texlua
+ mcb
+ - passing most of the term output to the log
+
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
@@ -9,6 +18,9 @@
- 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
diff --git a/Makefile b/Makefile
index 8f2f30d..6fdc7fb 100644
--- a/Makefile
+++ b/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
@@ -28,6 +28,9 @@ UNPACKED_LUATEX = luatex.sty test-luatex1.tex test-luatex2.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)
SOURCE = $(DTX) $(DTXSTY) README TODO Changes Makefile
@@ -38,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
diff --git a/TODO b/TODO
index b70a84a..6205464 100644
--- a/TODO
+++ b/TODO
@@ -13,9 +13,7 @@ all
or generalise use of qstest
- add debug messages to be used in the test suite?
- mark all occurences of version-dependent stuff in the code
-- drop compat for 0.25 when tl2010 is frozen
-- quit using module() in favor of locals, more generally ensure compat with
- Lua 5.2
+- quit using module() in favor of locals
- support the syntax foo = require"foo" in modutils? How?
compat
diff --git a/lltxb-dtxstyle.tex b/lltxb-dtxstyle.tex
index 804dbfb..115d4f2 100644
--- a/lltxb-dtxstyle.tex
+++ b/lltxb-dtxstyle.tex
@@ -57,8 +57,8 @@
\newif\ifluatexbase
\author{%
Heiko Oberdiek (primary author of \pk{luatex}) \\
- Élie Roux (primary author of \pk{luatextra}) \\
- Manuel Pégourié-Gonnard (current developper)\thanks{%
+ \'Elie Roux (primary author of \pk{luatextra}) \\
+ Manuel P\'egouri\'e-Gonnard (current developper)\thanks{%
See ``History''
\ifluatexbase\else in \href{luatexbase.pdf}{\file{luatexbase.pdf}} \fi
for details.}%
@@ -68,7 +68,7 @@
}
\hypersetup{%
pdfsubject = {Basic resource management for LuaTeX},
- pdfauthor = {Manuel Pégourié-Gonnard, Élie Roux, Heiko Oberdiek},
+ pdfauthor = {Manuel P\'egouri\'e-Gonnard, \'Elie Roux, Heiko Oberdiek},
}
% other metadata
diff --git a/luatexbase-loader.dtx b/luatexbase-loader.dtx
index 77b9b9b..b8e5098 100644
--- a/luatexbase-loader.dtx
+++ b/luatexbase-loader.dtx
@@ -283,6 +283,17 @@ module('luatexbase', package.seeall)
kpse.set_program_name("luatex")
% \end{macrocode}
%
+% In \LaTeX, it's traditional to print the included file paths. We don't want
+% to do this for scripts using texlua... Currently there is no perfect check
+% of texlua vs. luatex, so we check for the token table.
+%
+% \begin{macrocode}
+local print_included_path = false
+if token then
+ print_included_path = true
+end
+% \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.
@@ -357,7 +368,9 @@ local function load_module(mod)
if not loader then
return "\n\t[luatexbase.loader] Loading error:\n\t"..error
end
- texio.write_nl("("..file..")")
+ if print_included_path then
+ texio.write_nl("("..file..")")
+ end
return loader
end
% \end{macrocode}
diff --git a/luatexbase-mcb.dtx b/luatexbase-mcb.dtx
index 8b99a52..ee07019 100644
--- a/luatexbase-mcb.dtx
+++ b/luatexbase-mcb.dtx
@@ -393,7 +393,7 @@ See the aforementioned source file(s) for copyright and licensing information.
%
% \begin{macrocode}
module('luatexbase', package.seeall)
-local err, warning, info = luatexbase.provides_module({
+local err, warning, info, log = luatexbase.provides_module({
name = "luatexbase-mcb",
version = 0.5,
date = "2013/04/13",
@@ -687,7 +687,7 @@ function add_to_callback (name,func,description,priority)
warning("several functions in '%s',\n"
.."only one will be active.", name)
end
- info("inserting '%s'\nat position %s in '%s'",
+ log("inserting '%s'\nat position %s in '%s'",
description, priority, name)
end
% \end{macrocode}
@@ -733,7 +733,7 @@ function remove_from_callback (name, description)
return
end
table.remove(l, index)
- info("removing '%s'\nfrom '%s'", description, name)
+ log("removing '%s'\nfrom '%s'", description, name)
if #l == 0 then
callbacklist[name] = nil
if not lua_callbacks_defaults[name] then
@@ -756,11 +756,11 @@ function reset_callback (name, make_false)
err("unable to reset '%s':\nis not a valid callback", name)
return
end
- info("resetting callback '%s'", name)
+ log("resetting callback '%s'", name)
callbacklist[name] = nil
if not lua_callbacks_defaults[name] then
if make_false == true then
- info("setting '%s' to false", name)
+ log("setting '%s' to false", name)
register_callback(name, false)
else
register_callback(name, nil)
@@ -823,7 +823,7 @@ function create_callback(name, ctype, default)
err("unable to create callback '%s':\ntype '%s' undefined", name, ctype)
return nil
end
- info("creating '%s' type %s", name, ctype)
+ log("creating '%s' type %s", name, ctype)
lua_callbacks_defaults[name] = default
callbacktypes[name] = ctype
end
diff --git a/luatexbase-modutils.dtx b/luatexbase-modutils.dtx
index 57ffb1d..6f500da 100644
--- a/luatexbase-modutils.dtx
+++ b/luatexbase-modutils.dtx
@@ -378,10 +378,10 @@ See the aforementioned source file(s) for copyright and licensing information.
% 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}
diff --git a/luatexbase.dtx b/luatexbase.dtx
index 6bf3fa6..49b0c07 100644
--- a/luatexbase.dtx
+++ b/luatexbase.dtx
@@ -132,11 +132,11 @@ See the aforementioned source file(s) for copyright and licensing information.
% \subsection{History}
%
% The first package for managing \luatex's new resources was the \pk{luatex}
-% package by Heiko Oberdiek. Later, Élie Roux wrote \pk{luatextra} which
+% 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égourié-Gonnard by isolating
+% 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.
%
@@ -243,6 +243,21 @@ See the aforementioned source file(s) for copyright and licensing information.
\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}
+%
% \subsection{Packages loading}
%
% \begin{macrocode}