⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 latexoperatordocgenerator.java

📁 著名的开源仿真软件yale
💻 JAVA
字号:
/* *  YALE - Yet Another Learning Environment *  Copyright (C) 2002, 2003 *      Simon Fischer, Ralf Klinkenberg, Ingo Mierswa,  *          Katharina Morik, Oliver Ritthoff *      Artificial Intelligence Unit *      Computer Science Department *      University of Dortmund *      44221 Dortmund,  Germany *  email: yale@ls8.cs.uni-dortmund.de *  web:   http://yale.cs.uni-dortmund.de/ * *  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. * *  You should have received a copy of the GNU General Public License *  along with this program; if not, write to the Free Software *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *  USA. */package edu.udo.cs.yale.doc;import edu.udo.cs.yale.tools.LogService;import java.util.Stack;import java.io.PrintWriter;import java.io.StringReader;import java.io.IOException;import java.util.regex.*;import javax.xml.parsers.*;import org.xml.sax.helpers.*;import org.xml.sax.*;/** Formats operator documentation in LaTeX style. *   *  @yale.todo Lookup class when link is found and decide which tag to use (op, ioobj, ...) *  @version $Id: LatexOperatorDocGenerator.java,v 2.13 2003/09/04 15:16:22 fischer Exp $  */public class LatexOperatorDocGenerator extends AbstractOperatorDocGenerator {    public static final String[][] TAGS = { 	{ "", "" },	{ "\\operator{", "}" },	{ "\n\\begin{parameters}", "\\end{parameters}" },	{ "", "" },	{ "\\reqpar[", "]" },	{ "\\optpar[", "]" },	{ "", "" },	{ "\\opdescr ", "" },	{ "\\begin{opin} ", "\\end{opin}" },	{ "\\begin{opout} ", "\\end{opout}" },	{ "\\item[", "]" },	{ "\n\\begin{values}", "\\end{values}" },	{ "", "" },	{ "\\val[", "]" },	{ "", "" },	{ "\\index{", "}" },	{ "\\par References: ", "" },	{ "\\cite{", "}" }    };    public String getOpenTag(int tagNo) {	return TAGS[tagNo][0];    }    public String getCloseTag(int tagNo) {	return TAGS[tagNo][1];    }    public String marginIcon(String iconName) {	String epsfig = "\\epsfig{file=graphics/"+iconName+".eps}";	return "\\marginpar[\\flushright"+epsfig+"]{"+epsfig+"}";    }    public String escape(String toEscape) {	String escaped = toEscape.replaceAll("_", "\\\\_");	escaped = escaped.replaceAll("\\$", "\\\\\\$");	escaped = escaped.replaceAll("\u221E", "\\$\\\\infty\\$");	escaped = escaped.replaceAll("ä", "\\\\\"a");	escaped = escaped.replaceAll("ö", "\\\\\"o");	escaped = escaped.replaceAll("ü", "\\\\\"u");	escaped = escaped.replaceAll("Ä", "\\\\\"A");	escaped = escaped.replaceAll("Ö", "\\\\\"O");	escaped = escaped.replaceAll("Ü", "\\\\\"U");	escaped = escaped.replaceAll("ß", "\\\\\"s");	escaped = escaped.replaceAll(" ", "\\\\ ");	escaped = escaped.replaceAll(" "", " ``");// this can be improved!	escaped = escaped.replaceAll(""", "''");	escaped = escaped.replaceAll("#", "\\\\#");	escaped = escaped.replaceAll("

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -