1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259
|
/* TeXConstants.java
* =========================================================================
* This file is part of the JMathTeX Library - http://jmathtex.sourceforge.net
*
* Copyright (C) 2004-2007 Universiteit Gent
*
* 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.
*
* 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.
*
* A copy of the GNU General Public License can be found in the file
* LICENSE.txt provided with the source distribution of this program (see
* the META-INF directory in the source jar). This license can also be
* found on the GNU website at http://www.gnu.org/licenses/gpl.html.
*
* If you did not receive a copy of the GNU General Public License along
* with this program, contact the lead developer, or write to the Free
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
* 02110-1301, USA.
*
*/
package be.ugent.caagt.jmathtex;
/**
* The collection of constants that can be used in the methods of the classes of
* this package.
*/
public class TeXConstants {
// *******************
// ALIGNMENT CONSTANTS
// *******************
/**
* Alignment constant: extra space will be added to the right of the formula
*/
public static final int ALIGN_LEFT = 0;
/**
* Alignment constant: extra space will be added to the left of the formula
*/
public static final int ALIGN_RIGHT = 1;
/**
* Alignment constant: the formula will be centered in the middle. This constant
* can be used for both horizontal and vertical alignment.
*/
public static final int ALIGN_CENTER = 2;
/**
* Alignment constant: extra space will be added under the formula
*/
public static final int ALIGN_TOP = 3;
/**
* Alignment constant: extra space will be added above the formula
*/
public static final int ALIGN_BOTTOM = 4;
// *********************
// SYMBOL TYPE CONSTANTS
// *********************
/**
* Symbol/Atom type: ordinary symbol, e.g. "slash"
*/
public static final int TYPE_ORDINARY = 0;
/**
* Symbol/Atom type: big operator (= large operator), e.g. "sum"
*/
public static final int TYPE_BIG_OPERATOR = 1;
/**
* Symbol/Atom type: binary operator, e.g. "plus"
*/
public static final int TYPE_BINARY_OPERATOR = 2;
/**
* Symbol/Atom type: relation, e.g. "equals"
*/
public static final int TYPE_RELATION = 3;
/**
* Symbol/Atom type: opening symbol, e.g. "lbrace"
*/
public static final int TYPE_OPENING = 4;
/**
* Symbol/Atom type: closing symbol, e.g. "rbrace"
*/
public static final int TYPE_CLOSING = 5;
/**
* Symbol/Atom type: punctuation symbol, e.g. "comma"
*/
public static final int TYPE_PUNCTUATION = 6;
/**
* Atom type: inner atom (NOT FOR SYMBOLS!!!)
*/
public static final int TYPE_INNER = 7;
/**
* Symbol type: accent, e.g. "hat"
*/
public static final int TYPE_ACCENT = 10;
// ***************************************
// OVER AND UNDER DELIMITER TYPE CONSTANTS
// ***************************************
/**
* Delimiter type constant for putting delimiters over and under formula's: brace
*/
public static final int DELIM_BRACE = 0;
/**
* Delimiter type constant for putting delimiters over and under formula's: square bracket
*/
public static final int DELIM_SQUARE_BRACKET = 1;
/**
* Delimiter type constant for putting delimiters over and under formula's: parenthesis
*/
public static final int DELIM_BRACKET = 2;
/**
* Delimiter type constant for putting delimiters over and under formula's:
* arrow with single line pointing to the left
*/
public static final int DELIM_LEFT_ARROW = 3;
/**
* Delimiter type constant for putting delimiters over and under formula's:
* arrow with single line pointing to the right
*/
public static final int DELIM_RIGHT_ARROW = 4;
/**
* Delimiter type constant for putting delimiters over and under formula's:
* arrow with single line pointing to the left and to the right
*/
public static final int DELIM_LEFT_RIGHT_ARROW = 5;
/**
* Delimiter type constant for putting delimiters over and under formula's:
* arrow with two lines pointing to the left
*/
public static final int DELIM_DOUBLE_LEFT_ARROW = 6;
/**
* Delimiter type constant for putting delimiters over and under formula's:
* arrow with two lines pointing to the right
*/
public static final int DELIM_DOUBLE_RIGHT_ARROW = 7;
/**
* Delimiter type constant for putting delimiters over and under formula's:
* arrow with two lines pointing to the left and to the right
*/
public static final int DELIM_DOUBLE_LEFT_RIGHT_ARROW = 8;
/**
* Delimiter type constant for putting delimiters over and under formula's:
* underline once
*/
public static final int DELIM_SINGLE_LINE = 9;
/**
* Delimiter type constant for putting delimiters over and under formula's:
* underline twice
*/
public static final int DELIM_DOUBLE_LINE = 10;
// *******************
// TEX STYLE CONSTANTS
// *******************
/**
* TeX style: display style.
* <p>
* The large versions of big operators are used and limits are placed under and over
* these operators (default). Symbols are rendered in the largest size.
*/
public static final int STYLE_DISPLAY = 0;
/**
* TeX style: text style.
* <p>
* The small versions of big operators are used and limits are attached to
* these operators as scripts (default). The same size as in the display style
* is used to render symbols.
*/
public static final int STYLE_TEXT = 2;
/**
* TeX style: script style.
* <p>
* The same as the text style, but symbols are rendered in a smaller size.
*/
public static final int STYLE_SCRIPT = 4;
/**
* TeX style: script_script style.
* <p>
* The same as the script style, but symbols are rendered in a smaller size.
*/
public static final int STYLE_SCRIPT_SCRIPT = 6;
// **************
// UNIT CONSTANTS
// **************
/**
* Unit constant: em
* <p>
* 1 em = the width of the capital 'M' in the current font
*/
public static final int UNIT_EM = 0;
/**
* Unit constant: ex
* <p>
* 1 ex = the height of the character 'x' in the current font
*/
public static final int UNIT_EX = 1;
/**
* Unit constant: pixel
*/
public static final int UNIT_PIXEL = 2;
/**
* Unit constant: point
*/
public static final int UNIT_POINT = 3;
/**
* Unit constant: pica
* <p>
* 1 pica = 12 point
*/
public static final int UNIT_PICA = 4;
/**
* Unit constant: math unit (mu)
* <p>
* 1 mu = 1/18 em (em taken from the "mufont")
*/
public static final int UNIT_MU = 5;
}
|