From: Radek Czajka Date: Mon, 26 Mar 2018 00:18:16 +0000 (+0200) Subject: Import from v. 2.0.2 downloaded from http://getfo.org/texml/ X-Git-Tag: 3.0~2 X-Git-Url: https://git.mdrn.pl/texml.git/commitdiff_plain/f06bfe769b002b2335a03c7a6c871f2263bef6f6?ds=sidebyside Import from v. 2.0.2 downloaded from getfo.org/texml/ --- f06bfe769b002b2335a03c7a6c871f2263bef6f6 diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..51a4ef4 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,255 @@ +2011-01-19 Oleg Parashchenko olpa@users.sourceforge.net + +* Texml/handler.py: wrapper around strip() to support very +old python version +* scripts/texml.py: version number is changed to 2.0.2. + +2006-07-20 Oleg Parashchenko olpa@users.sourceforge.net + +* Texml/texml.py: try to write a symbol in the ^^XX form first, +and only then consult the rewriting maps. Otherwise combination +of --encoding and --ascii gives undesired result. +* scripts/texml.py: version number is changed to 2.0.1. + + +2006-07-10 Oleg Parashchenko olpa@users.sourceforge.net + +* TeXML 2.0.0 release. + + +2006-06-14 Oleg Parashchenko olpa@users.sourceforge.net + +* Texml/handler.py: one raise was incorrectly commented-out. +* scripts/texml.py: version number is changed to 2.0.0.beta1. +* scripts/texml.py: the first line now is just "#!python", the +path is to be corrected by distutils. + + +2006-06-02 Oleg Parashchenko olpa@users.sourceforge.net + +* Texml/specmap.py: mapping for the non-breaking hyphen, +as suggested by Paul Tremblay. + + +2006-06-01 Oleg Parashchenko olpa@users.sourceforge.net + +* Texml/specmap.py: "|" is now "\textbar". + + +2005-10-03 Oleg Parashchenko olpa@users.sourceforge.net + +* scripts/texml/texml.py: First line now is "#!python". +* scripts/texml: New file. +* scripts/texml_local: Old content of PYTHONPATH is retained. +* tests/data/quick/Makefile: Switched from using "texml.py" to +using "texml_local". +* setup.py: Version string is extracted from "scripts/texml.py". +* MANIFEST.in: HTML and text documentation is added. +* README: typo is fixed. + + +2005-09-26 Oleg Parashchenko olpa@users.sourceforge.net + +* texml.py: Version number is updated: 1.29.devel. +* texml.py: Default width now is 62 symbols. +* texmlwr.py: If symbol couldn't be translated to an encoding, + command "\unicodechar" is written instead of an #&xNNN; entity. + + +2005-09-07 Oleg Parashchenko olpa@users.sourceforge.net + +* texml.py: Version number is updated: 1.28.devel. +* dtd/texml.dtd: Element "pdf" is added. +* handler.py, texmlwr.py: Support of the element "pdf". +* data/pdfstring.xml, data/pdfstring.out, faildata/pdfstring.xml, + faildata/pdfstring.grep, test/readme: Tests for the "pdf" element. +* handler.py: doesn't print error on it's own. Instead, returns the + text to the caller, and caller should print the message. + The function "__print_error" is deleted. The format "prefix:\n" + is changed to "prefix: ". +* unimap.py: no more "<" and ">" instead of "<" and ">". + Thanks Felix Wiemann for reporting the bug. + http://sourceforge.net/mailarchive/forum.php?thread_id=7467879&forum_id=44318 + + +Version 1.27.devel (20 June 2005) + +* New feature: "--ascii" parameter. Now it's possible to + generate plain ASCII TeX files in a desired encoding. + Non-ascii bytes are encoded as "^^XX". + The test file "chinese1.xml" is a working example of + a Chinese LaTeX file. + +* TeXML issues a warning is an XML symbol isn't converted to + TeX and printed as '&#xNNN;' + +* Refactoring. Code for tuning output stream is moved from + "handler.py" to "texmlwr.py". + + +Version 1.26.devel (8 May 2005) + +* Bug is fixed. Now lines which consist of space characters and + tabulation characters are also regarded as blank lines. + + +Version 1.25.devel (4 April 2005) + +* Script texml_con + This script can directly convert a texml + document to a print document such as PDF. + +* External entities now handled + A small bug in handler.py prevented external + entties from being read. External entities + can now be read. + + +Version 1.24.devel (21 March 2005) + +* TeXML is now namespace aware + will process documents with the namespace + http://getfo.sourceforge.net/texml/ns1 + + will also process documents with no namespace + +* TeXML is installed the standard way + libraries are created in the python path; + scripts are automatically installed in the path + +* Error handling + + exceptions are now classes rather than strings. + This allows for better handling of exceptions. + + Column and line numbers are now outputed as part + of the error messages when an exception is raised. + + exceptions for invalid or ill-formed XML are now + handled in the script. Instead of a long message + (incomprehensible to non-python developers), the + error message consists of a column number, a line + number, and a simple explanation. + + +Version 1.23.devel (5 March 2005) + +* ConTeXt mode is now enabled through command line instead of + using the environment variable. + + +Version 1.22.devel (21 February 2005) + +* Support of ConTeXt environments (\startenv ... \stopenv) + Thanks to Paul Tremblay for the patch. More details: + http://sourceforge.net/tracker/index.php?func=detail&aid=1145206&group_id=102261&atid=631462 + http://sourceforge.net/forum/message.php?msg_id=3007157 + + +Version 1.21.devel (18 February 2005) + +* TeXML now should work under Python 2.2.1. + Thanks to Paul Tremblay for the bug report and the fix suggestion: + http://sourceforge.net/tracker/index.php?func=detail&aid=1123627&group_id=102261&atid=631460 + + +Version 1.20 (12 November 2004) + +* Jason Santos has proofread the documentation. +* Corrected DTD: attribute spec/@cat now allows the value "nl?". + + +Version 1.15.devel (17 August 2004) + +* New category of special items: conditional newline. + + +Version 1.12.devel (09 August 2004) + +* New document: Thesis of the talk at the First International + Conference of Open-Source Developers. +* Names of distribution packages now contain suffixes '-windows' + and '-unix' to reflect a difference in line endings. + + +Version 1.09.devel (08 July 2004) + +* Environments and groups are now allowed in parameters. +* Whitespace processing in environments is reworked. Now @nl2 + attribute of regards possible and . +* Empty line, produced by , is no longer being + commented out. + + +Version 1.08.devel (29 June 2004) + +* Advanced whitespace processing now implemented: the program + (a) removes what XML regards as insignificant whitespace, and + (b) introduces its own whitespace which would look reasonable + from a human point of view. +* A new attribute @ws of the element is responsible for + switching advanced whitespace processing on and off. +* New attributes of : @nl1 and @nl2, new attributes of + : @nl1, @nl2, @nl3 and @nl4. They are responsible for + creation of new lines. +* New symbols: new line, whitespace and nothing. +* Whitespace after commands is now significant, so the program + adds '{}' after a command. This behaviour is configurable. +* A new command-line paramater '-w' (or '--width') specifies + minimal width of lines that are subject to automatic line + breaks. +* Translation of special characters is now more LaTeXish. + For example, the symbol '<' is now translated into '\textless' + instead of '$<$'. +* Replacements for special symbols now have '{}' characters at + the endings instead of a space. +* Accurate handling of unicode mappings that can appear only in + text or in math modes. +* License is changed from the GPL to the Lesser GPL. +* Improved documentation, added a quick start document. + + +Version 1.01.devel (06 May 2004) + +* Added version number output. +* The program now deletes leading spaces in . +* Element now supports sub-elements and . + Elements and now support sub-element . + Thanks to Stephen Robertson for his request for improvements. + + +Version 1.00 (09 April 2004) + +* More ligatures are being processed: ``, '', ?`, !`. With -- and --- + they cover all default non-letter TeX ligatures. +* Simon Goodson is proofreading the documentation. + + +Version 0.98.beta (02 April 2004) + +* Text of specification is now better. Thanks Simon Goodson for + ideas on improvement. +* New handling of tags and . The processor now outputs + them instantly as they appear, and so multiple parameters of one + are not being united. +* Absence of spaces after LaTeX commands in some mappings is fixed. + + +Version 0.95.beta (26 March 2004) + +* Ligatures "--" and "---" are being processed. This is configurable. +* Escaping of TeX specials is configurable. +* Translation of empty line is configurable. +* Default encoding of output now is ascii, not utf8. +* ChangeLog file is created. + + +Version 0.91.beta (22 March 2004) + +* Under Windows, TeXML processor now creates lines with DOS endings. + Code should also work correctly in other systems (MacOS etc). + + +Version 0.90.beta (19 March 2004) + +* First packaged version of the TeXML. diff --git a/PKG-INFO b/PKG-INFO new file mode 100644 index 0000000..74a62c2 --- /dev/null +++ b/PKG-INFO @@ -0,0 +1,10 @@ +Metadata-Version: 1.0 +Name: texml +Version: 2.0.2 +Summary: Convert TeXML to LaTeX or ConTeXt +Home-page: http://getfo.org/texml/ +Author: Oleg Parashchenko, Paul Tremblay +Author-email: olpa@ http://uucode.com/ +License: MIT +Description: TeXML is an XML syntax for TeX. The processor transforms the TeXML markup into the TeX markup, escaping special and out-of-encoding characters. The intended audience is developers who automatically generate [La]TeX or ConTeXt files. +Platform: UNKNOWN diff --git a/README b/README new file mode 100644 index 0000000..264d575 --- /dev/null +++ b/README @@ -0,0 +1,66 @@ +TeXML: an XML syntax for TeX (LaTeX, ConTeXt) + + * Do you generate TeX code? Then download and try TeXML. + * Do you convert XML to TeX? Then you ought to use TeXML. + + TeXML is an XML syntax for TeX. The processor transforms the TeXML + markup into the TeX markup, escaping special and out-of-encoding + characters. The intended audience is developers who automatically + generate [La]TeX or ConTeXt files. + +XML to PDF -- TeXML vs XSL-FO + + Similarity: + + * Both TeXML and XSL-FO are an intermediate step in publishing XML + as PDF. + * -- In the XSL-FO way, you need an XSL-FO stylesheet. + -- By analogue, in the TeXML way, you need a TeXML stylesheet. + + Differences: + + * -- Open-source XSL-FO tools are not yet production quality; + -- LaTeX has been a reliable standard for decades. + * -- XSL-FO is for good enough PDFs; + -- TeXML is targeted to the minority to create excellent PDFs. + +XML to TeX -- TeXML vs Perl/Java/Python/etc + + XSLT is very poor at working with strings, so it is hard to write + valid TeX. In contrast, Perl etc. are excellent at handling strings + and so can easily produce TeX, but they are inconvenient to manipulate + an XML. The solution is TeXML. + + * XSLT is an ideal tool to convert XML to XML, and TeXML is an XML + syntax for TeX. + * A TeXML processor makes the rest, serializing TeXML to TeX. + +TeXML benefits + + * LaTeX and ConTeXt support. + * No need to bother escaping TeX special characters. + * No need to bother about empty lines in paragraphs. + * More than 700 unicode characters are mapped to LaTeX commands. + * Support for international publishing. + * Generated TeX code is human-friendly. + * Open source under the MIT/X Consortium license. Can be used in + commercial applications. + +Resources + +* Documentation + docs/index.html + +* Project home + http://getfo.org/texml/ + +* SourceForge project area + http://sourceforge.net/projects/getfo/ + +* Download + http://prdownloads.sourceforge.net/getfo/texml-2.0.0.tar.gz?download + + +-- +Oleg Parashchenko +http://uucode.com/blog/category/texml/ diff --git a/Texml/__init__.py b/Texml/__init__.py new file mode 100644 index 0000000..a9869bd --- /dev/null +++ b/Texml/__init__.py @@ -0,0 +1,3 @@ +""" +Package for texml +""" \ No newline at end of file diff --git a/Texml/handler.py b/Texml/handler.py new file mode 100644 index 0000000..32a6118 --- /dev/null +++ b/Texml/handler.py @@ -0,0 +1,612 @@ +""" Tranform TeXML SAX stream """ +# $Id: handler.py,v 1.14 2006-06-14 04:45:06 olpa Exp $ + +import xml.sax.handler +from xml.sax.handler import feature_namespaces + +import texmlwr +import specmap +import StringIO +import string +import os, sys + +# Unbreakable spaces should not be deleted by strip(), but it happens: +# http://uucode.com/blog/2010/06/01/python-wtf-strip-eats-too-much/ +# The solution from the web page does not work with old versions +# of python, therefore let's define a fallback functionality. +try: + "dummy".strip(string.whitespace) + strip_args = (string.whitespace, ) +except: + strip_args = () + +# +# TeXML SAX handler works correct but misfeaturely when SAX parser +# reports characters in several calls instead of one call. +# This wrappers fixes the problem +# + +class ParseFile: + """ + + Wrapper class to make the library easier to use. + + See the above notes for use. + + """ + + def __init__(self): + pass + + def parse_file(self, texml_writer, read_obj, use_context): + + handle = glue_handler(texml_writer, use_context) + + parser = xml.sax.make_parser() + parser.setFeature(feature_namespaces, 1) + parser.setContentHandler(handle) + parser.setFeature("http://xml.org/sax/features/external-general-entities", True) + + + parser.parse(read_obj) + +class InvalidXmlException(Exception): + """ + handle invalid xml + + """ + pass + +class glue_handler(xml.sax.ContentHandler): + + """ + Not really a public class. use ParseFile instead. + + """ + + def __init__(self, texml_writer, use_context, + name_space = 'http://getfo.sourceforge.net/texml/ns1'): + self.h = Handler(texml_writer, use_context) + self.c = None + + self.__name_space = name_space + self.__current_name_space = None + + def startDocument(self): + self.c = None + self.h.startDocument() + + def flushChars(self): + if self.c != None: + self.h.characters(self.c) + self.c = None + + def endDocument(self): + self.flushChars() + self.h.endDocument() + + # no longer use + def startElement_off(self, name, attrs): + self.flushChars() + self.h.startElement(name, attrs) + + def setDocumentLocator(self, locator): + self.locator = locator + + def startElementNS(self, name, qname, attrs): + # change attrs to regular dictionary + the_attrs = {} + keys = attrs.keys() + for key in keys: + att = key[1] + value = attrs[key] + the_attrs[att] = value + + name_space = name[0] + self.__current_name_space = name_space + local_name = name[1] + + # get the column and line number and use the handler + col_num = self.locator.getColumnNumber() + line_num = self.locator.getLineNumber() + self.h.set_location(col_num, line_num) + self.h.set_namespace(name_space) + + if name_space == self.__name_space or name_space == None: + self.flushChars() + self.h.startElement(local_name, the_attrs) + # report an error and quit + else: + self.h.invalid_xml(local_name) + + # no longer use + def endElement_off(self, name): + self.flushChars() + self.h.endElement(name) + + def endElementNS(self, name, qname): + col_num = self.locator.getColumnNumber() + line_num = self.locator.getLineNumber() + self.h.set_location(col_num, line_num) + name_space = name[0] + local_name = name[1] + if name_space == self.__name_space or name_space == None: + self.flushChars() + self.h.endElement(local_name) + # otherwise, ignore! + + + def processingInstruction(self, target, data): + self.flushChars() + # No action. The only effect is that chunk + # ... aa bb ... + # is reported twice ('... aa ' and ' bb ...') + # instead of onece ('... aa bb ...') + + def characters(self, content): + col_num = self.locator.getColumnNumber() + line_num = self.locator.getLineNumber() + self.h.set_location(col_num, line_num) + if None == self.c: + self.c = content + else: + self.c = self.c + content + +# WhiteSpace (WS) elimination +# In most cases, WS around tags (both opening and closing) are removed. +# But these tags save ws: and . +# WS processing is allowed or disallowed by "process_ws". + +class Handler: + + """ + Not really a public class. + + Handles the infile, using the glue_handle class to get the data as + elements or characters. + + """ + + # Object variables + # writer + # no_text_content + # text_is_only_spaces + # + # Whitespace handling: + # process_ws + # process_ws_stack + # nl_spec + # nl_spec_stack + # + # For support: + # cmdname + # cmdname_stack + # endenv + # endenv_stack + # + # For support: + # has_parm # Stacking is not required: if is in , + # # then is it wrapped by or + + def __init__(self, texml_writer, use_context): + """ Create writer, create maps """ + self.__use_context = use_context + # Paul Tremblay added this on 2005-03-08 + self.writer = texml_writer + self.cmdname_stack = [] + self.endenv_stack = [] + self.cmdname = '' + self.endenv = '' + self.has_parm = 0 + self.no_text_content = 0 + self.text_is_only_spaces = 0 + self.process_ws = 1 + self.process_ws_stack = [] + self.nl_spec = None + self.nl_spec_stack = [] + self.__name_space = None + # + # Create handler maps + # + self.model_nomath = { + 'TeXML': self.on_texml, + 'cmd': self.on_cmd, + 'env': self.on_env, + 'group': self.on_group, + 'ctrl': self.on_ctrl, + 'spec': self.on_spec, + 'pdf': self.on_pdf + } + self.model_content = self.model_nomath.copy() + self.model_content['math'] = self.on_math + self.model_content['dmath'] = self.on_dmath + self.model_cmd = { + 'opt': self.on_opt, + 'parm': self.on_parm + } + self.model_env = self.model_content.copy() # copy, so == will true only for environment, not for any tag that shares model_content + self.model_env.update(self.model_cmd) + self.model_opt = self.model_content + self.model_parm = self.model_content + self.end_handlers = { + 'TeXML': self.on_texml_end, + 'cmd': self.on_cmd_end, + 'env': self.on_env_end, + 'group': self.on_group_end, + 'ctrl': self.on_ctrl_end, + 'spec': self.on_spec_end, + 'opt': self.on_opt_end, + 'parm': self.on_parm_end, + 'math': self.on_math_end, + 'dmath': self.on_dmath_end, + 'pdf': self.on_pdf_end + } + + def set_location(self, col, line): + self.__col_num = col + self.__line_num = line + + def set_namespace(self, name): + self.__name_space = name + + def invalid_xml(self, local_name): + msg = 'Invalid XML %s, %s: ' % (self.__col_num, self.__line_num) + if self.__name_space: + msg += 'Element "%s" for namespace "%s" not expected' % (local_name, self.__name_space) + else: + msg += '%s not expected' % (local_name) + + raise InvalidXmlException, msg + + def invalid_xml_other(self, msg): + # for other types of invalid XML + raise InvalidXmlException, msg + + # ------------------------------------------------------------------- + + def startDocument(self): + """ Initialize data structures before parsing """ + self.model = {'TeXML': self.on_texml} + self.model_stack = [] + + def endDocument(self): + """ Finalize document """ + self.writer.conditionalNewline() + + def startElement(self, name, attrs): + """ Handle start of an element""" + if name in self.model: + self.model[name](attrs) + else: + self.invalid_xml(name) + + def characters(self, content): + """ Handle text data """ + # + # First, check if content allowed at all + # + # Elements like should be empty + if self.no_text_content: + msg = 'Invalid XML %s, %s: ' % (self.__col_num, self.__line_num) + msg += "Text content is not expected: '%s'" % content.encode('latin-1', 'replace') + self.invalid_xml_other(msg) + # Element should not have text content, + # but it also may contain spaces due to indenting + # Element may have and , so we do + # magic to delete whitespace at beginning of environment + if self.text_is_only_spaces: + stripped = content.lstrip(*strip_args) + if 0 != len(stripped): + msg = 'Invalid XML %s, %s: ' % (self.__col_num, self.__line_num) + msg += "Only whitespaces are expected, not text content: '%s'" % content.encode('latin-1', 'replace') + self.invalid_xml_other(msg) + return # return + # + # Eliminate whitespaces + # + post_content_ws = 0 + if self.process_ws: + content2 = content.lstrip(*strip_args) + if len(content2) != len(content): + self.writer.writeWeakWS() + content = content2.rstrip(*strip_args) + if len(content2) != len(content): + post_content_ws = 1 + # + # Finally, write content + # + self.writer.write(content) + if post_content_ws: + self.writer.writeWeakWS() + + def endElement(self, name): + """ Handle end of en element """ + self.end_handlers[name]() + self.unstack_model() + + def stack_model(self, model): + """ Remember content model of parent and set model for current node """ + self.model_stack.append(self.model) + self.model = model + + def unstack_model(self): + """ Restore content model of parent """ + self.model = self.model_stack.pop() + + # ----------------------------------------------------------------- + + def get_boolean(self, attrs, aname, default): + """ Returns true if value of attribute "aname" is "1", false if "0" and None if attribute not exists. Raises error in other cases.""" + aval = attrs.get(aname, None) + if None == aval: + return default + elif '1' == aval: + return 1 + elif '0' == aval: + return 0 + raise ValueError("Value of boolean attribute '%s' is not '0' or '1', but '%s'" % (aname, aval)) + + msg = 'Invalid XML %s, %s: ' % (self.__col_num, self.__line_num) + msg += "Value of boolean attribute '%s' is not '0' or '1', but '%s'" % (aname, aval) + self.invalid_xml_other(msg) + + def on_texml(self, attrs): + """ Handle TeXML element """ + self.stack_model(self.model_content) + # + # Set new mode ("text" or "math") + # + str = attrs.get('mode', None) + if None == str: + mode = texmlwr.DEFAULT + elif 'text' == str: + mode = texmlwr.TEXT + elif 'math' == str: + mode = texmlwr.MATH + else: + msg = 'Invalid XML %s, %s: ' % (self.__col_num, self.__line_num) + msg += "Unknown value of TeXML/@mode attribute: '%s'" % str + self.invalid_xml_other(msg) + emptylines = self.get_boolean(attrs, 'emptylines', None) + escape = self.get_boolean(attrs, 'escape', None) + ligatures = self.get_boolean(attrs, 'ligatures', None) + self.writer.stack_mode(mode) + self.writer.stack_emptylines(emptylines) + self.writer.stack_escape(escape) + self.writer.stack_ligatures(ligatures) + ws = self.get_boolean(attrs, 'ws', None) + self.process_ws_stack.append(self.process_ws) + if ws != None: + self.process_ws = 0 == ws + self.writer.set_allow_weak_ws_to_nl(not ws) + + def on_texml_end(self): + """ Handle TeXML element. Restore old mode. """ + self.writer.unstack_ligatures() + self.writer.unstack_escape() + self.writer.unstack_emptylines() + self.writer.unstack_mode() + self.process_ws = self.process_ws_stack.pop() + self.writer.set_allow_weak_ws_to_nl(self.process_ws) + + # ----------------------------------------------------------------- + + def on_cmd(self, attrs): + """ Handle 'cmd' element """ + self.stack_model(self.model_cmd) + # + # Get name of the command + # + name = attrs.get('name', '') + if 0 == len(name): + msg = 'Invalid XML %s, %s: ' % (self.__col_num, self.__line_num) + msg += "Attribute cmd/@name is empty" + self.invalid_xml_other(msg) + if self.get_boolean(attrs, 'nl1', 0): + self.writer.conditionalNewline() + self.writer.writech('\\', 0) + self.writer.write(name, 0) + # + # Setup in-cmd processing + # + self.has_parm = 0 + self.text_is_only_spaces = 1 + self.nl_spec_stack.append(self.nl_spec) + self.nl_spec = (self.get_boolean(attrs, 'nl2', 0), self.get_boolean(attrs, 'gr', 1)) + + def on_cmd_end(self): + self.text_is_only_spaces = 0 + # + # Write additional space or newline if command has no parameters + # + (nl, gr) = self.nl_spec + self.nl_spec = self.nl_spec_stack.pop() + if not(self.has_parm): + if gr: + self.writer.write('{}', 0) + else: + self.writer.writeWeakWS() + if nl: + self.writer.conditionalNewline() + + def on_opt(self, attrs): + """ Handle 'opt' element """ + self.on_opt_parm('[', attrs) + + def on_parm(self, attrs): + """ Handle 'parm' element """ + self.on_opt_parm('{', attrs) + + def on_opt_end(self): + self.on_opt_parm_end(']') + + def on_parm_end(self): + self.on_opt_parm_end('}') + + def on_opt_parm(self, ch, attrs): + """ Handle 'parm' and 'opt' """ + self.stack_model(self.model_opt) + if self.model_stack[-1] == self.model_env: + self.nl_spec_stack.append(self.nl_spec) + self.nl_spec = self.writer.ungetWeakWS() + self.writer.writech(ch, 0) + self.text_is_only_spaces = 0 + + def on_opt_parm_end(self, ch): + self.writer.writech(ch, 0) + self.has_parm = 1 # At the end to avoid collision of nesting + # can be only inside or (very rarely) in + if self.model_stack[-1] != self.model_env: + self.text_is_only_spaces = 1 + else: + self.text_is_only_spaces = 0 + if self.nl_spec: + self.writer.writeWeakWS(self.nl_spec) + self.nl_spec = self.nl_spec_stack.pop() + + # ----------------------------------------------------------------- + + def on_env(self, attrs): + """ Handle 'cmd' element """ + self.stack_model(self.model_env) + # + # Get name of the environment, and begin and end commands + # + name = attrs.get('name', '') + if 0 == len(name): + msg = 'Invalid XML %s, %s: ' % (self.__col_num, self.__line_num) + msg += 'Attribute env/@name is empty' + self.invalid_xml_other(msg) + # added by Paul Tremblay on 2004-02-19 + # the environment in context is \startenvironmentname ... + # \stopenvironmentname + if self.__use_context: + begenv = attrs.get('start', 'start') + else: + begenv = attrs.get('begin', 'begin') + self.cmdname_stack.append(self.cmdname) + self.endenv_stack.append(self.endenv) + self.cmdname = name + + # added by Paul Tremblay on 2004-02-19 + if self.__use_context: + self.endenv = attrs.get('stop', 'stop') + else: + self.endenv = attrs.get('end', 'end') + # + # Write and setup newline processing + # + if self.get_boolean(attrs, 'nl1', 1): + self.writer.conditionalNewline() + + # added by Paul Tremblay on 2004-02-19 + # See note above + if self.__use_context: + self.writer.write('\%s%s' % (begenv, name), 0) + else: + self.writer.write('\%s{%s}' % (begenv, name), 0) + if self.get_boolean(attrs, 'nl2', 1): + self.writer.writeWeakWS(texmlwr.WEAK_WS_IS_NEWLINE) + self.nl_spec_stack.append(self.nl_spec) + self.nl_spec = (self.get_boolean(attrs, 'nl3', 1), self.get_boolean(attrs, 'nl4', 1)) + + def on_env_end(self): + nl3, nl4 = self.nl_spec + self.nl_spec = self.nl_spec_stack.pop() + if nl3: + self.writer.conditionalNewline() + + # added by Paul Tremblay on 2004-02-19 + if self.__use_context: + self.writer.write('\%s%s' % (self.endenv, self.cmdname), 0) + else: + self.writer.write('\%s{%s}' % (self.endenv, self.cmdname), 0) + if nl4: + self.writer.conditionalNewline() + self.cmdname = self.cmdname_stack.pop() + self.endenv = self.endenv_stack.pop() + + def on_group(self, attrs): + """ Handle 'group' element """ + self.stack_model(self.model_content) + self.writer.writech('{', 0) + + def on_group_end(self): + self.writer.writech('}', 0) + + # ----------------------------------------------------------------- + + def on_ctrl(self, attrs): + # + # Get character, check and print tex command + # + ch = attrs.get('ch', '') + if 1 != len(ch): + msg = 'Invalid XML %s, %s: ' % (self.__col_num, self.__line_num) + msg += "Attribute ctrl/@ch is not a char: '%s'" % ch + self.invalid_xml_other(msg) + self.writer.writech('\\', 0) + self.writer.writech(ch, 0) + # + # Content of this element is empty + # + self.stack_model({}) + self.no_text_content = 1 + + def on_ctrl_end(self): + self.no_text_content = 0 + + def on_spec(self, attrs): + # + # Get category, get corresponding character + # + cat = attrs.get('cat', '') + if 'nl?' == cat: + self.writer.conditionalNewline() + else: + if not (cat in specmap.tocharmap): + msg = 'Invalid XML %s, %s: ' % (self.__col_num, self.__line_num) + msg += "Attribute spec/@cat unknown: '%s'" % cat + self.invalid_xml_other(msg) + ch = specmap.tocharmap[cat] + if '\n' == ch: + self.writer.stack_emptylines(1) + self.writer.write(ch, 0) + if '\n' == ch: + self.writer.unstack_emptylines() + # + # Content of this element is empty + # + self.stack_model({}) + self.no_text_content = 1 + + def on_spec_end(self): + self.no_text_content = 0 + + # ----------------------------------------------------------------- + + def on_math(self, attrs): + self.stack_model(self.model_nomath) + self.writer.writech('$', 0) + self.writer.stack_mode(texmlwr.MATH) + + def on_math_end(self): + self.writer.unstack_mode() + self.writer.writech('$', 0) + + def on_dmath(self, attrs): + self.writer.writech('$', 0) + self.on_math(attrs) + + def on_dmath_end(self): + self.on_math_end() + self.writer.writech('$', 0) + + # ----------------------------------------------------------------- + + def on_pdf(self, attrs): + self.stack_model({}) + self.writer.stack_mode(texmlwr.PDF) + + def on_pdf_end(self): + self.writer.unstack_mode() diff --git a/Texml/processor.py b/Texml/processor.py new file mode 100644 index 0000000..4f746d5 --- /dev/null +++ b/Texml/processor.py @@ -0,0 +1,121 @@ +""" +Using TeXML in Python +--------------------- + +The module Texml.process converts a TeXML file to a TeX file. + +Basic use requires the following: + +1. Import the needed libraries +2. Set up the input and output streams +3. Call on the function process +4. Use a try-except block around the call to process +5. Clean up resources + +Parameters for the function process +----------------------------------- + +in_stream + An input TeXML document as a file object or the path to a file. + Mandatory. + +out_stream + An output TeX document as a file object. Mandatory. + +autonl_width + Recommended width to split long lines on smaller ones. + Optional, default is 62. + +encoding + Output encoding. Should be known to the Python codecs. + Optional, default is ascii. + +always_ascii + Use only ASCII symbols for output. Non-ASCII bytes are escaped + using the ^^XX form, where XX is a hexadecimal code of the + character. Optional, default is 0 (False, do not encode as + ASCII). + +use_context + ConTeXt is an alternative to LaTeX. In ConTeXt mode, TeXML + translation is slightly different. Set to 1 (True) to activate + this mode. Optional, default is 0 (False, LaTeX mode). + +If the input file doesn't conform to the TeXML specification, then the +exception TeXML.handler.InvalidXmlException is raised. If the input +parameters are invalid, then the exception ValueError is raised. +Expect that the underlying libraries might also raise exceptions, such +as xml.sax.SAXException. + +Simplest example +---------------- + +#!/usr/bin/python + +# Import the needed libraries +import sys +import Texml.processor + +# Use the standard input and output +in_stream = sys.stdin +out_stream = sys.stdout + +# Convert +Texml.processor.process(in_stream, out_stream) + +Full example +------------ + +#!/usr/bin/python + +# Import the needed libraries +import sys +import Texml.processor + +# Input can be given by a path, output should be a file object +infile = 'document.xml' +out = file('out.tex', 'w') +# Older versions of python need the following code: +# out = open('out.tex', 'w') + +# Parameters +width = 75 +encoding = 'UTF-8' +always_ascii = 1 +use_context = 1 + +# Convert TeXML inside a try-except block +try: + Texml.processor.process( + in_stream = infile, + out_stream = out, + autonl_width = width, + encoding = encoding, + always_ascii = always_ascii, + use_context = use_context) +except Exception, msg: + print sys.stderr, 'texml: %s' % str(msg) + +# Clean up resources +out.close() +""" +# $Id: processor.py,v 1.2 2006-06-06 03:37:18 olpa Exp $ + +import Texml.texmlwr +import Texml.handler + +def process(in_stream, out_stream, encoding='ascii', autonl_width=62, always_ascii=0, use_context=0): + transform_obj = Texml.handler.ParseFile() + texml_writer = Texml.texmlwr.texmlwr( + stream = out_stream, + encoding = encoding, + autonl_width = autonl_width, + use_context = use_context, + always_ascii = always_ascii, + ) + transform_obj.parse_file( + read_obj = in_stream, + texml_writer = texml_writer, + use_context = use_context, + ) + diff --git a/Texml/specmap.py b/Texml/specmap.py new file mode 100644 index 0000000..140ad50 --- /dev/null +++ b/Texml/specmap.py @@ -0,0 +1,96 @@ +""" Map special TeX symbols """ +# $Id: specmap.py,v 1.4 2006-06-02 03:06:48 olpa Exp $ +import os + +# text escape map and math escape map should contain the same keys + +textescmap = { + '\\': r'\textbackslash{}', + '{': r'\{', + '}': r'\}', + '$': r'\textdollar{}', + '&': r'\&', + '#': r'\#', + '^': r'\^{}', + '_': r'\_', + '~': r'\textasciitilde{}', + '%': r'\%', + '|': r'\textbar{}', + '<': r'\textless{}', + '>': r'\textgreater{}', + # not special but typography + u'\u00a9': r'\textcopyright{}', + u'\u2011': r'\mbox{-}' +} + +# Paul Tremblay added this on 2005-03-08 +textescmap_context = { + '\\': r'\textbackslash{}', + '{': r'\{', + '}': r'\}', + '$': r'\textdollar{}', + '&': r'\&', + '#': r'\#', + '^': r'\^{}', + '_': r'\_', + '~': r'\textasciitilde{}', + '%': r'\%', + '|': r'\type{|}', + '<': r'\textless{}', + '>': r'\textgreater{}', + # not special but typography + # u'\u00a9': r'\textcopyright{}' + u'\u2011': r'\mbox{-}' +} + +mathescmap = { + '\\': r'\backslash{}', + '{': r'\{', + '}': r'\}', + '$': r'\$', + '&': r'\&', + '#': r'\#', + '^': r'\^{}', + '_': r'\_', + '~': r'\~{}', + '%': r'\%', + '|': r'|', + '<': r'<', + '>': r'>', + # not special but typography + u'\u00a9': r'\copyright{}', + u'\u2011': r'-' +} + +# +# Although these symbols are not special, it is better to escape them +# because in as-is form they are not so good +# +typographymap = { + u'\u00a0': r'~' +} + +textescmap.update(typographymap) +mathescmap.update(typographymap) + +# +# Mapping from spec/@cat to symbols +# +tocharmap = { + 'esc': '\\', + 'bg': '{', + 'eg': '}', + 'mshift': '$', + 'align': '&', + 'parm': '#', + 'sup': '^', + 'sub': '_', + 'tilde': '~', + 'comment': '%', + 'vert': '|', + 'lt': '<', + 'gt': '>', + 'nl': '\n', + 'space': ' ', + 'nil': '' +} diff --git a/Texml/texmlwr.py b/Texml/texmlwr.py new file mode 100644 index 0000000..631517a --- /dev/null +++ b/Texml/texmlwr.py @@ -0,0 +1,358 @@ +""" TeXML Writer and string services """ +# $Id: texmlwr.py,v 1.9 2006-07-20 03:56:27 olpa Exp $ + +# +# Modes of processing of special characters +# +DEFAULT = 0 +TEXT = 1 +MATH = 2 +ASIS = 3 +PDF = 4 +WEAK_WS_IS_NEWLINE = 2 + +import unimap +import specmap +import codecs +import os +import sys +import string + +# +# Writer&Co class +# +class texmlwr: + + # + # Object variables + # + # Handling of '--', '---' and other ligatures + # last_char + # + # Modes of transformation can be tuned and nested + # mode + # mode_stack + # escape + # escape_stack + # ligatures + # ligatures_stack + # emptylines + # emptylines_stack + # + # Current length of a line that is being written. Value usually + # incorrect, but always correct to detect the start of a line (0) + # > approx_current_line_len + # If length of a current line is greater the value + # then writer converts weak whitespaces into newlines. + # And flag if it is possible + # > autonewline_after_len + # > allow_weak_ws_to_nl + # > is_after_weak_ws + # We usually don't allow empty lines in output because such lines + # cause a paragraph break in TeX. + # > line_is_blank + # + # always_ascii: If attempts to write a character to the output + # stream have failed, then the code converts the symbol to bytes, + # and these bytes are written in the ^^xx format. + # + # bad_enc_warned: TeXML issues warning if it fails to convert + # a symbol. This flag controls that warning was issued only once. + # + + def __init__(self, stream, encoding, autonl_width, use_context = 0, always_ascii = 0): + """ Remember output stream, initialize data structures """ + # Tune output stream + self.always_ascii = always_ascii + self.encoding = encoding + try: + if always_ascii: + encoding = 'ascii' + self.stream = stream_encoder(stream, encoding) + except Exception, e: + raise ValueError("Can't create encoder: '%s'" % e) + # Continue initialization + self.after_char0d = 1 + self.after_char0a = 1 + self.last_ch = None + self.line_is_blank = 1 + self.mode = TEXT + self.mode_stack = [] + self.escape = 1 + self.escape_stack = [] + self.ligatures = 0 + self.ligatures_stack = [] + self.emptylines = 0 + self.emptylines_stack = [] + self.approx_current_line_len = 0 + self.autonewline_after_len = autonl_width + self.allow_weak_ws_to_nl = 1 + self.is_after_weak_ws = 0 + self.use_context = use_context + self.bad_enc_warned = 0 + + def stack_mode(self, mode): + """ Put new mode into the stack of modes """ + self.mode_stack.append(self.mode) + if mode != DEFAULT: + self.mode = mode + + def unstack_mode(self): + """ Restore mode """ + self.mode = self.mode_stack.pop() + + def stack_escape(self, ifdo): + """ Set if escaping is required. Remember old value. """ + self.escape_stack.append(self.escape) + if ifdo != None: + self.escape = ifdo + + def unstack_escape(self): + """ Restore old policy of escaping """ + self.escape = self.escape_stack.pop() + + def stack_ligatures(self, ifdo): + """ Set if breaking of ligatures is required. Remember old value. """ + self.ligatures_stack.append(self.ligatures) + if ifdo != None: + self.ligatures = ifdo + + def unstack_ligatures(self): + """ Restore old policy of breaking ligatures """ + self.ligatures = self.ligatures_stack.pop() + + def stack_emptylines(self, ifdo): + """ Set if empty lines are required. Remember old value. """ + self.emptylines_stack.append(self.emptylines) + if ifdo != None: + self.emptylines = ifdo + + def unstack_emptylines(self): + """ Restore old policy of handling of empty lines """ + self.emptylines = self.emptylines_stack.pop() + + def set_allow_weak_ws_to_nl(self, flag): + """ Set flag if weak spaces can be converted to new lines """ + self.allow_weak_ws_to_nl = flag + + def conditionalNewline(self): + """ Write a new line unless already at the start of a line """ + if self.approx_current_line_len != 0: + self.writech('\n', 0) + + def writeWeakWS(self, hint=1): + """ Write a whitespace instead of whitespaces deleted from source XML. Parameter 'hint' is a hack to make and in working good. hint=WEAK_WS_IS_NEWLINE if weak space should be converted to newline, not to a space """ + # weak WS that is newline can not be converted to ws that is space + if hint <= self.is_after_weak_ws: + # return or avoid next if(). I prefer return. + return # return + self.is_after_weak_ws = hint + #self.last_ch = ' ' # no, setting so is an error: new lines are not corrected after it. Anyway, check for weak ws is the first action in writech, so it should not lead to errors + # + # Break line if it is too long + # We should not break lines if we regard spaces + # Check for WEAK_WS_IS_NEWLINE in order to avoid line break in + # \begin{foo}[aa.....aa][bbb] + # + if (self.approx_current_line_len > self.autonewline_after_len) and self.allow_weak_ws_to_nl and (hint != WEAK_WS_IS_NEWLINE): + self.conditionalNewline() + return # return + + def ungetWeakWS(self): + """ Returns whitespace state and clears WS flag """ + hint = self.is_after_weak_ws + self.is_after_weak_ws = 0 + return hint + + def writech(self, ch, esc_specials): + """ Write a char, (maybe) escaping specials """ + # + # Write for PDF string + # + if PDF == self.mode: + self.stack_mode(TEXT) + self.writepdfch(ch) + self.unstack_mode() + return # return + # + # Write a suspended whitespace + # + if self.is_after_weak_ws: + hint = self.is_after_weak_ws + self.is_after_weak_ws = 0 + if hint == WEAK_WS_IS_NEWLINE: + if ('\n' != ch) and ('\r' != ch): + self.conditionalNewline() + else: + if (self.approx_current_line_len != 0) and not(ch in string.whitespace): + self.writech(' ', 0) + # + # Update counter + # + self.approx_current_line_len = self.approx_current_line_len + 1 + # + # Handle well-known standard TeX ligatures + # + if not(self.ligatures): + if '-' == ch: + if '-' == self.last_ch: + self.writech('{', 0) + self.writech('}', 0) + elif "'" == ch: + if "'" == self.last_ch: + self.writech('{', 0) + self.writech('}', 0) + elif '`' == ch: + if ('`' == self.last_ch) or ('!' == self.last_ch) or ('?' == self.last_ch): + self.writech('{', 0) + self.writech('}', 0) + # + # Handle end-of-line symbols. + # XML spec says: 2.11 End-of-Line Handling: + # ... contains either the literal two-character sequence "#xD#xA" or + # a standalone literal #xD, an XML processor must pass to the + # application the single character #xA. + # + if ('\n' == ch) or ('\r' == ch): + # + # We should never get '\r', but only '\n'. + # Anyway, someone will copy and paste this code, and code will + # get '\r'. In this case rewrite '\r' as '\n'. + # + if '\r' == ch: + ch = '\n' + # + # TeX interprets empty line as \par, fix this problem + # + if self.line_is_blank and (not self.emptylines): + self.writech('%', 0) + # + # Now create newline, update counters and return + # + self.stream.write(os.linesep) + self.approx_current_line_len = 0 + self.last_ch = ch + self.line_is_blank = 1 + return # return + # + # Remember the last character + # + self.last_ch = ch + # + # Reset the flag of a blank line + # + if not ch in ('\x20', '\x09'): + self.line_is_blank = 0 + # + # Handle specials + # + if esc_specials: + try: + if self.mode == TEXT: + # Paul Tremblay changed this code on 2005-03-08 + if self.use_context: + self.write(specmap.textescmap_context[ch], 0) + else: + self.write(specmap.textescmap[ch], 0) + else: + self.write(specmap.mathescmap[ch], 0) + return # return + except: + pass + # + # First attempt to write symbol as-is + # + try: + self.stream.write(ch) + return # return + except: + pass + # + # Try write the symbol in the ^^XX form + # + if self.always_ascii: + try: + bytes = ch.encode(self.encoding) + for by in bytes: + self.write('^^%02x' % ord(by), 0) + return + except Exception, e: + pass + # + # Symbol have to be rewritten. Let start with math mode. + # + chord = ord(ch) + if self.mode == TEXT: + # + # Text mode, lookup text map + # + try: + self.write(unimap.textmap[chord], 0) + return # return + except: + # + # Text mode, lookup math map + # + tostr = unimap.mathmap.get(chord, None) + else: # self.mode == MATH: + # + # Math mode, lookup math map + # + try: + self.write(unimap.mathmap[chord], 0) + return # return + except: + # + # Math mode, lookup text map + # + tostr = unimap.textmap.get(chord, None) + # + # If mapping in another mode table is found, use a wrapper + # + if tostr != None: + if self.mode == TEXT: + self.write('\\ensuremath{', 0) + else: + self.write('\\ensuretext{', 0) + self.write(tostr, 0) + self.writech('}', 0) + return # return + # + # Finally, warn about bad symbol and write it in the &#xNNN; form + # + if not self.bad_enc_warned: + sys.stderr.write("texml: not all XML symbols are converted\n"); + self.bad_enc_warned = 1 + self.write('\\unicodechar{%d}' % chord, 0) + + def write(self, str, escape = None): + """ Write symbols char-by-char in current mode of escaping """ + if None == escape: + escape = self.escape + for ch in str: + self.writech(ch, escape) + + def writepdfch(self, ch): + """ Write char in Acrobat utf16be encoding """ + bytes = ch.encode('utf_16_be') + for by in bytes: + self.write('\\%03o' % ord(by), 0) + +# +# Wrapper over output stream to write is desired encoding +# +class stream_encoder: + + def __init__(self, stream, encoding): + """ Construct a wrapper by stream and encoding """ + self.stream = stream + self.encode = codecs.getencoder(encoding) + + def write(self, str): + """ Write string encoded """ + self.stream.write(self.encode(str)[0]) + + def close(self): + """ Close underlying stream """ + self.stream.close() + diff --git a/Texml/unimap.py b/Texml/unimap.py new file mode 100644 index 0000000..cce41ab --- /dev/null +++ b/Texml/unimap.py @@ -0,0 +1,2563 @@ +textmap = { +0x000A0: r'~', +0x000AD: r'\-', +0x0007E: r'\textasciitilde{}', +0x000A1: r'\textexclamdown{}', +0x000A2: r'\textcent{}', +0x000A3: r'\textsterling{}', +0x000A4: r'\textcurrency{}', +0x000A5: r'\textyen{}', +0x000A6: r'\textbrokenbar{}', +0x000A7: r'\textsection{}', +0x000A8: r'\textasciidieresis{}', +0x000A9: r'\textcopyright{}', +0x000AA: r'\textordfeminine{}', +0x000AB: r'\guillemotleft{}', +0x000AE: r'\textregistered{}', +0x000AF: r'\textasciimacron{}', +0x000B0: r'\textdegree{}', +0x000B4: r'\textasciiacute{}', +0x000B6: r'\textparagraph{}', +0x000B8: r'\c{}', +0x000BA: r'\textordmasculine{}', +0x000BB: r'\guillemotright{}', +0x000BC: r'\textonequarter{}', +0x000BD: r'\textonehalf{}', +0x000BE: r'\textthreequarters{}', +0x000BF: r'\textquestiondown{}', +0x000C0: r'\`{A}', +0x000C1: r"\'{A}", +0x000C2: r'\^{A}', +0x000C3: r'\~{A}', +0x000C4: r'\"{A}', +0x000C5: r'\AA{}', +0x000C6: r'\AE{}', +0x000C7: r'\c{C}', +0x000C8: r'\`{E}', +0x000C9: r"\'{E}", +0x000CA: r'\^{E}', +0x000CB: r'\"{E}', +0x000CC: r'\`{I}', +0x000CD: r"\'{I}", +0x000CE: r'\^{I}', +0x000CF: r'\"{I}', +0x000D0: r'\DH{}', +0x000D1: r'\~{N}', +0x000D2: r'\`{O}', +0x000D3: r"\'{O}", +0x000D4: r'\^{O}', +0x000D5: r'\~{O}', +0x000D6: r'\"{O}', +0x000D7: r'\texttimes{}', +0x000D8: r'\O{}', +0x000D9: r'\`{U}', +0x000DA: r"\'{U}", +0x000DB: r'\^{U}', +0x000DC: r'\"{U}', +0x000DD: r"\'{Y}", +0x000DE: r'\TH{}', +0x000DF: r'\ss{}', +0x000E0: r'\`{a}', +0x000E1: r"\'{a}", +0x000E2: r'\^{a}', +0x000E3: r'\~{a}', +0x000E4: r'\"{a}', +0x000E5: r'\aa{}', +0x000E6: r'\ae{}', +0x000E7: r'\c{c}', +0x000E8: r'\`{e}', +0x000E9: r"\'{e}", +0x000EA: r'\^{e}', +0x000EB: r'\"{e}', +0x000EC: r'\`{\i}', +0x000ED: r"\'{\i}", +0x000EE: r'\^{\i}', +0x000EF: r'\"{\i}', +0x000F0: r'\dh{}', +0x000F1: r'\~{n}', +0x000F2: r'\`{o}', +0x000F3: r"\'{o}", +0x000F4: r'\^{o}', +0x000F5: r'\~{o}', +0x000F6: r'\"{o}', +0x000F8: r'\o{}', +0x000F9: r'\`{u}', +0x000FA: r"\'{u}", +0x000FB: r'\^{u}', +0x000FC: r'\"{u}', +0x000FD: r"\'{y}", +0x000FE: r'\th{}', +0x000FF: r'\"{y}', +0x00100: r'\={A}', +0x00101: r'\={a}', +0x00102: r'\u{A}', +0x00103: r'\u{a}', +0x00104: r'\k{A}', +0x00105: r'\k{a}', +0x00106: r"\'{C}", +0x00107: r"\'{c}", +0x00108: r'\^{C}', +0x00109: r'\^{c}', +0x0010A: r'\.{C}', +0x0010B: r'\.{c}', +0x0010C: r'\v{C}', +0x0010D: r'\v{c}', +0x0010E: r'\v{D}', +0x0010F: r'\v{d}', +0x00110: r'\DJ{}', +0x00111: r'\dj{}', +0x00112: r'\={E}', +0x00113: r'\={e}', +0x00114: r'\u{E}', +0x00115: r'\u{e}', +0x00116: r'\.{E}', +0x00117: r'\.{e}', +0x00118: r'\k{E}', +0x00119: r'\k{e}', +0x0011A: r'\v{E}', +0x0011B: r'\v{e}', +0x0011C: r'\^{G}', +0x0011D: r'\^{g}', +0x0011E: r'\u{G}', +0x0011F: r'\u{g}', +0x00120: r'\.{G}', +0x00121: r'\.{g}', +0x00122: r'\c{G}', +0x00123: r'\c{g}', +0x00124: r'\^{H}', +0x00125: r'\^{h}', +0x00126: r'{\fontencoding{LELA}\selectfont\char40}', +0x00128: r'\~{I}', +0x00129: r'\~{\i}', +0x0012A: r'\={I}', +0x0012B: r'\={\i}', +0x0012C: r'\u{I}', +0x0012D: r'\u{\i}', +0x0012E: r'\k{I}', +0x0012F: r'\k{i}', +0x00130: r'\.{I}', +0x00131: r'\i{}', +0x00132: r'IJ', +0x00133: r'ij', +0x00134: r'\^{J}', +0x00135: r'\^{\j}', +0x00136: r'\c{K}', +0x00137: r'\c{k}', +0x00138: r'{\fontencoding{LELA}\selectfont\char91}', +0x00139: r"\'{L}", +0x0013A: r"\'{l}", +0x0013B: r'\c{L}', +0x0013C: r'\c{l}', +0x0013D: r'\v{L}', +0x0013E: r'\v{l}', +0x0013F: r'{\fontencoding{LELA}\selectfont\char201}', +0x00140: r'{\fontencoding{LELA}\selectfont\char202}', +0x00141: r'\L{}', +0x00142: r'\l{}', +0x00143: r"\'{N}", +0x00144: r"\'{n}", +0x00145: r'\c{N}', +0x00146: r'\c{n}', +0x00147: r'\v{N}', +0x00148: r'\v{n}', +0x00149: r"'n", +0x0014A: r'\NG{}', +0x0014B: r'\ng{}', +0x0014C: r'\={O}', +0x0014D: r'\={o}', +0x0014E: r'\u{O}', +0x0014F: r'\u{o}', +0x00150: r'\H{O}', +0x00151: r'\H{o}', +0x00152: r'\OE{}', +0x00153: r'\oe{}', +0x00154: r"\'{R}", +0x00155: r"\'{r}", +0x00156: r'\c{R}', +0x00157: r'\c{r}', +0x00158: r'\v{R}', +0x00159: r'\v{r}', +0x0015A: r"\'{S}", +0x0015B: r"\'{s}", +0x0015C: r'\^{S}', +0x0015D: r'\^{s}', +0x0015E: r'\c{S}', +0x0015F: r'\c{s}', +0x00160: r'\v{S}', +0x00161: r'\v{s}', +0x00162: r'\c{T}', +0x00163: r'\c{t}', +0x00164: r'\v{T}', +0x00165: r'\v{t}', +0x00166: r'{\fontencoding{LELA}\selectfont\char47}', +0x00167: r'{\fontencoding{LELA}\selectfont\char63}', +0x00168: r'\~{U}', +0x00169: r'\~{u}', +0x0016A: r'\={U}', +0x0016B: r'\={u}', +0x0016C: r'\u{U}', +0x0016D: r'\u{u}', +0x0016E: r'\r{U}', +0x0016F: r'\r{u}', +0x00170: r'\H{U}', +0x00171: r'\H{u}', +0x00172: r'\k{U}', +0x00173: r'\k{u}', +0x00174: r'\^{W}', +0x00175: r'\^{w}', +0x00176: r'\^{Y}', +0x00177: r'\^{y}', +0x00178: r'\"{Y}', +0x00179: r"\'{Z}", +0x0017A: r"\'{z}", +0x0017B: r'\.{Z}', +0x0017C: r'\.{z}', +0x0017D: r'\v{Z}', +0x0017E: r'\v{z}', +0x00195: r'\texthvlig{}', +0x0019E: r'\textnrleg{}', +0x001BA: r'{\fontencoding{LELA}\selectfont\char195}', +0x001C2: r'\textdoublepipe{}', +0x001F5: r"\'{g}", +0x00258: r'{\fontencoding{LEIP}\selectfont\char61}', +0x00261: r'g', +0x00272: r'\Elzltln{}', +0x00278: r'\textphi{}', +0x0027F: r'{\fontencoding{LEIP}\selectfont\char202}', +0x0029E: r'\textturnk{}', +0x002BC: r"'", +0x002C7: r'\textasciicaron{}', +0x002D8: r'\textasciibreve{}', +0x002D9: r'\textperiodcentered{}', +0x002DA: r'\r{}', +0x002DB: r'\k{}', +0x002DC: r'\texttildelow{}', +0x002DD: r'\H{}', +0x002E5: r'\tone{55}', +0x002E6: r'\tone{44}', +0x002E7: r'\tone{33}', +0x002E8: r'\tone{22}', +0x002E9: r'\tone{11}', +0x00300: r'\`', +0x00301: r"\'", +0x00302: r'\^', +0x00303: r'\~', +0x00304: r'\=', +0x00306: r'\u{}', +0x00307: r'\.', +0x00308: r'\"', +0x0030A: r'\r{}', +0x0030B: r'\H{}', +0x0030C: r'\v{}', +0x0030F: r'\cyrchar\C{}', +0x00311: r'{\fontencoding{LECO}\selectfont\char177}', +0x00318: r'{\fontencoding{LECO}\selectfont\char184}', +0x00319: r'{\fontencoding{LECO}\selectfont\char185}', +0x00322: r'\Elzrh{}', +0x00327: r'\c{}', +0x00328: r'\k{}', +0x0032B: r'{\fontencoding{LECO}\selectfont\char203}', +0x0032F: r'{\fontencoding{LECO}\selectfont\char207}', +0x00335: r'\Elzxl{}', +0x00336: r'\Elzbar{}', +0x00337: r'{\fontencoding{LECO}\selectfont\char215}', +0x00338: r'{\fontencoding{LECO}\selectfont\char216}', +0x0033A: r'{\fontencoding{LECO}\selectfont\char218}', +0x0033B: r'{\fontencoding{LECO}\selectfont\char219}', +0x0033C: r'{\fontencoding{LECO}\selectfont\char220}', +0x0033D: r'{\fontencoding{LECO}\selectfont\char221}', +0x00361: r'{\fontencoding{LECO}\selectfont\char225}', +0x00386: r"\'{A}", +0x00388: r"\'{E}", +0x00389: r"\'{H}", +0x0038A: r"\'{}{I}", +0x0038C: r"\'{}O{}", +0x003AC: r"\'{$\alpha$}", +0x003B8: r'\texttheta{}', +0x003CC: r"\'{o}", +0x003D0: r'\Pisymbol{ppi022}{87}', +0x003D1: r'\textvartheta{}', +0x003F4: r'\textTheta{}', +0x00401: r'\cyrchar\CYRYO{}', +0x00402: r'\cyrchar\CYRDJE{}', +0x00403: r"\cyrchar{\'\CYRG}", +0x00404: r'\cyrchar\CYRIE{}', +0x00405: r'\cyrchar\CYRDZE{}', +0x00406: r'\cyrchar\CYRII{}', +0x00407: r'\cyrchar\CYRYI{}', +0x00408: r'\cyrchar\CYRJE{}', +0x00409: r'\cyrchar\CYRLJE{}', +0x0040A: r'\cyrchar\CYRNJE{}', +0x0040B: r'\cyrchar\CYRTSHE{}', +0x0040C: r"\cyrchar{\'\CYRK}", +0x0040E: r'\cyrchar\CYRUSHRT{}', +0x0040F: r'\cyrchar\CYRDZHE{}', +0x00410: r'\cyrchar\CYRA{}', +0x00411: r'\cyrchar\CYRB{}', +0x00412: r'\cyrchar\CYRV{}', +0x00413: r'\cyrchar\CYRG{}', +0x00414: r'\cyrchar\CYRD{}', +0x00415: r'\cyrchar\CYRE{}', +0x00416: r'\cyrchar\CYRZH{}', +0x00417: r'\cyrchar\CYRZ{}', +0x00418: r'\cyrchar\CYRI{}', +0x00419: r'\cyrchar\CYRISHRT{}', +0x0041A: r'\cyrchar\CYRK{}', +0x0041B: r'\cyrchar\CYRL{}', +0x0041C: r'\cyrchar\CYRM{}', +0x0041D: r'\cyrchar\CYRN{}', +0x0041E: r'\cyrchar\CYRO{}', +0x0041F: r'\cyrchar\CYRP{}', +0x00420: r'\cyrchar\CYRR{}', +0x00421: r'\cyrchar\CYRS{}', +0x00422: r'\cyrchar\CYRT{}', +0x00423: r'\cyrchar\CYRU{}', +0x00424: r'\cyrchar\CYRF{}', +0x00425: r'\cyrchar\CYRH{}', +0x00426: r'\cyrchar\CYRC{}', +0x00427: r'\cyrchar\CYRCH{}', +0x00428: r'\cyrchar\CYRSH{}', +0x00429: r'\cyrchar\CYRSHCH{}', +0x0042A: r'\cyrchar\CYRHRDSN{}', +0x0042B: r'\cyrchar\CYRERY{}', +0x0042C: r'\cyrchar\CYRSFTSN{}', +0x0042D: r'\cyrchar\CYREREV{}', +0x0042E: r'\cyrchar\CYRYU{}', +0x0042F: r'\cyrchar\CYRYA{}', +0x00430: r'\cyrchar\cyra{}', +0x00431: r'\cyrchar\cyrb{}', +0x00432: r'\cyrchar\cyrv{}', +0x00433: r'\cyrchar\cyrg{}', +0x00434: r'\cyrchar\cyrd{}', +0x00435: r'\cyrchar\cyre{}', +0x00436: r'\cyrchar\cyrzh{}', +0x00437: r'\cyrchar\cyrz{}', +0x00438: r'\cyrchar\cyri{}', +0x00439: r'\cyrchar\cyrishrt{}', +0x0043A: r'\cyrchar\cyrk{}', +0x0043B: r'\cyrchar\cyrl{}', +0x0043C: r'\cyrchar\cyrm{}', +0x0043D: r'\cyrchar\cyrn{}', +0x0043E: r'\cyrchar\cyro{}', +0x0043F: r'\cyrchar\cyrp{}', +0x00440: r'\cyrchar\cyrr{}', +0x00441: r'\cyrchar\cyrs{}', +0x00442: r'\cyrchar\cyrt{}', +0x00443: r'\cyrchar\cyru{}', +0x00444: r'\cyrchar\cyrf{}', +0x00445: r'\cyrchar\cyrh{}', +0x00446: r'\cyrchar\cyrc{}', +0x00447: r'\cyrchar\cyrch{}', +0x00448: r'\cyrchar\cyrsh{}', +0x00449: r'\cyrchar\cyrshch{}', +0x0044A: r'\cyrchar\cyrhrdsn{}', +0x0044B: r'\cyrchar\cyrery{}', +0x0044C: r'\cyrchar\cyrsftsn{}', +0x0044D: r'\cyrchar\cyrerev{}', +0x0044E: r'\cyrchar\cyryu{}', +0x0044F: r'\cyrchar\cyrya{}', +0x00451: r'\cyrchar\cyryo{}', +0x00452: r'\cyrchar\cyrdje{}', +0x00453: r"\cyrchar{\'\cyrg}", +0x00454: r'\cyrchar\cyrie{}', +0x00455: r'\cyrchar\cyrdze{}', +0x00456: r'\cyrchar\cyrii{}', +0x00457: r'\cyrchar\cyryi{}', +0x00458: r'\cyrchar\cyrje{}', +0x00459: r'\cyrchar\cyrlje{}', +0x0045A: r'\cyrchar\cyrnje{}', +0x0045B: r'\cyrchar\cyrtshe{}', +0x0045C: r"\cyrchar{\'\cyrk}", +0x0045E: r'\cyrchar\cyrushrt{}', +0x0045F: r'\cyrchar\cyrdzhe{}', +0x00460: r'\cyrchar\CYROMEGA{}', +0x00461: r'\cyrchar\cyromega{}', +0x00462: r'\cyrchar\CYRYAT{}', +0x00464: r'\cyrchar\CYRIOTE{}', +0x00465: r'\cyrchar\cyriote{}', +0x00466: r'\cyrchar\CYRLYUS{}', +0x00467: r'\cyrchar\cyrlyus{}', +0x00468: r'\cyrchar\CYRIOTLYUS{}', +0x00469: r'\cyrchar\cyriotlyus{}', +0x0046A: r'\cyrchar\CYRBYUS{}', +0x0046C: r'\cyrchar\CYRIOTBYUS{}', +0x0046D: r'\cyrchar\cyriotbyus{}', +0x0046E: r'\cyrchar\CYRKSI{}', +0x0046F: r'\cyrchar\cyrksi{}', +0x00470: r'\cyrchar\CYRPSI{}', +0x00471: r'\cyrchar\cyrpsi{}', +0x00472: r'\cyrchar\CYRFITA{}', +0x00474: r'\cyrchar\CYRIZH{}', +0x00478: r'\cyrchar\CYRUK{}', +0x00479: r'\cyrchar\cyruk{}', +0x0047A: r'\cyrchar\CYROMEGARND{}', +0x0047B: r'\cyrchar\cyromegarnd{}', +0x0047C: r'\cyrchar\CYROMEGATITLO{}', +0x0047D: r'\cyrchar\cyromegatitlo{}', +0x0047E: r'\cyrchar\CYROT{}', +0x0047F: r'\cyrchar\cyrot{}', +0x00480: r'\cyrchar\CYRKOPPA{}', +0x00481: r'\cyrchar\cyrkoppa{}', +0x00482: r'\cyrchar\cyrthousands{}', +0x00488: r'\cyrchar\cyrhundredthousands{}', +0x00489: r'\cyrchar\cyrmillions{}', +0x0048C: r'\cyrchar\CYRSEMISFTSN{}', +0x0048D: r'\cyrchar\cyrsemisftsn{}', +0x0048E: r'\cyrchar\CYRRTICK{}', +0x0048F: r'\cyrchar\cyrrtick{}', +0x00490: r'\cyrchar\CYRGUP{}', +0x00491: r'\cyrchar\cyrgup{}', +0x00492: r'\cyrchar\CYRGHCRS{}', +0x00493: r'\cyrchar\cyrghcrs{}', +0x00494: r'\cyrchar\CYRGHK{}', +0x00495: r'\cyrchar\cyrghk{}', +0x00496: r'\cyrchar\CYRZHDSC{}', +0x00497: r'\cyrchar\cyrzhdsc{}', +0x00498: r'\cyrchar\CYRZDSC{}', +0x00499: r'\cyrchar\cyrzdsc{}', +0x0049A: r'\cyrchar\CYRKDSC{}', +0x0049B: r'\cyrchar\cyrkdsc{}', +0x0049C: r'\cyrchar\CYRKVCRS{}', +0x0049D: r'\cyrchar\cyrkvcrs{}', +0x0049E: r'\cyrchar\CYRKHCRS{}', +0x0049F: r'\cyrchar\cyrkhcrs{}', +0x004A0: r'\cyrchar\CYRKBEAK{}', +0x004A1: r'\cyrchar\cyrkbeak{}', +0x004A2: r'\cyrchar\CYRNDSC{}', +0x004A3: r'\cyrchar\cyrndsc{}', +0x004A4: r'\cyrchar\CYRNG{}', +0x004A5: r'\cyrchar\cyrng{}', +0x004A6: r'\cyrchar\CYRPHK{}', +0x004A7: r'\cyrchar\cyrphk{}', +0x004A8: r'\cyrchar\CYRABHHA{}', +0x004A9: r'\cyrchar\cyrabhha{}', +0x004AA: r'\cyrchar\CYRSDSC{}', +0x004AB: r'\cyrchar\cyrsdsc{}', +0x004AC: r'\cyrchar\CYRTDSC{}', +0x004AD: r'\cyrchar\cyrtdsc{}', +0x004AE: r'\cyrchar\CYRY{}', +0x004AF: r'\cyrchar\cyry{}', +0x004B0: r'\cyrchar\CYRYHCRS{}', +0x004B1: r'\cyrchar\cyryhcrs{}', +0x004B2: r'\cyrchar\CYRHDSC{}', +0x004B3: r'\cyrchar\cyrhdsc{}', +0x004B4: r'\cyrchar\CYRTETSE{}', +0x004B5: r'\cyrchar\cyrtetse{}', +0x004B6: r'\cyrchar\CYRCHRDSC{}', +0x004B7: r'\cyrchar\cyrchrdsc{}', +0x004B8: r'\cyrchar\CYRCHVCRS{}', +0x004B9: r'\cyrchar\cyrchvcrs{}', +0x004BA: r'\cyrchar\CYRSHHA{}', +0x004BB: r'\cyrchar\cyrshha{}', +0x004BC: r'\cyrchar\CYRABHCH{}', +0x004BD: r'\cyrchar\cyrabhch{}', +0x004BE: r'\cyrchar\CYRABHCHDSC{}', +0x004BF: r'\cyrchar\cyrabhchdsc{}', +0x004C0: r'\cyrchar\CYRpalochka{}', +0x004C3: r'\cyrchar\CYRKHK{}', +0x004C4: r'\cyrchar\cyrkhk{}', +0x004C7: r'\cyrchar\CYRNHK{}', +0x004C8: r'\cyrchar\cyrnhk{}', +0x004CB: r'\cyrchar\CYRCHLDSC{}', +0x004CC: r'\cyrchar\cyrchldsc{}', +0x004D4: r'\cyrchar\CYRAE{}', +0x004D5: r'\cyrchar\cyrae{}', +0x004D8: r'\cyrchar\CYRSCHWA{}', +0x004D9: r'\cyrchar\cyrschwa{}', +0x004E0: r'\cyrchar\CYRABHDZE{}', +0x004E1: r'\cyrchar\cyrabhdze{}', +0x004E8: r'\cyrchar\CYROTLD{}', +0x004E9: r'\cyrchar\cyrotld{}', +0x02002: r'\hspace{0.6em}', +0x02003: r'\hspace{1em}', +0x02004: r'\hspace{0.33em}', +0x02005: r'\hspace{0.25em}', +0x02006: r'\hspace{0.166em}', +0x02007: r'\hphantom{0}', +0x02008: r'\hphantom{,}', +0x02009: r'\hspace{0.167em}', +0x02010: r'-', +0x02013: r'\textendash{}', +0x02014: r'\textemdash{}', +0x02015: r'\rule{1em}{1pt}', +0x02018: r'`', +0x02019: r"'", +0x0201A: r',', +0x0201C: r'\textquotedblleft{}', +0x0201D: r'\textquotedblright{}', +0x0201E: r',,', +0x02020: r'\textdagger{}', +0x02021: r'\textdaggerdbl{}', +0x02022: r'\textbullet{}', +0x02024: r'.', +0x02025: r'..', +0x02026: r'\ldots{}', +0x02030: r'\textperthousand{}', +0x02031: r'\textpertenthousand{}', +0x02039: r'\guilsinglleft{}', +0x0203A: r'\guilsinglright{}', +0x0205F: r'\mkern4mu{}', +0x02060: r'\nolinebreak{}', +0x020A7: r'\ensuremath{\Elzpes}', +0x020AC: r'\mbox{\texteuro}{}', +0x0210A: r'\mathscr{g}', +0x02116: r'\cyrchar\textnumero{}', +0x02122: r'\texttrademark{}', +0x0212B: r'\AA{}', +0x02212: r'-', +0x02254: r':=', +0x02305: r'\barwedge{}', +0x02423: r'\textvisiblespace{}', +0x02460: r'\ding{172}', +0x02461: r'\ding{173}', +0x02462: r'\ding{174}', +0x02463: r'\ding{175}', +0x02464: r'\ding{176}', +0x02465: r'\ding{177}', +0x02466: r'\ding{178}', +0x02467: r'\ding{179}', +0x02468: r'\ding{180}', +0x02469: r'\ding{181}', +0x025A0: r'\ding{110}', +0x025B2: r'\ding{115}', +0x025BC: r'\ding{116}', +0x025C6: r'\ding{117}', +0x025CF: r'\ding{108}', +0x025D7: r'\ding{119}', +0x02605: r'\ding{72}', +0x02606: r'\ding{73}', +0x0260E: r'\ding{37}', +0x0261B: r'\ding{42}', +0x0261E: r'\ding{43}', +0x0263E: r'\rightmoon{}', +0x0263F: r'\mercury{}', +0x02640: r'\venus{}', +0x02642: r'\male{}', +0x02643: r'\jupiter{}', +0x02644: r'\saturn{}', +0x02645: r'\uranus{}', +0x02646: r'\neptune{}', +0x02647: r'\pluto{}', +0x02648: r'\aries{}', +0x02649: r'\taurus{}', +0x0264A: r'\gemini{}', +0x0264B: r'\cancer{}', +0x0264C: r'\leo{}', +0x0264D: r'\virgo{}', +0x0264E: r'\libra{}', +0x0264F: r'\scorpio{}', +0x02650: r'\sagittarius{}', +0x02651: r'\capricornus{}', +0x02652: r'\aquarius{}', +0x02653: r'\pisces{}', +0x02660: r'\ding{171}', +0x02663: r'\ding{168}', +0x02665: r'\ding{170}', +0x02666: r'\ding{169}', +0x02669: r'\quarternote{}', +0x0266A: r'\eighthnote{}', +0x02701: r'\ding{33}', +0x02702: r'\ding{34}', +0x02703: r'\ding{35}', +0x02704: r'\ding{36}', +0x02706: r'\ding{38}', +0x02707: r'\ding{39}', +0x02708: r'\ding{40}', +0x02709: r'\ding{41}', +0x0270C: r'\ding{44}', +0x0270D: r'\ding{45}', +0x0270E: r'\ding{46}', +0x0270F: r'\ding{47}', +0x02710: r'\ding{48}', +0x02711: r'\ding{49}', +0x02712: r'\ding{50}', +0x02713: r'\ding{51}', +0x02714: r'\ding{52}', +0x02715: r'\ding{53}', +0x02716: r'\ding{54}', +0x02717: r'\ding{55}', +0x02718: r'\ding{56}', +0x02719: r'\ding{57}', +0x0271A: r'\ding{58}', +0x0271B: r'\ding{59}', +0x0271C: r'\ding{60}', +0x0271D: r'\ding{61}', +0x0271E: r'\ding{62}', +0x0271F: r'\ding{63}', +0x02720: r'\ding{64}', +0x02721: r'\ding{65}', +0x02722: r'\ding{66}', +0x02723: r'\ding{67}', +0x02724: r'\ding{68}', +0x02725: r'\ding{69}', +0x02726: r'\ding{70}', +0x02727: r'\ding{71}', +0x02729: r'\ding{73}', +0x0272A: r'\ding{74}', +0x0272B: r'\ding{75}', +0x0272C: r'\ding{76}', +0x0272D: r'\ding{77}', +0x0272E: r'\ding{78}', +0x0272F: r'\ding{79}', +0x02730: r'\ding{80}', +0x02731: r'\ding{81}', +0x02732: r'\ding{82}', +0x02733: r'\ding{83}', +0x02734: r'\ding{84}', +0x02735: r'\ding{85}', +0x02736: r'\ding{86}', +0x02737: r'\ding{87}', +0x02738: r'\ding{88}', +0x02739: r'\ding{89}', +0x0273A: r'\ding{90}', +0x0273B: r'\ding{91}', +0x0273C: r'\ding{92}', +0x0273D: r'\ding{93}', +0x0273E: r'\ding{94}', +0x0273F: r'\ding{95}', +0x02740: r'\ding{96}', +0x02741: r'\ding{97}', +0x02742: r'\ding{98}', +0x02743: r'\ding{99}', +0x02744: r'\ding{100}', +0x02745: r'\ding{101}', +0x02746: r'\ding{102}', +0x02747: r'\ding{103}', +0x02748: r'\ding{104}', +0x02749: r'\ding{105}', +0x0274A: r'\ding{106}', +0x0274B: r'\ding{107}', +0x0274D: r'\ding{109}', +0x0274F: r'\ding{111}', +0x02750: r'\ding{112}', +0x02751: r'\ding{113}', +0x02752: r'\ding{114}', +0x02756: r'\ding{118}', +0x02758: r'\ding{120}', +0x02759: r'\ding{121}', +0x0275A: r'\ding{122}', +0x0275B: r'\ding{123}', +0x0275C: r'\ding{124}', +0x0275D: r'\ding{125}', +0x0275E: r'\ding{126}', +0x02761: r'\ding{161}', +0x02762: r'\ding{162}', +0x02763: r'\ding{163}', +0x02764: r'\ding{164}', +0x02765: r'\ding{165}', +0x02766: r'\ding{166}', +0x02767: r'\ding{167}', +0x02776: r'\ding{182}', +0x02777: r'\ding{183}', +0x02778: r'\ding{184}', +0x02779: r'\ding{185}', +0x0277A: r'\ding{186}', +0x0277B: r'\ding{187}', +0x0277C: r'\ding{188}', +0x0277D: r'\ding{189}', +0x0277E: r'\ding{190}', +0x0277F: r'\ding{191}', +0x02780: r'\ding{192}', +0x02781: r'\ding{193}', +0x02782: r'\ding{194}', +0x02783: r'\ding{195}', +0x02784: r'\ding{196}', +0x02785: r'\ding{197}', +0x02786: r'\ding{198}', +0x02787: r'\ding{199}', +0x02788: r'\ding{200}', +0x02789: r'\ding{201}', +0x0278A: r'\ding{202}', +0x0278B: r'\ding{203}', +0x0278C: r'\ding{204}', +0x0278D: r'\ding{205}', +0x0278E: r'\ding{206}', +0x0278F: r'\ding{207}', +0x02790: r'\ding{208}', +0x02791: r'\ding{209}', +0x02792: r'\ding{210}', +0x02793: r'\ding{211}', +0x02794: r'\ding{212}', +0x02798: r'\ding{216}', +0x02799: r'\ding{217}', +0x0279A: r'\ding{218}', +0x0279B: r'\ding{219}', +0x0279C: r'\ding{220}', +0x0279D: r'\ding{221}', +0x0279E: r'\ding{222}', +0x0279F: r'\ding{223}', +0x027A0: r'\ding{224}', +0x027A1: r'\ding{225}', +0x027A2: r'\ding{226}', +0x027A3: r'\ding{227}', +0x027A4: r'\ding{228}', +0x027A5: r'\ding{229}', +0x027A6: r'\ding{230}', +0x027A7: r'\ding{231}', +0x027A8: r'\ding{232}', +0x027A9: r'\ding{233}', +0x027AA: r'\ding{234}', +0x027AB: r'\ding{235}', +0x027AC: r'\ding{236}', +0x027AD: r'\ding{237}', +0x027AE: r'\ding{238}', +0x027AF: r'\ding{239}', +0x027B1: r'\ding{241}', +0x027B2: r'\ding{242}', +0x027B3: r'\ding{243}', +0x027B4: r'\ding{244}', +0x027B5: r'\ding{245}', +0x027B6: r'\ding{246}', +0x027B7: r'\ding{247}', +0x027B8: r'\ding{248}', +0x027B9: r'\ding{249}', +0x027BA: r'\ding{250}', +0x027BB: r'\ding{251}', +0x027BC: r'\ding{252}', +0x027BD: r'\ding{253}', +0x027BE: r'\ding{254}', +0x0FB00: r'ff', +0x0FB01: r'fi', +0x0FB02: r'fl', +0x0FB03: r'ffi', +0x0FB04: r'ffl', +0x1D6B9: r'\mathbf{\vartheta}', +0x1D6DD: r'\mathbf{\vartheta}', +0x1D6DE: r'\mathbf{\varkappa}', +0x1D6DF: r'\mathbf{\phi}', +0x1D6E0: r'\mathbf{\varrho}', +0x1D6E1: r'\mathbf{\varpi}', +0x1D6F3: r'\mathsl{\vartheta}', +0x1D717: r'\mathsl{\vartheta}', +0x1D718: r'\mathsl{\varkappa}', +0x1D719: r'\mathsl{\phi}', +0x1D71A: r'\mathsl{\varrho}', +0x1D71B: r'\mathsl{\varpi}', +0x1D72D: r'\mathbit{O}', +0x1D751: r'\mathbit{\vartheta}', +0x1D752: r'\mathbit{\varkappa}', +0x1D753: r'\mathbit{\phi}', +0x1D754: r'\mathbit{\varrho}', +0x1D755: r'\mathbit{\varpi}', +0x1D767: r'\mathsfbf{\vartheta}', +0x1D78B: r'\mathsfbf{\vartheta}', +0x1D78C: r'\mathsfbf{\varkappa}', +0x1D78D: r'\mathsfbf{\phi}', +0x1D78E: r'\mathsfbf{\varrho}', +0x1D78F: r'\mathsfbf{\varpi}', +0x1D7A1: r'\mathsfbfsl{\vartheta}', +0x1D7C5: r'\mathsfbfsl{\vartheta}', +0x1D7C6: r'\mathsfbfsl{\varkappa}', +0x1D7C7: r'\mathsfbfsl{\phi}', +0x1D7C8: r'\mathsfbfsl{\varrho}', +0x1D7C9: r'\mathsfbfsl{\varpi}', +} +mathmap = { +0x0007B: r'\lbrace{}', +0x0007C: r'\vert{}', +0x0007D: r'\rbrace{}', +0x000A0: r'~', +0x000A2: r'\mbox{\textcent}', +0x000A3: r'\pounds{}', +0x000A4: r'\mbox{\textcurrency}', +0x000A5: r'\yen{}', +0x000A7: r'\S{}', +0x000A9: r'\copyright{}', +0x000AB: r'\mbox{\guillemotleft}', +0x000AC: r'\lnot{}', +0x000AD: r'\-', +0x000AE: r'\circledR{}', +0x000B0: r'\mbox{\textdegree}', +0x000B1: r'\pm{}', +0x000B2: r'{^2}', +0x000B3: r'{^3}', +0x000B5: r'\mathrm{\mu}', +0x000B6: r'\P{}', +0x000B7: r'\cdot{}', +0x000B8: r'\mbox{\c{}}', +0x000B9: r'{^1}', +0x000BB: r'\mbox{\guillemotright}', +0x000C0: r'\grave{A}', +0x000C1: r'\acute{A}', +0x000C2: r'\hat{A}', +0x000C3: r'\tilde{A}', +0x000C4: r'\ddot{A}', +0x000C7: r'\mbox{\c{C}}', +0x000C8: r'\grave{E}', +0x000C9: r'\acute{E}', +0x000CA: r'\hat{E}', +0x000CB: r'\ddot{E}', +0x000CC: r'\grave{I}', +0x000CD: r'\acute{I}', +0x000CE: r'\hat{I}', +0x000CF: r'\ddot{I}', +0x000D1: r'\tilde{N}', +0x000D2: r'\grave{O}', +0x000D3: r'\acute{O}', +0x000D4: r'\hat{O}', +0x000D5: r'\tilde{O}', +0x000D6: r'\ddot{O}', +0x000D7: r'\times{}', +0x000D9: r'\grave{U}', +0x000DA: r'\acute{U}', +0x000DB: r'\hat{U}', +0x000DC: r'\ddot{U}', +0x000DD: r'\acute{Y}', +0x000E0: r'\grave{a}', +0x000E1: r'\acute{a}', +0x000E2: r'\hat{a}', +0x000E3: r'\tilde{a}', +0x000E4: r'\ddot{a}', +0x000E7: r'\mbox{\c{c}}', +0x000E8: r'\grave{e}', +0x000E9: r'\acute{e}', +0x000EA: r'\hat{e}', +0x000EB: r'\ddot{e}', +0x000EC: r'\grave{\imath}', +0x000ED: r'\acute{\imath}', +0x000EE: r'\hat{\imath}', +0x000EF: r'\ddot{\imath}', +0x000F1: r'\tilde{n}', +0x000F2: r'\grave{o}', +0x000F3: r'\acute{o}', +0x000F4: r'\hat{o}', +0x000F5: r'\tilde{o}', +0x000F6: r'\ddot{o}', +0x000F7: r'\div{}', +0x000F9: r'\grave{u}', +0x000FA: r'\acute{u}', +0x000FB: r'\hat{u}', +0x000FC: r'\ddot{u}', +0x000FD: r'\acute{y}', +0x000FF: r'\ddot{y}', +0x00100: r'\bar{A}', +0x00101: r'\bar{a}', +0x00102: r'\breve{A}', +0x00103: r'\u{a}', +0x00106: r'\acute{C}', +0x00107: r'\acute{c}', +0x00108: r'\hat{C}', +0x00109: r'\hat{c}', +0x0010A: r'\dot{C}', +0x0010B: r'\dot{c}', +0x0010C: r'\check{C}', +0x0010D: r'\check{c}', +0x0010E: r'\check{D}', +0x0010F: r'\check{d}', +0x00112: r'\bar{E}', +0x00113: r'\bar{e}', +0x00114: r'\breve{E}', +0x00115: r'\breve{e}', +0x00116: r'\dot{E}', +0x00117: r'\dot{e}', +0x00118: r'\k{E}', +0x0011A: r'\check{E}', +0x0011B: r'\check{e}', +0x0011C: r'\hat{G}', +0x0011D: r'\hat{g}', +0x0011E: r'\breve{G}', +0x0011F: r'\breve{g}', +0x00120: r'\dot{G}', +0x00121: r'\dot{g}', +0x00122: r'\mbox{\c{G}}', +0x00123: r'\mbox{\c{g}}', +0x00124: r'\hat{H}', +0x00125: r'\hat{h}', +0x00127: r'\Elzxh{}', +0x00128: r'\tilde{I}', +0x00129: r'\tilde{\imath}', +0x0012A: r'\bar{I}', +0x0012B: r'\bar{\imath}', +0x0012C: r'\breve{I}', +0x0012D: r'\breve{\imath}', +0x00130: r'\dot{I}', +0x00131: r'\imath{}', +0x00134: r'\hat{J}', +0x00135: r'\hat{\jmath}', +0x00136: r'\mbox{\c{K}}', +0x00137: r'\mbox{\c{k}}', +0x00139: r'\acute{L}', +0x0013A: r'\acute{l}', +0x0013B: r'\mbox{\c{L}}', +0x0013C: r'\mbox{\c{l}}', +0x0013D: r'\check{L}', +0x0013E: r'\check{l}', +0x00143: r'\acute{N}', +0x00144: r'\acute{n}', +0x00145: r'\mbox{\c{N}}', +0x00146: r'\mbox{\c{n}}', +0x00147: r'\check{N}', +0x00148: r'\check{n}', +0x0014C: r'\bar{O}', +0x0014D: r'\bar{o}', +0x0014E: r'\breve{O}', +0x0014F: r'\breve{o}', +0x00150: r'\mbox{\H{O}}', +0x00151: r'\mbox{\H{o}}', +0x00154: r'\acute{R}', +0x00155: r'\acute{r}', +0x00156: r'\mbox{\c{R}}', +0x00157: r'\mbox{\c{r}}', +0x00158: r'\check{R}', +0x00159: r'\check{r}', +0x0015A: r'\acute{S}', +0x0015B: r'\acute{s}', +0x0015C: r'\hat{S}', +0x0015D: r'\hat{s}', +0x0015E: r'\mbox{\c{S}}', +0x0015F: r'\mbox{\c{s}}', +0x00160: r'\check{S}', +0x00161: r'\check{s}', +0x00162: r'\mbox{\c{T}}', +0x00163: r'\mbox{\c{t}}', +0x00164: r'\check{T}', +0x00165: r'\check{t}', +0x00168: r'\tilde{U}', +0x00169: r'\tilde{u}', +0x0016A: r'\bar{U}', +0x0016B: r'\bar{u}', +0x0016C: r'\breve{U}', +0x0016D: r'\breve{u}', +0x0016E: r'\mathring{U}', +0x0016F: r'\mathring{u}', +0x00170: r'\mbox{\H{U}}', +0x00171: r'\mbox{\H{u}}', +0x00172: r'\k{U}', +0x00174: r'\hat{W}', +0x00175: r'\hat{w}', +0x00176: r'\hat{Y}', +0x00177: r'\hat{y}', +0x00178: r'\ddot{Y}', +0x00179: r'\acute{Z}', +0x0017A: r'\acute{z}', +0x0017B: r'\dot{Z}', +0x0017C: r'\dot{z}', +0x0017D: r'\check{Z}', +0x0017E: r'\check{z}', +0x00192: r'f', +0x001AA: r'\eth{}', +0x001F5: r'\acute{g}', +0x00250: r'\Elztrna{}', +0x00252: r'\Elztrnsa{}', +0x00254: r'\Elzopeno{}', +0x00256: r'\Elzrtld{}', +0x00259: r'\Elzschwa{}', +0x0025B: r'\varepsilon{}', +0x00263: r'\Elzpgamma{}', +0x00264: r'\Elzpbgam{}', +0x00265: r'\Elztrnh{}', +0x0026C: r'\Elzbtdl{}', +0x0026D: r'\Elzrtll{}', +0x0026F: r'\Elztrnm{}', +0x00270: r'\Elztrnmlr{}', +0x00271: r'\Elzltlmr{}', +0x00273: r'\Elzrtln{}', +0x00277: r'\Elzclomeg{}', +0x00279: r'\Elztrnr{}', +0x0027A: r'\Elztrnrl{}', +0x0027B: r'\Elzrttrnr{}', +0x0027C: r'\Elzrl{}', +0x0027D: r'\Elzrtlr{}', +0x0027E: r'\Elzfhr{}', +0x00282: r'\Elzrtls{}', +0x00283: r'\Elzesh{}', +0x00287: r'\Elztrnt{}', +0x00288: r'\Elzrtlt{}', +0x0028A: r'\Elzpupsil{}', +0x0028B: r'\Elzpscrv{}', +0x0028C: r'\Elzinvv{}', +0x0028D: r'\Elzinvw{}', +0x0028E: r'\Elztrny{}', +0x00290: r'\Elzrtlz{}', +0x00292: r'\Elzyogh{}', +0x00294: r'\Elzglst{}', +0x00295: r'\Elzreglst{}', +0x00296: r'\Elzinglst{}', +0x002A4: r'\Elzdyogh{}', +0x002A7: r'\Elztesh{}', +0x002C8: r'\Elzverts{}', +0x002CC: r'\Elzverti{}', +0x002D0: r'\Elzlmrk{}', +0x002D1: r'\Elzhlmrk{}', +0x002D2: r'\Elzsbrhr{}', +0x002D3: r'\Elzsblhr{}', +0x002D4: r'\Elzrais{}', +0x002D5: r'\Elzlow{}', +0x002D8: r'\u{}', +0x002D9: r'\dot{}', +0x002DA: r'\mathring{}', +0x002DB: r'\mbox{\k{}}', +0x002DD: r'\mbox{\H{}}', +0x00300: r'\grave{}', +0x00301: r'\acute{}', +0x00302: r'\hat{}', +0x00303: r'\tilde{}', +0x00304: r'\bar{}', +0x00306: r'\breve{}', +0x00307: r'\dot{}', +0x00308: r'\ddot{}', +0x0030C: r'\check{}', +0x00321: r'\Elzpalh{}', +0x0032A: r'\Elzsbbrg{}', +0x00386: r'\acute{A}', +0x00388: r'\acute{E}', +0x00389: r'\grave{H}', +0x0038A: r"\mathrm{'I}", +0x0038C: r"\mathrm{'O}", +0x0038E: r"\mathrm{'Y}", +0x0038F: r"\mathrm{'\Omega}", +0x00390: r'\acute{\ddot{\iota}}', +0x00391: r'\Alpha{}', +0x00392: r'\Beta{}', +0x00393: r'\Gamma{}', +0x00394: r'\Delta{}', +0x00395: r'\Epsilon{}', +0x00396: r'\Zeta{}', +0x00397: r'\Eta{}', +0x00398: r'\Theta{}', +0x00399: r'\Iota{}', +0x0039A: r'\Kappa{}', +0x0039B: r'\Lambda{}', +0x0039C: r'M', +0x0039D: r'N', +0x0039E: r'\Xi{}', +0x0039F: r'O', +0x003A0: r'\Pi{}', +0x003A1: r'\Rho{}', +0x003A3: r'\Sigma{}', +0x003A4: r'\Tau{}', +0x003A5: r'\Upsilon{}', +0x003A6: r'\Phi{}', +0x003A7: r'\Chi{}', +0x003A8: r'\Psi{}', +0x003A9: r'\Omega{}', +0x003AA: r'\mathrm{\ddot{I}}', +0x003AB: r'\mathrm{\ddot{Y}}', +0x003AC: r'\acute{\alpha}', +0x003AD: r'\acute{\epsilon}', +0x003AE: r'\acute{\eta}', +0x003AF: r'\acute{\iota}', +0x003B0: r'\acute{\ddot{\upsilon}}', +0x003B1: r'\alpha{}', +0x003B2: r'\beta{}', +0x003B3: r'\gamma{}', +0x003B4: r'\delta{}', +0x003B5: r'\epsilon{}', +0x003B6: r'\zeta{}', +0x003B7: r'\eta{}', +0x003B8: r'\theta{}', +0x003B9: r'\iota{}', +0x003BA: r'\kappa{}', +0x003BB: r'\lambda{}', +0x003BC: r'\mu{}', +0x003BD: r'\nu{}', +0x003BE: r'\xi{}', +0x003BF: r'o', +0x003C0: r'\pi{}', +0x003C1: r'\rho{}', +0x003C2: r'\varsigma{}', +0x003C3: r'\sigma{}', +0x003C4: r'\tau{}', +0x003C5: r'\upsilon{}', +0x003C6: r'\varphi{}', +0x003C7: r'\chi{}', +0x003C8: r'\psi{}', +0x003C9: r'\omega{}', +0x003CA: r'\ddot{\iota}', +0x003CB: r'\ddot{\upsilon}', +0x003CC: r'\acute{o}', +0x003CD: r'\acute{\upsilon}', +0x003CE: r'\acute{\omega}', +0x003D1: r'\vartheta{}', +0x003D2: r'\Upsilon{}', +0x003D5: r'\phi{}', +0x003D6: r'\varpi{}', +0x003DA: r'\Stigma{}', +0x003DC: r'\Digamma{}', +0x003DD: r'\digamma{}', +0x003DE: r'\Koppa{}', +0x003E0: r'\Sampi{}', +0x003F0: r'\varkappa{}', +0x003F1: r'\varrho{}', +0x003F6: r'\backepsilon{}', +0x0200A: r'\mkern1mu{}', +0x02014: r'---', +0x02016: r'\Vert{}', +0x0201B: r'\Elzreapos{}', +0x02020: r'\dag{}', +0x02021: r'\ddag{}', +0x02022: r'\bullet{}', +0x02032: r"{'}", +0x02033: r"{''}", +0x02034: r"{'''}", +0x02035: r'\backprime{}', +0x02057: r"''''", +0x020A7: r'\Elzpes{}', +0x020DB: r'\dddot{}', +0x020DC: r'\ddddot{}', +0x02102: r'\mathbb{C}', +0x0210B: r'\mathscr{H}', +0x0210C: r'\mathfrak{H}', +0x0210D: r'\mathbb{H}', +0x0210F: r'\hslash{}', +0x02110: r'\mathscr{I}', +0x02111: r'\mathfrak{I}', +0x02112: r'\mathscr{L}', +0x02113: r'\mathscr{l}', +0x02115: r'\mathbb{N}', +0x02118: r'\wp{}', +0x02119: r'\mathbb{P}', +0x0211A: r'\mathbb{Q}', +0x0211B: r'\mathscr{R}', +0x0211C: r'\mathfrak{R}', +0x0211D: r'\mathbb{R}', +0x0211E: r'\Elzxrat{}', +0x02124: r'\mathbb{Z}', +0x02126: r'\Omega{}', +0x02127: r'\mho{}', +0x02128: r'\mathfrak{Z}', +0x02129: r'\ElsevierGlyph{2129}', +0x0212C: r'\mathscr{B}', +0x0212D: r'\mathfrak{C}', +0x0212F: r'\mathscr{e}', +0x02130: r'\mathscr{E}', +0x02131: r'\mathscr{F}', +0x02133: r'\mathscr{M}', +0x02134: r'\mathscr{o}', +0x02135: r'\aleph{}', +0x02136: r'\beth{}', +0x02137: r'\gimel{}', +0x02138: r'\daleth{}', +0x02153: r'\textfrac{1}{3}', +0x02154: r'\textfrac{2}{3}', +0x02155: r'\textfrac{1}{5}', +0x02156: r'\textfrac{2}{5}', +0x02157: r'\textfrac{3}{5}', +0x02158: r'\textfrac{4}{5}', +0x02159: r'\textfrac{1}{6}', +0x0215A: r'\textfrac{5}{6}', +0x0215B: r'\textfrac{1}{8}', +0x0215C: r'\textfrac{3}{8}', +0x0215D: r'\textfrac{5}{8}', +0x0215E: r'\textfrac{7}{8}', +0x02190: r'\leftarrow{}', +0x02191: r'\uparrow{}', +0x02192: r'\rightarrow{}', +0x02193: r'\downarrow{}', +0x02194: r'\leftrightarrow{}', +0x02195: r'\updownarrow{}', +0x02196: r'\nwarrow{}', +0x02197: r'\nearrow{}', +0x02198: r'\searrow{}', +0x02199: r'\swarrow{}', +0x0219A: r'\nleftarrow{}', +0x0219B: r'\nrightarrow{}', +0x0219C: r'\arrowwaveright{}', +0x0219D: r'\arrowwaveright{}', +0x0219E: r'\twoheadleftarrow{}', +0x021A0: r'\twoheadrightarrow{}', +0x021A2: r'\leftarrowtail{}', +0x021A3: r'\rightarrowtail{}', +0x021A6: r'\mapsto{}', +0x021A9: r'\hookleftarrow{}', +0x021AA: r'\hookrightarrow{}', +0x021AB: r'\looparrowleft{}', +0x021AC: r'\looparrowright{}', +0x021AD: r'\leftrightsquigarrow{}', +0x021AE: r'\nleftrightarrow{}', +0x021B0: r'\Lsh{}', +0x021B1: r'\Rsh{}', +0x021B3: r'\ElsevierGlyph{21B3}', +0x021B6: r'\curvearrowleft{}', +0x021B7: r'\curvearrowright{}', +0x021BA: r'\circlearrowleft{}', +0x021BB: r'\circlearrowright{}', +0x021BC: r'\leftharpoonup{}', +0x021BD: r'\leftharpoondown{}', +0x021BE: r'\upharpoonright{}', +0x021BF: r'\upharpoonleft{}', +0x021C0: r'\rightharpoonup{}', +0x021C1: r'\rightharpoondown{}', +0x021C2: r'\downharpoonright{}', +0x021C3: r'\downharpoonleft{}', +0x021C4: r'\rightleftarrows{}', +0x021C5: r'\dblarrowupdown{}', +0x021C6: r'\leftrightarrows{}', +0x021C7: r'\leftleftarrows{}', +0x021C8: r'\upuparrows{}', +0x021C9: r'\rightrightarrows{}', +0x021CA: r'\downdownarrows{}', +0x021CB: r'\leftrightharpoons{}', +0x021CC: r'\rightleftharpoons{}', +0x021CD: r'\nLeftarrow{}', +0x021CE: r'\nLeftrightarrow{}', +0x021CF: r'\nRightarrow{}', +0x021D0: r'\Leftarrow{}', +0x021D1: r'\Uparrow{}', +0x021D2: r'\Rightarrow{}', +0x021D3: r'\Downarrow{}', +0x021D4: r'\Leftrightarrow{}', +0x021D5: r'\Updownarrow{}', +0x021DA: r'\Lleftarrow{}', +0x021DB: r'\Rrightarrow{}', +0x021DD: r'\rightsquigarrow{}', +0x021F5: r'\DownArrowUpArrow{}', +0x02200: r'\forall{}', +0x02201: r'\complement{}', +0x02202: r'\partial{}', +0x02203: r'\exists{}', +0x02204: r'\nexists{}', +0x02205: r'\varnothing{}', +0x02207: r'\nabla{}', +0x02208: r'\in{}', +0x02209: r'\not\in{}', +0x0220B: r'\ni{}', +0x0220C: r'\not\ni{}', +0x0220F: r'\prod{}', +0x02210: r'\coprod{}', +0x02211: r'\sum{}', +0x02213: r'\mp{}', +0x02214: r'\dotplus{}', +0x02216: r'\setminus{}', +0x02217: r'{_\ast}', +0x02218: r'\circ{}', +0x02219: r'\bullet{}', +0x0221A: r'\surd{}', +0x0221D: r'\propto{}', +0x0221E: r'\infty{}', +0x0221F: r'\rightangle{}', +0x02220: r'\angle{}', +0x02221: r'\measuredangle{}', +0x02222: r'\sphericalangle{}', +0x02223: r'\mid{}', +0x02224: r'\nmid{}', +0x02225: r'\parallel{}', +0x02226: r'\nparallel{}', +0x02227: r'\wedge{}', +0x02228: r'\vee{}', +0x02229: r'\cap{}', +0x0222A: r'\cup{}', +0x0222B: r'\int{}', +0x0222C: r'\int\!\int{}', +0x0222D: r'\int\!\int\!\int{}', +0x0222E: r'\oint{}', +0x0222F: r'\surfintegral{}', +0x02230: r'\volintegral{}', +0x02231: r'\clwintegral{}', +0x02232: r'\ElsevierGlyph{2232}', +0x02233: r'\ElsevierGlyph{2233}', +0x02234: r'\therefore{}', +0x02235: r'\because{}', +0x02237: r'\Colon{}', +0x02238: r'\ElsevierGlyph{2238}', +0x0223A: r'\mathbin{{:}\!\!{-}\!\!{:}}', +0x0223B: r'\homothetic{}', +0x0223C: r'\sim{}', +0x0223D: r'\backsim{}', +0x0223E: r'\lazysinv{}', +0x02240: r'\wr{}', +0x02241: r'\not\sim{}', +0x02242: r'\ElsevierGlyph{2242}', +0x02243: r'\simeq{}', +0x02244: r'\not\simeq{}', +0x02245: r'\cong{}', +0x02246: r'\approxnotequal{}', +0x02247: r'\not\cong{}', +0x02248: r'\approx{}', +0x02249: r'\not\approx{}', +0x0224A: r'\approxeq{}', +0x0224B: r'\tildetrpl{}', +0x0224C: r'\allequal{}', +0x0224D: r'\asymp{}', +0x0224E: r'\Bumpeq{}', +0x0224F: r'\bumpeq{}', +0x02250: r'\doteq{}', +0x02251: r'\doteqdot{}', +0x02252: r'\fallingdotseq{}', +0x02253: r'\risingdotseq{}', +0x02255: r'=:', +0x02256: r'\eqcirc{}', +0x02257: r'\circeq{}', +0x02259: r'\estimates{}', +0x0225A: r'\ElsevierGlyph{225A}', +0x0225B: r'\starequal{}', +0x0225C: r'\triangleq{}', +0x0225F: r'\ElsevierGlyph{225F}', +0x02260: r'\not =', +0x02261: r'\equiv{}', +0x02262: r'\not\equiv{}', +0x02264: r'\leq{}', +0x02265: r'\geq{}', +0x02266: r'\leqq{}', +0x02267: r'\geqq{}', +0x02268: r'\lneqq{}', +0x02269: r'\gneqq{}', +0x0226A: r'\ll{}', +0x0226B: r'\gg{}', +0x0226C: r'\between{}', +0x0226D: r'\not\kern-0.3em\times{}', +0x0226E: r'\not<', +0x0226F: r'\not>', +0x02270: r'\not\leq{}', +0x02271: r'\not\geq{}', +0x02272: r'\lessequivlnt{}', +0x02273: r'\greaterequivlnt{}', +0x02274: r'\ElsevierGlyph{2274}', +0x02275: r'\ElsevierGlyph{2275}', +0x02276: r'\lessgtr{}', +0x02277: r'\gtrless{}', +0x02278: r'\notlessgreater{}', +0x02279: r'\notgreaterless{}', +0x0227A: r'\prec{}', +0x0227B: r'\succ{}', +0x0227C: r'\preccurlyeq{}', +0x0227D: r'\succcurlyeq{}', +0x0227E: r'\precapprox{}', +0x0227F: r'\succapprox{}', +0x02280: r'\not\prec{}', +0x02281: r'\not\succ{}', +0x02282: r'\subset{}', +0x02283: r'\supset{}', +0x02284: r'\not\subset{}', +0x02285: r'\not\supset{}', +0x02286: r'\subseteq{}', +0x02287: r'\supseteq{}', +0x02288: r'\not\subseteq{}', +0x02289: r'\not\supseteq{}', +0x0228A: r'\subsetneq{}', +0x0228B: r'\supsetneq{}', +0x0228E: r'\uplus{}', +0x0228F: r'\sqsubset{}', +0x02290: r'\sqsupset{}', +0x02291: r'\sqsubseteq{}', +0x02292: r'\sqsupseteq{}', +0x02293: r'\sqcap{}', +0x02294: r'\sqcup{}', +0x02295: r'\oplus{}', +0x02296: r'\ominus{}', +0x02297: r'\otimes{}', +0x02298: r'\oslash{}', +0x02299: r'\odot{}', +0x0229A: r'\circledcirc{}', +0x0229B: r'\circledast{}', +0x0229D: r'\circleddash{}', +0x0229E: r'\boxplus{}', +0x0229F: r'\boxminus{}', +0x022A0: r'\boxtimes{}', +0x022A1: r'\boxdot{}', +0x022A2: r'\vdash{}', +0x022A3: r'\dashv{}', +0x022A4: r'\top{}', +0x022A5: r'\perp{}', +0x022A7: r'\truestate{}', +0x022A8: r'\forcesextra{}', +0x022A9: r'\Vdash{}', +0x022AA: r'\Vvdash{}', +0x022AB: r'\VDash{}', +0x022AC: r'\nvdash{}', +0x022AD: r'\nvDash{}', +0x022AE: r'\nVdash{}', +0x022AF: r'\nVDash{}', +0x022B2: r'\vartriangleleft{}', +0x022B3: r'\vartriangleright{}', +0x022B4: r'\trianglelefteq{}', +0x022B5: r'\trianglerighteq{}', +0x022B6: r'\original{}', +0x022B7: r'\image{}', +0x022B8: r'\multimap{}', +0x022B9: r'\hermitconjmatrix{}', +0x022BA: r'\intercal{}', +0x022BB: r'\veebar{}', +0x022BE: r'\rightanglearc{}', +0x022C0: r'\ElsevierGlyph{22C0}', +0x022C1: r'\ElsevierGlyph{22C1}', +0x022C2: r'\bigcap{}', +0x022C3: r'\bigcup{}', +0x022C4: r'\diamond{}', +0x022C5: r'\cdot{}', +0x022C6: r'\star{}', +0x022C7: r'\divideontimes{}', +0x022C8: r'\bowtie{}', +0x022C9: r'\ltimes{}', +0x022CA: r'\rtimes{}', +0x022CB: r'\leftthreetimes{}', +0x022CC: r'\rightthreetimes{}', +0x022CD: r'\backsimeq{}', +0x022CE: r'\curlyvee{}', +0x022CF: r'\curlywedge{}', +0x022D0: r'\Subset{}', +0x022D1: r'\Supset{}', +0x022D2: r'\Cap{}', +0x022D3: r'\Cup{}', +0x022D4: r'\pitchfork{}', +0x022D6: r'\lessdot{}', +0x022D7: r'\gtrdot{}', +0x022D8: r'\verymuchless{}', +0x022D9: r'\verymuchgreater{}', +0x022DA: r'\lesseqgtr{}', +0x022DB: r'\gtreqless{}', +0x022DE: r'\curlyeqprec{}', +0x022DF: r'\curlyeqsucc{}', +0x022E2: r'\not\sqsubseteq{}', +0x022E3: r'\not\sqsupseteq{}', +0x022E5: r'\Elzsqspne{}', +0x022E6: r'\lnsim{}', +0x022E7: r'\gnsim{}', +0x022E8: r'\precedesnotsimilar{}', +0x022E9: r'\succnsim{}', +0x022EA: r'\ntriangleleft{}', +0x022EB: r'\ntriangleright{}', +0x022EC: r'\ntrianglelefteq{}', +0x022ED: r'\ntrianglerighteq{}', +0x022EE: r'\vdots{}', +0x022EF: r'\cdots{}', +0x022F0: r'\upslopeellipsis{}', +0x022F1: r'\downslopeellipsis{}', +0x02306: r'\perspcorrespond{}', +0x02308: r'\lceil{}', +0x02309: r'\rceil{}', +0x0230A: r'\lfloor{}', +0x0230B: r'\rfloor{}', +0x02315: r'\recorder{}', +0x02316: r'\mathchar"2208', +0x0231C: r'\ulcorner{}', +0x0231D: r'\urcorner{}', +0x0231E: r'\llcorner{}', +0x0231F: r'\lrcorner{}', +0x02322: r'\frown{}', +0x02323: r'\smile{}', +0x02329: r'\langle{}', +0x0232A: r'\rangle{}', +0x0233D: r'\ElsevierGlyph{E838}', +0x023A3: r'\Elzdlcorn{}', +0x023B0: r'\lmoustache{}', +0x023B1: r'\rmoustache{}', +0x024C8: r'\circledS{}', +0x02506: r'\Elzdshfnc{}', +0x02519: r'\Elzsqfnw{}', +0x02571: r'\diagup{}', +0x025A1: r'\square{}', +0x025AA: r'\blacksquare{}', +0x025AD: r'\fbox{~~}', +0x025AF: r'\Elzvrecto{}', +0x025B1: r'\ElsevierGlyph{E381}', +0x025B3: r'\bigtriangleup{}', +0x025B4: r'\blacktriangle{}', +0x025B5: r'\vartriangle{}', +0x025B8: r'\blacktriangleright{}', +0x025B9: r'\triangleright{}', +0x025BD: r'\bigtriangledown{}', +0x025BE: r'\blacktriangledown{}', +0x025BF: r'\triangledown{}', +0x025C2: r'\blacktriangleleft{}', +0x025C3: r'\triangleleft{}', +0x025CA: r'\lozenge{}', +0x025CB: r'\bigcirc{}', +0x025D0: r'\Elzcirfl{}', +0x025D1: r'\Elzcirfr{}', +0x025D2: r'\Elzcirfb{}', +0x025D8: r'\Elzrvbull{}', +0x025E7: r'\Elzsqfl{}', +0x025E8: r'\Elzsqfr{}', +0x025EA: r'\Elzsqfse{}', +0x025EF: r'\bigcirc{}', +0x02662: r'\diamond{}', +0x0266D: r'\flat{}', +0x0266E: r'\natural{}', +0x0266F: r'\sharp{}', +0x027F5: r'\longleftarrow{}', +0x027F6: r'\longrightarrow{}', +0x027F7: r'\longleftrightarrow{}', +0x027F8: r'\Longleftarrow{}', +0x027F9: r'\Longrightarrow{}', +0x027FA: r'\Longleftrightarrow{}', +0x027FC: r'\longmapsto{}', +0x027FF: r'\sim\joinrel\leadsto{}', +0x02905: r'\ElsevierGlyph{E212}', +0x02912: r'\UpArrowBar{}', +0x02913: r'\DownArrowBar{}', +0x02923: r'\ElsevierGlyph{E20C}', +0x02924: r'\ElsevierGlyph{E20D}', +0x02925: r'\ElsevierGlyph{E20B}', +0x02926: r'\ElsevierGlyph{E20A}', +0x02927: r'\ElsevierGlyph{E211}', +0x02928: r'\ElsevierGlyph{E20E}', +0x02929: r'\ElsevierGlyph{E20F}', +0x0292A: r'\ElsevierGlyph{E210}', +0x02933: r'\ElsevierGlyph{E21C}', +0x02936: r'\ElsevierGlyph{E21A}', +0x02937: r'\ElsevierGlyph{E219}', +0x02940: r'\Elolarr{}', +0x02941: r'\Elorarr{}', +0x02942: r'\ElzRlarr{}', +0x02944: r'\ElzrLarr{}', +0x02947: r'\Elzrarrx{}', +0x0294E: r'\LeftRightVector{}', +0x0294F: r'\RightUpDownVector{}', +0x02950: r'\DownLeftRightVector{}', +0x02951: r'\LeftUpDownVector{}', +0x02952: r'\LeftVectorBar{}', +0x02953: r'\RightVectorBar{}', +0x02954: r'\RightUpVectorBar{}', +0x02955: r'\RightDownVectorBar{}', +0x02956: r'\DownLeftVectorBar{}', +0x02957: r'\DownRightVectorBar{}', +0x02958: r'\LeftUpVectorBar{}', +0x02959: r'\LeftDownVectorBar{}', +0x0295A: r'\LeftTeeVector{}', +0x0295B: r'\RightTeeVector{}', +0x0295C: r'\RightUpTeeVector{}', +0x0295D: r'\RightDownTeeVector{}', +0x0295E: r'\DownLeftTeeVector{}', +0x0295F: r'\DownRightTeeVector{}', +0x02960: r'\LeftUpTeeVector{}', +0x02961: r'\LeftDownTeeVector{}', +0x0296E: r'\UpEquilibrium{}', +0x0296F: r'\ReverseUpEquilibrium{}', +0x02970: r'\RoundImplies{}', +0x0297C: r'\ElsevierGlyph{E214}', +0x0297D: r'\ElsevierGlyph{E215}', +0x02980: r'\Elztfnc{}', +0x02985: r'\ElsevierGlyph{3018}', +0x02986: r'\Elroang{}', +0x02993: r'<\kern-0.58em(', +0x02994: r'\ElsevierGlyph{E291}', +0x02999: r'\Elzddfnc{}', +0x0299C: r'\Angle{}', +0x029A0: r'\Elzlpargt{}', +0x029B5: r'\ElsevierGlyph{E260}', +0x029B6: r'\ElsevierGlyph{E61B}', +0x029CA: r'\ElzLap{}', +0x029CB: r'\Elzdefas{}', +0x029CF: r'\LeftTriangleBar{}', +0x029D0: r'\RightTriangleBar{}', +0x029DC: r'\ElsevierGlyph{E372}', +0x029EB: r'\blacklozenge{}', +0x029F4: r'\RuleDelayed{}', +0x02A04: r'\Elxuplus{}', +0x02A05: r'\ElzThr{}', +0x02A06: r'\Elxsqcup{}', +0x02A07: r'\ElzInf{}', +0x02A08: r'\ElzSup{}', +0x02A0D: r'\ElzCint{}', +0x02A0F: r'\clockoint{}', +0x02A10: r'\ElsevierGlyph{E395}', +0x02A16: r'\sqrint{}', +0x02A25: r'\ElsevierGlyph{E25A}', +0x02A2A: r'\ElsevierGlyph{E25B}', +0x02A2D: r'\ElsevierGlyph{E25C}', +0x02A2E: r'\ElsevierGlyph{E25D}', +0x02A2F: r'\ElzTimes{}', +0x02A34: r'\ElsevierGlyph{E25E}', +0x02A35: r'\ElsevierGlyph{E25E}', +0x02A3C: r'\ElsevierGlyph{E259}', +0x02A3F: r'\amalg{}', +0x02A53: r'\ElzAnd{}', +0x02A54: r'\ElzOr{}', +0x02A55: r'\ElsevierGlyph{E36E}', +0x02A56: r'\ElOr{}', +0x02A5E: r'\perspcorrespond{}', +0x02A5F: r'\Elzminhat{}', +0x02A63: r'\ElsevierGlyph{225A}', +0x02A6E: r'\stackrel{*}{=}', +0x02A75: r'\Equal{}', +0x02A7D: r'\leqslant{}', +0x02A7E: r'\geqslant{}', +0x02A85: r'\lessapprox{}', +0x02A86: r'\gtrapprox{}', +0x02A87: r'\lneq{}', +0x02A88: r'\gneq{}', +0x02A89: r'\lnapprox{}', +0x02A8A: r'\gnapprox{}', +0x02A8B: r'\lesseqqgtr{}', +0x02A8C: r'\gtreqqless{}', +0x02A95: r'\eqslantless{}', +0x02A96: r'\eqslantgtr{}', +0x02A9D: r'\Pisymbol{ppi020}{117}', +0x02A9E: r'\Pisymbol{ppi020}{105}', +0x02AA1: r'\NestedLessLess{}', +0x02AA2: r'\NestedGreaterGreater{}', +0x02AAF: r'\preceq{}', +0x02AB0: r'\succeq{}', +0x02AB5: r'\precneqq{}', +0x02AB6: r'\succneqq{}', +0x02AB7: r'\precapprox{}', +0x02AB8: r'\succapprox{}', +0x02AB9: r'\precnapprox{}', +0x02ABA: r'\succnapprox{}', +0x02AC5: r'\subseteqq{}', +0x02AC6: r'\supseteqq{}', +0x02ACB: r'\subsetneqq{}', +0x02ACC: r'\supsetneqq{}', +0x02AEB: r'\ElsevierGlyph{E30D}', +0x02AF6: r'\Elztdcol{}', +0x02AFD: r'{{/}\!\!{/}}', +0x0300A: r'\ElsevierGlyph{300A}', +0x0300B: r'\ElsevierGlyph{300B}', +0x03018: r'\ElsevierGlyph{3018}', +0x03019: r'\ElsevierGlyph{3019}', +0x0301A: r'\openbracketleft{}', +0x0301B: r'\openbracketright{}', +0x1D400: r'\mathbf{A}', +0x1D401: r'\mathbf{B}', +0x1D402: r'\mathbf{C}', +0x1D403: r'\mathbf{D}', +0x1D404: r'\mathbf{E}', +0x1D405: r'\mathbf{F}', +0x1D406: r'\mathbf{G}', +0x1D407: r'\mathbf{H}', +0x1D408: r'\mathbf{I}', +0x1D409: r'\mathbf{J}', +0x1D40A: r'\mathbf{K}', +0x1D40B: r'\mathbf{L}', +0x1D40C: r'\mathbf{M}', +0x1D40D: r'\mathbf{N}', +0x1D40E: r'\mathbf{O}', +0x1D40F: r'\mathbf{P}', +0x1D410: r'\mathbf{Q}', +0x1D411: r'\mathbf{R}', +0x1D412: r'\mathbf{S}', +0x1D413: r'\mathbf{T}', +0x1D414: r'\mathbf{U}', +0x1D415: r'\mathbf{V}', +0x1D416: r'\mathbf{W}', +0x1D417: r'\mathbf{X}', +0x1D418: r'\mathbf{Y}', +0x1D419: r'\mathbf{Z}', +0x1D41A: r'\mathbf{a}', +0x1D41B: r'\mathbf{b}', +0x1D41C: r'\mathbf{c}', +0x1D41D: r'\mathbf{d}', +0x1D41E: r'\mathbf{e}', +0x1D41F: r'\mathbf{f}', +0x1D420: r'\mathbf{g}', +0x1D421: r'\mathbf{h}', +0x1D422: r'\mathbf{i}', +0x1D423: r'\mathbf{j}', +0x1D424: r'\mathbf{k}', +0x1D425: r'\mathbf{l}', +0x1D426: r'\mathbf{m}', +0x1D427: r'\mathbf{n}', +0x1D428: r'\mathbf{o}', +0x1D429: r'\mathbf{p}', +0x1D42A: r'\mathbf{q}', +0x1D42B: r'\mathbf{r}', +0x1D42C: r'\mathbf{s}', +0x1D42D: r'\mathbf{t}', +0x1D42E: r'\mathbf{u}', +0x1D42F: r'\mathbf{v}', +0x1D430: r'\mathbf{w}', +0x1D431: r'\mathbf{x}', +0x1D432: r'\mathbf{y}', +0x1D433: r'\mathbf{z}', +0x1D434: r'\mathsl{A}', +0x1D435: r'\mathsl{B}', +0x1D436: r'\mathsl{C}', +0x1D437: r'\mathsl{D}', +0x1D438: r'\mathsl{E}', +0x1D439: r'\mathsl{F}', +0x1D43A: r'\mathsl{G}', +0x1D43B: r'\mathsl{H}', +0x1D43C: r'\mathsl{I}', +0x1D43D: r'\mathsl{J}', +0x1D43E: r'\mathsl{K}', +0x1D43F: r'\mathsl{L}', +0x1D440: r'\mathsl{M}', +0x1D441: r'\mathsl{N}', +0x1D442: r'\mathsl{O}', +0x1D443: r'\mathsl{P}', +0x1D444: r'\mathsl{Q}', +0x1D445: r'\mathsl{R}', +0x1D446: r'\mathsl{S}', +0x1D447: r'\mathsl{T}', +0x1D448: r'\mathsl{U}', +0x1D449: r'\mathsl{V}', +0x1D44A: r'\mathsl{W}', +0x1D44B: r'\mathsl{X}', +0x1D44C: r'\mathsl{Y}', +0x1D44D: r'\mathsl{Z}', +0x1D44E: r'\mathsl{a}', +0x1D44F: r'\mathsl{b}', +0x1D450: r'\mathsl{c}', +0x1D451: r'\mathsl{d}', +0x1D452: r'\mathsl{e}', +0x1D453: r'\mathsl{f}', +0x1D454: r'\mathsl{g}', +0x1D456: r'\mathsl{i}', +0x1D457: r'\mathsl{j}', +0x1D458: r'\mathsl{k}', +0x1D459: r'\mathsl{l}', +0x1D45A: r'\mathsl{m}', +0x1D45B: r'\mathsl{n}', +0x1D45C: r'\mathsl{o}', +0x1D45D: r'\mathsl{p}', +0x1D45E: r'\mathsl{q}', +0x1D45F: r'\mathsl{r}', +0x1D460: r'\mathsl{s}', +0x1D461: r'\mathsl{t}', +0x1D462: r'\mathsl{u}', +0x1D463: r'\mathsl{v}', +0x1D464: r'\mathsl{w}', +0x1D465: r'\mathsl{x}', +0x1D466: r'\mathsl{y}', +0x1D467: r'\mathsl{z}', +0x1D468: r'\mathbit{A}', +0x1D469: r'\mathbit{B}', +0x1D46A: r'\mathbit{C}', +0x1D46B: r'\mathbit{D}', +0x1D46C: r'\mathbit{E}', +0x1D46D: r'\mathbit{F}', +0x1D46E: r'\mathbit{G}', +0x1D46F: r'\mathbit{H}', +0x1D470: r'\mathbit{I}', +0x1D471: r'\mathbit{J}', +0x1D472: r'\mathbit{K}', +0x1D473: r'\mathbit{L}', +0x1D474: r'\mathbit{M}', +0x1D475: r'\mathbit{N}', +0x1D476: r'\mathbit{O}', +0x1D477: r'\mathbit{P}', +0x1D478: r'\mathbit{Q}', +0x1D479: r'\mathbit{R}', +0x1D47A: r'\mathbit{S}', +0x1D47B: r'\mathbit{T}', +0x1D47C: r'\mathbit{U}', +0x1D47D: r'\mathbit{V}', +0x1D47E: r'\mathbit{W}', +0x1D47F: r'\mathbit{X}', +0x1D480: r'\mathbit{Y}', +0x1D481: r'\mathbit{Z}', +0x1D482: r'\mathbit{a}', +0x1D483: r'\mathbit{b}', +0x1D484: r'\mathbit{c}', +0x1D485: r'\mathbit{d}', +0x1D486: r'\mathbit{e}', +0x1D487: r'\mathbit{f}', +0x1D488: r'\mathbit{g}', +0x1D489: r'\mathbit{h}', +0x1D48A: r'\mathbit{i}', +0x1D48B: r'\mathbit{j}', +0x1D48C: r'\mathbit{k}', +0x1D48D: r'\mathbit{l}', +0x1D48E: r'\mathbit{m}', +0x1D48F: r'\mathbit{n}', +0x1D490: r'\mathbit{o}', +0x1D491: r'\mathbit{p}', +0x1D492: r'\mathbit{q}', +0x1D493: r'\mathbit{r}', +0x1D494: r'\mathbit{s}', +0x1D495: r'\mathbit{t}', +0x1D496: r'\mathbit{u}', +0x1D497: r'\mathbit{v}', +0x1D498: r'\mathbit{w}', +0x1D499: r'\mathbit{x}', +0x1D49A: r'\mathbit{y}', +0x1D49B: r'\mathbit{z}', +0x1D49C: r'\mathscr{A}', +0x1D49E: r'\mathscr{C}', +0x1D49F: r'\mathscr{D}', +0x1D4A2: r'\mathscr{G}', +0x1D4A5: r'\mathscr{J}', +0x1D4A6: r'\mathscr{K}', +0x1D4A9: r'\mathscr{N}', +0x1D4AA: r'\mathscr{O}', +0x1D4AB: r'\mathscr{P}', +0x1D4AC: r'\mathscr{Q}', +0x1D4AE: r'\mathscr{S}', +0x1D4AF: r'\mathscr{T}', +0x1D4B0: r'\mathscr{U}', +0x1D4B1: r'\mathscr{V}', +0x1D4B2: r'\mathscr{W}', +0x1D4B3: r'\mathscr{X}', +0x1D4B4: r'\mathscr{Y}', +0x1D4B5: r'\mathscr{Z}', +0x1D4B6: r'\mathscr{a}', +0x1D4B7: r'\mathscr{b}', +0x1D4B8: r'\mathscr{c}', +0x1D4B9: r'\mathscr{d}', +0x1D4BB: r'\mathscr{f}', +0x1D4BD: r'\mathscr{h}', +0x1D4BE: r'\mathscr{i}', +0x1D4BF: r'\mathscr{j}', +0x1D4C0: r'\mathscr{k}', +0x1D4C1: r'\mathscr{l}', +0x1D4C2: r'\mathscr{m}', +0x1D4C3: r'\mathscr{n}', +0x1D4C5: r'\mathscr{p}', +0x1D4C6: r'\mathscr{q}', +0x1D4C7: r'\mathscr{r}', +0x1D4C8: r'\mathscr{s}', +0x1D4C9: r'\mathscr{t}', +0x1D4CA: r'\mathscr{u}', +0x1D4CB: r'\mathscr{v}', +0x1D4CC: r'\mathscr{w}', +0x1D4CD: r'\mathscr{x}', +0x1D4CE: r'\mathscr{y}', +0x1D4CF: r'\mathscr{z}', +0x1D4D0: r'\mathmit{A}', +0x1D4D1: r'\mathmit{B}', +0x1D4D2: r'\mathmit{C}', +0x1D4D3: r'\mathmit{D}', +0x1D4D4: r'\mathmit{E}', +0x1D4D5: r'\mathmit{F}', +0x1D4D6: r'\mathmit{G}', +0x1D4D7: r'\mathmit{H}', +0x1D4D8: r'\mathmit{I}', +0x1D4D9: r'\mathmit{J}', +0x1D4DA: r'\mathmit{K}', +0x1D4DB: r'\mathmit{L}', +0x1D4DC: r'\mathmit{M}', +0x1D4DD: r'\mathmit{N}', +0x1D4DE: r'\mathmit{O}', +0x1D4DF: r'\mathmit{P}', +0x1D4E0: r'\mathmit{Q}', +0x1D4E1: r'\mathmit{R}', +0x1D4E2: r'\mathmit{S}', +0x1D4E3: r'\mathmit{T}', +0x1D4E4: r'\mathmit{U}', +0x1D4E5: r'\mathmit{V}', +0x1D4E6: r'\mathmit{W}', +0x1D4E7: r'\mathmit{X}', +0x1D4E8: r'\mathmit{Y}', +0x1D4E9: r'\mathmit{Z}', +0x1D4EA: r'\mathmit{a}', +0x1D4EB: r'\mathmit{b}', +0x1D4EC: r'\mathmit{c}', +0x1D4ED: r'\mathmit{d}', +0x1D4EE: r'\mathmit{e}', +0x1D4EF: r'\mathmit{f}', +0x1D4F0: r'\mathmit{g}', +0x1D4F1: r'\mathmit{h}', +0x1D4F2: r'\mathmit{i}', +0x1D4F3: r'\mathmit{j}', +0x1D4F4: r'\mathmit{k}', +0x1D4F5: r'\mathmit{l}', +0x1D4F6: r'\mathmit{m}', +0x1D4F7: r'\mathmit{n}', +0x1D4F8: r'\mathmit{o}', +0x1D4F9: r'\mathmit{p}', +0x1D4FA: r'\mathmit{q}', +0x1D4FB: r'\mathmit{r}', +0x1D4FC: r'\mathmit{s}', +0x1D4FD: r'\mathmit{t}', +0x1D4FE: r'\mathmit{u}', +0x1D4FF: r'\mathmit{v}', +0x1D500: r'\mathmit{w}', +0x1D501: r'\mathmit{x}', +0x1D502: r'\mathmit{y}', +0x1D503: r'\mathmit{z}', +0x1D504: r'\mathfrak{A}', +0x1D505: r'\mathfrak{B}', +0x1D507: r'\mathfrak{D}', +0x1D508: r'\mathfrak{E}', +0x1D509: r'\mathfrak{F}', +0x1D50A: r'\mathfrak{G}', +0x1D50D: r'\mathfrak{J}', +0x1D50E: r'\mathfrak{K}', +0x1D50F: r'\mathfrak{L}', +0x1D510: r'\mathfrak{M}', +0x1D511: r'\mathfrak{N}', +0x1D512: r'\mathfrak{O}', +0x1D513: r'\mathfrak{P}', +0x1D514: r'\mathfrak{Q}', +0x1D516: r'\mathfrak{S}', +0x1D517: r'\mathfrak{T}', +0x1D518: r'\mathfrak{U}', +0x1D519: r'\mathfrak{V}', +0x1D51A: r'\mathfrak{W}', +0x1D51B: r'\mathfrak{X}', +0x1D51C: r'\mathfrak{Y}', +0x1D51E: r'\mathfrak{a}', +0x1D51F: r'\mathfrak{b}', +0x1D520: r'\mathfrak{c}', +0x1D521: r'\mathfrak{d}', +0x1D522: r'\mathfrak{e}', +0x1D523: r'\mathfrak{f}', +0x1D524: r'\mathfrak{g}', +0x1D525: r'\mathfrak{h}', +0x1D526: r'\mathfrak{i}', +0x1D527: r'\mathfrak{j}', +0x1D528: r'\mathfrak{k}', +0x1D529: r'\mathfrak{l}', +0x1D52A: r'\mathfrak{m}', +0x1D52B: r'\mathfrak{n}', +0x1D52C: r'\mathfrak{o}', +0x1D52D: r'\mathfrak{p}', +0x1D52E: r'\mathfrak{q}', +0x1D52F: r'\mathfrak{r}', +0x1D530: r'\mathfrak{s}', +0x1D531: r'\mathfrak{t}', +0x1D532: r'\mathfrak{u}', +0x1D533: r'\mathfrak{v}', +0x1D534: r'\mathfrak{w}', +0x1D535: r'\mathfrak{x}', +0x1D536: r'\mathfrak{y}', +0x1D537: r'\mathfrak{z}', +0x1D538: r'\mathbb{A}', +0x1D539: r'\mathbb{B}', +0x1D53B: r'\mathbb{D}', +0x1D53C: r'\mathbb{E}', +0x1D53D: r'\mathbb{F}', +0x1D53E: r'\mathbb{G}', +0x1D540: r'\mathbb{I}', +0x1D541: r'\mathbb{J}', +0x1D542: r'\mathbb{K}', +0x1D543: r'\mathbb{L}', +0x1D544: r'\mathbb{M}', +0x1D546: r'\mathbb{O}', +0x1D54A: r'\mathbb{S}', +0x1D54B: r'\mathbb{T}', +0x1D54C: r'\mathbb{U}', +0x1D54D: r'\mathbb{V}', +0x1D54E: r'\mathbb{W}', +0x1D54F: r'\mathbb{X}', +0x1D550: r'\mathbb{Y}', +0x1D552: r'\mathbb{a}', +0x1D553: r'\mathbb{b}', +0x1D554: r'\mathbb{c}', +0x1D555: r'\mathbb{d}', +0x1D556: r'\mathbb{e}', +0x1D557: r'\mathbb{f}', +0x1D558: r'\mathbb{g}', +0x1D559: r'\mathbb{h}', +0x1D55A: r'\mathbb{i}', +0x1D55B: r'\mathbb{j}', +0x1D55C: r'\mathbb{k}', +0x1D55D: r'\mathbb{l}', +0x1D55E: r'\mathbb{m}', +0x1D55F: r'\mathbb{n}', +0x1D560: r'\mathbb{o}', +0x1D561: r'\mathbb{p}', +0x1D562: r'\mathbb{q}', +0x1D563: r'\mathbb{r}', +0x1D564: r'\mathbb{s}', +0x1D565: r'\mathbb{t}', +0x1D566: r'\mathbb{u}', +0x1D567: r'\mathbb{v}', +0x1D568: r'\mathbb{w}', +0x1D569: r'\mathbb{x}', +0x1D56A: r'\mathbb{y}', +0x1D56B: r'\mathbb{z}', +0x1D56C: r'\mathslbb{A}', +0x1D56D: r'\mathslbb{B}', +0x1D56E: r'\mathslbb{C}', +0x1D56F: r'\mathslbb{D}', +0x1D570: r'\mathslbb{E}', +0x1D571: r'\mathslbb{F}', +0x1D572: r'\mathslbb{G}', +0x1D573: r'\mathslbb{H}', +0x1D574: r'\mathslbb{I}', +0x1D575: r'\mathslbb{J}', +0x1D576: r'\mathslbb{K}', +0x1D577: r'\mathslbb{L}', +0x1D578: r'\mathslbb{M}', +0x1D579: r'\mathslbb{N}', +0x1D57A: r'\mathslbb{O}', +0x1D57B: r'\mathslbb{P}', +0x1D57C: r'\mathslbb{Q}', +0x1D57D: r'\mathslbb{R}', +0x1D57E: r'\mathslbb{S}', +0x1D57F: r'\mathslbb{T}', +0x1D580: r'\mathslbb{U}', +0x1D581: r'\mathslbb{V}', +0x1D582: r'\mathslbb{W}', +0x1D583: r'\mathslbb{X}', +0x1D584: r'\mathslbb{Y}', +0x1D585: r'\mathslbb{Z}', +0x1D586: r'\mathslbb{a}', +0x1D587: r'\mathslbb{b}', +0x1D588: r'\mathslbb{c}', +0x1D589: r'\mathslbb{d}', +0x1D58A: r'\mathslbb{e}', +0x1D58B: r'\mathslbb{f}', +0x1D58C: r'\mathslbb{g}', +0x1D58D: r'\mathslbb{h}', +0x1D58E: r'\mathslbb{i}', +0x1D58F: r'\mathslbb{j}', +0x1D590: r'\mathslbb{k}', +0x1D591: r'\mathslbb{l}', +0x1D592: r'\mathslbb{m}', +0x1D593: r'\mathslbb{n}', +0x1D594: r'\mathslbb{o}', +0x1D595: r'\mathslbb{p}', +0x1D596: r'\mathslbb{q}', +0x1D597: r'\mathslbb{r}', +0x1D598: r'\mathslbb{s}', +0x1D599: r'\mathslbb{t}', +0x1D59A: r'\mathslbb{u}', +0x1D59B: r'\mathslbb{v}', +0x1D59C: r'\mathslbb{w}', +0x1D59D: r'\mathslbb{x}', +0x1D59E: r'\mathslbb{y}', +0x1D59F: r'\mathslbb{z}', +0x1D5A0: r'\mathsf{A}', +0x1D5A1: r'\mathsf{B}', +0x1D5A2: r'\mathsf{C}', +0x1D5A3: r'\mathsf{D}', +0x1D5A4: r'\mathsf{E}', +0x1D5A5: r'\mathsf{F}', +0x1D5A6: r'\mathsf{G}', +0x1D5A7: r'\mathsf{H}', +0x1D5A8: r'\mathsf{I}', +0x1D5A9: r'\mathsf{J}', +0x1D5AA: r'\mathsf{K}', +0x1D5AB: r'\mathsf{L}', +0x1D5AC: r'\mathsf{M}', +0x1D5AD: r'\mathsf{N}', +0x1D5AE: r'\mathsf{O}', +0x1D5AF: r'\mathsf{P}', +0x1D5B0: r'\mathsf{Q}', +0x1D5B1: r'\mathsf{R}', +0x1D5B2: r'\mathsf{S}', +0x1D5B3: r'\mathsf{T}', +0x1D5B4: r'\mathsf{U}', +0x1D5B5: r'\mathsf{V}', +0x1D5B6: r'\mathsf{W}', +0x1D5B7: r'\mathsf{X}', +0x1D5B8: r'\mathsf{Y}', +0x1D5B9: r'\mathsf{Z}', +0x1D5BA: r'\mathsf{a}', +0x1D5BB: r'\mathsf{b}', +0x1D5BC: r'\mathsf{c}', +0x1D5BD: r'\mathsf{d}', +0x1D5BE: r'\mathsf{e}', +0x1D5BF: r'\mathsf{f}', +0x1D5C0: r'\mathsf{g}', +0x1D5C1: r'\mathsf{h}', +0x1D5C2: r'\mathsf{i}', +0x1D5C3: r'\mathsf{j}', +0x1D5C4: r'\mathsf{k}', +0x1D5C5: r'\mathsf{l}', +0x1D5C6: r'\mathsf{m}', +0x1D5C7: r'\mathsf{n}', +0x1D5C8: r'\mathsf{o}', +0x1D5C9: r'\mathsf{p}', +0x1D5CA: r'\mathsf{q}', +0x1D5CB: r'\mathsf{r}', +0x1D5CC: r'\mathsf{s}', +0x1D5CD: r'\mathsf{t}', +0x1D5CE: r'\mathsf{u}', +0x1D5CF: r'\mathsf{v}', +0x1D5D0: r'\mathsf{w}', +0x1D5D1: r'\mathsf{x}', +0x1D5D2: r'\mathsf{y}', +0x1D5D3: r'\mathsf{z}', +0x1D5D4: r'\mathsfbf{A}', +0x1D5D5: r'\mathsfbf{B}', +0x1D5D6: r'\mathsfbf{C}', +0x1D5D7: r'\mathsfbf{D}', +0x1D5D8: r'\mathsfbf{E}', +0x1D5D9: r'\mathsfbf{F}', +0x1D5DA: r'\mathsfbf{G}', +0x1D5DB: r'\mathsfbf{H}', +0x1D5DC: r'\mathsfbf{I}', +0x1D5DD: r'\mathsfbf{J}', +0x1D5DE: r'\mathsfbf{K}', +0x1D5DF: r'\mathsfbf{L}', +0x1D5E0: r'\mathsfbf{M}', +0x1D5E1: r'\mathsfbf{N}', +0x1D5E2: r'\mathsfbf{O}', +0x1D5E3: r'\mathsfbf{P}', +0x1D5E4: r'\mathsfbf{Q}', +0x1D5E5: r'\mathsfbf{R}', +0x1D5E6: r'\mathsfbf{S}', +0x1D5E7: r'\mathsfbf{T}', +0x1D5E8: r'\mathsfbf{U}', +0x1D5E9: r'\mathsfbf{V}', +0x1D5EA: r'\mathsfbf{W}', +0x1D5EB: r'\mathsfbf{X}', +0x1D5EC: r'\mathsfbf{Y}', +0x1D5ED: r'\mathsfbf{Z}', +0x1D5EE: r'\mathsfbf{a}', +0x1D5EF: r'\mathsfbf{b}', +0x1D5F0: r'\mathsfbf{c}', +0x1D5F1: r'\mathsfbf{d}', +0x1D5F2: r'\mathsfbf{e}', +0x1D5F3: r'\mathsfbf{f}', +0x1D5F4: r'\mathsfbf{g}', +0x1D5F5: r'\mathsfbf{h}', +0x1D5F6: r'\mathsfbf{i}', +0x1D5F7: r'\mathsfbf{j}', +0x1D5F8: r'\mathsfbf{k}', +0x1D5F9: r'\mathsfbf{l}', +0x1D5FA: r'\mathsfbf{m}', +0x1D5FB: r'\mathsfbf{n}', +0x1D5FC: r'\mathsfbf{o}', +0x1D5FD: r'\mathsfbf{p}', +0x1D5FE: r'\mathsfbf{q}', +0x1D5FF: r'\mathsfbf{r}', +0x1D600: r'\mathsfbf{s}', +0x1D601: r'\mathsfbf{t}', +0x1D602: r'\mathsfbf{u}', +0x1D603: r'\mathsfbf{v}', +0x1D604: r'\mathsfbf{w}', +0x1D605: r'\mathsfbf{x}', +0x1D606: r'\mathsfbf{y}', +0x1D607: r'\mathsfbf{z}', +0x1D608: r'\mathsfsl{A}', +0x1D609: r'\mathsfsl{B}', +0x1D60A: r'\mathsfsl{C}', +0x1D60B: r'\mathsfsl{D}', +0x1D60C: r'\mathsfsl{E}', +0x1D60D: r'\mathsfsl{F}', +0x1D60E: r'\mathsfsl{G}', +0x1D60F: r'\mathsfsl{H}', +0x1D610: r'\mathsfsl{I}', +0x1D611: r'\mathsfsl{J}', +0x1D612: r'\mathsfsl{K}', +0x1D613: r'\mathsfsl{L}', +0x1D614: r'\mathsfsl{M}', +0x1D615: r'\mathsfsl{N}', +0x1D616: r'\mathsfsl{O}', +0x1D617: r'\mathsfsl{P}', +0x1D618: r'\mathsfsl{Q}', +0x1D619: r'\mathsfsl{R}', +0x1D61A: r'\mathsfsl{S}', +0x1D61B: r'\mathsfsl{T}', +0x1D61C: r'\mathsfsl{U}', +0x1D61D: r'\mathsfsl{V}', +0x1D61E: r'\mathsfsl{W}', +0x1D61F: r'\mathsfsl{X}', +0x1D620: r'\mathsfsl{Y}', +0x1D621: r'\mathsfsl{Z}', +0x1D622: r'\mathsfsl{a}', +0x1D623: r'\mathsfsl{b}', +0x1D624: r'\mathsfsl{c}', +0x1D625: r'\mathsfsl{d}', +0x1D626: r'\mathsfsl{e}', +0x1D627: r'\mathsfsl{f}', +0x1D628: r'\mathsfsl{g}', +0x1D629: r'\mathsfsl{h}', +0x1D62A: r'\mathsfsl{i}', +0x1D62B: r'\mathsfsl{j}', +0x1D62C: r'\mathsfsl{k}', +0x1D62D: r'\mathsfsl{l}', +0x1D62E: r'\mathsfsl{m}', +0x1D62F: r'\mathsfsl{n}', +0x1D630: r'\mathsfsl{o}', +0x1D631: r'\mathsfsl{p}', +0x1D632: r'\mathsfsl{q}', +0x1D633: r'\mathsfsl{r}', +0x1D634: r'\mathsfsl{s}', +0x1D635: r'\mathsfsl{t}', +0x1D636: r'\mathsfsl{u}', +0x1D637: r'\mathsfsl{v}', +0x1D638: r'\mathsfsl{w}', +0x1D639: r'\mathsfsl{x}', +0x1D63A: r'\mathsfsl{y}', +0x1D63B: r'\mathsfsl{z}', +0x1D63C: r'\mathsfbfsl{A}', +0x1D63D: r'\mathsfbfsl{B}', +0x1D63E: r'\mathsfbfsl{C}', +0x1D63F: r'\mathsfbfsl{D}', +0x1D640: r'\mathsfbfsl{E}', +0x1D641: r'\mathsfbfsl{F}', +0x1D642: r'\mathsfbfsl{G}', +0x1D643: r'\mathsfbfsl{H}', +0x1D644: r'\mathsfbfsl{I}', +0x1D645: r'\mathsfbfsl{J}', +0x1D646: r'\mathsfbfsl{K}', +0x1D647: r'\mathsfbfsl{L}', +0x1D648: r'\mathsfbfsl{M}', +0x1D649: r'\mathsfbfsl{N}', +0x1D64A: r'\mathsfbfsl{O}', +0x1D64B: r'\mathsfbfsl{P}', +0x1D64C: r'\mathsfbfsl{Q}', +0x1D64D: r'\mathsfbfsl{R}', +0x1D64E: r'\mathsfbfsl{S}', +0x1D64F: r'\mathsfbfsl{T}', +0x1D650: r'\mathsfbfsl{U}', +0x1D651: r'\mathsfbfsl{V}', +0x1D652: r'\mathsfbfsl{W}', +0x1D653: r'\mathsfbfsl{X}', +0x1D654: r'\mathsfbfsl{Y}', +0x1D655: r'\mathsfbfsl{Z}', +0x1D656: r'\mathsfbfsl{a}', +0x1D657: r'\mathsfbfsl{b}', +0x1D658: r'\mathsfbfsl{c}', +0x1D659: r'\mathsfbfsl{d}', +0x1D65A: r'\mathsfbfsl{e}', +0x1D65B: r'\mathsfbfsl{f}', +0x1D65C: r'\mathsfbfsl{g}', +0x1D65D: r'\mathsfbfsl{h}', +0x1D65E: r'\mathsfbfsl{i}', +0x1D65F: r'\mathsfbfsl{j}', +0x1D660: r'\mathsfbfsl{k}', +0x1D661: r'\mathsfbfsl{l}', +0x1D662: r'\mathsfbfsl{m}', +0x1D663: r'\mathsfbfsl{n}', +0x1D664: r'\mathsfbfsl{o}', +0x1D665: r'\mathsfbfsl{p}', +0x1D666: r'\mathsfbfsl{q}', +0x1D667: r'\mathsfbfsl{r}', +0x1D668: r'\mathsfbfsl{s}', +0x1D669: r'\mathsfbfsl{t}', +0x1D66A: r'\mathsfbfsl{u}', +0x1D66B: r'\mathsfbfsl{v}', +0x1D66C: r'\mathsfbfsl{w}', +0x1D66D: r'\mathsfbfsl{x}', +0x1D66E: r'\mathsfbfsl{y}', +0x1D66F: r'\mathsfbfsl{z}', +0x1D670: r'\mathtt{A}', +0x1D671: r'\mathtt{B}', +0x1D672: r'\mathtt{C}', +0x1D673: r'\mathtt{D}', +0x1D674: r'\mathtt{E}', +0x1D675: r'\mathtt{F}', +0x1D676: r'\mathtt{G}', +0x1D677: r'\mathtt{H}', +0x1D678: r'\mathtt{I}', +0x1D679: r'\mathtt{J}', +0x1D67A: r'\mathtt{K}', +0x1D67B: r'\mathtt{L}', +0x1D67C: r'\mathtt{M}', +0x1D67D: r'\mathtt{N}', +0x1D67E: r'\mathtt{O}', +0x1D67F: r'\mathtt{P}', +0x1D680: r'\mathtt{Q}', +0x1D681: r'\mathtt{R}', +0x1D682: r'\mathtt{S}', +0x1D683: r'\mathtt{T}', +0x1D684: r'\mathtt{U}', +0x1D685: r'\mathtt{V}', +0x1D686: r'\mathtt{W}', +0x1D687: r'\mathtt{X}', +0x1D688: r'\mathtt{Y}', +0x1D689: r'\mathtt{Z}', +0x1D68A: r'\mathtt{a}', +0x1D68B: r'\mathtt{b}', +0x1D68C: r'\mathtt{c}', +0x1D68D: r'\mathtt{d}', +0x1D68E: r'\mathtt{e}', +0x1D68F: r'\mathtt{f}', +0x1D690: r'\mathtt{g}', +0x1D691: r'\mathtt{h}', +0x1D692: r'\mathtt{i}', +0x1D693: r'\mathtt{j}', +0x1D694: r'\mathtt{k}', +0x1D695: r'\mathtt{l}', +0x1D696: r'\mathtt{m}', +0x1D697: r'\mathtt{n}', +0x1D698: r'\mathtt{o}', +0x1D699: r'\mathtt{p}', +0x1D69A: r'\mathtt{q}', +0x1D69B: r'\mathtt{r}', +0x1D69C: r'\mathtt{s}', +0x1D69D: r'\mathtt{t}', +0x1D69E: r'\mathtt{u}', +0x1D69F: r'\mathtt{v}', +0x1D6A0: r'\mathtt{w}', +0x1D6A1: r'\mathtt{x}', +0x1D6A2: r'\mathtt{y}', +0x1D6A3: r'\mathtt{z}', +0x1D6A8: r'\mathbf{\Alpha}', +0x1D6A9: r'\mathbf{\Beta}', +0x1D6AA: r'\mathbf{\Gamma}', +0x1D6AB: r'\mathbf{\Delta}', +0x1D6AC: r'\mathbf{\Epsilon}', +0x1D6AD: r'\mathbf{\Zeta}', +0x1D6AE: r'\mathbf{\Eta}', +0x1D6AF: r'\mathbf{\Theta}', +0x1D6B0: r'\mathbf{\Iota}', +0x1D6B1: r'\mathbf{\Kappa}', +0x1D6B2: r'\mathbf{\Lambda}', +0x1D6B3: r'M', +0x1D6B4: r'N', +0x1D6B5: r'\mathbf{\Xi}', +0x1D6B6: r'O', +0x1D6B7: r'\mathbf{\Pi}', +0x1D6B8: r'\mathbf{\Rho}', +0x1D6BA: r'\mathbf{\Sigma}', +0x1D6BB: r'\mathbf{\Tau}', +0x1D6BC: r'\mathbf{\Upsilon}', +0x1D6BD: r'\mathbf{\Phi}', +0x1D6BE: r'\mathbf{\Chi}', +0x1D6BF: r'\mathbf{\Psi}', +0x1D6C0: r'\mathbf{\Omega}', +0x1D6C1: r'\mathbf{\nabla}', +0x1D6C2: r'\mathbf{\Alpha}', +0x1D6C3: r'\mathbf{\Beta}', +0x1D6C4: r'\mathbf{\Gamma}', +0x1D6C5: r'\mathbf{\Delta}', +0x1D6C6: r'\mathbf{\Epsilon}', +0x1D6C7: r'\mathbf{\Zeta}', +0x1D6C8: r'\mathbf{\Eta}', +0x1D6C9: r'\mathbf{\theta}', +0x1D6CA: r'\mathbf{\Iota}', +0x1D6CB: r'\mathbf{\Kappa}', +0x1D6CC: r'\mathbf{\Lambda}', +0x1D6CD: r'M', +0x1D6CE: r'N', +0x1D6CF: r'\mathbf{\Xi}', +0x1D6D0: r'O', +0x1D6D1: r'\mathbf{\Pi}', +0x1D6D2: r'\mathbf{\Rho}', +0x1D6D3: r'\mathbf{\varsigma}', +0x1D6D4: r'\mathbf{\Sigma}', +0x1D6D5: r'\mathbf{\Tau}', +0x1D6D6: r'\mathbf{\Upsilon}', +0x1D6D7: r'\mathbf{\Phi}', +0x1D6D8: r'\mathbf{\Chi}', +0x1D6D9: r'\mathbf{\Psi}', +0x1D6DA: r'\mathbf{\Omega}', +0x1D6DB: r'\partial{}', +0x1D6DC: r'\in{}', +0x1D6E2: r'\mathsl{\Alpha}', +0x1D6E3: r'\mathsl{\Beta}', +0x1D6E4: r'\mathsl{\Gamma}', +0x1D6E5: r'\mathsl{\Delta}', +0x1D6E6: r'\mathsl{\Epsilon}', +0x1D6E7: r'\mathsl{\Zeta}', +0x1D6E8: r'\mathsl{\Eta}', +0x1D6E9: r'\mathsl{\Theta}', +0x1D6EA: r'\mathsl{\Iota}', +0x1D6EB: r'\mathsl{\Kappa}', +0x1D6EC: r'\mathsl{\Lambda}', +0x1D6ED: r'M', +0x1D6EE: r'N', +0x1D6EF: r'\mathsl{\Xi}', +0x1D6F0: r'O', +0x1D6F1: r'\mathsl{\Pi}', +0x1D6F2: r'\mathsl{\Rho}', +0x1D6F4: r'\mathsl{\Sigma}', +0x1D6F5: r'\mathsl{\Tau}', +0x1D6F6: r'\mathsl{\Upsilon}', +0x1D6F7: r'\mathsl{\Phi}', +0x1D6F8: r'\mathsl{\Chi}', +0x1D6F9: r'\mathsl{\Psi}', +0x1D6FA: r'\mathsl{\Omega}', +0x1D6FB: r'\mathsl{\nabla}', +0x1D6FC: r'\mathsl{\Alpha}', +0x1D6FD: r'\mathsl{\Beta}', +0x1D6FE: r'\mathsl{\Gamma}', +0x1D6FF: r'\mathsl{\Delta}', +0x1D700: r'\mathsl{\Epsilon}', +0x1D701: r'\mathsl{\Zeta}', +0x1D702: r'\mathsl{\Eta}', +0x1D703: r'\mathsl{\Theta}', +0x1D704: r'\mathsl{\Iota}', +0x1D705: r'\mathsl{\Kappa}', +0x1D706: r'\mathsl{\Lambda}', +0x1D707: r'M', +0x1D708: r'N', +0x1D709: r'\mathsl{\Xi}', +0x1D70A: r'O', +0x1D70B: r'\mathsl{\Pi}', +0x1D70C: r'\mathsl{\Rho}', +0x1D70D: r'\mathsl{\varsigma}', +0x1D70E: r'\mathsl{\Sigma}', +0x1D70F: r'\mathsl{\Tau}', +0x1D710: r'\mathsl{\Upsilon}', +0x1D711: r'\mathsl{\Phi}', +0x1D712: r'\mathsl{\Chi}', +0x1D713: r'\mathsl{\Psi}', +0x1D714: r'\mathsl{\Omega}', +0x1D715: r'\partial{}', +0x1D716: r'\in{}', +0x1D71C: r'\mathbit{\Alpha}', +0x1D71D: r'\mathbit{\Beta}', +0x1D71E: r'\mathbit{\Gamma}', +0x1D71F: r'\mathbit{\Delta}', +0x1D720: r'\mathbit{\Epsilon}', +0x1D721: r'\mathbit{\Zeta}', +0x1D722: r'\mathbit{\Eta}', +0x1D723: r'\mathbit{\Theta}', +0x1D724: r'\mathbit{\Iota}', +0x1D725: r'\mathbit{\Kappa}', +0x1D726: r'\mathbit{\Lambda}', +0x1D727: r'M', +0x1D728: r'N', +0x1D729: r'\mathbit{\Xi}', +0x1D72A: r'O', +0x1D72B: r'\mathbit{\Pi}', +0x1D72C: r'\mathbit{\Rho}', +0x1D72E: r'\mathbit{\Sigma}', +0x1D72F: r'\mathbit{\Tau}', +0x1D730: r'\mathbit{\Upsilon}', +0x1D731: r'\mathbit{\Phi}', +0x1D732: r'\mathbit{\Chi}', +0x1D733: r'\mathbit{\Psi}', +0x1D734: r'\mathbit{\Omega}', +0x1D735: r'\mathbit{\nabla}', +0x1D736: r'\mathbit{\Alpha}', +0x1D737: r'\mathbit{\Beta}', +0x1D738: r'\mathbit{\Gamma}', +0x1D739: r'\mathbit{\Delta}', +0x1D73A: r'\mathbit{\Epsilon}', +0x1D73B: r'\mathbit{\Zeta}', +0x1D73C: r'\mathbit{\Eta}', +0x1D73D: r'\mathbit{\Theta}', +0x1D73E: r'\mathbit{\Iota}', +0x1D73F: r'\mathbit{\Kappa}', +0x1D740: r'\mathbit{\Lambda}', +0x1D741: r'M', +0x1D742: r'N', +0x1D743: r'\mathbit{\Xi}', +0x1D744: r'O', +0x1D745: r'\mathbit{\Pi}', +0x1D746: r'\mathbit{\Rho}', +0x1D747: r'\mathbit{\varsigma}', +0x1D748: r'\mathbit{\Sigma}', +0x1D749: r'\mathbit{\Tau}', +0x1D74A: r'\mathbit{\Upsilon}', +0x1D74B: r'\mathbit{\Phi}', +0x1D74C: r'\mathbit{\Chi}', +0x1D74D: r'\mathbit{\Psi}', +0x1D74E: r'\mathbit{\Omega}', +0x1D74F: r'\partial{}', +0x1D750: r'\in{}', +0x1D756: r'\mathsfbf{\Alpha}', +0x1D757: r'\mathsfbf{\Beta}', +0x1D758: r'\mathsfbf{\Gamma}', +0x1D759: r'\mathsfbf{\Delta}', +0x1D75A: r'\mathsfbf{\Epsilon}', +0x1D75B: r'\mathsfbf{\Zeta}', +0x1D75C: r'\mathsfbf{\Eta}', +0x1D75D: r'\mathsfbf{\Theta}', +0x1D75E: r'\mathsfbf{\Iota}', +0x1D75F: r'\mathsfbf{\Kappa}', +0x1D760: r'\mathsfbf{\Lambda}', +0x1D761: r'M', +0x1D762: r'N', +0x1D763: r'\mathsfbf{\Xi}', +0x1D764: r'O', +0x1D765: r'\mathsfbf{\Pi}', +0x1D766: r'\mathsfbf{\Rho}', +0x1D768: r'\mathsfbf{\Sigma}', +0x1D769: r'\mathsfbf{\Tau}', +0x1D76A: r'\mathsfbf{\Upsilon}', +0x1D76B: r'\mathsfbf{\Phi}', +0x1D76C: r'\mathsfbf{\Chi}', +0x1D76D: r'\mathsfbf{\Psi}', +0x1D76E: r'\mathsfbf{\Omega}', +0x1D76F: r'\mathsfbf{\nabla}', +0x1D770: r'\mathsfbf{\Alpha}', +0x1D771: r'\mathsfbf{\Beta}', +0x1D772: r'\mathsfbf{\Gamma}', +0x1D773: r'\mathsfbf{\Delta}', +0x1D774: r'\mathsfbf{\Epsilon}', +0x1D775: r'\mathsfbf{\Zeta}', +0x1D776: r'\mathsfbf{\Eta}', +0x1D777: r'\mathsfbf{\Theta}', +0x1D778: r'\mathsfbf{\Iota}', +0x1D779: r'\mathsfbf{\Kappa}', +0x1D77A: r'\mathsfbf{\Lambda}', +0x1D77B: r'M', +0x1D77C: r'N', +0x1D77D: r'\mathsfbf{\Xi}', +0x1D77E: r'O', +0x1D77F: r'\mathsfbf{\Pi}', +0x1D780: r'\mathsfbf{\Rho}', +0x1D781: r'\mathsfbf{\varsigma}', +0x1D782: r'\mathsfbf{\Sigma}', +0x1D783: r'\mathsfbf{\Tau}', +0x1D784: r'\mathsfbf{\Upsilon}', +0x1D785: r'\mathsfbf{\Phi}', +0x1D786: r'\mathsfbf{\Chi}', +0x1D787: r'\mathsfbf{\Psi}', +0x1D788: r'\mathsfbf{\Omega}', +0x1D789: r'\partial{}', +0x1D78A: r'\in{}', +0x1D790: r'\mathsfbfsl{\Alpha}', +0x1D791: r'\mathsfbfsl{\Beta}', +0x1D792: r'\mathsfbfsl{\Gamma}', +0x1D793: r'\mathsfbfsl{\Delta}', +0x1D794: r'\mathsfbfsl{\Epsilon}', +0x1D795: r'\mathsfbfsl{\Zeta}', +0x1D796: r'\mathsfbfsl{\Eta}', +0x1D797: r'\mathsfbfsl{\vartheta}', +0x1D798: r'\mathsfbfsl{\Iota}', +0x1D799: r'\mathsfbfsl{\Kappa}', +0x1D79A: r'\mathsfbfsl{\Lambda}', +0x1D79B: r'M', +0x1D79C: r'N', +0x1D79D: r'\mathsfbfsl{\Xi}', +0x1D79E: r'O', +0x1D79F: r'\mathsfbfsl{\Pi}', +0x1D7A0: r'\mathsfbfsl{\Rho}', +0x1D7A2: r'\mathsfbfsl{\Sigma}', +0x1D7A3: r'\mathsfbfsl{\Tau}', +0x1D7A4: r'\mathsfbfsl{\Upsilon}', +0x1D7A5: r'\mathsfbfsl{\Phi}', +0x1D7A6: r'\mathsfbfsl{\Chi}', +0x1D7A7: r'\mathsfbfsl{\Psi}', +0x1D7A8: r'\mathsfbfsl{\Omega}', +0x1D7A9: r'\mathsfbfsl{\nabla}', +0x1D7AA: r'\mathsfbfsl{\Alpha}', +0x1D7AB: r'\mathsfbfsl{\Beta}', +0x1D7AC: r'\mathsfbfsl{\Gamma}', +0x1D7AD: r'\mathsfbfsl{\Delta}', +0x1D7AE: r'\mathsfbfsl{\Epsilon}', +0x1D7AF: r'\mathsfbfsl{\Zeta}', +0x1D7B0: r'\mathsfbfsl{\Eta}', +0x1D7B1: r'\mathsfbfsl{\vartheta}', +0x1D7B2: r'\mathsfbfsl{\Iota}', +0x1D7B3: r'\mathsfbfsl{\Kappa}', +0x1D7B4: r'\mathsfbfsl{\Lambda}', +0x1D7B5: r'M', +0x1D7B6: r'N', +0x1D7B7: r'\mathsfbfsl{\Xi}', +0x1D7B8: r'O', +0x1D7B9: r'\mathsfbfsl{\Pi}', +0x1D7BA: r'\mathsfbfsl{\Rho}', +0x1D7BB: r'\mathsfbfsl{\varsigma}', +0x1D7BC: r'\mathsfbfsl{\Sigma}', +0x1D7BD: r'\mathsfbfsl{\Tau}', +0x1D7BE: r'\mathsfbfsl{\Upsilon}', +0x1D7BF: r'\mathsfbfsl{\Phi}', +0x1D7C0: r'\mathsfbfsl{\Chi}', +0x1D7C1: r'\mathsfbfsl{\Psi}', +0x1D7C2: r'\mathsfbfsl{\Omega}', +0x1D7C3: r'\partial{}', +0x1D7C4: r'\in{}', +0x1D7CE: r'\mathbf{0}', +0x1D7CF: r'\mathbf{1}', +0x1D7D0: r'\mathbf{2}', +0x1D7D1: r'\mathbf{3}', +0x1D7D2: r'\mathbf{4}', +0x1D7D3: r'\mathbf{5}', +0x1D7D4: r'\mathbf{6}', +0x1D7D5: r'\mathbf{7}', +0x1D7D6: r'\mathbf{8}', +0x1D7D7: r'\mathbf{9}', +0x1D7D8: r'\mathbb{0}', +0x1D7D9: r'\mathbb{1}', +0x1D7DA: r'\mathbb{2}', +0x1D7DB: r'\mathbb{3}', +0x1D7DC: r'\mathbb{4}', +0x1D7DD: r'\mathbb{5}', +0x1D7DE: r'\mathbb{6}', +0x1D7DF: r'\mathbb{7}', +0x1D7E0: r'\mathbb{8}', +0x1D7E1: r'\mathbb{9}', +0x1D7E2: r'\mathsf{0}', +0x1D7E3: r'\mathsf{1}', +0x1D7E4: r'\mathsf{2}', +0x1D7E5: r'\mathsf{3}', +0x1D7E6: r'\mathsf{4}', +0x1D7E7: r'\mathsf{5}', +0x1D7E8: r'\mathsf{6}', +0x1D7E9: r'\mathsf{7}', +0x1D7EA: r'\mathsf{8}', +0x1D7EB: r'\mathsf{9}', +0x1D7EC: r'\mathsfbf{0}', +0x1D7ED: r'\mathsfbf{1}', +0x1D7EE: r'\mathsfbf{2}', +0x1D7EF: r'\mathsfbf{3}', +0x1D7F0: r'\mathsfbf{4}', +0x1D7F1: r'\mathsfbf{5}', +0x1D7F2: r'\mathsfbf{6}', +0x1D7F3: r'\mathsfbf{7}', +0x1D7F4: r'\mathsfbf{8}', +0x1D7F5: r'\mathsfbf{9}', +0x1D7F6: r'\mathtt{0}', +0x1D7F7: r'\mathtt{1}', +0x1D7F8: r'\mathtt{2}', +0x1D7F9: r'\mathtt{3}', +0x1D7FA: r'\mathtt{4}', +0x1D7FB: r'\mathtt{5}', +0x1D7FC: r'\mathtt{6}', +0x1D7FD: r'\mathtt{7}', +0x1D7FE: r'\mathtt{8}', +0x1D7FF: r'\mathtt{9}', +} diff --git a/Thanks b/Thanks new file mode 100644 index 0000000..f7e9e46 --- /dev/null +++ b/Thanks @@ -0,0 +1,9 @@ +* Paul Tremblay for adding ConTeXt support, and helping with +documentation. +* Jason Santos for proofreading the documentation of version 1.20. +* Stephen Robertson for testing, submitting bug reports and suggesting +improvements. +* Simon Goodson for proofreading the documentation of version 1.00 +* Vitaly Ostanin for discussions on XML publishing. +* Heinz Pommer and bitplant.de for supporting the project. +* Douglas Lovell for TeXMLatte and the original TeXML specification. diff --git a/docs/graph1.png b/docs/graph1.png new file mode 100644 index 0000000..2d6fcf7 Binary files /dev/null and b/docs/graph1.png differ diff --git a/docs/graph2.png b/docs/graph2.png new file mode 100644 index 0000000..37ac476 Binary files /dev/null and b/docs/graph2.png differ diff --git a/docs/graph3.png b/docs/graph3.png new file mode 100644 index 0000000..66bf7ea Binary files /dev/null and b/docs/graph3.png differ diff --git a/docs/texml.1 b/docs/texml.1 new file mode 100644 index 0000000..3182a25 --- /dev/null +++ b/docs/texml.1 @@ -0,0 +1,26 @@ +.TH texml 1 "April 16, 2006" "version 2.0" +.SH NAME +texml \- Serialize TeXML to TeX (LaTeX, ConTeXt) +.SH SYNOPSIS +.B texml +[ \fIoptions\fR ] \fIinputfile\fR \fIoutputfile\fR +.SH DESCRIPTION +Convert TeXML file \fIinputfile\fR to TeX file \fIoutfile\fR. The special file name "\fI\-\fR" means the standard input or standard output, correspondingly. +.TP +\fB\-w\fR, \fB\-\-width\fR \fIwidth\fR +If possible, split long lines on smaller ones of the desired width. +.TP +\fB\-e\fR, \fB\-\-encoding\fR \fIencoding\fR +Output encoding. Should be known to the Python codecs. Default is ASCII. +.TP +\fB\-a\fR, \fB\-\-ascii\fR +Use only ASCII symbols for output. Non-ASCII bytes are escaped using the \fB^^XX\fR form, where \fBXX\fR is a hexadecimal code of the character. +.TP +\fB\-c\fR, \fB\-\-context\fR +Activate ConTeXt support. +.SH AUTHOR +Oleg Parashchenko +.SH SEE ALSO +http://getfo.org/texml/ + +http://uucode.com/blog/category/texml/ diff --git a/docs/texml.css b/docs/texml.css new file mode 100644 index 0000000..9b39d10 --- /dev/null +++ b/docs/texml.css @@ -0,0 +1,22 @@ +pre, tt, code { + color: #000000; + background-color: #f0f0f0; +} +em { + background-color: #c0c0ff; +} +.footnote { + font-size: 66%; +} + +/* syntax highlighting in listings */ +.synComment { color: #0000FF } +.synConstant { color: #FF00FF } +.synIdentifier { color: #008B8B } +.synStatement { color: #A52A2A ; font-weight: bold } +.synPreProc { color: #A020F0 } +.synType { color: #2E8B57 ; font-weight: bold } +.synSpecial { color: #6A5ACD } +.synUnderlined { color: #000000 ; text-decoration: underline } +.synError { color: #FFFFFF ; background: #FF0000 none } +.synTodo { color: #0000FF ; background: #FFFF00 none } diff --git a/docs/texml.png b/docs/texml.png new file mode 100644 index 0000000..337085f Binary files /dev/null and b/docs/texml.png differ diff --git a/dtd/texml.dtd b/dtd/texml.dtd new file mode 100644 index 0000000..c62bbbe --- /dev/null +++ b/dtd/texml.dtd @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/license.txt b/license.txt new file mode 100644 index 0000000..5da2881 --- /dev/null +++ b/license.txt @@ -0,0 +1,19 @@ +Copyright (c) 2006 Oleg Parashchenko + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. diff --git a/scripts/texml b/scripts/texml new file mode 100755 index 0000000..39bfa34 --- /dev/null +++ b/scripts/texml @@ -0,0 +1,4 @@ +#!/bin/sh + +DIR=`dirname $0` +$DIR/texml.py "$@" diff --git a/scripts/texml.py b/scripts/texml.py new file mode 100755 index 0000000..40dd6b6 --- /dev/null +++ b/scripts/texml.py @@ -0,0 +1,96 @@ +#!python +# $Id: texml.py,v 1.20 2006-07-20 03:56:49 olpa Exp $ + +VERSION = "2.0.2"; # GREPVERSION # Format of this string is important +usage = """Convert TeXML markup to [La]TeX markup. v.%s. Usage: +python texml.py [-e encoding] [-w auto_width] [-c|--context] [-a|--ascii] in_file out_file""" % VERSION + +# +# Check command line, print help +# +import sys +if len(sys.argv) < 3: + print >>sys.stderr, usage + sys.exit(1) + +# +# Parse command line options +# +encoding = 'ascii' +always_ascii = 0 +width = 62 +use_context = 0 +use_namespace = 1 +import getopt +try: + opts, args = getopt.getopt(sys.argv[1:], 'hcaw:e:', ['help', 'context', 'ascii', 'width=', 'encoding=', ]) +except getopt.GetoptError, e: + print >>sys.stderr, 'texml: Can\'t parse command line: %s' % e + print >>sys.stderr, usage + sys.exit(2) +for o, a in opts: + if o in ('-h', '--help'): + print >>sys.stderr, usage; + sys.exit(1) + if o in ('-c', '--context'): + use_context = 1 + if o in ('-a', '--ascii'): + always_ascii = 1 + if o in ('-w', '--width'): + try: + width = int(a) + except: + print >>sys.stderr, "texml: Width is not an integer: '%s'" % a + sys.exit(1) + if width < 3: # just a random value + print >>sys.stderr, "texml: Width should be greater 3 but get '%s'" % a + sys.exit(1) + if o in ('-e', '--encoding'): + encoding = a + +# +# Get input and output file +# +if len(args) != 2: + print >>sys.stderr, 'texml: Expected two command line arguments, but got %d' % len(args) + sys.exit(3) +(infile, outfile) = args + +# +# Prepare transformation-1: input file, XML parser +# +import xml.sax +from xml.sax.handler import feature_namespaces + +if '-' == infile: + infile = sys.stdin + +# +# Prepare transformation-2: output +# +if '-' == outfile: + f = sys.stdout +else: + f = file(outfile, 'wb') + +# +# An error handler +# +def quit(msg): + sys.stderr.write(msg) + f.close() + sys.exit(1) + +# +# import main class and parse +# +import Texml.processor +try: + Texml.processor.process(infile, f, encoding, width, always_ascii, use_context) + +except Exception, msg: + msg = 'texml: %s\n' % (str(msg)) + quit(msg) + +f.close() +sys.exit(0) diff --git a/scripts/texml_local b/scripts/texml_local new file mode 100755 index 0000000..0ecbbbe --- /dev/null +++ b/scripts/texml_local @@ -0,0 +1,9 @@ +#!/bin/sh + +DIR=`dirname $0` + +PYTHONPATH=$DIR/..:$PYTHONPATH +export PYTHONPATH + +python $DIR/texml.py "$@" + diff --git a/scripts/texml_local.bat b/scripts/texml_local.bat new file mode 100644 index 0000000..d27b57a --- /dev/null +++ b/scripts/texml_local.bat @@ -0,0 +1,6 @@ +set SCRIPTDIR=%~dp0 +set PYTHONPATH=%SCRIPTDIR%\..;%PYTHONPATH% + +python %SCRIPTDIR%texml.py %* + +pause diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..a5eeacf --- /dev/null +++ b/setup.py @@ -0,0 +1,62 @@ +import sys +from distutils.core import setup +import os.path +import re +import glob + +def test_for_sax(): + try: + import xml.sax + except ImportError: + sys.stderr.write('Please install the python pyxml modules\n') + sys.stdout.write('You must have this module before you can install texml\n') + sys.exit(1) + +def get_dtd_location(): + """ + For now, this is not used + + """ + return + return '/home/paul/Documents/data/dtds/' + + +def get_version(): + # Take the version from "scripts/texml.py" + version = None + version_re = re.compile('^VERSION[^"]*"([^"]+)"; # GREPVERSION') + f = open(os.path.join('scripts', 'texml.py')) + for line in f: + match = version_re.search(line) + if match: + version = match.group(1) + break + f.close() + if None == version: + raise "Can't find version" + return version + +if 'build' in sys.argv: + test_for_sax() + +version = get_version() + +setup(name="texml", + version= version , + description="Convert TeXML to LaTeX or ConTeXt", + long_description = """TeXML is an XML syntax for TeX. The processor transforms the TeXML markup into the TeX markup, escaping special and out-of-encoding characters. The intended audience is developers who automatically generate [La]TeX or ConTeXt files.""", + author="Oleg Parashchenko, Paul Tremblay", + author_email="olpa@ http://uucode.com/", + license = 'MIT', + url = 'http://getfo.org/texml/', + packages=['Texml'], + scripts=['scripts/texml.py', 'scripts/texml'], + data_files=[ + ('share/man/man1', ['docs/texml.1']), + ('share/doc/texml-%s' % version, + glob.glob(os.path.join('docs', '*.html')) + + glob.glob(os.path.join('docs', '*.css')) + + glob.glob(os.path.join('docs', '*.png'))) + ] + ) + diff --git a/tests/Makefile b/tests/Makefile new file mode 100644 index 0000000..d60b978 --- /dev/null +++ b/tests/Makefile @@ -0,0 +1,82 @@ +# $Id: Makefile,v 1.17 2006-07-20 03:41:23 olpa Exp $ + +all: tests + +clean: + rm -rf *~ */*~ tmp + +good_xml_tests:=$(notdir $(wildcard data/*xml)) quick.xml +good_test_stamps=$(addprefix tmp/data/,$(good_xml_tests:.xml=.stamp)) +fail_xml_tests:=$(notdir $(wildcard faildata/*xml)) +fail_test_stamps=$(addprefix tmp/faildata/,$(fail_xml_tests:.xml=.stamp)) + +texml_modules:=$(wildcard ../Texml/*py) +texml_program_files=$(texml_modules) ../scripts/texml.py +texml_script=../scripts/texml_local + +# +# Individual test parameters to converter +# +params-mixed = -e ascii +params-koi8 = -e koi8-r +params-koi8_ns = -e koi8-r +params-koi8bad = -e koi8-r +params-koi8bad_ns = -e koi8-r +params-latex = -e koi8-r +params-latex_ns = -e koi8-r +params-cmdnest = -e ascii +params-wselim2 = -w 100 +params-wselim2_ns = -w 100 +params-quick = -w 60 +params-quick_ns = -w 60 +params-context = --context -e utf8 +params-context_ns = --context -e utf8 +params-chinese1 = -e utf8 -a +params-tour_pdfok = -e koi8-r +params-aenc = --encoding utf8 -a + +tests: $(good_test_stamps) $(fail_test_stamps) + +# +# Initialization, creation of folders +# +init=tmp/data/.stamp tmp/faildata/.stamp + +tmp/data/.stamp tmp/faildata/.stamp: + mkdir -p $(dir $@) + touch $@ + +# Need a line after "FORCE" +FORCE: + +# Need a line after "FORCE" + +.SECONDARY: + +# +# Running "good" tests +# +tmp/data/%.out: data/%.xml $(texml_program_files) data/%.out $(init) + $(texml_script) $(call params-$*) $< $@ + +tmp/data/%.stamp: tmp/data/%.out FORCE + diff -qs $(basename $@).out data/$(notdir $*).out + +# +# Running "bad" tests: if fact, we make grep of error message +# +tmp/faildata/%.err: faildata/%.xml $(texml_program_files) $(init) + $(texml_script) $< $(basename $@).out 2>$@ || true + +tmp/faildata/%.stamp: tmp/faildata/%.err FORCE + grep -q -f faildata/$(notdir $*).grep $< + +# +# Dependencies for quick start files +# +data/quick.xml: data/quick/quick.texml + cp $< $@ + +data/quick.out: data/quick/quick.tex + cp $< $@ + diff --git a/tests/data/aenc.out b/tests/data/aenc.out new file mode 100644 index 0000000..7e60808 --- /dev/null +++ b/tests/data/aenc.out @@ -0,0 +1 @@ +Hello, [^^d1^^8f]! diff --git a/tests/data/aenc.xml b/tests/data/aenc.xml new file mode 100644 index 0000000..963f26f --- /dev/null +++ b/tests/data/aenc.xml @@ -0,0 +1,2 @@ + +Hello, [я]! diff --git a/tests/data/chinese1.out b/tests/data/chinese1.out new file mode 100644 index 0000000..51da343 --- /dev/null +++ b/tests/data/chinese1.out @@ -0,0 +1,9 @@ +\documentclass{article} +\usepackage[encapsulated]{CJK} +\usepackage{ucs} +\usepackage[utf8x]{inputenc} +\begin{document} +\begin{CJK}{UTF8}{cyberbit} +^^e4^^b8^^96^^e7^^95^^8c^^ef^^bc^^8c^^e4^^bd^^a0^^e5^^a5^^bd^^ef^^bc^^81 +\end{CJK} +\end{document} diff --git a/tests/data/chinese1.xml b/tests/data/chinese1.xml new file mode 100644 index 0000000..7310d52 --- /dev/null +++ b/tests/data/chinese1.xml @@ -0,0 +1,23 @@ + + + article + + + encapsulated + CJK + + + ucs + + + utf8x + inputenc + + + + UTF8 + cyberbit + 世界,你好! + + + diff --git a/tests/data/cmd.out b/tests/data/cmd.out new file mode 100644 index 0000000..33dc150 --- /dev/null +++ b/tests/data/cmd.out @@ -0,0 +1,6 @@ +\documentclass[12pt]{letter} \par{} \o[o1] \p{p1} \op[o1]{p1}[o2]{p2} +\unusual{a\ a}[b\b] \def \textvert{$|$} {\it{}italics} \par{} +par \par{} +par +\aaaaaaaaaa \aaaaaaaaaa \aaaaaaaaaa \aaaaaaaaaa \aaaaaaaaaa \aaaaaaaaaa +\it{} once, \it twice diff --git a/tests/data/cmd.xml b/tests/data/cmd.xml new file mode 100644 index 0000000..88e5184 --- /dev/null +++ b/tests/data/cmd.xml @@ -0,0 +1,37 @@ + + + 12pt + letter + + + + + o1 + + + p1 + + + o1 + p1 + o2 + p2 + + + aa + bb + +| +italics +par + par + + + + + + + + + once, twice + diff --git a/tests/data/cmd_ns.out b/tests/data/cmd_ns.out new file mode 100644 index 0000000..33dc150 --- /dev/null +++ b/tests/data/cmd_ns.out @@ -0,0 +1,6 @@ +\documentclass[12pt]{letter} \par{} \o[o1] \p{p1} \op[o1]{p1}[o2]{p2} +\unusual{a\ a}[b\b] \def \textvert{$|$} {\it{}italics} \par{} +par \par{} +par +\aaaaaaaaaa \aaaaaaaaaa \aaaaaaaaaa \aaaaaaaaaa \aaaaaaaaaa \aaaaaaaaaa +\it{} once, \it twice diff --git a/tests/data/cmd_ns.xml b/tests/data/cmd_ns.xml new file mode 100644 index 0000000..97e642e --- /dev/null +++ b/tests/data/cmd_ns.xml @@ -0,0 +1,37 @@ + + + 12pt + letter + + + + + o1 + + + p1 + + + o1 + p1 + o2 + p2 + + + aa + bb + +| +italics +par + par + + + + + + + + + once, twice + diff --git a/tests/data/cmdnest.out b/tests/data/cmdnest.out new file mode 100644 index 0000000..624179b --- /dev/null +++ b/tests/data/cmdnest.out @@ -0,0 +1 @@ +\par1[ \par2[ \par3{ \par4{} }[\unicodechar{1984}] ] ]{aaa} diff --git a/tests/data/cmdnest.xml b/tests/data/cmdnest.xml new file mode 100644 index 0000000..4cfad8a --- /dev/null +++ b/tests/data/cmdnest.xml @@ -0,0 +1,17 @@ + + + + + + + + + + ߀ + + + + + aaa + + diff --git a/tests/data/cmdnest_ns.out b/tests/data/cmdnest_ns.out new file mode 100644 index 0000000..624179b --- /dev/null +++ b/tests/data/cmdnest_ns.out @@ -0,0 +1 @@ +\par1[ \par2[ \par3{ \par4{} }[\unicodechar{1984}] ] ]{aaa} diff --git a/tests/data/cmdnest_ns.xml b/tests/data/cmdnest_ns.xml new file mode 100644 index 0000000..db3388c --- /dev/null +++ b/tests/data/cmdnest_ns.xml @@ -0,0 +1,17 @@ + + + + + + + + + + ߀ + + + + + aaa + + diff --git a/tests/data/context.out b/tests/data/context.out new file mode 100644 index 0000000..4dbac2f --- /dev/null +++ b/tests/data/context.out @@ -0,0 +1,7 @@ +\enableregime[utf] \setuppagenumbering[state=stop] +\starttext +Wie schön! +\stoptext +\xstartfake[opt1]{par1}[opt2]{par2} +Wie schön! +\xstopfake diff --git a/tests/data/context.xml b/tests/data/context.xml new file mode 100644 index 0000000..ff94979 --- /dev/null +++ b/tests/data/context.xml @@ -0,0 +1,19 @@ + + + + utf + + + state=stop + + + Wie schön! + + + opt1 + par1 + opt2 + par2 + Wie schön! + + diff --git a/tests/data/context_ns.out b/tests/data/context_ns.out new file mode 100644 index 0000000..4dbac2f --- /dev/null +++ b/tests/data/context_ns.out @@ -0,0 +1,7 @@ +\enableregime[utf] \setuppagenumbering[state=stop] +\starttext +Wie schön! +\stoptext +\xstartfake[opt1]{par1}[opt2]{par2} +Wie schön! +\xstopfake diff --git a/tests/data/context_ns.xml b/tests/data/context_ns.xml new file mode 100644 index 0000000..33003ee --- /dev/null +++ b/tests/data/context_ns.xml @@ -0,0 +1,19 @@ + + + + utf + + + state=stop + + + Wie schön! + + + opt1 + par1 + opt2 + par2 + Wie schön! + + diff --git a/tests/data/ctrl.out b/tests/data/ctrl.out new file mode 100644 index 0000000..4f4628e --- /dev/null +++ b/tests/data/ctrl.out @@ -0,0 +1 @@ +Spaces:[\ \ \ \ \ ]. And others: \\\.\+. diff --git a/tests/data/ctrl.xml b/tests/data/ctrl.xml new file mode 100644 index 0000000..56427cb --- /dev/null +++ b/tests/data/ctrl.xml @@ -0,0 +1 @@ +Spaces:[]. And others: . diff --git a/tests/data/ctrl_ns.out b/tests/data/ctrl_ns.out new file mode 100644 index 0000000..4f4628e --- /dev/null +++ b/tests/data/ctrl_ns.out @@ -0,0 +1 @@ +Spaces:[\ \ \ \ \ ]. And others: \\\.\+. diff --git a/tests/data/ctrl_ns.xml b/tests/data/ctrl_ns.xml new file mode 100644 index 0000000..56427cb --- /dev/null +++ b/tests/data/ctrl_ns.xml @@ -0,0 +1 @@ +Spaces:[]. And others: . diff --git a/tests/data/empty.out b/tests/data/empty.out new file mode 100644 index 0000000..e69de29 diff --git a/tests/data/empty.xml b/tests/data/empty.xml new file mode 100644 index 0000000..cc16ded --- /dev/null +++ b/tests/data/empty.xml @@ -0,0 +1 @@ + diff --git a/tests/data/empty_ns.out b/tests/data/empty_ns.out new file mode 100644 index 0000000..e69de29 diff --git a/tests/data/empty_ns.xml b/tests/data/empty_ns.xml new file mode 100644 index 0000000..cc16ded --- /dev/null +++ b/tests/data/empty_ns.xml @@ -0,0 +1 @@ + diff --git a/tests/data/emptyline.out b/tests/data/emptyline.out new file mode 100644 index 0000000..388d0ab --- /dev/null +++ b/tests/data/emptyline.out @@ -0,0 +1,30 @@ +Commented-out: +% +% +Empty: + + +More empty: + + +Again commented-out: +% +% +More commented: +% +% +% +% +% + + + + + + +% +% +x + + +x diff --git a/tests/data/emptyline.xml b/tests/data/emptyline.xml new file mode 100644 index 0000000..9ddf480 --- /dev/null +++ b/tests/data/emptyline.xml @@ -0,0 +1,34 @@ +Commented-out: + + +Empty: + + +More empty: + + +Again commented-out: + + +More commented: + + + + + + + + + + + + + + +x + + + +x + + diff --git a/tests/data/emptyline_ns.out b/tests/data/emptyline_ns.out new file mode 100644 index 0000000..388d0ab --- /dev/null +++ b/tests/data/emptyline_ns.out @@ -0,0 +1,30 @@ +Commented-out: +% +% +Empty: + + +More empty: + + +Again commented-out: +% +% +More commented: +% +% +% +% +% + + + + + + +% +% +x + + +x diff --git a/tests/data/emptyline_ns.xml b/tests/data/emptyline_ns.xml new file mode 100644 index 0000000..9ddf480 --- /dev/null +++ b/tests/data/emptyline_ns.xml @@ -0,0 +1,34 @@ +Commented-out: + + +Empty: + + +More empty: + + +Again commented-out: + + +More commented: + + + + + + + + + + + + + + +x + + + +x + + diff --git a/tests/data/endline1.out b/tests/data/endline1.out new file mode 100644 index 0000000..b9e0c24 --- /dev/null +++ b/tests/data/endline1.out @@ -0,0 +1 @@ +newline to be created diff --git a/tests/data/endline1.xml b/tests/data/endline1.xml new file mode 100644 index 0000000..17efed4 --- /dev/null +++ b/tests/data/endline1.xml @@ -0,0 +1,4 @@ +newline to be created + + + diff --git a/tests/data/endline1_ns.out b/tests/data/endline1_ns.out new file mode 100644 index 0000000..b9e0c24 --- /dev/null +++ b/tests/data/endline1_ns.out @@ -0,0 +1 @@ +newline to be created diff --git a/tests/data/endline1_ns.xml b/tests/data/endline1_ns.xml new file mode 100644 index 0000000..17efed4 --- /dev/null +++ b/tests/data/endline1_ns.xml @@ -0,0 +1,4 @@ +newline to be created + + + diff --git a/tests/data/endline2.out b/tests/data/endline2.out new file mode 100644 index 0000000..05f1771 --- /dev/null +++ b/tests/data/endline2.out @@ -0,0 +1,3 @@ + no additional newlines to be created +% +% diff --git a/tests/data/endline2.xml b/tests/data/endline2.xml new file mode 100644 index 0000000..507d20f --- /dev/null +++ b/tests/data/endline2.xml @@ -0,0 +1,4 @@ + no additional newlines to be created + + + diff --git a/tests/data/endline2_ns.out b/tests/data/endline2_ns.out new file mode 100644 index 0000000..05f1771 --- /dev/null +++ b/tests/data/endline2_ns.out @@ -0,0 +1,3 @@ + no additional newlines to be created +% +% diff --git a/tests/data/endline2_ns.xml b/tests/data/endline2_ns.xml new file mode 100644 index 0000000..507d20f --- /dev/null +++ b/tests/data/endline2_ns.xml @@ -0,0 +1,4 @@ + no additional newlines to be created + + + diff --git a/tests/data/entity.out b/tests/data/entity.out new file mode 100644 index 0000000..d986c12 --- /dev/null +++ b/tests/data/entity.out @@ -0,0 +1 @@ +\^{} diff --git a/tests/data/entity.xml b/tests/data/entity.xml new file mode 100644 index 0000000..eb2f6d1 --- /dev/null +++ b/tests/data/entity.xml @@ -0,0 +1,4 @@ + +]> +&e; diff --git a/tests/data/entity_ns.out b/tests/data/entity_ns.out new file mode 100644 index 0000000..d986c12 --- /dev/null +++ b/tests/data/entity_ns.out @@ -0,0 +1 @@ +\^{} diff --git a/tests/data/entity_ns.xml b/tests/data/entity_ns.xml new file mode 100644 index 0000000..eb2f6d1 --- /dev/null +++ b/tests/data/entity_ns.xml @@ -0,0 +1,4 @@ + +]> +&e; diff --git a/tests/data/env.out b/tests/data/env.out new file mode 100644 index 0000000..393745d --- /dev/null +++ b/tests/data/env.out @@ -0,0 +1,12 @@ +\begin{document} +text +\s{st} +ET phone home! +\e{st} +text +\begin{test} Test whitespaces in an environment +\end{test} +\begin{test}{a}[b] +*{c} Test extended environment[Incorrect, but interesting. Also see '*' above] +\end{test} +\end{document} diff --git a/tests/data/env.xml b/tests/data/env.xml new file mode 100644 index 0000000..94cfcd6 --- /dev/null +++ b/tests/data/env.xml @@ -0,0 +1,18 @@ + + +text +ET phone home! +text + + Test whitespaces in an environment + + + a + b + * + c + Test extended environment + Incorrect, but interesting. Also see '*' above + + + diff --git a/tests/data/env_ns.out b/tests/data/env_ns.out new file mode 100644 index 0000000..393745d --- /dev/null +++ b/tests/data/env_ns.out @@ -0,0 +1,12 @@ +\begin{document} +text +\s{st} +ET phone home! +\e{st} +text +\begin{test} Test whitespaces in an environment +\end{test} +\begin{test}{a}[b] +*{c} Test extended environment[Incorrect, but interesting. Also see '*' above] +\end{test} +\end{document} diff --git a/tests/data/env_ns.xml b/tests/data/env_ns.xml new file mode 100644 index 0000000..e08cddf --- /dev/null +++ b/tests/data/env_ns.xml @@ -0,0 +1,18 @@ + + +text +ET phone home! +text + + Test whitespaces in an environment + + + a + b + * + c + Test extended environment + Incorrect, but interesting. Also see '*' above + + + diff --git a/tests/data/envenv.out b/tests/data/envenv.out new file mode 100644 index 0000000..357fd74 --- /dev/null +++ b/tests/data/envenv.out @@ -0,0 +1,7 @@ +\b1{n1} +\par1{} +\b2{n2} +\b3{n3} +\e3{n3} +\e2{n2} +\e1{n1} diff --git a/tests/data/envenv.xml b/tests/data/envenv.xml new file mode 100644 index 0000000..d1eaa05 --- /dev/null +++ b/tests/data/envenv.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/data/envenv_ns.out b/tests/data/envenv_ns.out new file mode 100644 index 0000000..357fd74 --- /dev/null +++ b/tests/data/envenv_ns.out @@ -0,0 +1,7 @@ +\b1{n1} +\par1{} +\b2{n2} +\b3{n3} +\e3{n3} +\e2{n2} +\e1{n1} diff --git a/tests/data/envenv_ns.xml b/tests/data/envenv_ns.xml new file mode 100644 index 0000000..d1eaa05 --- /dev/null +++ b/tests/data/envenv_ns.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/data/escape.out b/tests/data/escape.out new file mode 100644 index 0000000..55ffd21 --- /dev/null +++ b/tests/data/escape.out @@ -0,0 +1,2 @@ +\{\textbackslash{}\^{}\} {\^} {\^} \{\textbackslash{}\^{}\} +\{\textbackslash{}\^{}\} diff --git a/tests/data/escape.xml b/tests/data/escape.xml new file mode 100644 index 0000000..f62593c --- /dev/null +++ b/tests/data/escape.xml @@ -0,0 +1,9 @@ +{\^} + {\^} + {\^} + {\^} + {\^} + + + + diff --git a/tests/data/escape_ns.out b/tests/data/escape_ns.out new file mode 100644 index 0000000..55ffd21 --- /dev/null +++ b/tests/data/escape_ns.out @@ -0,0 +1,2 @@ +\{\textbackslash{}\^{}\} {\^} {\^} \{\textbackslash{}\^{}\} +\{\textbackslash{}\^{}\} diff --git a/tests/data/escape_ns.xml b/tests/data/escape_ns.xml new file mode 100644 index 0000000..f62593c --- /dev/null +++ b/tests/data/escape_ns.xml @@ -0,0 +1,9 @@ +{\^} + {\^} + {\^} + {\^} + {\^} + + + + diff --git a/tests/data/fordocs.out b/tests/data/fordocs.out new file mode 100644 index 0000000..51551b7 --- /dev/null +++ b/tests/data/fordocs.out @@ -0,0 +1,77 @@ +\documentclass[12pt]{letter} +\begin{=================}\end{=================} +\textbackslash{}section\{No~break\} +\begin{=================}\end{=================} +\cyrchar\CYRT{}\cyrchar\cyre{}\cyrchar\CYRH{} +\begin{=================}\end{=================} +\documentclass[12pt]{letter} +\begin{=================}\end{=================} +... Visit \href{TeXML homepage}{http://getfo.org/texml/} ... +\begin{=================}\end{=================} +... \item{}first \item{}second +\item{}third +\item{} +fourth ... +\begin{=================}\end{=================} +\it{} once, \it twice +\begin{=================}\end{=================} +\begin{document} +... +\end{document} +\begin{=================}\end{=================} +\start{list} +... +\finish{list} +\begin{=================}\end{=================} +... one +\begin{fake} +env +\end{fake} +, another \begin{fake}env\end{fake}, etc. +\begin{=================}\end{=================} +{\it italics} +\begin{=================}\end{=================} +$a+b$ $$\sqrt{2}$$ +\begin{=================}\end{=================} +\ +\begin{=================}\end{=================} +{\it italics} +\begin{=================}\end{=================} +\textdollar{}a \textbackslash{}/\textbackslash{}/ \textdollar{}b +\begin{=================}\end{=================} +\def \textvert{$|$} +\begin{=================}\end{=================} +\textexclamdown{} \ensuremath{\longleftarrow{}} +$\ensuretext{\textexclamdown{}} \longleftarrow{}$ +\begin{=================}\end{=================} +\def \ensuretext{\textrm } +\begin{=================}\end{=================} +-{}-, -{}-{}-, `{}`, '{}', !{}` and ?{}` +\begin{=================}\end{=================} +$a \/\/ $b +\begin{=================}\end{=================} +text mode here: \textbar{}\^ math mode here: |\hat{} text in math in text: \textbar{}\^ +again math mode: |\hat{} again text mode: \textbar{}\^ +\begin{=================}\end{=================} +{ \it{} text } + { + \it{} text + } +\begin{=================}\end{=================} +... here. +More, ... +\begin{=================}\end{=================} +One line + Another line +Last line +\begin{=================}\end{=================} +line +line +also line +\begin{=================}\end{=================} +two nl: [ + +] +two nl?: [ +] +\begin{=================}\end{=================} diff --git a/tests/data/fordocs.xml b/tests/data/fordocs.xml new file mode 100644 index 0000000..c87cbb4 --- /dev/null +++ b/tests/data/fordocs.xml @@ -0,0 +1,159 @@ + + + + 12pt + letter + + + + +\section{No break} + + + +ТеХ + + + + + 12pt + letter + + + + +... Visit + TeXML homepage + http://getfo.org/texml/ ... + + + +... +first +second +third +fourth ... + + + + once, twice + + + + +... + + + + + +... + + + + +... one env, another env, etc. + + + +italics + + + +a+b +2 + + + + + + + +it italics + + + +$a \/\/ $b + + + +| + + + +¡ ⟵ +¡ ⟵ + + + + + + + + +--, ---, ``, '', !` and ?` + + + +$a \/\/ $b + + + + + text mode here: |̂ + + math mode here: |̂ + text in math in text: |̂ + again math mode: |̂ + + again text mode: |̂ + + + + + + + + text + + + + + text + + + + + + +... here. More, ... + + + + + One line +Another line + Last line + + + + + +line +line +also + +line + + + + + +two nl: [] +two nl?: [] + + + + + diff --git a/tests/data/fordocs_ns.out b/tests/data/fordocs_ns.out new file mode 100644 index 0000000..51551b7 --- /dev/null +++ b/tests/data/fordocs_ns.out @@ -0,0 +1,77 @@ +\documentclass[12pt]{letter} +\begin{=================}\end{=================} +\textbackslash{}section\{No~break\} +\begin{=================}\end{=================} +\cyrchar\CYRT{}\cyrchar\cyre{}\cyrchar\CYRH{} +\begin{=================}\end{=================} +\documentclass[12pt]{letter} +\begin{=================}\end{=================} +... Visit \href{TeXML homepage}{http://getfo.org/texml/} ... +\begin{=================}\end{=================} +... \item{}first \item{}second +\item{}third +\item{} +fourth ... +\begin{=================}\end{=================} +\it{} once, \it twice +\begin{=================}\end{=================} +\begin{document} +... +\end{document} +\begin{=================}\end{=================} +\start{list} +... +\finish{list} +\begin{=================}\end{=================} +... one +\begin{fake} +env +\end{fake} +, another \begin{fake}env\end{fake}, etc. +\begin{=================}\end{=================} +{\it italics} +\begin{=================}\end{=================} +$a+b$ $$\sqrt{2}$$ +\begin{=================}\end{=================} +\ +\begin{=================}\end{=================} +{\it italics} +\begin{=================}\end{=================} +\textdollar{}a \textbackslash{}/\textbackslash{}/ \textdollar{}b +\begin{=================}\end{=================} +\def \textvert{$|$} +\begin{=================}\end{=================} +\textexclamdown{} \ensuremath{\longleftarrow{}} +$\ensuretext{\textexclamdown{}} \longleftarrow{}$ +\begin{=================}\end{=================} +\def \ensuretext{\textrm } +\begin{=================}\end{=================} +-{}-, -{}-{}-, `{}`, '{}', !{}` and ?{}` +\begin{=================}\end{=================} +$a \/\/ $b +\begin{=================}\end{=================} +text mode here: \textbar{}\^ math mode here: |\hat{} text in math in text: \textbar{}\^ +again math mode: |\hat{} again text mode: \textbar{}\^ +\begin{=================}\end{=================} +{ \it{} text } + { + \it{} text + } +\begin{=================}\end{=================} +... here. +More, ... +\begin{=================}\end{=================} +One line + Another line +Last line +\begin{=================}\end{=================} +line +line +also line +\begin{=================}\end{=================} +two nl: [ + +] +two nl?: [ +] +\begin{=================}\end{=================} diff --git a/tests/data/fordocs_ns.xml b/tests/data/fordocs_ns.xml new file mode 100644 index 0000000..68012d2 --- /dev/null +++ b/tests/data/fordocs_ns.xml @@ -0,0 +1,159 @@ + + + + 12pt + letter + + + + +\section{No break} + + + +ТеХ + + + + + 12pt + letter + + + + +... Visit + TeXML homepage + http://getfo.org/texml/ ... + + + +... +first +second +third +fourth ... + + + + once, twice + + + + +... + + + + + +... + + + + +... one env, another env, etc. + + + +italics + + + +a+b +2 + + + + + + + +it italics + + + +$a \/\/ $b + + + +| + + + +¡ ⟵ +¡ ⟵ + + + + + + + + +--, ---, ``, '', !` and ?` + + + +$a \/\/ $b + + + + + text mode here: |̂ + + math mode here: |̂ + text in math in text: |̂ + again math mode: |̂ + + again text mode: |̂ + + + + + + + + text + + + + + text + + + + + + +... here. More, ... + + + + + One line +Another line + Last line + + + + + +line +line +also + +line + + + + + +two nl: [] +two nl?: [] + + + + + diff --git a/tests/data/group.out b/tests/data/group.out new file mode 100644 index 0000000..4f8f13a --- /dev/null +++ b/tests/data/group.out @@ -0,0 +1 @@ +{{{\it{}italics}}} { { {\bf{}bold} } } diff --git a/tests/data/group.xml b/tests/data/group.xml new file mode 100644 index 0000000..d0b585f --- /dev/null +++ b/tests/data/group.xml @@ -0,0 +1,8 @@ + + italics + + + bold + + + diff --git a/tests/data/group_ns.out b/tests/data/group_ns.out new file mode 100644 index 0000000..4f8f13a --- /dev/null +++ b/tests/data/group_ns.out @@ -0,0 +1 @@ +{{{\it{}italics}}} { { {\bf{}bold} } } diff --git a/tests/data/group_ns.xml b/tests/data/group_ns.xml new file mode 100644 index 0000000..5cb3390 --- /dev/null +++ b/tests/data/group_ns.xml @@ -0,0 +1,8 @@ + + italics + + + bold + + + diff --git a/tests/data/hello.out b/tests/data/hello.out new file mode 100644 index 0000000..8ab686e --- /dev/null +++ b/tests/data/hello.out @@ -0,0 +1 @@ +Hello, World! diff --git a/tests/data/hello.xml b/tests/data/hello.xml new file mode 100644 index 0000000..6d549db --- /dev/null +++ b/tests/data/hello.xml @@ -0,0 +1 @@ +Hello, World! diff --git a/tests/data/hello_ns.out b/tests/data/hello_ns.out new file mode 100644 index 0000000..8ab686e --- /dev/null +++ b/tests/data/hello_ns.out @@ -0,0 +1 @@ +Hello, World! diff --git a/tests/data/hello_ns.xml b/tests/data/hello_ns.xml new file mode 100644 index 0000000..6d549db --- /dev/null +++ b/tests/data/hello_ns.xml @@ -0,0 +1 @@ +Hello, World! diff --git a/tests/data/koi8.out b/tests/data/koi8.out new file mode 100644 index 0000000..82da464 --- /dev/null +++ b/tests/data/koi8.out @@ -0,0 +1 @@ +úÄÒÁ×ÓÔ×ÕÊ, íÉÒ! diff --git a/tests/data/koi8.xml b/tests/data/koi8.xml new file mode 100644 index 0000000..a258a30 --- /dev/null +++ b/tests/data/koi8.xml @@ -0,0 +1,2 @@ + +úÄÒÁ×ÓÔ×ÕÊ, íÉÒ! diff --git a/tests/data/koi8_ns.out b/tests/data/koi8_ns.out new file mode 100644 index 0000000..82da464 --- /dev/null +++ b/tests/data/koi8_ns.out @@ -0,0 +1 @@ +úÄÒÁ×ÓÔ×ÕÊ, íÉÒ! diff --git a/tests/data/koi8_ns.xml b/tests/data/koi8_ns.xml new file mode 100644 index 0000000..a258a30 --- /dev/null +++ b/tests/data/koi8_ns.xml @@ -0,0 +1,2 @@ + +úÄÒÁ×ÓÔ×ÕÊ, íÉÒ! diff --git a/tests/data/koi8bad.out b/tests/data/koi8bad.out new file mode 100644 index 0000000..df0e655 --- /dev/null +++ b/tests/data/koi8bad.out @@ -0,0 +1 @@ +ðÌÏÈÉÅ ÓÉÍ×ÏÌÙ: \unicodechar{1917}\unicodechar{2004} diff --git a/tests/data/koi8bad.xml b/tests/data/koi8bad.xml new file mode 100644 index 0000000..b6a6838 --- /dev/null +++ b/tests/data/koi8bad.xml @@ -0,0 +1,2 @@ + +ðÌÏÈÉÅ ÓÉÍ×ÏÌÙ: ݽߔ diff --git a/tests/data/koi8bad_ns.out b/tests/data/koi8bad_ns.out new file mode 100644 index 0000000..df0e655 --- /dev/null +++ b/tests/data/koi8bad_ns.out @@ -0,0 +1 @@ +ðÌÏÈÉÅ ÓÉÍ×ÏÌÙ: \unicodechar{1917}\unicodechar{2004} diff --git a/tests/data/koi8bad_ns.xml b/tests/data/koi8bad_ns.xml new file mode 100644 index 0000000..b6a6838 --- /dev/null +++ b/tests/data/koi8bad_ns.xml @@ -0,0 +1,2 @@ + +ðÌÏÈÉÅ ÓÉÍ×ÏÌÙ: ݽߔ diff --git a/tests/data/latex.out b/tests/data/latex.out new file mode 100644 index 0000000..53ea850 --- /dev/null +++ b/tests/data/latex.out @@ -0,0 +1,2 @@ +\textcopyright{}~úÄÒÁ×ÓÔ×ÕÊ,~\ldots{}! \x{úÄÒÁ×ÓÔ×ÕÊ,~\ldots{}!}[úÄÒÁ×ÓÔ×ÕÊ,~\ldots{}!] +Check if unicode.map bug fixed: [~][\-] diff --git a/tests/data/latex.xml b/tests/data/latex.xml new file mode 100644 index 0000000..d3e6d78 --- /dev/null +++ b/tests/data/latex.xml @@ -0,0 +1,8 @@ + +© Çäðàâñòâóé, …! + +Çäðàâñòâóé, …! +Çäðàâñòâóé, …! + +Check if unicode.map bug fixed: [ ][­] + diff --git a/tests/data/latex_ns.out b/tests/data/latex_ns.out new file mode 100644 index 0000000..53ea850 --- /dev/null +++ b/tests/data/latex_ns.out @@ -0,0 +1,2 @@ +\textcopyright{}~úÄÒÁ×ÓÔ×ÕÊ,~\ldots{}! \x{úÄÒÁ×ÓÔ×ÕÊ,~\ldots{}!}[úÄÒÁ×ÓÔ×ÕÊ,~\ldots{}!] +Check if unicode.map bug fixed: [~][\-] diff --git a/tests/data/latex_ns.xml b/tests/data/latex_ns.xml new file mode 100644 index 0000000..d3e6d78 --- /dev/null +++ b/tests/data/latex_ns.xml @@ -0,0 +1,8 @@ + +© Çäðàâñòâóé, …! + +Çäðàâñòâóé, …! +Çäðàâñòâóé, …! + +Check if unicode.map bug fixed: [ ][­] + diff --git a/tests/data/ligatures.out b/tests/data/ligatures.out new file mode 100644 index 0000000..e564535 --- /dev/null +++ b/tests/data/ligatures.out @@ -0,0 +1,5 @@ +z \textless{}\textless{}x\textgreater{}\textgreater{} - -{}- -{}-{}- -{}-{}-{}-{}- z ` `{}` `{}`{}` ' '{}' '{}'{}'{}' !!!{}` !{}` ???{}` ?{}` z +z \textless{}\textless{}x\textgreater{}\textgreater{} - -- --- ----- z ` `` ``` ' '' '''' !!!` !` ???` ?` z +z \textless{}\textless{}x\textgreater{}\textgreater{} - -- --- ----- z ` `` ``` ' '' '''' !!!` !` ???` ?` z +z \textless{}\textless{}x\textgreater{}\textgreater{} - -{}- -{}-{}- -{}-{}-{}-{}- z ` `{}` `{}`{}` ' '{}' '{}'{}'{}' !!!{}` !{}` ???{}` ?{}` z +z \textless{}\textless{}x\textgreater{}\textgreater{} - -{}- -{}-{}- -{}-{}-{}-{}- z ` `{}` `{}`{}` ' '{}' '{}'{}'{}' !!!{}` !{}` ???{}` ?{}` z diff --git a/tests/data/ligatures.xml b/tests/data/ligatures.xml new file mode 100644 index 0000000..bfe345c --- /dev/null +++ b/tests/data/ligatures.xml @@ -0,0 +1,9 @@ +z <<x>> - -- --- ----- z ` `` ``` ' '' '''' !!!` !` ???` ?` z + z <<x>> - -- --- ----- z ` `` ``` ' '' '''' !!!` !` ???` ?` z + z <<x>> - -- --- ----- z ` `` ``` ' '' '''' !!!` !` ???` ?` z + z <<x>> - -- --- ----- z ` `` ``` ' '' '''' !!!` !` ???` ?` z + z <<x>> - -- --- ----- z ` `` ``` ' '' '''' !!!` !` ???` ?` z + + + + diff --git a/tests/data/ligatures_ns.out b/tests/data/ligatures_ns.out new file mode 100644 index 0000000..e564535 --- /dev/null +++ b/tests/data/ligatures_ns.out @@ -0,0 +1,5 @@ +z \textless{}\textless{}x\textgreater{}\textgreater{} - -{}- -{}-{}- -{}-{}-{}-{}- z ` `{}` `{}`{}` ' '{}' '{}'{}'{}' !!!{}` !{}` ???{}` ?{}` z +z \textless{}\textless{}x\textgreater{}\textgreater{} - -- --- ----- z ` `` ``` ' '' '''' !!!` !` ???` ?` z +z \textless{}\textless{}x\textgreater{}\textgreater{} - -- --- ----- z ` `` ``` ' '' '''' !!!` !` ???` ?` z +z \textless{}\textless{}x\textgreater{}\textgreater{} - -{}- -{}-{}- -{}-{}-{}-{}- z ` `{}` `{}`{}` ' '{}' '{}'{}'{}' !!!{}` !{}` ???{}` ?{}` z +z \textless{}\textless{}x\textgreater{}\textgreater{} - -{}- -{}-{}- -{}-{}-{}-{}- z ` `{}` `{}`{}` ' '{}' '{}'{}'{}' !!!{}` !{}` ???{}` ?{}` z diff --git a/tests/data/ligatures_ns.xml b/tests/data/ligatures_ns.xml new file mode 100644 index 0000000..bfe345c --- /dev/null +++ b/tests/data/ligatures_ns.xml @@ -0,0 +1,9 @@ +z <<x>> - -- --- ----- z ` `` ``` ' '' '''' !!!` !` ???` ?` z + z <<x>> - -- --- ----- z ` `` ``` ' '' '''' !!!` !` ???` ?` z + z <<x>> - -- --- ----- z ` `` ``` ' '' '''' !!!` !` ???` ?` z + z <<x>> - -- --- ----- z ` `` ``` ' '' '''' !!!` !` ???` ?` z + z <<x>> - -- --- ----- z ` `` ``` ' '' '''' !!!` !` ???` ?` z + + + + diff --git a/tests/data/math.out b/tests/data/math.out new file mode 100644 index 0000000..b5dba55 --- /dev/null +++ b/tests/data/math.out @@ -0,0 +1,20 @@ +category 0: \backslash{} +category 1: \{ +category 2: \} +category 3: \$ +category 4: \& +category 5: +category 6: \# +category 7: \^{} +category 8: \_ +category 9: +category a: +category b: +category c: +category d: \~{} +category e: \% +category f: +also: | +also: < +also: > +also: [-] // non-breaking hyphen diff --git a/tests/data/math.xml b/tests/data/math.xml new file mode 100644 index 0000000..590a9e6 --- /dev/null +++ b/tests/data/math.xml @@ -0,0 +1,22 @@ + +category 0: \ +category 1: { +category 2: } +category 3: $ +category 4: & +category 5: +category 6: # +category 7: ^ +category 8: _ +category 9: +category a: +category b: +category c: +category d: ~ +category e: % +category f: +also: | +also: < +also: > +also: [‑] // non-breaking hyphen + diff --git a/tests/data/math_ns.out b/tests/data/math_ns.out new file mode 100644 index 0000000..767b9ea --- /dev/null +++ b/tests/data/math_ns.out @@ -0,0 +1,19 @@ +category 0: \backslash{} +category 1: \{ +category 2: \} +category 3: \$ +category 4: \& +category 5: +category 6: \# +category 7: \^{} +category 8: \_ +category 9: +category a: +category b: +category c: +category d: \~{} +category e: \% +category f: +also: | +also: < +also: > diff --git a/tests/data/math_ns.xml b/tests/data/math_ns.xml new file mode 100644 index 0000000..df90407 --- /dev/null +++ b/tests/data/math_ns.xml @@ -0,0 +1,21 @@ + +category 0: \ +category 1: { +category 2: } +category 3: $ +category 4: & +category 5: +category 6: # +category 7: ^ +category 8: _ +category 9: +category a: +category b: +category c: +category d: ~ +category e: % +category f: +also: | +also: < +also: > + diff --git a/tests/data/mathgr.out b/tests/data/mathgr.out new file mode 100644 index 0000000..35a698c --- /dev/null +++ b/tests/data/mathgr.out @@ -0,0 +1,2 @@ +Text: \textbar{}a+b\textbar{}\textgreater{}2 $|a+b|>3$ $$|a+b|>4$$ +$$\sqrt{2}$$ diff --git a/tests/data/mathgr.xml b/tests/data/mathgr.xml new file mode 100644 index 0000000..391eee3 --- /dev/null +++ b/tests/data/mathgr.xml @@ -0,0 +1,5 @@ +Text: |a+b|>2 +|a+b|>3 +|a+b|>4 +2 + diff --git a/tests/data/mathgr_ns.out b/tests/data/mathgr_ns.out new file mode 100644 index 0000000..35a698c --- /dev/null +++ b/tests/data/mathgr_ns.out @@ -0,0 +1,2 @@ +Text: \textbar{}a+b\textbar{}\textgreater{}2 $|a+b|>3$ $$|a+b|>4$$ +$$\sqrt{2}$$ diff --git a/tests/data/mathgr_ns.xml b/tests/data/mathgr_ns.xml new file mode 100644 index 0000000..391eee3 --- /dev/null +++ b/tests/data/mathgr_ns.xml @@ -0,0 +1,5 @@ +Text: |a+b|>2 +|a+b|>3 +|a+b|>4 +2 + diff --git a/tests/data/mixed.out b/tests/data/mixed.out new file mode 100644 index 0000000..9179bd0 --- /dev/null +++ b/tests/data/mixed.out @@ -0,0 +1,15 @@ +In \textbar{}text\textbar{} mode. Still in \textbar{}text\textbar{} mode +In |math| mode: |\hat{}. In \textbar{}text\textbar{} mode inside math mode +Still in |math| mode In \textbar{}text\textbar{} mode: \textbar{}\^. +The symbol can be only in math: \ensuremath{\longleftarrow{}} $ad$$ +$$ unicode mapping in math mode: +in text: \ensuretext{\textexclamdown{}} +in mixed: \hat{a} +in math: \longleftarrow{} +none: \unicodechar{1911} $$ +unicode mapping in text mode: +in text: \textexclamdown{} +in mixed: \^{a} +in math: \ensuremath{\longleftarrow{}} +none: \unicodechar{1911} diff --git a/tests/data/mixed.xml b/tests/data/mixed.xml new file mode 100644 index 0000000..d635f77 --- /dev/null +++ b/tests/data/mixed.xml @@ -0,0 +1,26 @@ + +In |text| mode. +Still in |text| mode + +In |math| mode: |̂. +In |text| mode inside math mode +Still in |math| mode + +In |text| mode: |̂. +The symbol can be only in math: ⟵ +a<b c>d + +unicode mapping in math mode: +in text: ¡ +in mixed: â +in math: ⟵ +none: ݷ + + +unicode mapping in text mode: +in text: ¡ +in mixed: â +in math: ⟵ +none: ݷ + + diff --git a/tests/data/mixed_ns.out b/tests/data/mixed_ns.out new file mode 100644 index 0000000..9179bd0 --- /dev/null +++ b/tests/data/mixed_ns.out @@ -0,0 +1,15 @@ +In \textbar{}text\textbar{} mode. Still in \textbar{}text\textbar{} mode +In |math| mode: |\hat{}. In \textbar{}text\textbar{} mode inside math mode +Still in |math| mode In \textbar{}text\textbar{} mode: \textbar{}\^. +The symbol can be only in math: \ensuremath{\longleftarrow{}} $ad$$ +$$ unicode mapping in math mode: +in text: \ensuretext{\textexclamdown{}} +in mixed: \hat{a} +in math: \longleftarrow{} +none: \unicodechar{1911} $$ +unicode mapping in text mode: +in text: \textexclamdown{} +in mixed: \^{a} +in math: \ensuremath{\longleftarrow{}} +none: \unicodechar{1911} diff --git a/tests/data/mixed_ns.xml b/tests/data/mixed_ns.xml new file mode 100644 index 0000000..7ad0c22 --- /dev/null +++ b/tests/data/mixed_ns.xml @@ -0,0 +1,26 @@ + +In |text| mode. +Still in |text| mode + +In |math| mode: |̂. +In |text| mode inside math mode +Still in |math| mode + +In |text| mode: |̂. +The symbol can be only in math: ⟵ +a<b c>d + +unicode mapping in math mode: +in text: ¡ +in mixed: â +in math: ⟵ +none: ݷ + + +unicode mapping in text mode: +in text: ¡ +in mixed: â +in math: ⟵ +none: ݷ + + diff --git a/tests/data/nlcmd.out b/tests/data/nlcmd.out new file mode 100644 index 0000000..1a75a88 --- /dev/null +++ b/tests/data/nlcmd.out @@ -0,0 +1,18 @@ +Use \it{} italic + or +\bf{} bold + or \tt{} tt. +Again: + Use \it{} italic + or \bf{} +bold + or \tt{} tt. +Finally: +x \y{} z +x \y{} +z +x +\y{} z +x +\y{} +z diff --git a/tests/data/nlcmd.xml b/tests/data/nlcmd.xml new file mode 100644 index 0000000..5dcc310 --- /dev/null +++ b/tests/data/nlcmd.xml @@ -0,0 +1,14 @@ + + Use italic + or bold + or tt. +Again: + Use italic + or bold + or tt. +Finally: +x z +x z +x z +x z + diff --git a/tests/data/nlcmd_ns.out b/tests/data/nlcmd_ns.out new file mode 100644 index 0000000..1a75a88 --- /dev/null +++ b/tests/data/nlcmd_ns.out @@ -0,0 +1,18 @@ +Use \it{} italic + or +\bf{} bold + or \tt{} tt. +Again: + Use \it{} italic + or \bf{} +bold + or \tt{} tt. +Finally: +x \y{} z +x \y{} +z +x +\y{} z +x +\y{} +z diff --git a/tests/data/nlcmd_ns.xml b/tests/data/nlcmd_ns.xml new file mode 100644 index 0000000..9b87e59 --- /dev/null +++ b/tests/data/nlcmd_ns.xml @@ -0,0 +1,14 @@ + + Use italic + or bold + or tt. +Again: + Use italic + or bold + or tt. +Finally: +x z +x z +x z +x z + diff --git a/tests/data/nlenv.out b/tests/data/nlenv.out new file mode 100644 index 0000000..d10676d --- /dev/null +++ b/tests/data/nlenv.out @@ -0,0 +1,19 @@ +x +\begin{y} +? +\end{y} +z x +\begin{y} +? +\end{y} +z x \begin{y}?\end{y} z x +\begin{y}?\end{y} z + x \begin{y} +?\end{y} z + x \begin{y}? +\end{y} z + x \begin{y}?\end{y} +z +\begin{foo}[options1]{parameters1}[options2]{parameters2}[options3]{parameters3}[options4] +text... +\end{foo} diff --git a/tests/data/nlenv.xml b/tests/data/nlenv.xml new file mode 100644 index 0000000..f25ca37 --- /dev/null +++ b/tests/data/nlenv.xml @@ -0,0 +1,24 @@ + + + x ? z + + x ? z + + x ? z + + x ? z + x ? z + x ? z + x ? z + + + options1 + parameters1 + options2 + parameters2 + options3 + parameters3 + options4 + text... + + diff --git a/tests/data/nlenv_ns.out b/tests/data/nlenv_ns.out new file mode 100644 index 0000000..d10676d --- /dev/null +++ b/tests/data/nlenv_ns.out @@ -0,0 +1,19 @@ +x +\begin{y} +? +\end{y} +z x +\begin{y} +? +\end{y} +z x \begin{y}?\end{y} z x +\begin{y}?\end{y} z + x \begin{y} +?\end{y} z + x \begin{y}? +\end{y} z + x \begin{y}?\end{y} +z +\begin{foo}[options1]{parameters1}[options2]{parameters2}[options3]{parameters3}[options4] +text... +\end{foo} diff --git a/tests/data/nlenv_ns.xml b/tests/data/nlenv_ns.xml new file mode 100644 index 0000000..bb10d7e --- /dev/null +++ b/tests/data/nlenv_ns.xml @@ -0,0 +1,24 @@ + + + x ? z + + x ? z + + x ? z + + x ? z + x ? z + x ? z + x ? z + + + options1 + parameters1 + options2 + parameters2 + options3 + parameters3 + options4 + text... + + diff --git a/tests/data/nopara.out b/tests/data/nopara.out new file mode 100644 index 0000000..4e0c8a8 --- /dev/null +++ b/tests/data/nopara.out @@ -0,0 +1,26 @@ +One line. +% +Second line. +% +Third line. +% +% +% +% +% +All previous lines +should belong to one paragraph. +% +Now lines are filled by spaces: +One line. + % +Second line. + % +Third line. + % + % + % + % + % +All previous lines +should belong to one paragraph. diff --git a/tests/data/nopara.xml b/tests/data/nopara.xml new file mode 100644 index 0000000..3259ea1 --- /dev/null +++ b/tests/data/nopara.xml @@ -0,0 +1,29 @@ + +One line. + +Second line. + +Third line. + + + + + +All previous lines +should belong to one paragraph. + +Now lines are filled by spaces: +One line. + +Second line. + +Third line. + + + + + +All previous lines +should belong to one paragraph. + + diff --git a/tests/data/nopara_ns.out b/tests/data/nopara_ns.out new file mode 100644 index 0000000..f708315 --- /dev/null +++ b/tests/data/nopara_ns.out @@ -0,0 +1,12 @@ +One line. +% +Second line. +% +Third line. +% +% +% +% +% +All previous lines +should belong to one paragraph. diff --git a/tests/data/nopara_ns.xml b/tests/data/nopara_ns.xml new file mode 100644 index 0000000..e2acbef --- /dev/null +++ b/tests/data/nopara_ns.xml @@ -0,0 +1,14 @@ + +One line. + +Second line. + +Third line. + + + + + +All previous lines +should belong to one paragraph. + diff --git a/tests/data/normal.out b/tests/data/normal.out new file mode 100644 index 0000000..5bc968f --- /dev/null +++ b/tests/data/normal.out @@ -0,0 +1,20 @@ +category 0: \textbackslash{} +category 1: \{ +category 2: \} +category 3: \textdollar{} +category 4: \& +category 5: +category 6: \# +category 7: \^{} +category 8: \_ +category 9: +category a: +category b: +category c: +category d: \textasciitilde{} +category e: \% +category f: +also: \textbar{} +also: \textless{} +also: \textgreater{} +also: [\mbox{-}] // non-breaking hyphen diff --git a/tests/data/normal.xml b/tests/data/normal.xml new file mode 100644 index 0000000..95227a8 --- /dev/null +++ b/tests/data/normal.xml @@ -0,0 +1,22 @@ + +category 0: \ +category 1: { +category 2: } +category 3: $ +category 4: & +category 5: +category 6: # +category 7: ^ +category 8: _ +category 9: +category a: +category b: +category c: +category d: ~ +category e: % +category f: +also: | +also: < +also: > +also: [‑] // non-breaking hyphen + diff --git a/tests/data/normal_ns.out b/tests/data/normal_ns.out new file mode 100644 index 0000000..ecd30df --- /dev/null +++ b/tests/data/normal_ns.out @@ -0,0 +1,19 @@ +category 0: \textbackslash{} +category 1: \{ +category 2: \} +category 3: \textdollar{} +category 4: \& +category 5: +category 6: \# +category 7: \^{} +category 8: \_ +category 9: +category a: +category b: +category c: +category d: \textasciitilde{} +category e: \% +category f: +also: \textbar{} +also: \textless{} +also: \textgreater{} diff --git a/tests/data/normal_ns.xml b/tests/data/normal_ns.xml new file mode 100644 index 0000000..dd24745 --- /dev/null +++ b/tests/data/normal_ns.xml @@ -0,0 +1,21 @@ + +category 0: \ +category 1: { +category 2: } +category 3: $ +category 4: & +category 5: +category 6: # +category 7: ^ +category 8: _ +category 9: +category a: +category b: +category c: +category d: ~ +category e: % +category f: +also: | +also: < +also: > + diff --git a/tests/data/pdfstring.out b/tests/data/pdfstring.out new file mode 100644 index 0000000..995ae32 --- /dev/null +++ b/tests/data/pdfstring.out @@ -0,0 +1,4 @@ +\_/0189:\_@ABYZ[\_`abyz\{\_\cyrchar\cyrya{} +\000\137\000\057\000\060\000\061\000\070\000\071\000\072\000\137\000\100\000\101\000\102\000\131\000\132\000\133\000\137\000\140\000\141\000\142\000\171\000\172\000\173\000\137\004\117 + +\_/0189:\_@ABYZ[\_`abyz\{\_\cyrchar\cyrya{} diff --git a/tests/data/pdfstring.xml b/tests/data/pdfstring.xml new file mode 100644 index 0000000..adf76a2 --- /dev/null +++ b/tests/data/pdfstring.xml @@ -0,0 +1,7 @@ + + _/0189:_@ABYZ[_`abyz{_я + + _/0189:_@ABYZ[_`abyz{_я + + _/0189:_@ABYZ[_`abyz{_я + diff --git a/tests/data/quick.out b/tests/data/quick.out new file mode 100644 index 0000000..8c8186a --- /dev/null +++ b/tests/data/quick.out @@ -0,0 +1,16 @@ +\documentclass[a4paper,12pt]{article} +\begin{document} +\author{A. U. Thor} +\title{A SHORT STORY} +\maketitle +\section*{A SHORT STORY} +Once upon a time, in a distant galaxy called + \"{O}\"{o}\c{c}, there lived a computer + named R.~J. Drofnats.\par +Mr.~Droftnats\textemdash{}or \lq{}\lq{}R.J.,\rq{}\rq{} as he + preferred to be called\textemdash{}was happiest + when he was at work typesetting beautiful + documents.\par +\bigskip +\hrule +\end{document} diff --git a/tests/data/quick.xml b/tests/data/quick.xml new file mode 100644 index 0000000..463cfba --- /dev/null +++ b/tests/data/quick.xml @@ -0,0 +1,29 @@ + + + + a4paper,12pt + article + + + + A. U. Thor + + + A SHORT STORY + + + + A SHORT STORY + + Once upon a time, in a distant galaxy called + Ööç, there lived a computer + named R. J. Drofnats. + Mr. Droftnats—or + R.J., as he + preferred to be called—was happiest + when he was at work typesetting beautiful + documents. + + + + diff --git a/tests/data/quick/Makefile b/tests/data/quick/Makefile new file mode 100644 index 0000000..6935425 --- /dev/null +++ b/tests/data/quick/Makefile @@ -0,0 +1,15 @@ +all: quick.pdf + +quick.pdf: quick.tex + pdflatex $< + +pyfiles := $(wildcard ../../../bin/*py) ../../../scripts/texml_local + +quick.tex: quick.texml $(pyfiles) + ../../../scripts/texml_local --width 60 $< $@ + +quick.texml: quick.xsl quick.html + xsltproc -o $@ $+ + +clean: + rm -f *log *aux *~ diff --git a/tests/data/quick/quick-pdf.bat b/tests/data/quick/quick-pdf.bat new file mode 100644 index 0000000..01a92cc --- /dev/null +++ b/tests/data/quick/quick-pdf.bat @@ -0,0 +1,2 @@ +pdflatex quick.tex +pause diff --git a/tests/data/quick/quick.bat b/tests/data/quick/quick.bat new file mode 100644 index 0000000..2d2b75a --- /dev/null +++ b/tests/data/quick/quick.bat @@ -0,0 +1,5 @@ +REM In c:\texml\bin folder use this: +REM python texml.py -w 60 quick.texml quick.tex +REM In c:\texml\tests\data\quick folder use this: +python ../../../bin/texml.py -w 60 quick.texml quick.tex +pause diff --git a/tests/data/quick/quick.html b/tests/data/quick/quick.html new file mode 100644 index 0000000..3ba3b5c --- /dev/null +++ b/tests/data/quick/quick.html @@ -0,0 +1,24 @@ + + +A SHORT STORY + + + +

