📄 entitiestosymbol.java
字号:
map.put("977", new Character((char)74));
map.put("978", new Character((char)161));
map.put("981", new Character((char)106));
map.put("982", new Character((char)118));
map.put("9824", new Character((char)170));
map.put("9827", new Character((char)167));
map.put("9829", new Character((char)169));
map.put("9830", new Character((char)168));
map.put("Alpha", new Character((char)65));
map.put("Beta", new Character((char)66));
map.put("Chi", new Character((char)67));
map.put("Delta", new Character((char)68));
map.put("Epsilon", new Character((char)69));
map.put("Eta", new Character((char)72));
map.put("Gamma", new Character((char)71));
map.put("Iota", new Character((char)73));
map.put("Kappa", new Character((char)75));
map.put("Lambda", new Character((char)76));
map.put("Mu", new Character((char)77));
map.put("Nu", new Character((char)78));
map.put("Omega", new Character((char)87));
map.put("Omicron", new Character((char)79));
map.put("Phi", new Character((char)70));
map.put("Pi", new Character((char)80));
map.put("Prime", new Character((char)178));
map.put("Psi", new Character((char)89));
map.put("Rho", new Character((char)82));
map.put("Sigma", new Character((char)83));
map.put("Tau", new Character((char)84));
map.put("Theta", new Character((char)81));
map.put("Upsilon", new Character((char)85));
map.put("Xi", new Character((char)88));
map.put("Zeta", new Character((char)90));
map.put("alefsym", new Character((char)192));
map.put("alpha", new Character((char)97));
map.put("and", new Character((char)217));
map.put("ang", new Character((char)208));
map.put("asymp", new Character((char)187));
map.put("beta", new Character((char)98));
map.put("cap", new Character((char)199));
map.put("chi", new Character((char)99));
map.put("clubs", new Character((char)167));
map.put("cong", new Character((char)64));
map.put("copy", new Character((char)211));
map.put("crarr", new Character((char)191));
map.put("cup", new Character((char)200));
map.put("dArr", new Character((char)223));
map.put("darr", new Character((char)175));
map.put("delta", new Character((char)100));
map.put("diams", new Character((char)168));
map.put("divide", new Character((char)184));
map.put("empty", new Character((char)198));
map.put("epsilon", new Character((char)101));
map.put("equiv", new Character((char)186));
map.put("eta", new Character((char)104));
map.put("euro", new Character((char)240));
map.put("exist", new Character((char)36));
map.put("forall", new Character((char)34));
map.put("frasl", new Character((char)164));
map.put("gamma", new Character((char)103));
map.put("ge", new Character((char)179));
map.put("hArr", new Character((char)219));
map.put("harr", new Character((char)171));
map.put("hearts", new Character((char)169));
map.put("hellip", new Character((char)188));
map.put("horizontal arrow extender", new Character((char)190));
map.put("image", new Character((char)193));
map.put("infin", new Character((char)165));
map.put("int", new Character((char)242));
map.put("iota", new Character((char)105));
map.put("isin", new Character((char)206));
map.put("kappa", new Character((char)107));
map.put("lArr", new Character((char)220));
map.put("lambda", new Character((char)108));
map.put("lang", new Character((char)225));
map.put("large brace extender", new Character((char)239));
map.put("large integral extender", new Character((char)244));
map.put("large left brace (bottom)", new Character((char)238));
map.put("large left brace (middle)", new Character((char)237));
map.put("large left brace (top)", new Character((char)236));
map.put("large left bracket (bottom)", new Character((char)235));
map.put("large left bracket (extender)", new Character((char)234));
map.put("large left bracket (top)", new Character((char)233));
map.put("large left parenthesis (bottom)", new Character((char)232));
map.put("large left parenthesis (extender)", new Character((char)231));
map.put("large left parenthesis (top)", new Character((char)230));
map.put("large right brace (bottom)", new Character((char)254));
map.put("large right brace (middle)", new Character((char)253));
map.put("large right brace (top)", new Character((char)252));
map.put("large right bracket (bottom)", new Character((char)251));
map.put("large right bracket (extender)", new Character((char)250));
map.put("large right bracket (top)", new Character((char)249));
map.put("large right parenthesis (bottom)", new Character((char)248));
map.put("large right parenthesis (extender)", new Character((char)247));
map.put("large right parenthesis (top)", new Character((char)246));
map.put("larr", new Character((char)172));
map.put("le", new Character((char)163));
map.put("lowast", new Character((char)42));
map.put("loz", new Character((char)224));
map.put("minus", new Character((char)45));
map.put("mu", new Character((char)109));
map.put("nabla", new Character((char)209));
map.put("ne", new Character((char)185));
map.put("not", new Character((char)216));
map.put("notin", new Character((char)207));
map.put("nsub", new Character((char)203));
map.put("nu", new Character((char)110));
map.put("omega", new Character((char)119));
map.put("omicron", new Character((char)111));
map.put("oplus", new Character((char)197));
map.put("or", new Character((char)218));
map.put("otimes", new Character((char)196));
map.put("part", new Character((char)182));
map.put("perp", new Character((char)94));
map.put("phi", new Character((char)102));
map.put("pi", new Character((char)112));
map.put("piv", new Character((char)118));
map.put("plusmn", new Character((char)177));
map.put("prime", new Character((char)162));
map.put("prod", new Character((char)213));
map.put("prop", new Character((char)181));
map.put("psi", new Character((char)121));
map.put("rArr", new Character((char)222));
map.put("radic", new Character((char)214));
map.put("radical extender", new Character((char)96));
map.put("rang", new Character((char)241));
map.put("rarr", new Character((char)174));
map.put("real", new Character((char)194));
map.put("reg", new Character((char)210));
map.put("rho", new Character((char)114));
map.put("sdot", new Character((char)215));
map.put("sigma", new Character((char)115));
map.put("sigmaf", new Character((char)86));
map.put("sim", new Character((char)126));
map.put("spades", new Character((char)170));
map.put("sub", new Character((char)204));
map.put("sube", new Character((char)205));
map.put("sum", new Character((char)229));
map.put("sup", new Character((char)201));
map.put("supe", new Character((char)202));
map.put("tau", new Character((char)116));
map.put("there4", new Character((char)92));
map.put("theta", new Character((char)113));
map.put("thetasym", new Character((char)74));
map.put("times", new Character((char)180));
map.put("trade", new Character((char)212));
map.put("uArr", new Character((char)221));
map.put("uarr", new Character((char)173));
map.put("upsih", new Character((char)161));
map.put("upsilon", new Character((char)117));
map.put("vertical arrow extender", new Character((char)189));
map.put("weierp", new Character((char)195));
map.put("xi", new Character((char)120));
map.put("zeta", new Character((char)122));
}
/**
* Gets a chunk with a symbol character.
* @param e a symbol value (see Entities class: alfa is greek alfa,...)
* @param font the font if the symbol isn't found (otherwise Font.SYMBOL)
* @return a Chunk
*/
public static Chunk get(String e, Font font) {
char s = getCorrespondingSymbol(e);
if (s == (char)0) {
try {
return new Chunk(String.valueOf((char)Integer.parseInt(e)), font);
}
catch(Exception exception) {
return new Chunk(e, font);
}
}
Font symbol = new Font(Font.SYMBOL, font.getSize(), font.getStyle(), font.getColor());
return new Chunk(String.valueOf(s), symbol);
}
/**
* Looks for the corresponding symbol in the font Symbol.
*
* @param name the name of the entity
* @return the corresponding character in font Symbol
*/
public static char getCorrespondingSymbol(String name) {
Character symbol = (Character) map.get(name);
if (symbol == null) {
return (char)0;
}
return symbol.charValue();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -