net.sourceforge.czt.parser.util
Class LatexCommand

java.lang.Object
  extended by net.sourceforge.czt.parser.util.LatexCommand

public class LatexCommand
extends java.lang.Object

A latex command for Zed markup together with its rendering information.

Author:
Petra Malik

Constructor Summary
LatexCommand(java.lang.String name, java.lang.String unicode, boolean addLeftSpace, boolean addRightSpace)
          Creates a new latex command.
 
Method Summary
 boolean addLeftSpace()
          A boolean indicating whether a space is usually inserted before.
 boolean addRightSpace()
          A boolean indicating whether a space is usually inserted after.
 java.lang.String getName()
          Returns the name of this latex command.
 java.lang.String getUnicode()
          Returns the unicode sequence represented by this latex command.
 java.lang.String toString()
          Returns a string representation of this latex command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LatexCommand

public LatexCommand(java.lang.String name,
                    java.lang.String unicode,
                    boolean addLeftSpace,
                    boolean addRightSpace)
Creates a new latex command.

Parameters:
name - the name of the latex command (should contain backslash character if present).
unicode - the corresponding unicode sequence represented.
addLeftSpace - a boolean indicating whether space is added on the leftern side of the unicode sequence when transforming latex to unicode.
addRightSpace - a boolean indicating whether space is added on the rightern side of the unicode sequence when transforming latex to unicode.
Method Detail

getName

public java.lang.String getName()
Returns the name of this latex command.

Returns:
the name of this latex command (contains the backslash character if present).

addLeftSpace

public boolean addLeftSpace()
A boolean indicating whether a space is usually inserted before. This is the case for %%Zinchar, %%Zinword, %%Zpostchar, and %%Zpostword definitions.


addRightSpace

public boolean addRightSpace()
A boolean indicating whether a space is usually inserted after. This is the case for %%Zinchar, %%Zinword, %%Zprechar, and %%Zpreword definitions.


getUnicode

public java.lang.String getUnicode()
Returns the unicode sequence represented by this latex command.

Returns:
the unicode sequence represented by this latex command.

toString

public java.lang.String toString()
Returns a string representation of this latex command.

Overrides:
toString in class java.lang.Object


Copyright © 2003-2007 Community Z Tools Project. All Rights Reserved.