A SHORT STORY

+ +

by + A. U. Thor

+ +

Once upon a time, in a distant galaxy called + Ööç, there lived a computer + named R. J. Drofnats.

+ +

Mr. Droftnats—or + R.J., as he + preferred to be called—was happiest + when he was at work typesetting beautiful + documents.

+ +
+ + diff --git a/tests/data/quick/quick.pdf b/tests/data/quick/quick.pdf new file mode 100644 index 0000000..a4c65bf Binary files /dev/null and b/tests/data/quick/quick.pdf differ diff --git a/tests/data/quick/quick.tex b/tests/data/quick/quick.tex new file mode 100644 index 0000000..8c8186a --- /dev/null +++ b/tests/data/quick/quick.tex @@ -0,0 +1,16 @@ +\documentclass[a4paper,12pt]{article} +\begin{document} +\author{A. U. Thor} +\title{A SHORT STORY} +\maketitle +\section*{A SHORT STORY} +Once upon a time, in a distant galaxy called + \"{O}\"{o}\c{c}, there lived a computer + named R.~J. Drofnats.\par +Mr.~Droftnats\textemdash{}or \lq{}\lq{}R.J.,\rq{}\rq{} as he + preferred to be called\textemdash{}was happiest + when he was at work typesetting beautiful + documents.\par +\bigskip +\hrule +\end{document} diff --git a/tests/data/quick/quick.texml b/tests/data/quick/quick.texml new file mode 100644 index 0000000..463cfba --- /dev/null +++ b/tests/data/quick/quick.texml @@ -0,0 +1,29 @@ + + + + a4paper,12pt + article + + + + A. U. Thor + + + A SHORT STORY + + + + A SHORT STORY + + Once upon a time, in a distant galaxy called + Ööç, there lived a computer + named R. J. Drofnats. + Mr. Droftnats—or + R.J., as he + preferred to be called—was happiest + when he was at work typesetting beautiful + documents. + + + + diff --git a/tests/data/quick/quick.xsl b/tests/data/quick/quick.xsl new file mode 100644 index 0000000..4c5b6cb --- /dev/null +++ b/tests/data/quick/quick.xsl @@ -0,0 +1,62 @@ + + + + + + + + a4paper,12pt + article + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/data/quick_ns.out b/tests/data/quick_ns.out new file mode 100644 index 0000000..8c8186a --- /dev/null +++ b/tests/data/quick_ns.out @@ -0,0 +1,16 @@ +\documentclass[a4paper,12pt]{article} +\begin{document} +\author{A. U. Thor} +\title{A SHORT STORY} +\maketitle +\section*{A SHORT STORY} +Once upon a time, in a distant galaxy called + \"{O}\"{o}\c{c}, there lived a computer + named R.~J. Drofnats.\par +Mr.~Droftnats\textemdash{}or \lq{}\lq{}R.J.,\rq{}\rq{} as he + preferred to be called\textemdash{}was happiest + when he was at work typesetting beautiful + documents.\par +\bigskip +\hrule +\end{document} diff --git a/tests/data/quick_ns.xml b/tests/data/quick_ns.xml new file mode 100644 index 0000000..ab65235 --- /dev/null +++ b/tests/data/quick_ns.xml @@ -0,0 +1,29 @@ + + + + a4paper,12pt + article + + + + A. U. Thor + + + A SHORT STORY + + + + A SHORT STORY + + Once upon a time, in a distant galaxy called + Ööç, there lived a computer + named R. J. Drofnats. + Mr. Droftnats—or + R.J., as he + preferred to be called—was happiest + when he was at work typesetting beautiful + documents. + + + + diff --git a/tests/data/realspace.out b/tests/data/realspace.out new file mode 100644 index 0000000..8d3bd9b --- /dev/null +++ b/tests/data/realspace.out @@ -0,0 +1,4 @@ +\ \ {\it{} it} \ +\aaaaaaaaaa{} \aaaaaaaaaa{} \aaaaaaaaaa{} \aaaaaaaaaa{} \aaaaaaaaaa{} +\aaaaaaaaaa{} +\aaaaaaaaaa{} \aaaaaaaaaa{} \aaaaaaaaaa{} \aaaaaaaaaa{} \aaaaaaaaaa{} \aaaaaaaaaa{} diff --git a/tests/data/realspace.xml b/tests/data/realspace.xml new file mode 100644 index 0000000..0946050 --- /dev/null +++ b/tests/data/realspace.xml @@ -0,0 +1,22 @@ + + + + + + + it + + + + + + + + + + + diff --git a/tests/data/realspace_ns.out b/tests/data/realspace_ns.out new file mode 100644 index 0000000..8d3bd9b --- /dev/null +++ b/tests/data/realspace_ns.out @@ -0,0 +1,4 @@ +\ \ {\it{} it} \ +\aaaaaaaaaa{} \aaaaaaaaaa{} \aaaaaaaaaa{} \aaaaaaaaaa{} \aaaaaaaaaa{} +\aaaaaaaaaa{} +\aaaaaaaaaa{} \aaaaaaaaaa{} \aaaaaaaaaa{} \aaaaaaaaaa{} \aaaaaaaaaa{} \aaaaaaaaaa{} diff --git a/tests/data/realspace_ns.xml b/tests/data/realspace_ns.xml new file mode 100644 index 0000000..ef58740 --- /dev/null +++ b/tests/data/realspace_ns.xml @@ -0,0 +1,22 @@ + + + + + + + it + + + + + + + + + + + diff --git a/tests/data/spec.out b/tests/data/spec.out new file mode 100644 index 0000000..f8e9de0 --- /dev/null +++ b/tests/data/spec.out @@ -0,0 +1,27 @@ +category 0: [\] +category 1: [{] +category 2: [}] +category 3: [$] +category 4: [&] +category 5: [n/a] +category 6: [#] +category 7: [^] +category 8: [_] +category 9: [n/a] +category a: [n/a] +category b: [n/a] +category c: [n/a] +category d: [~] +category e: [%] +category f: [n/a] +also: [|] +also: [<] +also: [>] +also: [ + + +] +also: [ +] +also: [ ] +also: [] diff --git a/tests/data/spec.xml b/tests/data/spec.xml new file mode 100644 index 0000000..855bd18 --- /dev/null +++ b/tests/data/spec.xml @@ -0,0 +1,25 @@ + +category 0: [] +category 1: [] +category 2: [] +category 3: [] +category 4: [] +category 5: [n/a] +category 6: [] +category 7: [] +category 8: [] +category 9: [n/a] +category a: [n/a] +category b: [n/a] +category c: [n/a] +category d: [] +category e: [] +category f: [n/a] +also: [] +also: [] +also: [] +also: [] +also: [] +also: [] +also: [] + diff --git a/tests/data/spec_ns.out b/tests/data/spec_ns.out new file mode 100644 index 0000000..f8e9de0 --- /dev/null +++ b/tests/data/spec_ns.out @@ -0,0 +1,27 @@ +category 0: [\] +category 1: [{] +category 2: [}] +category 3: [$] +category 4: [&] +category 5: [n/a] +category 6: [#] +category 7: [^] +category 8: [_] +category 9: [n/a] +category a: [n/a] +category b: [n/a] +category c: [n/a] +category d: [~] +category e: [%] +category f: [n/a] +also: [|] +also: [<] +also: [>] +also: [ + + +] +also: [ +] +also: [ ] +also: [] diff --git a/tests/data/spec_ns.xml b/tests/data/spec_ns.xml new file mode 100644 index 0000000..fa0cad7 --- /dev/null +++ b/tests/data/spec_ns.xml @@ -0,0 +1,25 @@ + +category 0: [] +category 1: [] +category 2: [] +category 3: [] +category 4: [] +category 5: [n/a] +category 6: [] +category 7: [] +category 8: [] +category 9: [n/a] +category a: [n/a] +category b: [n/a] +category c: [n/a] +category d: [] +category e: [] +category f: [n/a] +also: [] +also: [] +also: [] +also: [] +also: [] +also: [] +also: [] + diff --git a/tests/data/specandws.out b/tests/data/specandws.out new file mode 100644 index 0000000..630ef07 --- /dev/null +++ b/tests/data/specandws.out @@ -0,0 +1,5 @@ +trademark symbol: \texttrademark{} +windows\texttrademark{} outside +// Some time ago it was mapped to 'windows\textbackslash{}texttrademark outside'. +// As result, words 'windows' and 'outside' were not divided by a space. +// Now we use '\{\}' instead of space, so this test is just a reminder. diff --git a/tests/data/specandws.xml b/tests/data/specandws.xml new file mode 100644 index 0000000..5724423 --- /dev/null +++ b/tests/data/specandws.xml @@ -0,0 +1,7 @@ + +trademark symbol: ™ +windows™ outside +// Some time ago it was mapped to 'windows\texttrademark outside'. +// As result, words 'windows' and 'outside' were not divided by a space. +// Now we use '{}' instead of space, so this test is just a reminder. + diff --git a/tests/data/specandws_ns.out b/tests/data/specandws_ns.out new file mode 100644 index 0000000..630ef07 --- /dev/null +++ b/tests/data/specandws_ns.out @@ -0,0 +1,5 @@ +trademark symbol: \texttrademark{} +windows\texttrademark{} outside +// Some time ago it was mapped to 'windows\textbackslash{}texttrademark outside'. +// As result, words 'windows' and 'outside' were not divided by a space. +// Now we use '\{\}' instead of space, so this test is just a reminder. diff --git a/tests/data/specandws_ns.xml b/tests/data/specandws_ns.xml new file mode 100644 index 0000000..36d1fb9 --- /dev/null +++ b/tests/data/specandws_ns.xml @@ -0,0 +1,7 @@ + +trademark symbol: ™ +windows™ outside +// Some time ago it was mapped to 'windows\texttrademark outside'. +// As result, words 'windows' and 'outside' were not divided by a space. +// Now we use '{}' instead of space, so this test is just a reminder. + diff --git a/tests/data/texmlapis.out b/tests/data/texmlapis.out new file mode 100644 index 0000000..67dffec --- /dev/null +++ b/tests/data/texmlapis.out @@ -0,0 +1,51 @@ +\documentclass[onecolumn ]{article} +\usepackage[dvipdfm,colorlinks]{hyperref} +\usepackage{booktabs} +\begin{document} +\title{\TeX MLapis} +\author{ Chris Houser\\ chouser@bluweb.com } +\maketitle{} +\section{What is \TeX MLapis?} +\TeX MLapis translates \TeX ML documents into \TeX{}.\par{} +\section{What good is \TeX ML?} +\LaTeX \footnote{\href{http://www.latex-project.org/}{http://www.latex-project.org/}} +is very good at a + number of very tricky things. These include formatting mathematical + formulae, laying out out books and articles, typesetting text and tables in + a pleasing and consistant manner, etc. However, XML is good at a number of + things \LaTeX{} is {\em{}not} so good at, such as being easily parsed and + translated into a variety of output formats.\par{} +Unfortunately, the standard XML transformation system XSL\footnote{\href{http://www.w3.org/Style/XSL/}{http://www.w3.org/Style/XSL/}} +is not powerful enough to + translate from normal XML formats to \LaTeX{} directly. So when you use XML + to edit, store, and distribute your source documents, \TeX ML provides the + bridge you need to leverage the power of \LaTeX{} when formatting your + document for the printed page.\par{} +The DTD and other documentation about \TeX ML\footnote{\href{http://www.alphaworks.ibm.com/formula/texml}{http://www.alphaworks.ibm.com/formula/texml}} +is available + from IBM + alphaWorks\footnote{\href{http://www.alphaworks.ibm.com/formula/texml}{http://www.alphaworks.ibm.com/formula/texml}}. My interpretation of their software license does not allow + me to redistribute those materials here.\par{} +\section{\TeX MLapis vs. \TeX MLatte} +There is already a \TeX ML-to-\TeX{} translator called \TeX MLatte\footnote{\href{http://www.alphaworks.ibm.com/formula/texml}{http://www.alphaworks.ibm.com/formula/texml}}, but I + was completely unable to get it to work. It's written in Java\footnote{\href{http://java.sun.com/}{http://java.sun.com/}} +and the perhaps the runtime engines I + have around are drastically sub-standard or something, but for whatever + reason I could not get their tool to run. Also, the software license for +\TeX MLatte is rather less community-oriented than the GPL, so I thought a + new implementation was in order.\par{} +\TeX MLapis is written in pure Perl 5 and requires nothing but a standard + Perl\footnote{\href{http://www.cpan.org/ports/}{http://www.cpan.org/ports/}} +interpreter. It has it's own + little XML parser built in. Of course in order for it to be useful you'll + need at least \LaTeX{} and almost certainly an XSLT processor as well. It was + written entirely without reference + to the \TeX MLatte code, which I have never even seen, so there shouldn't + be any copyright entanglements. I cannot guarantee that it will produce + results + identical to \TeX MLatte, but it has worked well enough for my purposes and + seems to comply with available specs and examples.\par{} +\section{How to get it} +This page documents texmlapis-1.1.tar.gz\footnote{\href{http://bluweb.com/chouser/proj/texmlapis/texmlapis-1.1.tar.gz}{http://bluweb.com/chouser/proj/texmlapis/texmlapis-1.1.tar.gz}}, + but you can always find the latest version at \TeX MLapis\footnote{\href{http://bluweb.com/chouser/proj/texmlapis}{http://bluweb.com/chouser/proj/texmlapis}}.\par{} +\end{document} diff --git a/tests/data/texmlapis.xml b/tests/data/texmlapis.xml new file mode 100644 index 0000000..a48dc80 --- /dev/null +++ b/tests/data/texmlapis.xml @@ -0,0 +1,89 @@ + + + + onecolumn + + article + + + dvipdfm,colorlinks + hyperref + + + booktabs + + + + MLapis + + Chris Houser + chouser@bluweb.com + + + + What is + MLapis? + + + MLapis translates + ML documents into . + + What good is + ML? + + http://www.latex-project.org/http://www.latex-project.org/ is very good at a + number of very tricky things. These include formatting mathematical + formulae, laying out out books and articles, typesetting text and tables in + a pleasing and consistant manner, etc. However, XML is good at a number of + things is not so good at, such as being easily parsed and + translated into a variety of output formats. + + Unfortunately, the standard XML transformation system XSLhttp://www.w3.org/Style/XSL/http://www.w3.org/Style/XSL/ is not powerful enough to + translate from normal XML formats to directly. So when you use XML + to edit, store, and distribute your source documents, + ML provides the + bridge you need to leverage the power of when formatting your + document for the printed page. + + The DTD and other documentation about + MLhttp://www.alphaworks.ibm.com/formula/texmlhttp://www.alphaworks.ibm.com/formula/texml is available + from IBM + alphaWorkshttp://www.alphaworks.ibm.com/formula/texmlhttp://www.alphaworks.ibm.com/formula/texml. My interpretation of their software license does not allow + me to redistribute those materials here. + + + MLapis vs. + MLatte + + There is already a + ML-to- translator called + MLattehttp://www.alphaworks.ibm.com/formula/texmlhttp://www.alphaworks.ibm.com/formula/texml, but I + was completely unable to get it to work. It's written in Javahttp://java.sun.com/http://java.sun.com/ and the perhaps the runtime engines I + have around are drastically sub-standard or something, but for whatever + reason I could not get their tool to run. Also, the software license for + + MLatte is rather less community-oriented than the GPL, so I thought a + new implementation was in order. + + + MLapis is written in pure Perl 5 and requires nothing but a standard + Perlhttp://www.cpan.org/ports/http://www.cpan.org/ports/ interpreter. It has it's own + little XML parser built in. Of course in order for it to be useful you'll + need at least and almost certainly an XSLT processor as well. It was + written entirely without reference + to the + MLatte code, which I have never even seen, so there shouldn't + be any copyright entanglements. I cannot guarantee that it will produce + results + identical to + MLatte, but it has worked well enough for my purposes and + seems to comply with available specs and examples. + + How to get it + + This page documents texmlapis-1.1.tar.gzhttp://bluweb.com/chouser/proj/texmlapis/texmlapis-1.1.tar.gzhttp://bluweb.com/chouser/proj/texmlapis/texmlapis-1.1.tar.gz, + but you can always find the latest version at + MLapishttp://bluweb.com/chouser/proj/texmlapishttp://bluweb.com/chouser/proj/texmlapis. + + + diff --git a/tests/data/texmlapis_ns.out b/tests/data/texmlapis_ns.out new file mode 100644 index 0000000..67dffec --- /dev/null +++ b/tests/data/texmlapis_ns.out @@ -0,0 +1,51 @@ +\documentclass[onecolumn ]{article} +\usepackage[dvipdfm,colorlinks]{hyperref} +\usepackage{booktabs} +\begin{document} +\title{\TeX MLapis} +\author{ Chris Houser\\ chouser@bluweb.com } +\maketitle{} +\section{What is \TeX MLapis?} +\TeX MLapis translates \TeX ML documents into \TeX{}.\par{} +\section{What good is \TeX ML?} +\LaTeX \footnote{\href{http://www.latex-project.org/}{http://www.latex-project.org/}} +is very good at a + number of very tricky things. These include formatting mathematical + formulae, laying out out books and articles, typesetting text and tables in + a pleasing and consistant manner, etc. However, XML is good at a number of + things \LaTeX{} is {\em{}not} so good at, such as being easily parsed and + translated into a variety of output formats.\par{} +Unfortunately, the standard XML transformation system XSL\footnote{\href{http://www.w3.org/Style/XSL/}{http://www.w3.org/Style/XSL/}} +is not powerful enough to + translate from normal XML formats to \LaTeX{} directly. So when you use XML + to edit, store, and distribute your source documents, \TeX ML provides the + bridge you need to leverage the power of \LaTeX{} when formatting your + document for the printed page.\par{} +The DTD and other documentation about \TeX ML\footnote{\href{http://www.alphaworks.ibm.com/formula/texml}{http://www.alphaworks.ibm.com/formula/texml}} +is available + from IBM + alphaWorks\footnote{\href{http://www.alphaworks.ibm.com/formula/texml}{http://www.alphaworks.ibm.com/formula/texml}}. My interpretation of their software license does not allow + me to redistribute those materials here.\par{} +\section{\TeX MLapis vs. \TeX MLatte} +There is already a \TeX ML-to-\TeX{} translator called \TeX MLatte\footnote{\href{http://www.alphaworks.ibm.com/formula/texml}{http://www.alphaworks.ibm.com/formula/texml}}, but I + was completely unable to get it to work. It's written in Java\footnote{\href{http://java.sun.com/}{http://java.sun.com/}} +and the perhaps the runtime engines I + have around are drastically sub-standard or something, but for whatever + reason I could not get their tool to run. Also, the software license for +\TeX MLatte is rather less community-oriented than the GPL, so I thought a + new implementation was in order.\par{} +\TeX MLapis is written in pure Perl 5 and requires nothing but a standard + Perl\footnote{\href{http://www.cpan.org/ports/}{http://www.cpan.org/ports/}} +interpreter. It has it's own + little XML parser built in. Of course in order for it to be useful you'll + need at least \LaTeX{} and almost certainly an XSLT processor as well. It was + written entirely without reference + to the \TeX MLatte code, which I have never even seen, so there shouldn't + be any copyright entanglements. I cannot guarantee that it will produce + results + identical to \TeX MLatte, but it has worked well enough for my purposes and + seems to comply with available specs and examples.\par{} +\section{How to get it} +This page documents texmlapis-1.1.tar.gz\footnote{\href{http://bluweb.com/chouser/proj/texmlapis/texmlapis-1.1.tar.gz}{http://bluweb.com/chouser/proj/texmlapis/texmlapis-1.1.tar.gz}}, + but you can always find the latest version at \TeX MLapis\footnote{\href{http://bluweb.com/chouser/proj/texmlapis}{http://bluweb.com/chouser/proj/texmlapis}}.\par{} +\end{document} diff --git a/tests/data/texmlapis_ns.xml b/tests/data/texmlapis_ns.xml new file mode 100644 index 0000000..9b01c62 --- /dev/null +++ b/tests/data/texmlapis_ns.xml @@ -0,0 +1,89 @@ + + + + onecolumn + + article + + + dvipdfm,colorlinks + hyperref + + + booktabs + + + + MLapis + + Chris Houser + chouser@bluweb.com + + + + What is + MLapis? + + + MLapis translates + ML documents into . + + What good is + ML? + + http://www.latex-project.org/http://www.latex-project.org/ is very good at a + number of very tricky things. These include formatting mathematical + formulae, laying out out books and articles, typesetting text and tables in + a pleasing and consistant manner, etc. However, XML is good at a number of + things is not so good at, such as being easily parsed and + translated into a variety of output formats. + + Unfortunately, the standard XML transformation system XSLhttp://www.w3.org/Style/XSL/http://www.w3.org/Style/XSL/ is not powerful enough to + translate from normal XML formats to directly. So when you use XML + to edit, store, and distribute your source documents, + ML provides the + bridge you need to leverage the power of when formatting your + document for the printed page. + + The DTD and other documentation about + MLhttp://www.alphaworks.ibm.com/formula/texmlhttp://www.alphaworks.ibm.com/formula/texml is available + from IBM + alphaWorkshttp://www.alphaworks.ibm.com/formula/texmlhttp://www.alphaworks.ibm.com/formula/texml. My interpretation of their software license does not allow + me to redistribute those materials here. + + + MLapis vs. + MLatte + + There is already a + ML-to- translator called + MLattehttp://www.alphaworks.ibm.com/formula/texmlhttp://www.alphaworks.ibm.com/formula/texml, but I + was completely unable to get it to work. It's written in Javahttp://java.sun.com/http://java.sun.com/ and the perhaps the runtime engines I + have around are drastically sub-standard or something, but for whatever + reason I could not get their tool to run. Also, the software license for + + MLatte is rather less community-oriented than the GPL, so I thought a + new implementation was in order. + + + MLapis is written in pure Perl 5 and requires nothing but a standard + Perlhttp://www.cpan.org/ports/http://www.cpan.org/ports/ interpreter. It has it's own + little XML parser built in. Of course in order for it to be useful you'll + need at least and almost certainly an XSLT processor as well. It was + written entirely without reference + to the + MLatte code, which I have never even seen, so there shouldn't + be any copyright entanglements. I cannot guarantee that it will produce + results + identical to + MLatte, but it has worked well enough for my purposes and + seems to comply with available specs and examples. + + How to get it + + This page documents texmlapis-1.1.tar.gzhttp://bluweb.com/chouser/proj/texmlapis/texmlapis-1.1.tar.gzhttp://bluweb.com/chouser/proj/texmlapis/texmlapis-1.1.tar.gz, + but you can always find the latest version at + MLapishttp://bluweb.com/chouser/proj/texmlapishttp://bluweb.com/chouser/proj/texmlapis. + + + diff --git a/tests/data/texmlatte.out b/tests/data/texmlatte.out new file mode 100644 index 0000000..2634970 --- /dev/null +++ b/tests/data/texmlatte.out @@ -0,0 +1,31 @@ +\documentclass{article} +\title{Edward Weston} +\begin{document} +\maketitle{} +\section*{Some biographical information} +Edward Weston + was born in + 1886. + Weston + lived until + 1958. \par{} +Weston was a photographer who pioneered the modern use of photography + as an art form in the United States. +\section*{Some short quotes from Weston} +\begin{enumerate} +\item{} ``My own eyes are no more than scouts on a preliminary search, + for the camera's eye may entirely change my idea.'' \item{} ``Ultimately success of failure in photographing people depends + on the photographer's ability to understand his fellow man.'' +\end{enumerate} +\section*{A longer quote} +\begin{quote} +``One does not think during creative work, any more than one thinks + when driving a car. But one has a background of years - learning, + unlearning, success, failure, dreaming, thinking, experience, all + this - then the moment of creation, the focusing of all into the + moment. So I can make 'without thought,' fifteen carefully + considered negatives, one every fifteen minutes, given material + with as many possibilities. But there is all the eyes have seen in + this life to influence me.'' +\end{quote} +\end{document} diff --git a/tests/data/texmlatte.xml b/tests/data/texmlatte.xml new file mode 100644 index 0000000..278ff63 --- /dev/null +++ b/tests/data/texmlatte.xml @@ -0,0 +1,47 @@ + + + article + + + Edward Weston + + + + + Some biographical information + + Edward Weston + was born in + 1886. + Weston + lived until + 1958. + + Weston was a photographer who pioneered the modern use of photography + as an art form in the United States. + + Some short quotes from Weston + + + + ``My own eyes are no more than scouts on a preliminary search, + for the camera's eye may entirely change my idea.'' + + ``Ultimately success of failure in photographing people depends + on the photographer's ability to understand his fellow man.'' + + + A longer quote + + + ``One does not think during creative work, any more than one thinks + when driving a car. But one has a background of years - learning, + unlearning, success, failure, dreaming, thinking, experience, all + this - then the moment of creation, the focusing of all into the + moment. So I can make 'without thought,' fifteen carefully + considered negatives, one every fifteen minutes, given material + with as many possibilities. But there is all the eyes have seen in + this life to influence me.'' + + + diff --git a/tests/data/texmlatte_ns.out b/tests/data/texmlatte_ns.out new file mode 100644 index 0000000..2634970 --- /dev/null +++ b/tests/data/texmlatte_ns.out @@ -0,0 +1,31 @@ +\documentclass{article} +\title{Edward Weston} +\begin{document} +\maketitle{} +\section*{Some biographical information} +Edward Weston + was born in + 1886. + Weston + lived until + 1958. \par{} +Weston was a photographer who pioneered the modern use of photography + as an art form in the United States. +\section*{Some short quotes from Weston} +\begin{enumerate} +\item{} ``My own eyes are no more than scouts on a preliminary search, + for the camera's eye may entirely change my idea.'' \item{} ``Ultimately success of failure in photographing people depends + on the photographer's ability to understand his fellow man.'' +\end{enumerate} +\section*{A longer quote} +\begin{quote} +``One does not think during creative work, any more than one thinks + when driving a car. But one has a background of years - learning, + unlearning, success, failure, dreaming, thinking, experience, all + this - then the moment of creation, the focusing of all into the + moment. So I can make 'without thought,' fifteen carefully + considered negatives, one every fifteen minutes, given material + with as many possibilities. But there is all the eyes have seen in + this life to influence me.'' +\end{quote} +\end{document} diff --git a/tests/data/texmlatte_ns.xml b/tests/data/texmlatte_ns.xml new file mode 100644 index 0000000..1556f17 --- /dev/null +++ b/tests/data/texmlatte_ns.xml @@ -0,0 +1,47 @@ + + + article + + + Edward Weston + + + + + Some biographical information + + Edward Weston + was born in + 1886. + Weston + lived until + 1958. + + Weston was a photographer who pioneered the modern use of photography + as an art form in the United States. + + Some short quotes from Weston + + + + ``My own eyes are no more than scouts on a preliminary search, + for the camera's eye may entirely change my idea.'' + + ``Ultimately success of failure in photographing people depends + on the photographer's ability to understand his fellow man.'' + + + A longer quote + + + ``One does not think during creative work, any more than one thinks + when driving a car. But one has a background of years - learning, + unlearning, success, failure, dreaming, thinking, experience, all + this - then the moment of creation, the focusing of all into the + moment. So I can make 'without thought,' fifteen carefully + considered negatives, one every fifteen minutes, given material + with as many possibilities. But there is all the eyes have seen in + this life to influence me.'' + + + diff --git a/tests/data/thesis_basic.out b/tests/data/thesis_basic.out new file mode 100644 index 0000000..99eb149 --- /dev/null +++ b/tests/data/thesis_basic.out @@ -0,0 +1,4 @@ +\documentclass[a4paper]{minimal} +\begin{document} +Eto~\textemdash{} primer. +\end{document} diff --git a/tests/data/thesis_basic.xml b/tests/data/thesis_basic.xml new file mode 100644 index 0000000..c1437ed --- /dev/null +++ b/tests/data/thesis_basic.xml @@ -0,0 +1,9 @@ + + + a4paper + minimal + + + Eto — primer. + + diff --git a/tests/data/thesis_small.out b/tests/data/thesis_small.out new file mode 100644 index 0000000..eec3070 --- /dev/null +++ b/tests/data/thesis_small.out @@ -0,0 +1 @@ +{\it \textbackslash{}example} diff --git a/tests/data/thesis_small.xml b/tests/data/thesis_small.xml new file mode 100644 index 0000000..d311200 --- /dev/null +++ b/tests/data/thesis_small.xml @@ -0,0 +1 @@ +\example diff --git a/tests/data/tour_better.out b/tests/data/tour_better.out new file mode 100644 index 0000000..48b080c --- /dev/null +++ b/tests/data/tour_better.out @@ -0,0 +1,5 @@ +\documentclass[a4paper]{article} +.... +\begin{document} +Hello, {\it World}! +\end{document} diff --git a/tests/data/tour_better.xml b/tests/data/tour_better.xml new file mode 100644 index 0000000..ca7ac7d --- /dev/null +++ b/tests/data/tour_better.xml @@ -0,0 +1,10 @@ + + + a4paper + article + + .... + + Hello, World! + + diff --git a/tests/data/tour_harder.out b/tests/data/tour_harder.out new file mode 100644 index 0000000..4309f68 --- /dev/null +++ b/tests/data/tour_harder.out @@ -0,0 +1,4 @@ +\documentclass[a4paper]{article} .... +\begin{document} +Hello, {\it{}World}! +\end{document} diff --git a/tests/data/tour_harder.xml b/tests/data/tour_harder.xml new file mode 100644 index 0000000..395a799 --- /dev/null +++ b/tests/data/tour_harder.xml @@ -0,0 +1,10 @@ + + + a4paper + article + + .... + + Hello, World! + + diff --git a/tests/data/tour_pdfok.out b/tests/data/tour_pdfok.out new file mode 100644 index 0000000..ccc5d08 --- /dev/null +++ b/tests/data/tour_pdfok.out @@ -0,0 +1,8 @@ +\documentclass{article} +\usepackage[T2A]{fontenc} +\usepackage[koi8-r]{inputenc} +\usepackage[unicode]{hyperref} +\begin{document} +\section[ \texorpdfstring{úÁÇÏÌÏ×ÏË (Title)}{\004\027\004\060\004\063\004\076\004\073\004\076\004\062\004\076\004\072\000\040\000\050\000\124\000\151\000\164\000\154\000\145\000\051} +]{úÁÇÏÌÏ×ÏË (Title)} ôÅËÓÔ (Text) +\end{document} diff --git a/tests/data/tour_pdfok.xml b/tests/data/tour_pdfok.xml new file mode 100644 index 0000000..83d5bd4 --- /dev/null +++ b/tests/data/tour_pdfok.xml @@ -0,0 +1,20 @@ + + +\documentclass{article} +\usepackage[T2A]{fontenc} +\usepackage[koi8-r]{inputenc} +\usepackage[unicode]{hyperref} + + + + + + Заголовок (Title) + Заголовок (Title) + + + Заголовок (Title) + + Текст (Text) + + diff --git a/tests/data/tour_simple.out b/tests/data/tour_simple.out new file mode 100644 index 0000000..baad6ad --- /dev/null +++ b/tests/data/tour_simple.out @@ -0,0 +1,7 @@ +\documentclass[a4paper]{article} +\usepackage[latin1]{inputenc} +\usepackage[T1]{fontenc} +\begin{document} +I'm not afraid of the symbols +\textdollar{}, \^{}, \textgreater{} and others. +\end{document} diff --git a/tests/data/tour_simple.xml b/tests/data/tour_simple.xml new file mode 100644 index 0000000..397dc60 --- /dev/null +++ b/tests/data/tour_simple.xml @@ -0,0 +1,11 @@ + + +\documentclass[a4paper]{article} +\usepackage[latin1]{inputenc} +\usepackage[T1]{fontenc} + + +I'm not afraid of the symbols +$, ^, > and others. + + diff --git a/tests/data/v101.out b/tests/data/v101.out new file mode 100644 index 0000000..4b25279 --- /dev/null +++ b/tests/data/v101.out @@ -0,0 +1,3 @@ +\section{Milton's { \it{} Paradise Lost } } +\begin{tabular}[t]{r|c|l} ... table goes here ... +\end{tabular} diff --git a/tests/data/v101.xml b/tests/data/v101.xml new file mode 100644 index 0000000..4afe2ea --- /dev/null +++ b/tests/data/v101.xml @@ -0,0 +1,15 @@ + + + Milton's + + + Paradise Lost + + + + + t + rcl + ... table goes here ... + + diff --git a/tests/data/v101_ns.out b/tests/data/v101_ns.out new file mode 100644 index 0000000..4b25279 --- /dev/null +++ b/tests/data/v101_ns.out @@ -0,0 +1,3 @@ +\section{Milton's { \it{} Paradise Lost } } +\begin{tabular}[t]{r|c|l} ... table goes here ... +\end{tabular} diff --git a/tests/data/v101_ns.xml b/tests/data/v101_ns.xml new file mode 100644 index 0000000..bc19cd4 --- /dev/null +++ b/tests/data/v101_ns.xml @@ -0,0 +1,15 @@ + + + Milton's + + + Paradise Lost + + + + + t + rcl + ... table goes here ... + + diff --git a/tests/data/v109.out b/tests/data/v109.out new file mode 100644 index 0000000..60b1d3d --- /dev/null +++ b/tests/data/v109.out @@ -0,0 +1,18 @@ +\begin{foo}[options]{parameters} +text... +\end{foo} + + +x + +x + + +\setlength{\parindent }{0pt} +\parindent =0pt + + +\foo{ +\begin{bar} +\end{bar} +} diff --git a/tests/data/v109.xml b/tests/data/v109.xml new file mode 100644 index 0000000..0eb95b0 --- /dev/null +++ b/tests/data/v109.xml @@ -0,0 +1,56 @@ + + + + + + options + parameters + text... + + + + + +xx + + + + + + + + 0pt + +=0pt + + + + + + + + + + + + diff --git a/tests/data/v109_ns.out b/tests/data/v109_ns.out new file mode 100644 index 0000000..60b1d3d --- /dev/null +++ b/tests/data/v109_ns.out @@ -0,0 +1,18 @@ +\begin{foo}[options]{parameters} +text... +\end{foo} + + +x + +x + + +\setlength{\parindent }{0pt} +\parindent =0pt + + +\foo{ +\begin{bar} +\end{bar} +} diff --git a/tests/data/v109_ns.xml b/tests/data/v109_ns.xml new file mode 100644 index 0000000..f0e91c7 --- /dev/null +++ b/tests/data/v109_ns.xml @@ -0,0 +1,56 @@ + + + + + + options + parameters + text... + + + + + +xx + + + + + + + + 0pt + +=0pt + + + + + + + + + + + + diff --git a/tests/data/wselim1.out b/tests/data/wselim1.out new file mode 100644 index 0000000..4eee20a --- /dev/null +++ b/tests/data/wselim1.out @@ -0,0 +1,5 @@ +TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! +TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! +TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! +TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! +TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! diff --git a/tests/data/wselim1.xml b/tests/data/wselim1.xml new file mode 100644 index 0000000..a849804 --- /dev/null +++ b/tests/data/wselim1.xml @@ -0,0 +1,42 @@ + + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + diff --git a/tests/data/wselim1_ns.out b/tests/data/wselim1_ns.out new file mode 100644 index 0000000..4eee20a --- /dev/null +++ b/tests/data/wselim1_ns.out @@ -0,0 +1,5 @@ +TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! +TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! +TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! +TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! +TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! diff --git a/tests/data/wselim1_ns.xml b/tests/data/wselim1_ns.xml new file mode 100644 index 0000000..f5eba56 --- /dev/null +++ b/tests/data/wselim1_ns.xml @@ -0,0 +1,42 @@ + + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + diff --git a/tests/data/wselim2.out b/tests/data/wselim2.out new file mode 100644 index 0000000..55cdd37 --- /dev/null +++ b/tests/data/wselim2.out @@ -0,0 +1,4 @@ +TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! +TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! +TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! +TeST ! diff --git a/tests/data/wselim2.xml b/tests/data/wselim2.xml new file mode 100644 index 0000000..a849804 --- /dev/null +++ b/tests/data/wselim2.xml @@ -0,0 +1,42 @@ + + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + diff --git a/tests/data/wselim2_ns.out b/tests/data/wselim2_ns.out new file mode 100644 index 0000000..55cdd37 --- /dev/null +++ b/tests/data/wselim2_ns.out @@ -0,0 +1,4 @@ +TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! +TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! +TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! TeST ! +TeST ! diff --git a/tests/data/wselim2_ns.xml b/tests/data/wselim2_ns.xml new file mode 100644 index 0000000..f5eba56 --- /dev/null +++ b/tests/data/wselim2_ns.xml @@ -0,0 +1,42 @@ + + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + TeST ! + diff --git a/tests/data/wspi.out b/tests/data/wspi.out new file mode 100644 index 0000000..c6a016e --- /dev/null +++ b/tests/data/wspi.out @@ -0,0 +1 @@ +aaa bbb diff --git a/tests/data/wspi.xml b/tests/data/wspi.xml new file mode 100644 index 0000000..d2878d1 --- /dev/null +++ b/tests/data/wspi.xml @@ -0,0 +1,5 @@ + + aaa + + bbb + diff --git a/tests/data/wspi_ns.out b/tests/data/wspi_ns.out new file mode 100644 index 0000000..c6a016e --- /dev/null +++ b/tests/data/wspi_ns.out @@ -0,0 +1 @@ +aaa bbb diff --git a/tests/data/wspi_ns.xml b/tests/data/wspi_ns.xml new file mode 100644 index 0000000..64dd308 --- /dev/null +++ b/tests/data/wspi_ns.xml @@ -0,0 +1,5 @@ + + aaa + + bbb + diff --git a/tests/data/wsstack.out b/tests/data/wsstack.out new file mode 100644 index 0000000..56499c0 --- /dev/null +++ b/tests/data/wsstack.out @@ -0,0 +1,11 @@ +[spaces eliminated] + [ws around] + % + [more ws around] + % + [ws still around] + [and now no ws] [again ws] + % + % + % + % diff --git a/tests/data/wsstack.xml b/tests/data/wsstack.xml new file mode 100644 index 0000000..83191f1 --- /dev/null +++ b/tests/data/wsstack.xml @@ -0,0 +1,21 @@ + + + [spaces eliminated] + + + [ws around] + + [more ws around] + + [ws still around] + + [and now no ws] + [again ws] + + + + + + + + diff --git a/tests/data/wsstack_ns.out b/tests/data/wsstack_ns.out new file mode 100644 index 0000000..56499c0 --- /dev/null +++ b/tests/data/wsstack_ns.out @@ -0,0 +1,11 @@ +[spaces eliminated] + [ws around] + % + [more ws around] + % + [ws still around] + [and now no ws] [again ws] + % + % + % + % diff --git a/tests/data/wsstack_ns.xml b/tests/data/wsstack_ns.xml new file mode 100644 index 0000000..87f6d2f --- /dev/null +++ b/tests/data/wsstack_ns.xml @@ -0,0 +1,21 @@ + + + [spaces eliminated] + + + [ws around] + + [more ws around] + + [ws still around] + + [and now no ws] + [again ws] + + + + + + + + diff --git a/tests/data/wstrivia.out b/tests/data/wstrivia.out new file mode 100644 index 0000000..a0fc866 --- /dev/null +++ b/tests/data/wstrivia.out @@ -0,0 +1 @@ +NO SPACES diff --git a/tests/data/wstrivia.xml b/tests/data/wstrivia.xml new file mode 100644 index 0000000..0894a79 --- /dev/null +++ b/tests/data/wstrivia.xml @@ -0,0 +1,8 @@ + + + + NO SPACES + + + + diff --git a/tests/data/wstrivia_ns.out b/tests/data/wstrivia_ns.out new file mode 100644 index 0000000..a0fc866 --- /dev/null +++ b/tests/data/wstrivia_ns.out @@ -0,0 +1 @@ +NO SPACES diff --git a/tests/data/wstrivia_ns.xml b/tests/data/wstrivia_ns.xml new file mode 100644 index 0000000..3259592 --- /dev/null +++ b/tests/data/wstrivia_ns.xml @@ -0,0 +1,8 @@ + + + + NO SPACES + + + + diff --git a/tests/faildata/badesc.grep b/tests/faildata/badesc.grep new file mode 100644 index 0000000..1b10b01 --- /dev/null +++ b/tests/faildata/badesc.grep @@ -0,0 +1,2 @@ +Invalid XML 0, 1: +Value of boolean attribute 'escape' is not '0' or '1', but 'x0' diff --git a/tests/faildata/badesc.xml b/tests/faildata/badesc.xml new file mode 100644 index 0000000..c728025 --- /dev/null +++ b/tests/faildata/badesc.xml @@ -0,0 +1 @@ + diff --git a/tests/faildata/badlig.grep b/tests/faildata/badlig.grep new file mode 100644 index 0000000..6b09a7b --- /dev/null +++ b/tests/faildata/badlig.grep @@ -0,0 +1,2 @@ +Invalid XML 0, 1: +Value of boolean attribute 'ligatures' is not '0' or '1', but 'true' diff --git a/tests/faildata/badlig.xml b/tests/faildata/badlig.xml new file mode 100644 index 0000000..364bdf8 --- /dev/null +++ b/tests/faildata/badlig.xml @@ -0,0 +1 @@ + diff --git a/tests/faildata/badns.grep b/tests/faildata/badns.grep new file mode 100644 index 0000000..ad3265b --- /dev/null +++ b/tests/faildata/badns.grep @@ -0,0 +1 @@ +Element "TeXML" for namespace "http://getfo.sourceforge.net/texml/ns1--" not expected diff --git a/tests/faildata/badns.xml b/tests/faildata/badns.xml new file mode 100644 index 0000000..927b5d6 --- /dev/null +++ b/tests/faildata/badns.xml @@ -0,0 +1,3 @@ + + + diff --git a/tests/faildata/badtyline.grep b/tests/faildata/badtyline.grep new file mode 100644 index 0000000..f339ecb --- /dev/null +++ b/tests/faildata/badtyline.grep @@ -0,0 +1,2 @@ +Invalid XML 1, 4: +Value of boolean attribute 'emptylines' is not '0' or '1', but '' diff --git a/tests/faildata/badtyline.xml b/tests/faildata/badtyline.xml new file mode 100644 index 0000000..ddc8a53 --- /dev/null +++ b/tests/faildata/badtyline.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/tests/faildata/badxml.grep b/tests/faildata/badxml.grep new file mode 100644 index 0000000..efee7e7 --- /dev/null +++ b/tests/faildata/badxml.grep @@ -0,0 +1 @@ +not well\-formed diff --git a/tests/faildata/badxml.xml b/tests/faildata/badxml.xml new file mode 100644 index 0000000..2a8bd7e --- /dev/null +++ b/tests/faildata/badxml.xml @@ -0,0 +1 @@ +&aa diff --git a/tests/faildata/cmdname.grep b/tests/faildata/cmdname.grep new file mode 100644 index 0000000..2737695 --- /dev/null +++ b/tests/faildata/cmdname.grep @@ -0,0 +1,2 @@ +Invalid XML 7, 1: +Attribute cmd/@name is empty diff --git a/tests/faildata/cmdname.xml b/tests/faildata/cmdname.xml new file mode 100644 index 0000000..e9d8af2 --- /dev/null +++ b/tests/faildata/cmdname.xml @@ -0,0 +1 @@ + diff --git a/tests/faildata/ctrlch.grep b/tests/faildata/ctrlch.grep new file mode 100644 index 0000000..3799dee --- /dev/null +++ b/tests/faildata/ctrlch.grep @@ -0,0 +1,2 @@ +Invalid XML 7, 1: +Attribute ctrl/@ch is not a char: '' diff --git a/tests/faildata/ctrlch.xml b/tests/faildata/ctrlch.xml new file mode 100644 index 0000000..4f1952f --- /dev/null +++ b/tests/faildata/ctrlch.xml @@ -0,0 +1 @@ + diff --git a/tests/faildata/ctrlch2.grep b/tests/faildata/ctrlch2.grep new file mode 100644 index 0000000..792400d --- /dev/null +++ b/tests/faildata/ctrlch2.grep @@ -0,0 +1,2 @@ +Invalid XML 7, 1: +Attribute ctrl/@ch is not a char: 'zx' diff --git a/tests/faildata/ctrlch2.xml b/tests/faildata/ctrlch2.xml new file mode 100644 index 0000000..d79bceb --- /dev/null +++ b/tests/faildata/ctrlch2.xml @@ -0,0 +1 @@ + diff --git a/tests/faildata/ctrlcont.grep b/tests/faildata/ctrlcont.grep new file mode 100644 index 0000000..2fe1bc1 --- /dev/null +++ b/tests/faildata/ctrlcont.grep @@ -0,0 +1,2 @@ +Invalid XML 21, 1 +Text content is not expected: ' ' diff --git a/tests/faildata/ctrlcont.xml b/tests/faildata/ctrlcont.xml new file mode 100644 index 0000000..73faf00 --- /dev/null +++ b/tests/faildata/ctrlcont.xml @@ -0,0 +1 @@ + diff --git a/tests/faildata/envnoname.grep b/tests/faildata/envnoname.grep new file mode 100644 index 0000000..6455915 --- /dev/null +++ b/tests/faildata/envnoname.grep @@ -0,0 +1,2 @@ +Invalid XML 1, 2 +Attribute env/@name is empty diff --git a/tests/faildata/envnoname.xml b/tests/faildata/envnoname.xml new file mode 100644 index 0000000..c70ba3c --- /dev/null +++ b/tests/faildata/envnoname.xml @@ -0,0 +1,3 @@ + + env + diff --git a/tests/faildata/errmode.grep b/tests/faildata/errmode.grep new file mode 100644 index 0000000..9537114 --- /dev/null +++ b/tests/faildata/errmode.grep @@ -0,0 +1,2 @@ +Invalid XML 0, 1: +Unknown value of TeXML/@mode attribute: 'tex' diff --git a/tests/faildata/errmode.xml b/tests/faildata/errmode.xml new file mode 100644 index 0000000..7e26135 --- /dev/null +++ b/tests/faildata/errmode.xml @@ -0,0 +1 @@ + diff --git a/tests/faildata/errmode2.grep b/tests/faildata/errmode2.grep new file mode 100644 index 0000000..1e9fac0 --- /dev/null +++ b/tests/faildata/errmode2.grep @@ -0,0 +1,2 @@ +Invalid XML 0, 1: +Unknown value of TeXML/@mode attribute: '' diff --git a/tests/faildata/errmode2.xml b/tests/faildata/errmode2.xml new file mode 100644 index 0000000..8f5dbae --- /dev/null +++ b/tests/faildata/errmode2.xml @@ -0,0 +1 @@ + diff --git a/tests/faildata/math1.grep b/tests/faildata/math1.grep new file mode 100644 index 0000000..dbf850e --- /dev/null +++ b/tests/faildata/math1.grep @@ -0,0 +1,3 @@ +Invalid XML 14, 1: +dmath not expected + diff --git a/tests/faildata/math1.xml b/tests/faildata/math1.xml new file mode 100644 index 0000000..b223b87 --- /dev/null +++ b/tests/faildata/math1.xml @@ -0,0 +1 @@ +aba diff --git a/tests/faildata/math2.grep b/tests/faildata/math2.grep new file mode 100644 index 0000000..9fd2781 --- /dev/null +++ b/tests/faildata/math2.grep @@ -0,0 +1,3 @@ +Invalid XML 14, 1: +math not expected$a + diff --git a/tests/faildata/math2.xml b/tests/faildata/math2.xml new file mode 100644 index 0000000..a29627c --- /dev/null +++ b/tests/faildata/math2.xml @@ -0,0 +1 @@ +aba diff --git a/tests/faildata/math3.grep b/tests/faildata/math3.grep new file mode 100644 index 0000000..09acd39 --- /dev/null +++ b/tests/faildata/math3.grep @@ -0,0 +1,3 @@ +Invalid XML 15, 1: +dmath not expected$$a + diff --git a/tests/faildata/math3.xml b/tests/faildata/math3.xml new file mode 100644 index 0000000..f727d00 --- /dev/null +++ b/tests/faildata/math3.xml @@ -0,0 +1 @@ +aba diff --git a/tests/faildata/math4.grep b/tests/faildata/math4.grep new file mode 100644 index 0000000..e8dd1cd --- /dev/null +++ b/tests/faildata/math4.grep @@ -0,0 +1,3 @@ +Invalid XML 15, 1: +math not expected$$a + diff --git a/tests/faildata/math4.xml b/tests/faildata/math4.xml new file mode 100644 index 0000000..9e02e37 --- /dev/null +++ b/tests/faildata/math4.xml @@ -0,0 +1 @@ +aba diff --git a/tests/faildata/misopt.grep b/tests/faildata/misopt.grep new file mode 100644 index 0000000..51579d2 --- /dev/null +++ b/tests/faildata/misopt.grep @@ -0,0 +1,3 @@ +Invalid XML 0, 2: +opt not expected\par[a] + diff --git a/tests/faildata/misopt.xml b/tests/faildata/misopt.xml new file mode 100644 index 0000000..9ede5c6 --- /dev/null +++ b/tests/faildata/misopt.xml @@ -0,0 +1,2 @@ +a +b diff --git a/tests/faildata/misparm.grep b/tests/faildata/misparm.grep new file mode 100644 index 0000000..49bb084 --- /dev/null +++ b/tests/faildata/misparm.grep @@ -0,0 +1,3 @@ +Invalid XML 0, 2: +parm not expected\par{a} + diff --git a/tests/faildata/misparm.xml b/tests/faildata/misparm.xml new file mode 100644 index 0000000..8219f6a --- /dev/null +++ b/tests/faildata/misparm.xml @@ -0,0 +1,2 @@ +a +b diff --git a/tests/faildata/optcont.grep b/tests/faildata/optcont.grep new file mode 100644 index 0000000..72364ed --- /dev/null +++ b/tests/faildata/optcont.grep @@ -0,0 +1,3 @@ +Invalid XML 9, 2: +opt not expected\par\[ab + diff --git a/tests/faildata/optcont.xml b/tests/faildata/optcont.xml new file mode 100644 index 0000000..7e65824 --- /dev/null +++ b/tests/faildata/optcont.xml @@ -0,0 +1,4 @@ + + aba + + diff --git a/tests/faildata/parmcont.grep b/tests/faildata/parmcont.grep new file mode 100644 index 0000000..a48cb13 --- /dev/null +++ b/tests/faildata/parmcont.grep @@ -0,0 +1,3 @@ +Invalid XML 10, 2: +parm not expected\par{ab + diff --git a/tests/faildata/parmcont.xml b/tests/faildata/parmcont.xml new file mode 100644 index 0000000..0c1cfc6 --- /dev/null +++ b/tests/faildata/parmcont.xml @@ -0,0 +1,3 @@ + + abzz + diff --git a/tests/faildata/pdfstring.grep b/tests/faildata/pdfstring.grep new file mode 100644 index 0000000..8012e25 --- /dev/null +++ b/tests/faildata/pdfstring.grep @@ -0,0 +1 @@ +texml: Invalid XML 10, 3: TeXML not expected \ No newline at end of file diff --git a/tests/faildata/pdfstring.xml b/tests/faildata/pdfstring.xml new file mode 100644 index 0000000..f6554be --- /dev/null +++ b/tests/faildata/pdfstring.xml @@ -0,0 +1,4 @@ + + + aaabbb + diff --git a/tests/faildata/spec1.grep b/tests/faildata/spec1.grep new file mode 100644 index 0000000..c3fad35 --- /dev/null +++ b/tests/faildata/spec1.grep @@ -0,0 +1,2 @@ +Invalid XML 7, 1: +Attribute spec/@cat unknown: '' diff --git a/tests/faildata/spec1.xml b/tests/faildata/spec1.xml new file mode 100644 index 0000000..c5f7f6a --- /dev/null +++ b/tests/faildata/spec1.xml @@ -0,0 +1 @@ + diff --git a/tests/faildata/spec2.grep b/tests/faildata/spec2.grep new file mode 100644 index 0000000..6598cf6 --- /dev/null +++ b/tests/faildata/spec2.grep @@ -0,0 +1,2 @@ +Invalid XML 7, 1: +Attribute spec/@cat unknown: 'zx' diff --git a/tests/faildata/spec2.xml b/tests/faildata/spec2.xml new file mode 100644 index 0000000..2379b9f --- /dev/null +++ b/tests/faildata/spec2.xml @@ -0,0 +1 @@ + diff --git a/tests/faildata/speccont.grep b/tests/faildata/speccont.grep new file mode 100644 index 0000000..5735226 --- /dev/null +++ b/tests/faildata/speccont.grep @@ -0,0 +1,2 @@ +Invalid XML 24, 1 +Text content is not expected: ' ' diff --git a/tests/faildata/speccont.xml b/tests/faildata/speccont.xml new file mode 100644 index 0000000..99c9130 --- /dev/null +++ b/tests/faildata/speccont.xml @@ -0,0 +1 @@ + diff --git a/tests/faildata/unkelem.grep b/tests/faildata/unkelem.grep new file mode 100644 index 0000000..deb7d7c --- /dev/null +++ b/tests/faildata/unkelem.grep @@ -0,0 +1,2 @@ +Invalid XML 7, 1: +teXML not expected diff --git a/tests/faildata/unkelem.xml b/tests/faildata/unkelem.xml new file mode 100644 index 0000000..6e29b70 --- /dev/null +++ b/tests/faildata/unkelem.xml @@ -0,0 +1 @@ + diff --git a/tests/readme b/tests/readme new file mode 100644 index 0000000..247124d --- /dev/null +++ b/tests/readme @@ -0,0 +1,80 @@ +TeXML tests + +Long examples are data/texmlatte.xml and data/texmlapis.xml. +An example from the quick start document is data/quick.xml. + +The ending "_ns" means that an example uses the TeXML namespace. + ++ empty no data, only the root element ++ hello text "Hello, World!" ++ normal escaping of special chars in tex mode ++ math escaping of special chars in math mode ++ mixed both normal and mixed mode ++ nopara output should not contain empty lines ++ koi8 conversion from unicode to koi8 encoding ++ koi8bad conversion from unicode to koi8 with out of range chars ++ latex out-of-encoding chars as latex commands ++ escape escaping and unescaping of specials ++ emptyline leaving and commenting-out of empty lines ++ ligatures leaving and breaking ligatures ++ cmd command ++ env environment ++ group group ++ mathgr math group ++ ctrl control symbols ++ spec special symbols ++ entity check that entities are expanded ++ cmdnest test nested commands (incorrect, but possible) ++ envenv nested environments ++ v101 test of changes from version 1.00 to version 1.01 ++ endline1 test of creation of a newline at the end of document ++ endline2 test of creation of a newline at the end of document ++ wstrivia simplest whitespace elimination ++ wselim1 whitespace elimination (default line length limit) ++ wselim2 whitespace elimination (line length limit is 100) ++ realspace check that we don't delete important whitespaces ++ wsstack nested specifications of whitespace handling ++ nlcmd a newline attribute of ++ nlenv newline attributes of ++ wspi tests whitespace handling near processing instruction ++ specandws a regression test for a space after a rewritten character ++ v109 test of changes from version 1.08 to version 1.09 ++ fordocs test of examples from documentation ++ texmlatte long example from the Douglas Lovell's paper on TeXMLatte ++ texmlapis long test from Chris Houser's TeXMLapis ++ quick example from the quick start document ++ context test of the conTeXt mode ++ chinese1 test of the option "--ascii". A complete Chinese example. ++ pdfstring creating utf16be strings for PDF. ++ aenc --encoding plus -a ++ tour_* examples from the TeXML tour ++ thesis_* examples from the thesis + +Tests that will fail: + ++ badxml unparsable XML ++ unkelem unknown element ++ errmode incorrect mode specification ++ errmode2 incorrect mode specification ++ cmdname no name for "cmd" ++ cmdcont "cmd" contains something other than "opt" or "parm" ++ misopt "opt" is not a child of "cmd" or "env" ++ optcont "opt" contains something other then "ctrl" or "spec" ++ misparm "parm" is not a child of "cmd" or "env" ++ parmcont "parm" contains something other then "ctrl" or "spec" ++ envnoname no name for "env" ++ math1 "dmath" inside "math" ++ math2 "math" inside "math" ++ math3 "dmath" inside "dmath" ++ math4 "math" inside "dmath" ++ ctrlch no "ch" attribute in "ctrl" ++ ctrlch2 length of value of "ch" is not 1 ++ spec1 "spec" without attribute "cat" ++ spec2 "spec" with unknown value of "cat" ++ ctrlcont "ctrl" element have content ++ speccont "spec" element have content ++ badesc value of TeXML/@escape is not 0 or 1 ++ badlig value of TeXML/@ligatures is not 0 or 1 ++ badtyline value of TeXML/@emptylines is not 0 or 1 ++ badns incorrect namespace ++ pdfstring an element inside "pdf"