summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changes5
-rw-r--r--TODO9
-rw-r--r--luatexbase-cctb.dtx28
3 files changed, 17 insertions, 25 deletions
diff --git a/Changes b/Changes
index 9fd6732..f6afb4b 100644
--- a/Changes
+++ b/Changes
@@ -3,7 +3,10 @@
[on-going]
luatexbase-attr
- use luatexbase as the Lua module name
- - don't creat tex.attributenumber
+ - don't create tex.attributenumber
+ luatexbase-cctb
+ - use luatexbase as the Lua module name
+ - don't create tex.catcodetablenumber
2010/03/26
luatexbase-cctb 0.1
diff --git a/TODO b/TODO
index b893c91..42c735f 100644
--- a/TODO
+++ b/TODO
@@ -18,16 +18,7 @@ Later
- change lua module name(s) (luatexbase or luatexbase.regs etc)
-regs
-----
-
-- Should the various allocation macros set something in a Lua table, or should
- we just wait for it to be implemented in LuaTeX? (The \*blk macros would be
-rather tricky in this respect, but are they really used?) Well, is there any
-actual need for this?
-
cctb
----
-- don't write in the tex table!
- don't define macros starting with \luatex
diff --git a/luatexbase-cctb.dtx b/luatexbase-cctb.dtx
index 5eeefc9..7c6a907 100644
--- a/luatexbase-cctb.dtx
+++ b/luatexbase-cctb.dtx
@@ -175,7 +175,7 @@ and the derived files
% catcode table. Since |\chardef| is used for the definition of the control
% sequence, this is rather easy to do. However, for extra ease of use, the
% numbers are also directly accessible from Lua as the value of the table
-% |luatextra.catcodetables|, whose keys is the name of the control sequence
+% |luatexbase.catcodetables|, whose keys is the name of the control sequence
% (without any leading backslash). Moreover, nickames are available for the
% predefined catcode tables:
% \begin{itemize}
@@ -270,7 +270,7 @@ and the derived files
\global\chardef#1\allocationnumber
\luatexinitcatcodetable\allocationnumber
\begingroup\escapechar\m@ne \expandafter\endgroup
- \directlua{luatextra.catcodetabledef_from_tex(
+ \directlua{luatexbase.catcodetabledef_from_tex(
'\luatexluaescapestring{\string#1}', '\number\allocationnumber')}%
\wlog{\string#1=\string\luatexcatcodetable\the\allocationnumber}%
\else
@@ -391,7 +391,7 @@ and the derived files
% Finally do the shortcuts.
%
% \begin{macrocode}
-\directlua{luatextra.catcodetable_do_shortcuts()}
+\directlua{luatexbase.catcodetable_do_shortcuts()}
%</texpackage>
% \end{macrocode}
%
@@ -399,28 +399,26 @@ and the derived files
%
% \begin{macrocode}
%<*luamodule>
-module('luatextra', package.seeall)
+module('luatexbase', package.seeall)
% \end{macrocode}
%
-% In the same way, the table \texttt{tex.catcodetablenumber} contains the
-% numbers of the catcodetables registered with
-% \texttt{\string\newluacatcodetable}.
+% The number associated to a CS name is remembered in the |catcodetables|
+% table.
%
% \begin{macrocode}
catcodetables = {}
-tex.catcodetablenumber = catcodetables
function catcodetabledef_from_tex(name, number)
catcodetables[name] = tonumber(number)
end
% \end{macrocode}
%
-% With this function we create some shortcuts for a better readability in
-% lua code. This makes |tex.catcodetablenumber.latex| equivalent to
-% |tex.catcodetablenumber['CatcodeTableLaTeX']|.
+% The next function creates some shortcuts for better readability in lua
+% code. This makes |luatexbase.catcodetables.latex| equivalent to
+% |luatexbase.catcodetables.CatcodeTableLaTeX|.
%
% \begin{macrocode}
function catcodetable_do_shortcuts()
- local cat = luatextra.catcodetables
+ local cat = catcodetables
cat['latex'] = cat.CatcodeTableLaTeX
cat['latex-package'] = cat.CatcodeTableLaTeXAtLetter
cat['latex-atletter'] = cat.CatcodeTableLaTeXAtLetter
@@ -447,7 +445,7 @@ end
%<testlatex>\RequirePackage{luatexbase-cctb}
%<*testplain,testlatex>
\newluatexcatcodetable\testcctb
-\directlua{assert(luatextra.catcodetables.testcctb)}
+\directlua{assert(luatexbase.catcodetables.testcctb)}
% \end{macrocode}
%
% Also check that the catcodetable's number is remembered well,
@@ -458,7 +456,7 @@ end
\escapechar64
\newluatexcatcodetable\anothercctb
\endgroup
-\directlua{assert(luatextra.catcodetables.anothercctb)}
+\directlua{assert(luatexbase.catcodetables.anothercctb)}
% \end{macrocode}
%
% Now, play a little bit with predefined tables.
@@ -471,7 +469,7 @@ end
%<testlatex>\documentclass{minimal}
\directlua{%
tex.sprint('\string\\setbox0=\string\\hbox{')
- tex.sprint(luatextra.catcodetables.string, "\string\\undef # _^&")
+ tex.sprint(luatexbase.catcodetables.string, "\string\\undef # _^&")
tex.sprint('}')
}
% \end{macrocode}