public abstract class UserDefinedCommandOrEnvironment extends Object implements CommandOrEnvironment
UserDefinedCommands and UserDefinedEnvironments.UserDefinedEnvironment| Modifier and Type | Field and Description |
|---|---|
protected int |
argumentCount
Number of arguments
|
protected String |
optionalArgument
Optional argument, which may be blank. null if not supported
|
protected String |
texName |
| Constructor and Description |
|---|
UserDefinedCommandOrEnvironment(String texName,
String optionalArgument,
int argumentCount) |
| Modifier and Type | Method and Description |
|---|---|
int |
getArgumentCount()
Returns the number of mandatory arguments this command expects, which will be zero
or greater.
|
LaTeXMode |
getArgumentMode(int argumentIndex)
User-defined commands and environments stay in the same mode when parsing arguments.
|
String |
getOptionalArgument() |
String |
getTeXName()
Returns the TeX name for this command or environment.
|
boolean |
isAllowingOptionalArgument()
Returns whether this command/environment takes an optional argument.
|
String |
toString() |
protected final String texName
protected final String optionalArgument
protected final int argumentCount
public String getTeXName()
CommandOrEnvironmentgetTeXName in interface CommandOrEnvironmentpublic boolean isAllowingOptionalArgument()
CommandOrEnvironmentisAllowingOptionalArgument in interface CommandOrEnvironmentpublic String getOptionalArgument()
public int getArgumentCount()
CommandOrEnvironmentgetArgumentCount in interface CommandOrEnvironmentpublic LaTeXMode getArgumentMode(int argumentIndex)
getArgumentMode in interface CommandOrEnvironmentCopyright © 2008–2026 The University of Edinburgh. All rights reserved.