public final class BuiltinCommand extends Object implements Command
Command that has been defined internally via a SnugglePackage.
All of the core LaTeX macros have been defined in this way - see CorePackageDefinitions.
BuiltinEnvironment,
CorePackageDefinitions| Modifier and Type | Field and Description |
|---|---|
protected EnumSet<LaTeXMode> |
allowedModes |
protected boolean |
allowingOptionalArgument |
protected int |
argumentCount |
protected H |
domBuildingHandler |
protected EnumMap<InterpretationType,Interpretation> |
interpretationMap |
protected String |
texName |
protected TextFlowContext |
textFlowContext |
| Constructor and Description |
|---|
BuiltinCommand(String texName,
CommandType commandType,
boolean allowingOptionalArgument,
int argumentCount,
EnumSet<LaTeXMode> allowedModes,
LaTeXMode[] argumentModes,
EnumMap<InterpretationType,Interpretation> interpretations,
CommandHandler domBuilderHandler,
TextFlowContext textFlowContext,
CombinerTargetMatcher combinerTargetMatcher) |
| Modifier and Type | Method and Description |
|---|---|
EnumSet<LaTeXMode> |
getAllowedModes() |
int |
getArgumentCount()
Returns the number of mandatory arguments this command expects, which will be zero
or greater.
|
LaTeXMode |
getArgumentMode(int argumentIndex)
Returns the LaTeX mode that each argument should be parsed in, starting with the
optional argument (if used) and then each mandatory argument in order.
|
CombinerTargetMatcher |
getCombinerTargetMatcher() |
H |
getDOMBuildingHandler() |
Interpretation |
getInterpretation(InterpretationType type) |
EnumMap<InterpretationType,Interpretation> |
getInterpretationMap() |
MathCharacter |
getMathCharacter() |
int |
getMathCharacterCodePoint() |
String |
getTeXName()
Returns the TeX name for this command or environment.
|
TextFlowContext |
getTextFlowContext() |
CommandType |
getType() |
boolean |
hasInterpretation(InterpretationType type) |
boolean |
isAllowingOptionalArgument()
Returns whether this command/environment takes an optional argument.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetArgumentCount, getTeXName, isAllowingOptionalArgumentprotected final String texName
protected final boolean allowingOptionalArgument
protected final int argumentCount
protected final EnumMap<InterpretationType,Interpretation> interpretationMap
protected final TextFlowContext textFlowContext
protected final H domBuildingHandler
public BuiltinCommand(String texName, CommandType commandType, boolean allowingOptionalArgument, int argumentCount, EnumSet<LaTeXMode> allowedModes, LaTeXMode[] argumentModes, EnumMap<InterpretationType,Interpretation> interpretations, CommandHandler domBuilderHandler, TextFlowContext textFlowContext, CombinerTargetMatcher combinerTargetMatcher)
public CommandType getType()
public LaTeXMode getArgumentMode(int argumentIndex)
CommandOrEnvironmentgetArgumentMode in interface CommandOrEnvironmentpublic CombinerTargetMatcher getCombinerTargetMatcher()
public MathCharacter getMathCharacter()
public int getMathCharacterCodePoint()
public String getTeXName()
CommandOrEnvironmentgetTeXName in interface CommandOrEnvironmentpublic boolean isAllowingOptionalArgument()
CommandOrEnvironmentisAllowingOptionalArgument in interface CommandOrEnvironmentpublic int getArgumentCount()
CommandOrEnvironmentgetArgumentCount in interface CommandOrEnvironmentpublic EnumMap<InterpretationType,Interpretation> getInterpretationMap()
public boolean hasInterpretation(InterpretationType type)
public Interpretation getInterpretation(InterpretationType type)
public TextFlowContext getTextFlowContext()
public H getDOMBuildingHandler()
Copyright © 2008–2026 The University of Edinburgh. All rights reserved.