SnugglePackage defines a collection of BuiltinCommands, BuiltinEnvironments,
and ErrorCodes/ErrorGroups that can be registered with a SnuggleEngine
to add in extra functionality.
The core SnuggleTeX distribution comes with what is essentially a built-in package defined
in CorePackageDefinitions which provides its core functionality.
BuiltinCommand, BuiltinEnvironment
| Modifier and Type | Class and Description |
|---|---|
| private static interface |
| Modifier and Type | Field and Description |
|---|---|
| private final ConcurrentHashMap | builtinCommandMap
Thread-safe Map of built-in commands, keyed on name |
| private final ConcurrentHashMap | builtinEnvironmentMap
Thread-safe Map of built-in environments, keyed on name |
| private final List | errorGroupList
Thread-safe List of all |
| private final ConcurrentHashMap | errorGroupMap
Thread-safe Map of all |
| private ResourceBundle | errorMessageBundle
|
| public static final InterpretableSimpleMathHandler | interpretableSimpleMathBuilder
Share instance of |
| private final ConcurrentHashMap | mathCharacterMap
Thread-safe Map of |
| private final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public BuiltinCommand | addCombinerCommand(final String name, final EnumSet<LaTeXMode> allowedModes, final CombinerTargetMatcher combinerTargetMatcher, final CommandHandler handler, final TextFlowContext context)
|
| public BuiltinCommand | |
| public void | |
| public BuiltinCommand | addComplexCommand(final String name, final boolean allowOptionalArgument, final int arguments, final EnumSet<LaTeXMode> allowedModes, final LaTeXMode[] argumentModes, final CommandHandler handler, final TextFlowContext context)
|
| public BuiltinCommand | addComplexCommandOneArg(final String name, final boolean allowOptionalArgument, final EnumSet<LaTeXMode> allowedModes, final LaTeXMode argumentMode, final CommandHandler handler, final TextFlowContext context)
|
| public BuiltinCommand | addComplexCommandOneArg(final String name, final boolean allowOptionalArgument, final EnumSet<LaTeXMode> allowedModes, final LaTeXMode argumentMode, final Interpretation interpretation, final CommandHandler handler, final TextFlowContext context)
|
| public BuiltinCommand | addComplexCommandSameArgMode(final String name, final boolean allowOptionalArgument, final int arguments, final EnumSet<LaTeXMode> allowedModes, final CommandHandler handler, final TextFlowContext context)
|
| public BuiltinCommand | addComplexCommandSameArgMode(final String name, final boolean allowOptionalArgument, final int arguments, final EnumSet<LaTeXMode> allowedModes, final Interpretation interpretation, final CommandHandler handler, final TextFlowContext context)
|
| public BuiltinEnvironment | addEnvironment(final String name, final EnumSet<LaTeXMode> allowedModes, final LaTeXMode contentMode, final Interpretation interpretation, final EnvironmentHandler handler, final TextFlowContext context)
|
| public BuiltinEnvironment | addEnvironment(final String name, final EnumSet<LaTeXMode> allowedModes, final LaTeXMode contentMode, final Interpretation[] interpretations, final EnvironmentHandler handler, final TextFlowContext context)
|
| public BuiltinEnvironment | addEnvironment(final String name, final boolean allowOptionalArgument, final int argumentCount, final EnumSet<LaTeXMode> allowedModes, final LaTeXMode contentMode, final Interpretation interpretation, final EnvironmentHandler handler, final TextFlowContext context)
|
| public BuiltinEnvironment | addEnvironment(final String name, final boolean allowOptionalArgument, final int argumentCount, final EnumSet<LaTeXMode> allowedModes, final LaTeXMode contentMode, final Interpretation[] interpretations, final EnvironmentHandler handler, final TextFlowContext context)
|
| public BuiltinEnvironment | |
| public void | |
| public void | |
| public BuiltinCommand | |
| public BuiltinCommand | |
| public BuiltinCommand | addSimpleCommand(final String name, final EnumSet<LaTeXMode> allowedModes, final CommandHandler handler, final TextFlowContext context)
|
| public BuiltinCommand | addSimpleCommand(final String name, final EnumSet<LaTeXMode> allowedModes, final Interpretation[] interpretations, final CommandHandler handler, final TextFlowContext context)
|
| public BuiltinCommand | addSimpleCommand(final String name, final EnumSet<LaTeXMode> allowedModes, final Interpretation interpretation, final CommandHandler handler, final TextFlowContext context)
|
| public BuiltinCommand | |
| public BuiltinCommand | addSimpleMathCommand(final String name, final MathInterpretation interpretation, final CommandHandler handler)
|
| public BuiltinCommand | addSimpleMathCommand(final String name, final MathInterpretation[] interpretations, final CommandHandler handler)
|
| private MathCharacter | |
| public BuiltinCommand | getBuiltinCommandByTeXName(String texName)
Returns the |
| public Map | getBuiltinCommandMap()
Returns a read-only |
| public BuiltinEnvironment | getBuiltinEnvironmentByTeXName(String texName)
Returns the |
| public Map | getBuiltinEnvironmentMap()
Returns a read-only |
| public List | getErrorCodes(ErrorGroup errorGroup)
Returns an unmodifiable view of the |
| public List | |
| public ResourceBundle | |
| public MathCharacter | getMathCharacter(int codePoint)
Returns the |
| public Map | getMathCharacterMap()
Returns a read-only |
| public String | |
| public static boolean | isInputableTeXName(final String texName)
Tests whether the name of a command or environment is "inputable". |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public static EnumMap | |
| public static EnumMap | |
| private void | |
| public void | setErrorMessageBundle(ResourceBundle errorMessageBundle)
Sets the |
| builtinCommandMap | back to summary |
|---|---|
| private final ConcurrentHashMap<String, BuiltinCommand> builtinCommandMap Thread-safe Map of built-in commands, keyed on name | |
| builtinEnvironmentMap | back to summary |
|---|---|
| private final ConcurrentHashMap<String, BuiltinEnvironment> builtinEnvironmentMap Thread-safe Map of built-in environments, keyed on name | |
| errorGroupList | back to summary |
|---|---|
| private final List<ErrorGroup> errorGroupList Thread-safe List of all | |
| errorGroupMap | back to summary |
|---|---|
| private final ConcurrentHashMap<ErrorGroup, List<ErrorCode>> errorGroupMap Thread-safe Map of all | |
| errorMessageBundle | back to summary |
|---|---|
| private ResourceBundle errorMessageBundle
| |
| interpretableSimpleMathBuilder | back to summary |
|---|---|
| public static final InterpretableSimpleMathHandler interpretableSimpleMathBuilder Share instance of | |
| mathCharacterMap | back to summary |
|---|---|
| private final ConcurrentHashMap<Integer, MathCharacter> mathCharacterMap Thread-safe Map of | |
| name | back to summary |
|---|---|
| private final String name Short name, used when formatting | |
| SnugglePackage | back to summary |
|---|---|
| public SnugglePackage(final String name) | |
| addCombinerCommand | back to summary |
|---|---|
| public BuiltinCommand addCombinerCommand(final String name, final EnumSet<LaTeXMode> allowedModes, final CombinerTargetMatcher combinerTargetMatcher, final CommandHandler handler, final TextFlowContext context) | |
| addCommand | back to summary |
|---|---|
| public BuiltinCommand addCommand(final BuiltinCommand command) | |
| addCommandInterpretation | back to summary |
|---|---|
| public void addCommandInterpretation(final String name, final Interpretation interpretation) | |
| addComplexCommand | back to summary |
|---|---|
| public BuiltinCommand addComplexCommand(final String name, final boolean allowOptionalArgument, final int arguments, final EnumSet<LaTeXMode> allowedModes, final LaTeXMode[] argumentModes, final CommandHandler handler, final TextFlowContext context) | |
| addComplexCommandOneArg | back to summary |
|---|---|
| public BuiltinCommand addComplexCommandOneArg(final String name, final boolean allowOptionalArgument, final EnumSet<LaTeXMode> allowedModes, final LaTeXMode argumentMode, final CommandHandler handler, final TextFlowContext context) | |
| addComplexCommandOneArg | back to summary |
|---|---|
| public BuiltinCommand addComplexCommandOneArg(final String name, final boolean allowOptionalArgument, final EnumSet<LaTeXMode> allowedModes, final LaTeXMode argumentMode, final Interpretation interpretation, final CommandHandler handler, final TextFlowContext context) | |
| addComplexCommandSameArgMode | back to summary |
|---|---|
| public BuiltinCommand addComplexCommandSameArgMode(final String name, final boolean allowOptionalArgument, final int arguments, final EnumSet<LaTeXMode> allowedModes, final CommandHandler handler, final TextFlowContext context) | |
| addComplexCommandSameArgMode | back to summary |
|---|---|
| public BuiltinCommand addComplexCommandSameArgMode(final String name, final boolean allowOptionalArgument, final int arguments, final EnumSet<LaTeXMode> allowedModes, final Interpretation interpretation, final CommandHandler handler, final TextFlowContext context) | |
| addEnvironment | back to summary |
|---|---|
| public BuiltinEnvironment addEnvironment(final String name, final EnumSet<LaTeXMode> allowedModes, final LaTeXMode contentMode, final Interpretation interpretation, final EnvironmentHandler handler, final TextFlowContext context) | |
| addEnvironment | back to summary |
|---|---|
| public BuiltinEnvironment addEnvironment(final String name, final EnumSet<LaTeXMode> allowedModes, final LaTeXMode contentMode, final Interpretation[] interpretations, final EnvironmentHandler handler, final TextFlowContext context) | |
| addEnvironment | back to summary |
|---|---|
| public BuiltinEnvironment addEnvironment(final String name, final boolean allowOptionalArgument, final int argumentCount, final EnumSet<LaTeXMode> allowedModes, final LaTeXMode contentMode, final Interpretation interpretation, final EnvironmentHandler handler, final TextFlowContext context) | |
| addEnvironment | back to summary |
|---|---|
| public BuiltinEnvironment addEnvironment(final String name, final boolean allowOptionalArgument, final int argumentCount, final EnumSet<LaTeXMode> allowedModes, final LaTeXMode contentMode, final Interpretation[] interpretations, final EnvironmentHandler handler, final TextFlowContext context) | |
| addEnvironment | back to summary |
|---|---|
| public BuiltinEnvironment addEnvironment(final BuiltinEnvironment environment) | |
| addErrorCode | back to summary |
|---|---|
| public void addErrorCode(ErrorCode errorCode) | |
| addErrorCodes | back to summary |
|---|---|
| public void addErrorCodes(ErrorCode... errorCodes) | |
| addMathCharacterCommand | back to summary |
|---|---|
| public BuiltinCommand addMathCharacterCommand(final MathCharacter mathCharacter) | |
| addMathCharacterCommandAlias | back to summary |
|---|---|
| public BuiltinCommand addMathCharacterCommandAlias(final String name, final MathCharacter mathCharacter) | |
| addSimpleCommand | back to summary |
|---|---|
| public BuiltinCommand addSimpleCommand(final String name, final EnumSet<LaTeXMode> allowedModes, final CommandHandler handler, final TextFlowContext context) | |
| addSimpleCommand | back to summary |
|---|---|
| public BuiltinCommand addSimpleCommand(final String name, final EnumSet<LaTeXMode> allowedModes, final Interpretation[] interpretations, final CommandHandler handler, final TextFlowContext context) | |
| addSimpleCommand | back to summary |
|---|---|
| public BuiltinCommand addSimpleCommand(final String name, final EnumSet<LaTeXMode> allowedModes, final Interpretation interpretation, final CommandHandler handler, final TextFlowContext context) | |
| addSimpleMathCommand | back to summary |
|---|---|
| public BuiltinCommand addSimpleMathCommand(final String name, final MathInterpretation... interpretations) | |
| addSimpleMathCommand | back to summary |
|---|---|
| public BuiltinCommand addSimpleMathCommand(final String name, final MathInterpretation interpretation, final CommandHandler handler) | |
| addSimpleMathCommand | back to summary |
|---|---|
| public BuiltinCommand addSimpleMathCommand(final String name, final MathInterpretation[] interpretations, final CommandHandler handler) | |
| ensureBuiltinMathCharacterCommand | back to summary |
|---|---|
| private MathCharacter ensureBuiltinMathCharacterCommand(String texName, String errorMessageContext) | |
| getBuiltinCommandByTeXName | back to summary |
|---|---|
| public BuiltinCommand getBuiltinCommandByTeXName(String texName) Returns the | |
| getBuiltinCommandMap | back to summary |
|---|---|
| public Map Returns a read-only | |
| getBuiltinEnvironmentByTeXName | back to summary |
|---|---|
| public BuiltinEnvironment getBuiltinEnvironmentByTeXName(String texName) Returns the | |
| getBuiltinEnvironmentMap | back to summary |
|---|---|
| public Map Returns a read-only | |
| getErrorCodes | back to summary |
|---|---|
| public List Returns an unmodifiable view of the | |
| getErrorGroups | back to summary |
|---|---|
| public List Returns an unmodifiable view of all of the | |
| getErrorMessageBundle | back to summary |
|---|---|
| public ResourceBundle getErrorMessageBundle() Returns the | |
| getMathCharacter | back to summary |
|---|---|
| public MathCharacter getMathCharacter(int codePoint) Returns the | |
| getMathCharacterMap | back to summary |
|---|---|
| public Map Returns a read-only | |
| getName | back to summary |
|---|---|
| public String getName() Returns the name for this package. | |
| isInputableTeXName | back to summary |
|---|---|
| public static boolean isInputableTeXName(final String texName) Tests whether the name of a command or environment is "inputable". Ones which cannot be directly input are enclosed in angle brackets. These commands are created during token fixing. | |
| loadMathCharacterAliases | back to summary |
|---|---|
| public void loadMathCharacterAliases(final String resourceLocation) | |
| loadMathCharacterBigLimitTargets | back to summary |
|---|---|
| public void loadMathCharacterBigLimitTargets(final String resourceLocation) | |
| loadMathCharacterBrackets | back to summary |
|---|---|
| public void loadMathCharacterBrackets(final String resourceLocation) | |
| loadMathCharacterDefinitions | back to summary |
|---|---|
| public void loadMathCharacterDefinitions(final String resourceLocation) | |
| loadMathCharacterNegations | back to summary |
|---|---|
| public void loadMathCharacterNegations(final String resourceLocation) | |
| loadMathFunctionDefinitions | back to summary |
|---|---|
| public void loadMathFunctionDefinitions(final String resourceLocation) | |
| makeInterpretationMap | back to summary |
|---|---|
| public static EnumMap | |
| makeInterpretationMap | back to summary |
|---|---|
| public static EnumMap | |
| readResourceData | back to summary |
|---|---|
| private void readResourceData(final String resourceLocation, final SnugglePackage. | |
| setErrorMessageBundle | back to summary |
|---|---|
| public void setErrorMessageBundle(ResourceBundle errorMessageBundle) Sets the | |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| handleLine | back to summary |
|---|---|
| public void handleLine(String line) | |