package ac.essec.ooechs.tex2html;

/**
 * <p/>
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version,
 * provided that any use properly credits the author.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details at http://www.gnu.org
 * </p>
 *
 * @author Olly Oechsle, University of Essex, Date: 06-Dec-2006
 * @version 1.0
 */
public class TexText {

    public static final int PLAIN = 0;
    public static final int INSIDE_BRACKETS = 1;

    protected String text;
    protected int type;

    public TexText(String text, int type) {
        this.text = text;
        if (this.text.startsWith("{")) this.text = this.text.substring(1);
        this.type = type;
    }

    public int getType() {
        return type;
    }

    public String toString() {
        return text;
    }

}
