summaryrefslogtreecommitdiff
path: root/luatexbase-attr.dtx
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-03-29 06:03:16 +0200
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-03-29 06:03:16 +0200
commit46c64ac9b3bb3dab8bf4a1dc6039983171c73186 (patch)
treea5d8c3f6813848af9d25b898859e1426d377dae4 /luatexbase-attr.dtx
parentdb64070daee7f0f64183b45fea1de8ff993f8023 (diff)
downloadluatexbase-46c64ac9b3bb3dab8bf4a1dc6039983171c73186.tar.gz
First attempt at using compat.
Diffstat (limited to 'luatexbase-attr.dtx')
-rw-r--r--luatexbase-attr.dtx12
1 files changed, 8 insertions, 4 deletions
diff --git a/luatexbase-attr.dtx b/luatexbase-attr.dtx
index 41d7b88..1d66d5a 100644
--- a/luatexbase-attr.dtx
+++ b/luatexbase-attr.dtx
@@ -252,6 +252,9 @@ See source file '\inFileName' for details.
%
% \subsubsection{Load supporting Lua module}
%
+% First load \pk{luatexbase-loader} (hence \pk{luatexbase-compat}), then
+% the supporting Lua module.
+%
% \begin{macrocode}
\begingroup\expandafter\expandafter\expandafter\endgroup
\expandafter\ifx\csname RequirePackage\endcsname\relax
@@ -259,7 +262,7 @@ See source file '\inFileName' for details.
\else
\RequirePackage{luatexbase-loader}
\fi
-\directlua{require('luatexbase.attr')}
+\luatexbase@directlua{require('luatexbase.attr')}
% \end{macrocode}
%
% \subsection{User macros}
@@ -276,7 +279,7 @@ See source file '\inFileName' for details.
\global\luatexattributedef#1=\allocationnumber
\unsetluatexattribute#1%
\begingroup\escapechar\m@ne \expandafter\endgroup
- \directlua{luatexbase.attributedef_from_tex(
+ \luatexbase@directlua{luatexbase.attributedef_from_tex(
'\luatexluaescapestring{\string#1}', '\number\allocationnumber')}%
\wlog{\string#1=\string\luatexattribute\the\allocationnumber}%
\else
@@ -343,13 +346,14 @@ end
\newluatexattribute\testattr
\setluatexattribute\testattr{1}
\unsetluatexattribute\testattr
-\directlua{assert(luatexbase.attributes.testattr)}
+\catcode64 11
+\luatexbase@directlua{assert(luatexbase.attributes.testattr)}
\begingroup
\escapechar64
\newluatexattribute\anotherattr
\endgroup
\setluatexattribute\anotherattr{1}
-\directlua{assert(luatexbase.attributes.anotherattr)}
+\luatexbase@directlua{assert(luatexbase.attributes.anotherattr)}
%</testplain,testlatex>
%<testplain>\bye
%<testlatex>\stop