summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile11
-rw-r--r--luamcallbacks.dtx31
2 files changed, 17 insertions, 25 deletions
diff --git a/Makefile b/Makefile
index 64fe331..9baf7fb 100644
--- a/Makefile
+++ b/Makefile
@@ -4,6 +4,8 @@ NAME = luatexbase
DTX = $(wildcard *.dtx)
DOC = $(patsubst %.dtx, %.pdf, $(DTX))
DTXSTY = lltxb-dtxstyle.tex
+LOADER_RUN = luatexbase-loader.sty luatexbase.loader.lua
+MOD_RUN = luatexbase-modutils.sty luatexbase.modutils.lua
# Files grouped by generation mode
UNPACKED_MCB = test-luamcallbacks.tex luamcallbacks.lua
@@ -13,9 +15,9 @@ UNPACKED_ATTR = luatexbase-attr.sty luatexbase.attr.lua \
test-attr-plain.tex test-attr-latex.tex
UNPACKED_CCTB = luatexbase-cctb.sty luatexbase.cctb.lua \
test-cctb-plain.tex test-cctb-latex.tex
-UNPACKED_LOADER = luatexbase-loader.sty luatexbase.loader.lua \
+UNPACKED_LOADER = $(LOADER_RUN) \
test-loader-plain.tex test-loader-latex.tex
-UNPACKED_MODUTILS = luatexbase-modutils.sty luatexbase.modutils.lua \
+UNPACKED_MODUTILS = $(MOD_RUN) \
test-modutils-plain.tex test-modutils-latex.tex
UNPACKED = $(UNPACKED_MCB) $(UNPACKED_REGS) $(UNPACKED_ATTR) $(UNPACKED_CCTB) \
$(UNPACKED_LOADER) $(UNPACKED_MODUTILS)
@@ -49,7 +51,7 @@ DO_MAKEINDEX = makeindex -s gind.ist $(subst .dtx,,$<) >/dev/null 2>&1
# Main targets definition
all: $(GENERATED)
-check: check-regs check-attr check-cctb check-loader check-modutils
+check: check-regs check-attr check-cctb check-loader check-modutils check-mcb
doc: $(COMPILED)
unpack: $(UNPACKED)
ctan: check $(CTAN_ZIP)
@@ -100,6 +102,9 @@ check-modutils: $(UNPACKED_MODUTILS)
luatex --interaction=batchmode test-modutils-plain.tex >/dev/null
lualatex --interaction=batchmode test-modutils-latex.tex >/dev/null
+check-mcb: $(UNPACKED_MCB) $(LOADER_RUN) $(MOD_RUN)
+ luatex --interaction=batchmode test-luamcallbacks.tex >/dev/null
+
$(CTAN_ZIP): $(SOURCE) $(COMPILED) $(TDS_ZIP)
@echo "Making $@ for CTAN upload."
@$(RM) -- $@
diff --git a/luamcallbacks.dtx b/luamcallbacks.dtx
index 6b06b24..98cf67a 100644
--- a/luamcallbacks.dtx
+++ b/luamcallbacks.dtx
@@ -14,11 +14,6 @@
% Documentation:
% pdflatex luamcallbacks.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}%
@@ -30,10 +25,6 @@
%</ignore>
%<*install>
\input docstrip.tex
-\Msg{************************************************************************}
-\Msg{* Installation}
-\Msg{* Package: luamcallbacks 2009/09/18 v0.93 LuaTeX multiple callbacks.}
-\Msg{************************************************************************}
\keepsilent
\askforoverwritefalse
@@ -56,13 +47,10 @@ and the derived files
\let\MetaPrefix\DoubleperCent
\generate{%
- \usedir{doc/luatex/luatextra}%
+ \usedir{doc/luatex/luatexbase}%
\file{test-luamcallbacks.tex}{\from{luamcallbacks.dtx}{test}}%
}
-% The following hacks are to generate a lua file with lua comments starting by
-% -- instead of %%
-
\def\MetaPrefix{-- }
\def\luapostamble{%
@@ -73,7 +61,7 @@ and the derived files
\def\currentpostamble{\luapostamble}%
\generate{%
- \usedir{tex/luatex/luatextra}%
+ \usedir{tex/luatex/luatexbase}%
\file{luamcallbacks.lua}{\from{luamcallbacks.dtx}{lua}}%
}
@@ -95,12 +83,8 @@ and the derived files
\fi
%</ignore>
%<*driver>
-\NeedsTeXFormat{LaTeX2e}
-\ProvidesFile{luamcallbacks.drv}
- [2009/09/18 v0.93 LuaTeX multiple callbacks package]
\documentclass{ltxdoc}
-\EnableCrossrefs
-\CodelineIndex
+\input{lltxb-dtxstyle}
\begin{document}
\DocInput{luamcallbacks.dtx}%
\end{document}
@@ -139,6 +123,8 @@ and the derived files
% \texttt{callback.register}. It also allows to create and call new callbacks.
% For an introduction on this package (among others), please refer to the
% document \texttt{luatextra-reference.pdf}.
+% \par\textbf{Warning.} Currently assumes that \textsf{luatexbase-modutils}
+% has been previously loaded. (This is a temporary limitation.)
% \end{abstract}
%
% \section{Documentation}
@@ -803,15 +789,16 @@ end
% get a non-empty document.
%
% \begin{macrocode}
-\input luatextra.sty
-
+\input luatexbase-loader.sty
+\input luatexbase-modutils.sty
+\directlua{require "luamcallbacks"}
This is just a test file.
% \end{macrocode}
%
% Then we declare three functions that we will use.
%
% \begin{macrocode}
-\luadirect{
+\directlua{
local function one(head,...)
texio.write_nl("I'm number 1")
return head, true