Top Description Methods
uk.ac.ed.ph.snuggletex.definitions

public Interface CommandOrEnvironment

Known Direct Subinterfaces
uk.ac.ed.ph.snuggletex.definitions.Environment, uk.ac.ed.ph.snuggletex.definitions.Command
Known Direct Implementers
uk.ac.ed.ph.snuggletex.definitions.UserDefinedCommandOrEnvironment, uk.ac.ed.ph.snuggletex.definitions.BuiltinCommandOrEnvironment

Base interface for LaTeX commands and environments.
Author
David McKain
Version
$Revision:179 $

Method Summary

Modifier and TypeMethod and Description
public int
getArgumentCount()

Returns the number of mandatory arguments this command expects, which will be zero or greater.

public 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.

public String
getTeXName()

Returns the TeX name for this command or environment.

public boolean
isAllowingOptionalArgument()

Returns whether this command/environment takes an optional argument.

Method Detail

getArgumentCountback to summary
public int getArgumentCount()

Returns the number of mandatory arguments this command expects, which will be zero or greater.

getArgumentModeback to summary
public 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. Null entries indicate that the current LaTeX mode should be used.

getTeXNameback to summary
public String getTeXName()

Returns the TeX name for this command or environment. (In the case of commands, this does not include the leading backslash.)

isAllowingOptionalArgumentback to summary
public boolean isAllowingOptionalArgument()

Returns whether this command/environment takes an optional argument. As per LaTeX convention, this will only return true if the command/environment takes at least one mandatory argument as well.