CommandRegistry class

Command Registry: Maps LaTeX command names to their corresponding CommandHandler.

Usage:

final registry = CommandRegistry();
registry.installFractionHandlers();
registry.installRootHandlers();
// ...

// Inside parseCommand():
final node = registry.dispatch(cmdName, ctx, stream);
Available extensions

Constructors

CommandRegistry()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispatch(String cmdName, LatexParserContext ctx, LatexTokenStream stream) LatexNode?
Attempts to dispatch a command. If registered, calls the handler and returns the result; if unregistered, returns null (allowing the caller to fall back to default handling).
hasHandler(String cmdName) bool
Checks if a command is registered.
installAccentHandlers() → void

Available on CommandRegistry, provided by the AccentHandlersExtension extension

installAdvancedHandlers() → void

Available on CommandRegistry, provided by the AdvancedHandlersExtension extension

installArrowAndStackHandlers() → void

Available on CommandRegistry, provided by the ArrowAndStackHandlersExtension extension

installBigOperatorHandlers() → void

Available on CommandRegistry, provided by the BigOperatorHandlersExtension extension

installColorHandlers() → void

Available on CommandRegistry, provided by the ColorHandlersExtension extension

installDelimiterHandlers() → void

Available on CommandRegistry, provided by the DelimiterHandlersExtension extension

installFractionHandlers() → void

Available on CommandRegistry, provided by the FractionHandlersExtension extension

installHyperlinkHandlers() → void

Available on CommandRegistry, provided by the HyperlinkHandlersExtension extension

installMacroHandlers() → void

Available on CommandRegistry, provided by the MacroHandlersExtension extension

installModule(void registrar(CommandRegistry)) → void
Installs a module (batch registers a set of handlers).
installOperatorHandlers() → void

Available on CommandRegistry, provided by the OperatorHandlersExtension extension

installPackageCommandHandlers() → void

Available on CommandRegistry, provided by the PackageCommandHandlersExtension extension

installReferenceHandlers() → void

Available on CommandRegistry, provided by the ReferenceHandlersExtension extension

installRootHandlers() → void

Available on CommandRegistry, provided by the RootHandlersExtension extension

installSectionHandlers() → void

Available on CommandRegistry, provided by the SectionHandlersExtension extension

installSpaceHandlers() → void

Available on CommandRegistry, provided by the SpaceHandlersExtension extension

installSpecialEffectHandlers() → void

Available on CommandRegistry, provided by the SpecialEffectHandlersExtension extension

installStyleHandlers() → void

Available on CommandRegistry, provided by the StyleHandlers extension

installTableHandlers() → void

Available on CommandRegistry, provided by the TableHandlersExtension extension

installTextDirectionHandlers() → void

Available on CommandRegistry, provided by the TextDirectionHandlersExtension extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register(List<String> names, CommandHandler handler) → void
Registers a handler for one or more command names. Later registrations of the same name will overwrite previous ones.
registeredCommands() Set<String>
Returns all registered command names (useful for debugging/testing).
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited