summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2013-05-16 21:52:25 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2013-05-16 21:52:25 +0200
commit3260c403de194f3001e1ffac32ab32c7bc79d481 (patch)
tree6d536be3d286e214ea1477360c4ecb5bfbc39cc1
parenta39d157491119aec0d15c7b2a3679707b7c5e232 (diff)
downloadluatexbase-3260c403de194f3001e1ffac32ab32c7bc79d481.tar.gz
add function to retrieve attribute unset value
-rw-r--r--luatexbase-attr.dtx3
1 files changed, 3 insertions, 0 deletions
diff --git a/luatexbase-attr.dtx b/luatexbase-attr.dtx
index c6a7040..499677d 100644
--- a/luatexbase-attr.dtx
+++ b/luatexbase-attr.dtx
@@ -434,6 +434,8 @@ luatexbase.new_attribute = new_attribute
% \end{macrocode}
%
% Unset an attribute the correct way depending on \luatex's version.
+% The constant \verb+unset_value+ can be retrieved by calling
+% \verb+get_unset_value()+ to apply to nodes.
%
% \begin{macrocode}
local unset_value = (luatexbase.luatexversion < 37) and -1 or -2147483647
@@ -441,6 +443,7 @@ function unset_attribute(name)
tex.setattribute(attributes[name], unset_value)
end
luatexbase.unset_attribute = unset_attribute
+luatexbase.get_unset_value = function () return unset_value end
% \end{macrocode}
%
% Allocation of user-defined whatsit nodes (experimental).