[latex3-commits] [git/LaTeX3-latex3-latex2e] callback_rules: Add documentation (ed83a5cb)

Marcel Fabian Krüger tex at 2krueger.de
Sun Sep 4 14:17:55 CEST 2022


Repository : https://github.com/latex3/latex2e
On branch  : callback_rules
Link       : https://github.com/latex3/latex2e/commit/ed83a5cb740448504db0c0e0d55dc35012cd228b

>---------------------------------------------------------------

commit ed83a5cb740448504db0c0e0d55dc35012cd228b
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date:   Sun Aug 14 21:54:21 2022 +0200

    Add documentation


>---------------------------------------------------------------

ed83a5cb740448504db0c0e0d55dc35012cd228b
 base/ltluatex.dtx | 30 +++++++++++++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)

diff --git a/base/ltluatex.dtx b/base/ltluatex.dtx
index 5c0666a9..06361a9f 100644
--- a/base/ltluatex.dtx
+++ b/base/ltluatex.dtx
@@ -380,7 +380,7 @@
 %
 % \noindent
 % \DescribeMacro{create_callback}
-% |luatexbase.create_callback(|\meta{name},meta{type},\meta{default}|)|
+% |luatexbase.create_callback(|\meta{name},\meta{type},\meta{default}|)|
 % Defines a user defined callback. The last argument is a default
 % function or |false|.
 %
@@ -389,6 +389,34 @@
 % |luatexbase.call_callback(|\meta{name},\ldots|)|
 % Calls a user defined callback with the supplied arguments.
 %
+% \noindent
+% \DescribeMacro{declare_callback_rule}
+% |luatexbase.declare_callback_rule(|\meta{name}, \meta{first}, \meta{relation}, \meta{second}|)|
+% Adds an ordering constraint between two callback functions for callback \meta{name}.
+%
+% The kind of constraint added depends on \meta{relation}:
+% \begin{description}
+%   \item[before] The callback function with description \meta{first} will be
+%     executed before the function with description \meta{second}.
+%   \item[after] The callback function with description \meta{first} will be
+%     executed after the function with description \meta{second}.
+%   \item[incompatible-warning] When both a callback function with description \meta{first}
+%     and with description \meta{second} is registered, then a warning is printed when
+%     the callback is executed.
+%   \item[incompatible-error] When both a callback function with description \meta{first}
+%     and with description \meta{second} is registered, then an error is printed when
+%     the callback is executed.
+%   \item[unrelated] Any previously declared callback rule between \meta{first}
+%     and \meta{second} gets disabled.
+% \end{description}
+% Every call to \texttt{declare_callback_rule} with a specific callback \meta{name}
+% and descriptions \meta{first} and \meta{second} overwrites all previous calls with
+% same callback and descriptions.
+%
+% The callback functions do not have to be registered yet when the functions is called.
+% Ony the constraints for which both callback descriptions refer to callbacks
+% registered at the time the callback is called will have an effect.
+%
 % \endgroup
 %
 % \MaybeStop{}





More information about the latex3-commits mailing list.