pax_global_header00006660000000000000000000000064127404452720014521gustar00rootroot0000000000000052 comment=55519039c3e50954e62388b64e20604b3f091731 LaTeXML-0.8.2/000077500000000000000000000000001274044527200127365ustar00rootroot00000000000000LaTeXML-0.8.2/.gitignore000066400000000000000000000014551274044527200147330ustar00rootroot00000000000000# Ignore backup files *~ *.bak # Ignore perltidy files *.tdy # generated by running make MYMETA.json MYMETA.yml Makefile # And of course the whole compiled lib pm_to_blib blib/ # These are generated by creating manual.pdf doc/manual/manual.aux doc/manual/manual.idx doc/manual/manual.ilg doc/manual/manual.ind doc/manual/manual.lof doc/manual/manual.log doc/manual/manual.out doc/manual/manual.toc doc/manual/manual.xml doc/manual/pods/ # Generated files... doc/manual/release.tex doc/manual/schema.tex # The compiled manual, which is copied to top-level doc/manual/manual.pdf # These are generated by building the site doc/site/examples/tabular/tabular.aux doc/site/examples/tabular/tabular.log doc/site/examples/tabular/tabular.pdf doc/site/examples/tabular/tabular.xml doc/site/index.xml doc/site/releases.tex LaTeXML-0.8.2/.travis.yml000066400000000000000000000002421274044527200150450ustar00rootroot00000000000000language: perl perl: - "5.20" - "5.18" - "5.14" - "5.10" sudo: false addons: apt: packages: - libdb-dev - libxml2-dev - libxslt1-devLaTeXML-0.8.2/Changes000066400000000000000000001205201274044527200142310ustar00rootroot000000000000000.8.2 2016-07-10 - Numerous bug, robustness, fidelity fixes; - fixes to amsmath, amsthm, keyvals, listings, tikz/pgf, color, xcolor, supertabular packages; - fixes to bibliography, OpenMath, MathML, svg generation; - accomodate sizing of math, better position adjustments; - JATS/NLM format; - Colorized error logging; - New bindings: aas_macros.sty, algc.sty, algcompatible.sty, algmatlab.sty, algorithm.sty, algorithmic.sty, algorithmicx.sty, algpascal.sty, algpseudocode.sty, amsgen.sty, apjfonts.sty, attachfile.sty, authblk.sty, balance.sty, braket.sty, breakurl.sty, colordvi.sty, deluxtable.sty, emulateapj5.sty, esint.sty, fix-cm.sty, flafter.sty, grffile.sty, ifluatex.sty, import.sty, lmodern.sty, marvosym.sty, mathbbol.sty, mathtools.sty, nameref.sty, newlfont.sty, parskip.sty, pdfsync.sty, psfig.tex, pslatex.sty, rotate.sty, srcltx.sty, showkeys.sty, slashed.sty, soul.sty, subfig.sty, subfloat.sty, stmaryrd.sty, svg.sty, t1enc.sty, tabulary.sty, threeparttable.sty, transparent.sty, wasysym.sty. Thanks: Deyan Ginev, Kim Philipp Jablonski, Lukas Kohlhase, Michael Kohlhase, Viacheslav Zholudev; And angerhang, Stefan Becuwe, Stephane Binarez, casio7131, Howard Cohl, Joe Cornelli, Boyd Duffee, Giovanni, goska, Bernhard Kleine, neos21, Grant Petty, Bob Plantz, Paolo Prandoni, Tim Prescott, Matteo Seclì, M. Senthilkumar, Moritz Schubotz, Raniere Silva, Cooper Stevenson, Tom Tczyczko, Scott Walter, Frederic Wang, Simon Winter, Tom Wiesing, 0.8.1 2015-02-17 - Generate "span soup" for inline blocks, when otherwise would produce invalid HTML5. - Can use svg as math ouput format. - listings from the listings package provides link to downloadable raw data - implemented low-level TeX input/ouptut primitives - more consistent handling of math spacing, delimiter sizes, equation positioning and alignment; improved linebreaking layout - parallel math markup w/cross-referencing - math grammar enhancements - language support (xml:lang & (slightly) internationalized number recognition) - font size handling more consistent with CSS - New fallback for unknown classes "OmniBus.cls" mimics common frontmatter markup. - improved package option handling - improved documentation - improved portability (Windows, Perl versions) - various other bugs & fidelity improvements - New bindings: a0poster.cls, a0size.sty, braket.sty, crop.sty, epsf.tex, ellipsis.sty, fancyhdr.sty, floatpag.sty, ifthen.sty, lineno.sty, listingsutf8.sty, pgfplots.sty, relsize.sty, type1cm.sty, xargs.sty Thanks: Deyan Ginev, Michael Brade, Joe Cornelli, dpantele, Giovanni, Kim Phillip Jablonski, Bernhard Kleine, Lukas Kohlhase, Michael Kohlhase, Silviu Opreah, Antonio Sanchez, Moritz Schubotz, Rainere Silva, Frederic Wang & Others. 0.8.0 2014-05-05 - Too many changes to enumerate... - Generates HTML5, ePub - new Color objects allowing better & more accurate, and extensible color models; binding for the xcolor package. - RDFa support; Thanks Christoph Lange - consistent error reporting, in both conversion & post-processing that supports automated build systems; Thanks Deyan Ginev, Heinrich Stammerjohanns - uses dvipng (IF available) for converting tex code to images; MUCH faster than going via eps. HOWEVER, it wont handle embedded postscript, so we only use it for converting math to images. - Reorganize various non-perl data files into a (hopefully) more manageable arrangement, and with more consistent naming: lib/LaTeXML/resources contains various resources for running the program including * DTD, RelaxNG for holding various schema * XSLT, CSS, javascript for holding various styling & script resources - Mechanism for bindings to request resources (css, javascript) that will be included in generated output if appropriate (eg. if html) - more consistent naming schemes * for classes typically start ltx_, ltx_font_, ltx_role_ etc * LaTeXML.css for core.css * package specific css files: ltx-.css * special purpose css files: LaTeXML-.css - XSLT uses exclusively so same modules cope with both xhtml & html5; More easily extended and overridden by author customizations. 0.7.9xx 2012-08-01 - some slight efficiency improvements (reports Deyan Ginev, Joe Corneli) - fixed bug in Post reading from STDIN (thanks Josh Bialkowski) - various robustness - I/O reorganization, which includes * an extensible pseudo-protocol for sources of TeX and data, including file:, string: * Migration of control of I/O to functions defined in Package.pm InputFile, InputDefinitions, etc * Obsolete $GULLET->input, $GULLET->expandTokens * Tokens lists are now immutable (do NOT implement Mouth API) 0.7.9xx 2012-07-01 - more consistent handling of math spacing; treat \quad and wider as punctuation - better support for adding ID to all elements - parallel math markup will establish node-to-node cross-referencing Particularly pmml+cmml uses id & xref to connect related pmml & cmml nodes. - generate MathML mrow instead of mfenced. - experimentally, do NOT define non-control sequences as mathactive (in order to assign XMTok attributes), but store such properties separately. - Have MathBox store the XMTok properties of simple symbols; create Primitives for simple symbols, rather than Constructors. - switched comparison files from dvi to pdf; more portable 0.7.9xx 2012-06-02 - MathFork updates - use LaTeXML.catalog more consistently; define URN's for RelaxNG modules and XSLT modules - 0.7.9xx 2011-06-01 - various changes and small completions to LaTeX that help to process raw TeX style & definition files from the LaTeX distribution. - Support LaTeX's input encoding mechanism by finding, reading and implementing the encoding definitions - Support LaTeX's fontencoding mechanism and TeX's \char, etal, by implementing FontMap's that map input codepoints to unicode. Also read in font encoding definitions from the LaTeX distribution - Support babel by implementing core support and reading individual language definitions from the LaTeX distribution. 0.7.x 2011-03-16 - Bindings for floatfig, floatflt, JHEP,JHEP2,JHEP3 - improved model, attributes and conversion for floating objects - Have \caption increment the appropriate counter, rather than figure, table, etc This avoids many problems with subfigures, and so forth. 0.7.x 2011-02-28 - Bindings for llncs.cls, rsfs.sty, multicol.sty, enumerate.sty, xspace.sty, caption.sty, subfigure.sty, upgreek.sty - Initial support for AmSTeX (AmSTeX.pool) - Schema changes: new ltx:inline-para, fixed ltx:classification, positionable ltx:p, ltx:bib-data holds original bibentry - improved parallel markup - support for Unicode Plane 1 as alternative to mathvariant - various improved code, implenting \fracwithdelims, \DeclareMathAlphabet, \obeylines, \hypersetup, \centering, \raggedright, \raggedleft, \let, \rotatebox, \reflectbox, \scalebox, \qopname, \Sb, \Sp, \afterassignment, \sidecaption, \@vec, \minCDarrowwidth, \beginsection, \proclaim, \AtBeginDocument, \AtEndDocument, numbering, rules within tables - new Box() function - \iflatexml in latexml.sty namespaced attributes - improved table header heuristics - better handling, and distinguishing broup, begingroup - better ID handling; many elements get ID's, equations always do. - better MathML conversion, even when parsing fails. - support for --icon provides a favicon - more test cases (but not enough) - More careful distinction between ToString vs Stringify vs UnTeX Stringify is for debugging, ToString should return string form, NOT neccesarily for getting TeX many changes to definitions and usage of these. - Many constructors converted to Primitives to support turning accents or Unicode conversions directly to boxes, not requiring constructors; this allows them to be unambiguosly converted to Strings (using ToString) and thus can be put in attributes. - avoid introducing doubled slashes in pathnames, so that (eventually) might use the TeX standard interpretation that treats them as recursive wildcard. (that is, expandable directories) - INCOMPATIBLE: Localization; remove assumed names & symbols from formatting titles, sections, etc. Let style files determine prefixes or formatting of reference numbers. Put these within the ltx:title (eg.) and wrapped in ltx:tag. This is incompatible as different attributes are used, and ltx:tag is used to contain the reference number. - more flexible TOC creation, support for list-of-figures and similar. - Fuller support for seealso, heuristics to try to connect the terms to actual entries. - Safer encode/decode of objects being stored in the ObjectDB. 0.7.x 2009-06-19 (ref 983) - fixed typos in aa_support & sv - added wrapfig.sty, llncs.cls, rsfs.sty, multicol.sty, enumerate.sty, xspace.sty, caption.sty, subfigure.sty - initial implementation of AMSTeX (amstex.tex & amsppt.sty) - enabled better CSS styling via XSLT. Thanks Lee Worden 0.7.0 2009-06-16 (rev 964) - Release 0.7.0 0.6.x 2009-06-15 (rev 959) - mostly complete listings.sty - new classes sv, svmult - better compatibility-mode support - made indices case sensitive and fixed sorting order correspondingly - many small fixes throughout - improved manual - Thanks to Deyan Ginev, Michael Kohlhase, Lee Worden for reports/patches. 0.6.x 2009-05-07 (rev 899) - added various macros to existing packages. - new packages/classes: elsart, iopart, iopams, mn, mn2e - added less obnoxious Info message for things not as severe as Warning. - changes to centering, flush commands; get rid of centering element, try to use class and css for same effect. - fix typos in latexmlpost (Thanks Jason Blevins) - reduced load time, primarily for latexmlmath 0.6.x 2009-03-15 (rev. 824) - efficiency improvements - documentation and error message improvements - various minor fixes, extra macros, - heuristics to handle misused environments - support to "lock" macros from being inappropriately redefined within TeX documents - new packages: paralist, eurosym 0.6.x 2009-01-14 (rev. 740) Preparation for release 0.7.0 - New packages: revtex and revtex4 classes and styles (Thanks Deyan Ginev and Catalin David ) aas styles, amscd, lscape - latexml now processes BibTeX files - latexmlmath; new command for creating images or MathML for individual math expressions. - Improvements to MathGrammar for bra-ket notations, assignment, and other presentation markup like odd sub/superscripts - Improved option handling - More consistent math meaning "ontology" - Some documentation improvements - Rearranged Makefile & dependencies to port to Centos, MacOS - Many additional macros, robustness fixes - Clarified progress and error messages. 0.6.0 2008-04-09 (rev 485) Released. - Reorganized site and manual building. Unfortunately, the manual isn't as extensively rewritten as I'd like. - reorganized build & installation. Should be able to generate rpm's now. 0.5.x 2008-03-18 - Added implementation for supertabular and longtable (the latter isn't perfect; it produces empty rows after header/footers) - random minor fixes 0.5.x 2008-03-03 - Added support for class & package options with new exported functions in LaTeXML::Package (DeclareOption, PassOptions, ProcessOptions, ExecuteOptions). - Modular XSLT: individual XSLT files correspond to the Schema modules and are assembled into composite html and xhtml versions. - Option to latexmlpost to suppress section numbering. - new package ifpdf - more consistent date formatting - switch to using id in html instead of when it is absorbed, whether or not there's a \maketitle. => ... => ... inside of Similarly for This construct gives more flexibility for representing editors, translators, reviewers, etc, And also for various kinds of info about them (address, etc). 0.5.x 2006-07-24 - Fixed a sneaky bug in \def parameters, and gullet->readMatch where TeX collapses multiple spaces! Thanks Ioan! 0.5.x 2006-07-23 - Fixed the TeX font command to recognize more fonts. - Redefined sectioning commands to go via \@startsection, so more author customizations will still work. - added report & book classes. - Other random (minimal) packages: eulervm, yfonts, a4wide 0.5.x 2006-07-22 - Dealing with some font issues, and adding minimal implementations: fixltx2e, textcomp, exscale mathptmx, mathpazo, charter, utopia, chancery, helvet, avant, courier, bookman, newcent, times, palatino, mathptm, mathpple, latexsym, beton, euler, ccfonts, concmath, cmbright, luximono, txfonts, pxfonts, fourier, And a start at pifont... 0.5.x 2006-07-22 - Went through the TeX book and implemented bunches of Appendix B (plain) --- still not complete, but better. 0.5.x 2006-07-21 - Added implementation of amsthm; thanks Ioan Sucan. along with tests, implementation of LaTeX's newtheorem, and a few other tweaks to make it cleaner. 0.5.x 2006-07-17 - Revised handling of sub/superscripts: Abandoned the SUBSUPERSCRIPT combinination of sub+super generated by the parser; now sub and superscripts (including prescripts) are nested in the (seemingly) given order; ams's sideset is done similarly. This imho gives a more sensible semantic structure. The stackscripts attribute was renamed to scriptpos and generalized to track the position (pre, mid, post) and the bracket nesting level where the script was created. This allows the presentation mathml module to determine sensible nesting and positioning so that it can determine under/over vs sub/sup as well as subsuper combinations, and mprescripts according to the given tree. A few other enhancements were made to mathml generation, as well. - Added class attribute to and defined new (generic) block element with class attribute. These can serve as fallback elements for testing purposes. 0.5.x 2006-06-24 - With some trepidations... Converted math arrays to use XMArray/XMRow/XMCell so there's more sharing with tabular, and it can handle the lines, headings, etc. Instead of the more abstract XMApp/[role=ARRAY], etc. - Added a meaning attribute to math. The idea is: role : grammar or presentation info. name : a name for the token, probably from the cs, but not necessarily completely semantic. meaning: a hopefully semantic enough name for the token. This would be used for content conversions. - Recent runs show the Perl function bound as an XPath extension are very costly. Recoded the font match handling to avoid the perl function, using a set of contains calls. Vastly faster! 0.5.x 2006-06-16 - Fixed typos in DTD parsing Thanks Ioan Sucan - Reworked pathname_find to be a little clearer about seaching for files that come with the installation (but can be overridden by SEARCHPATHS). Added pathname_findall which finds all matching files, and used it so that all available catalogs are loaded, in particular any in the SEARCHPATHS. In the process noted a bug that if the environment variable XML_DEBUG_CATALOG is set, XML::LibXML bombs (seeking advice from mailing list). - Fix to \varintjlim (Ioan Sucan)_ 0.5.x 2006-06-01 - Simplifications to PMML; use roles more consistently (which means there are some roles that never appear in Grammar, but which represent presentational structure). 0.5.x 2006-05-20 - Sorted out (hopefully finally) the Unicode nonsense w/chars in 80--FF; Perl is dumm; you really need to use pack; exported handy UTF(hex) from LaTeXML::Package to help. I had been (over)using Unicode::Normalize::NFC to patchup after the fact, but this has screwy effects (translates \langle to something in chinese block !?!) 0.5.x 2006-04-28 - A number of initializations, typos, missing \and fixed. Thanks Christopher B. Hamlin - Fix to eqnarray numbering bug. Thanks Eduardo Tabacman 0.5.1 2006-04-27 - Release 0.5.1 0.5.x 2006-04-24 - Refined the math grammar, added some test cases. 0.5.x 2006-04-09 - Fixed up some math grammatical quirks, redefined default role for :, \mid - Corrected handling of \left.,\right. - Fixed up Presentation MathML handling of unsuccessfully parsed math. 0.5.x 2006-03-28 - straightened out some namespace mismatches in DTD's - Updated documentation to reflect current commands & API's 0.5.0 2006-03-22 - Release 0.4.0 0.4.x 2006-03-18 - Defined \LXDeclMath for "Math Declarations" in latexml package. These declarations can be embedded in the TeX Source. Basically these define patterns to match to scoped portions of the generated document tree (using Rewrite rules), and add declarative attributes to support the math parsing. 0.4.x 2006-03-01 - Modularized the DTD, along with lots of cleanup. 0.4.x 2006-02-09 - Cleaned up Makefile.pm: made ImageMagick optional (tho' without any clear failure mode when used, yet); Safer XSL style file generation. Should be close to able to install on windows. - Wrote some Test::Builder support code, reorganized the test suite, and started adding new tests. 0.4.x 2006-01-27 - Essentially backtracking on changes for 0.2.0, I'm concerned about the number of globals and exports, and formalizing extensible readers for control sequences. Thus, yet another incompatible change in the parameters to code blocks defining macros, primitives and constructors. macro($gullet,@args) primitive($stomach,@args) beforeDigest($stomach) afterDigest($stomach) constructor($document,@args, %properties) beforeDigest($stomach) properties($stomach,@args) afterDigest($stomach,$whatsit) beforeConstruct($document,$whatsit) afterConstruct($document,$whatsit,$node) For Tag code blocks: afterOpen($document,$node,$box); afterClose($document,$node,$box); 0.4.x 2006-01-22 - Yet another rewrite of tabular processing. Now allows @-expressions. - New Tag option: whitspaceTrim; this trims leading & trailing whitespace from the direct text content of these tags. - Significant namespace cleanup. There are 2 prefix/namespace mappings. (1) the one used in code (eg.ltxml) for constructors,etc. (2) the one used to interpret the DocType (dtd). Constructors should always specify a namespace prefix for names, unless they are in the null namespace (NOT default namespace). In fact, there is no longer a notion of default namespace, as such, and RegisterNamespace no longer takes that 3rd argument. DocType takes as extra args prefix=>namespaceURI mappings to be used in interpretting the DTD, and the resulting document will be constructed using those same prefixes. 0.4.1 2006-01-09 - Relase 0.4.1 0.4.x 2006-01-09 - Experimental tabular transformation. More faithful reproduction of latex tabular in html, via CSS. Heuristics for table headers. 0.4.x 2005-12-15 - Fixed some namespace usages, so that constructors containing "..." will work, provided foo was registered (RegisterNamespace) Added a too-simple testcase. - If "-" is used on latexml|latexmlpost command line, they reads the TeX|XML, respectively, from STDIN. 0.4.x 2005-09-27 - Added missing test result file keyval.xml - Patch to postprocessor: only mung LaTeXML's DTDs. 0.4.0 2005-09-26 - Release 0.4.0 0.3.x 2005-09-xx - Hopefully harmless simplifications in DTD regarding text. Combined the and with the element. Changed model for XMath to only allow rather than %Simple.class; and made auto-open so that all non-obviously math things will be wrapped in . - More DTD (and generation) modification to better support a logical versus physical paragraph structure. is a possibly numbered & labeled element generated by the \paragraph command. represents a logical paragraph; It contains block elements, in particular it can contain sequences of

and that represent a logical paragraph. It can have a refnum and label, although it does NOT get the label assigned by \label.

represents a physical paragraph --- a block of text. - implemented various missing plain macros. 0.3.x 2005-08-xx - Added support for LaTeX's picture environment and pstricks (along with pst-node). A Postprocessing module converts the resulting XML into SVG! Thanks very much to Ioan Sucan!! - Reverted the attribute xml:id to id on math nodes (XM*), since XMRef's idref attribute should only refer to XMath nodes. This also avoids conflict with other uses of xml:id that a developer might need to make. 0.3.x 2005-07-xx - INCOMPATIBLE changes. In order to make constructors more flexible, I'm incorporating the possibility to invoke arbitrary functions within constructors. So, something like: would set the attribute bar on the element foo to be the result of applying the function Func to the first argument, and the string 'a'. Note that even w/o args,parens are required (so maybe entities still work). The Incompatibility is due to absorbing previous ad-hoc functionality: ?IfMath is now ?#isMath (since isMath is an internal property of all Whatsits) Accessing bound values is VALUE('name') => &LookupValue('name') A new constructor pattern triggered by '%' is defined such that %value adds a _set_ of attributes to an element, where value would be something like #1, #foo, &KeyVals(#1) such that the value returns a hash reference. - The above also allows KeyVals to be better encapsulated and pulled out from the core of LaTeXML. The functionality of keyvals will now only be available if you \usepackage{keyvals} or RequirePackage('keyval') The Parameter specification for KeyVals is now of the form; RequiredKeyVals:name or OptionalKeyVals:name where name is the name of the keyval set. The first expects keyvals wrapped in the usual {} pair, whereas the second expects optional args wrapped in [], if present. Furthermore, the constructor patterns have been redefined in a more general framework: Accessing KeyVal data: #1{key} is now &KeyVal(#1,'key') Accessing all keys would now be instead of simply - Similar change to argument type semiverb. Instead of {semiverb} you should now write Semiverbatim this reads an {} delimited argument, but with most catcodes turned off. - Conditional patterns in constructors now properly balance the delimiting parentheses. Thus conditionals can now be nested, and function calls used within the patterns should work. - Revamped and regularized Parameter specs, making them more extensible. {KeyVals:foo} => RequiredKeyVals:foo [KeyVals:foo] => OptionalKeyVals:foo Flag:* => OptionalKeyword:* 0.3.x 2005-06-xx - Fixed Subtle bug with conditionals and \else; Special case: \else doesn't get expanded while the conditional test is being expanded! (See TeX: The Program) (Thanks Kohlhase for pointing it out) - Fixed \underline, \overrightarrow, \overleftarrow to work in textmode. 0.3.2 2005-05-16 - Cleanup of LaTeXML.dtd; to be make sure all elements get appropriate attributes defined (should validate mostly). - More tweaks & tuning for more understandable error messages. - implemented \raggedright, \raisebox,\buildrel,\stackrel - New functionality in Constructor patterns: VALUE('keyword') can be used where a value is expected to lookup a value in the state. Also allows args & such, So \ref ends up defined as VALUE('LABEL@#1') This also means that the constructors \@VALUE and \REF are no longer needed, so they're removed. 0.3.1 2005-05-10 - Improved mismatched environment reporting. - More faithful implementation of verbatim & comment environments with fixes to mouth's readRawLines. - Fix in Stringify for XML nodes; apparently a documentation bug in XML::LibXML::Namespace ? (it doesn't implement getValue) - imcremental improvements in latexmlfind 0.3.0 2005-05-06 - Release 0.3.0 - Some speculative code on handling the picture environment, along with pstricks, but not yet settled. - More exports from Package for common operations there, and hopefully reduce the usage of global $STOMACH, etc. - Improved and updated documentation. Still need to document the new Rewrite facilities (but would like to make API more concise) 0.2.99x 2005-04-13 - Allow * flag (ignored) on \newcommand, et.al. - Fixed some problems with fake environments (ie. \begin{small}...\end{small}) 0.2.99 2005-04-07 - Released as 0.2.99 so the Bremen folks can get some work done. Documentation update is needed for 0.3.0 release. 0.2.xx 2005-03-17 - Bigger changes, increment version. - Modified DocType; don't add namespace, use RegisterNamespace instead. - Intestine now creates XML::LibXML structures directly. Module LaTeXML::Node is removed. In fact, Intestine essentially represents the Document itself and thus is now renamed LaTeXML::Document. - Removed global exported Font() and MathFont() - Made more definitions scopable, cleaned up stash & scope implementation. Renamed: methods {de}activateStash - Implemented Rewrite rules that act on the constructed document. They also allow rules defined in terms of TeX strings (tokenized, digested, converted to document fragments and then XPath statements, as needed). These rules can be used to effectively declare variable or symbol's Grammatical roles. Math Parsing is now part of the latexml script and removed from latexmlpost. 0.2.3 2005-01-xx - Fixed a problem where misplaced egroups could inadvertently change the mode. Mode is no longer affected by the TeX stack; they must be explicitly start/finished (even though they also introduce grouping). - Fixed counting of `raw' lines read for "comment"ed environments. Line numbers for errors were getting skewed. - Moved sectional attribute declarations inside the %define.structure; block to ease defining extension DTD's 0.2.2 2005-01-11 - Random minor bug fixes and improvements to error reporting. 0.2.1 2005-01-10 - Bug fixes to stylesheet LaTeXML-xhtml, Thanks Yann Golanski - A few rearrangements and renamings to make a simple top-level 'digest from string' alternative. [ $latexml->readAndDigestString($string) ] Also, renamed the slightly misnamed Stomach methods: readAndDigestChunk => digestNextChunk readAndDigestBody => digestNextBody - A few typos in Stomach fixed - Almost complete implementation of the various AMS packages:amsbsy,amsfonts,amsmath,amsopn,amssymb,amstext,amsxtra Still need to complete and test the various alignment environments 0.2.0 2004-12-25 Extensive changes, so incrementing minor version, but not robust enough for major version! - Added version info to latexml, latexmlpost help output. separated --debug and --trace options. - Removed mathConstructor option to various DefXXs Use new constructor conditional "?IfMath(..)(...)" - POS is an annoying acronym. Role is better and upon reflection, doesn't conflict with OpenMath's ussge. Hence, partOfSpeech and POS have been replaced by role to describe the grammatical role (or `part of speech') of tokens to be interpreted during a math parse. - Reduced introduction of new `name' attributes for math tokens, especially when they add little value. Most greek & math characters are just replaced by thier unicode equivalent; In most cases, a name is synthesized from the control sequence when needed. The intestines will now create an XMTok, if required. Also, it will automatically manage the font and assign a `cs' attribute to record the macro used to create the token. - DefSymbol is deprecated (removed in fact) - DefMath (new) covers what DefSymbol did, and more: handles the common form for functions taking arguments. When the macro takes args and the replacement presentation text involves #1, it generates an XMDual using the replacement as an expansion, but also creates the content form. To avoid duplicating the arguments, the XMArg's containing the arguments in the content branch are marked with an id; in the presentation branch is used. Corresponding code in postprocessor looks up the referred node when needed. XMRef can also be used on it's own: see the macros \@XMArg and \@XMRef in TeX.ltxml. - Constructors take property arguments which supply properties to the whatsit (which can be CODE evaluated at digestion time). These properties can be used in the constructor pattern. - Refactoring of Intestine & DOM; most interaction with Model is done in Intestine. Renamed DOM to Node and renamed it's subclasses. - "In for a dime, in for a dollar": Since I'd found it necessary to use global variables to access the stomach and intestine from strange places, then I might just USE the darn'ed things! Consequently, most places were a $stomach, $intestine (or $gullet and $model) were passed around as arguments, no longer do. Now, just use the globals, which the inlines STOMACH, INTESTINE and GULLET and MODEL return. As a side effect, the `0-th' argument to CODE implementing control sequences is generally the definition (for whatever use that might be), or the Whatsit for constructors. - Made DOM construction more forgiving by using SalvageError when constructing a tree that doesn't conform to DTD. The result may not be valid, but continues processing. This led to major rewriting & cleanup of error reporting, and storing a `locator' on all data objects that record where in the source file they were created. [Thanks to suggestions from Kevin Smith] - Cleanup of math parsing, presentation mathml generation. - Added postprocessing module for generating OpenMath. It is insufficient, but a starting point. - latexml.sty & latexml.ltxml A start at providing special purpose macros that make sense in LaTeX, and do even more interesting things in LaTeXML. Currently, define some silly macros like \XML, \LaTeXML, etc, and provide LaTeX bindings for things like DefMath! - Sadly, I gave up on "overload". Nice idea, but for a big package, it's tricky to get right. The magic creation of methods can lead to hard-to-find performance issues, if you try to do to much with Stringify. So, Object doesn't use overload. To stringify or compare, consider the (newly exported functions in Global): Stringify($ob), ToString($ob) and Equals($a,$b). - added latexml.sty which should get installed in the local branch of the standard texmf directories. Not yet documented, but it provides (or will) LaTeX bindings to interesting LaTeXML declarations, eg. defining math commands. 0.1.2 2004-09-02 - Some experiments to reduce namespace redundancy. C14N is too severe, use of $node->addNewChild is non-portable and awkward. Kludge: leverage the namespace cleanup on _parsing_ !! (which means, write to string & reparse!!!) (acknowledged need on libxml2 end, but not done) - Portability fixes to LaTeXML::Util::Pathname Should work in Windows, thanks Ioan Sucan. - Modifications to Constructor patterns * Changed the `property' value pattern to '#name' (eg. #body instead of %body). (Gratuitous, but simplifies the grammar) * Values in patterns, #1 and #name can now be followed by {key}, for KeyVal arguments, to access the value associated with a given key. * Conditional expressions now recognize general values: ?(...) and also accept an else clause ?(...)(...). * The NOT conditional, !(...), is removed; Use ?()(...) instead. * Prefixing the constructor pattern with '^' allows the generated XML to `float up' to a parent node that is allowed to contain it, according to the document type. The floats keyword for definitions is also removed. * The untex strings for constructors that shouldn't appear in the math TeX string (used for image generation) should now be empty, '', instead of using the floats keyword. 0.1.1 2004-06-15 - Packages: * Made package loading more robust; doesn't re-load; * Crude access to options * Added several missing definitions to TeX & LaTeX * Implemented comment, acronym packages; initial (mostly empty) amssymb - General: * Catch filters that don't actually change the input. * Refactoring: New module Global.pm carries all exported constants and constructors to simplify coding. * Refactoring: name changes & code movement of methods confusingly called `digestFoo' and similar. * Refactoring: Moved macro parameter handling to new module Parameters.pm (and as side-effect had to rename parameters to Register (DefRegister, etc)) * More careful Token equals method, so newline can convert to a T_SPACE w/ newline inside; this means the output nominally preserves lines! (but STOMACH->setValue('preserveNewLines',0); disables it). * New constructor \@VALUE fetches values from stomach during absorbtion in intestines. This (or similar) used to put reference numbers in \ref, like 2nd LaTeX pass. - Math: * Introduced new element which can contain the various alternative representations of math, such as XMath, m:math, ... Moved most of XMath's attributes to Math. - Error/Warning Messages * Added messages to show progress during processing (unless -quiet) * New SalvageError message for things that in principle are errors, but we're going to try to proceed; added some things to this category, like unknown macros, and such. * Added source locator to Whatsit to improve error messages. - PostProcessing: * Fixed xml catalog so it finds mathml dtd and entity files * Fixed latexmlpost and LaTeXML::Post to recognize html and xhtml output formats; refined the stylesheets (LaTeXML-html.xsl and LaTeXML-xhtml.xsl (both of which include LaTeXML-base.xsl)) - Put LaTeXML tags in thier own namespace: http://dlmf.nist.gov/LaTeXML And first pass at fixing postprocessors to recognize this [probably introduced bugs, and in any case, namespace normalization is pretty crummy] - NEED TO DO: * Implement alltt package * Question: Should XMath be duplicated before parsing? (ie w/different status=tokenized|parsed|partially-parsed|....) This would allow more inference and then re-run the parser. * Extend constructor syntax to work with KeyVals, apply random functions? * Refactor DOM? eg. use XML::LibXML, move more analysis to Intestine this needs (at least) resorting Font reduction. Thanks to Michael Kohlhase for comments & examples leading to many of these patches. 0.1.0 2004-05-10 Initial (pre)release ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������LaTeXML-0.8.2/INSTALL�������������������������������������������������������������������������������0000664�0000000�0000000�00000000466�12740445272�0013775�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������INSTALL Notes for LaTeXML perl Makefile.PL make make test make install REQUIREMENTS A sufficiently Unicode supporting Perl: 5.8, maybe 5.6 XML::LibXML and XML::LibXSLT (See www.CPAN.org) (which require libxml2 and libxslt: See http://www.xmlsoft.org/) Parse::RecDescent Image::Magick ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������LaTeXML-0.8.2/INSTALL.SKIP��������������������������������������������������������������������������0000664�0000000�0000000�00000000013�12740445272�0014526�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������\bREADME\. ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������LaTeXML-0.8.2/LICENSE�������������������������������������������������������������������������������0000664�0000000�0000000�00000005155�12740445272�0013751�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ THIS SOFTWARE IS IN THE PUBLIC DOMAIN: This software was developed at the National Institute of Standards and Technology by employees of the Federal Government in the course of their official duties. Pursuant to title 17 Section 105 of the United States Code, this software is not subject to copyright protection in the U.S. and is in the public domain. To the extent that any copyright protections may be considered to be held by the authors of this sofware in some jurisdiction outside the United States, the authors hereby waive those copyright protections and dedicate the software to the public domain. Thus, this license may be considered equivalent to Creative Commons 0: "No Rights Reserved". See http://creativecommons.org/about/cc0. Note that, according to http://www.gnu.org/licences/license-list.html#PublicDomain, public domain is compatible with GPL. We would appreciate acknowledgement if the software is used. CONTRIBUTOR NOTICE: Contributions of software patches and enhancements to this project are welcome; such contributions are assumed to be under the same terms as the software itself. Specifically, if you contribute code, documention, text samples or any other material, you are asserting and acknowledging that: you are the copyright holder of the material or that it is in the public domain; it does not contain any patented material; and that you waive any copyright protections and dedicate the material to the public domain. DISCLAIMER: LaTeXML is an experimental system provided by NIST as a public service. The software is expressly provided "AS IS." NIST makes NO warranty of any kind, express, implied, in fact or arising by operation of law, including, without limitation, the implied warranty of merchantability, fitness for a particular purpose, non-infringement and data accuracy. nist neither represents nor warrants that the operation of the software will be uninterrupted or error-free, or that any defects will be corrected. NIST does not warrant or make any representations regarding the use of the software or the results thereof, including but not limited to the correctness, accuracy, reliability, or usefulness of the software. You are solely responsible for determining the appropriateness of using and distributing the software and you assume all risks associated with its use, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and the unavailability or interruption of operation. This software is not intended to be used in any situation where a failure could cause risk of injury or damage to property. �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������LaTeXML-0.8.2/MANIFEST������������������������������������������������������������������������������0000664�0000000�0000000�00000111060�12740445272�0014066�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������#================================================== # Base #================================================== Changes Makefile.PL MANIFEST This list of files MANIFEST.SKIP README.pod INSTALL INSTALL.SKIP LICENSE manual.pdf #================================================== # Executables #================================================== bin/latexml bin/latexmlfind bin/latexmlpost bin/latexmlmath bin/latexmlc #================================================== # Master Modules #================================================== lib/LaTeXML.pm lib/LaTeXML/Version.in lib/LaTeXML/Global.pm #================================================== # Core Modules #================================================== lib/LaTeXML/Core.pm lib/LaTeXML/Core/State.pm lib/LaTeXML/Core/Mouth.pm lib/LaTeXML/Core/Mouth/file.pm lib/LaTeXML/Core/Mouth/http.pm lib/LaTeXML/Core/Mouth/https.pm lib/LaTeXML/Core/Mouth/Binding.pm lib/LaTeXML/Core/Gullet.pm lib/LaTeXML/Core/Stomach.pm lib/LaTeXML/Core/Document.pm lib/LaTeXML/Core/Rewrite.pm lib/LaTeXML/Core/Token.pm lib/LaTeXML/Core/Tokens.pm lib/LaTeXML/Core/Box.pm lib/LaTeXML/Core/Comment.pm lib/LaTeXML/Core/List.pm lib/LaTeXML/Core/Whatsit.pm lib/LaTeXML/Core/Definition.pm lib/LaTeXML/Core/Definition/Expandable.pm lib/LaTeXML/Core/Definition/Conditional.pm lib/LaTeXML/Core/Definition/Primitive.pm lib/LaTeXML/Core/Definition/Register.pm lib/LaTeXML/Core/Definition/CharDef.pm lib/LaTeXML/Core/Definition/Constructor.pm lib/LaTeXML/Core/Definition/Constructor/Compiler.pm lib/LaTeXML/Core/Parameter.pm lib/LaTeXML/Core/Parameters.pm lib/LaTeXML/Core/Alignment.pm lib/LaTeXML/Core/Alignment/Template.pm lib/LaTeXML/Core/Array.pm lib/LaTeXML/Core/KeyVals.pm lib/LaTeXML/Core/MuDimension.pm lib/LaTeXML/Core/MuGlue.pm lib/LaTeXML/Core/Pair.pm lib/LaTeXML/Core/PairList.pm # .... lib/LaTeXML/MathGrammar lib/LaTeXML/MathParser.pm #================================================== # Preprocessing Modules #================================================== lib/LaTeXML/Pre/BibTeX.pm lib/LaTeXML/Pre/BibTeX/Entry.pm #================================================== # Postprocessing Modules #================================================== lib/LaTeXML/Post.pm lib/LaTeXML/Post/Collector.pm lib/LaTeXML/Post/CrossRef.pm lib/LaTeXML/Post/Graphics.pm lib/LaTeXML/Post/LaTeXImages.pm lib/LaTeXML/Post/MakeBibliography.pm lib/LaTeXML/Post/MakeIndex.pm lib/LaTeXML/Post/Manifest.pm lib/LaTeXML/Post/Manifest/Epub.pm lib/LaTeXML/Post/MathImages.pm lib/LaTeXML/Post/MathML.pm lib/LaTeXML/Post/MathML/Linebreaker.pm lib/LaTeXML/Post/MathML/Presentation.pm lib/LaTeXML/Post/MathML/Content.pm lib/LaTeXML/Post/OpenMath.pm lib/LaTeXML/Post/PictureImages.pm lib/LaTeXML/Post/Scan.pm lib/LaTeXML/Post/Split.pm lib/LaTeXML/Post/SVG.pm lib/LaTeXML/Post/Writer.pm lib/LaTeXML/Post/XSLT.pm lib/LaTeXML/Post/XMath.pm lib/LaTeXML/Post/TeXMath.pm lib/LaTeXML/LaTeXML.catalog #================================================== # Common Modules #================================================== lib/LaTeXML/Common/Object.pm lib/LaTeXML/Common/Config.pm lib/LaTeXML/Common/Color.pm lib/LaTeXML/Common/Color/rgb.pm lib/LaTeXML/Common/Color/cmy.pm lib/LaTeXML/Common/Color/cmyk.pm lib/LaTeXML/Common/Color/hsb.pm lib/LaTeXML/Common/Color/gray.pm lib/LaTeXML/Common/Color/Derived.pm lib/LaTeXML/Common/Error.pm lib/LaTeXML/Common/Font.pm lib/LaTeXML/Common/Number.pm lib/LaTeXML/Common/Float.pm lib/LaTeXML/Common/Dimension.pm lib/LaTeXML/Common/Glue.pm lib/LaTeXML/Common/Model.pm lib/LaTeXML/Common/Model/DTD.pm lib/LaTeXML/Common/Model/RelaxNG.pm lib/LaTeXML/Common/XML.pm lib/LaTeXML/Common/XML/Parser.pm lib/LaTeXML/Common/XML/XPath.pm lib/LaTeXML/Common/XML/XSLT.pm lib/LaTeXML/Common/XML/RelaxNG.pm #================================================== # Utility Modules #================================================== lib/LaTeXML/Util/Test.pm lib/LaTeXML/Util/ObjectDB.pm lib/LaTeXML/Util/ObjectDB/Entry.pm lib/LaTeXML/Util/Pathname.pm lib/LaTeXML/Util/Pack.pm lib/LaTeXML/Util/WWW.pm lib/LaTeXML/Util/Radix.pm lib/LaTeXML/Util/Image.pm lib/LaTeXML/Util/Geometry.pm lib/LaTeXML/Util/Transform.pm #================================================== # Document Model #================================================== lib/LaTeXML/resources/RelaxNG/LaTeXML.model lib/LaTeXML/resources/RelaxNG/LaTeXML.rnc lib/LaTeXML/resources/RelaxNG/LaTeXML.rng lib/LaTeXML/resources/RelaxNG/LaTeXML-bib.rnc lib/LaTeXML/resources/RelaxNG/LaTeXML-bib.rng lib/LaTeXML/resources/RelaxNG/LaTeXML-block.rnc lib/LaTeXML/resources/RelaxNG/LaTeXML-block.rng lib/LaTeXML/resources/RelaxNG/LaTeXML-common.rnc lib/LaTeXML/resources/RelaxNG/LaTeXML-common.rng lib/LaTeXML/resources/RelaxNG/LaTeXML-inline.rnc lib/LaTeXML/resources/RelaxNG/LaTeXML-inline.rng lib/LaTeXML/resources/RelaxNG/LaTeXML-math.rnc lib/LaTeXML/resources/RelaxNG/LaTeXML-math.rng lib/LaTeXML/resources/RelaxNG/LaTeXML-misc.rnc lib/LaTeXML/resources/RelaxNG/LaTeXML-misc.rng lib/LaTeXML/resources/RelaxNG/LaTeXML-meta.rnc lib/LaTeXML/resources/RelaxNG/LaTeXML-meta.rng lib/LaTeXML/resources/RelaxNG/LaTeXML-para.rnc lib/LaTeXML/resources/RelaxNG/LaTeXML-para.rng lib/LaTeXML/resources/RelaxNG/LaTeXML-picture.rnc lib/LaTeXML/resources/RelaxNG/LaTeXML-picture.rng lib/LaTeXML/resources/RelaxNG/LaTeXML-structure.rnc lib/LaTeXML/resources/RelaxNG/LaTeXML-structure.rng lib/LaTeXML/resources/RelaxNG/LaTeXML-tabular.rnc lib/LaTeXML/resources/RelaxNG/LaTeXML-tabular.rng lib/LaTeXML/resources/RelaxNG/svg/svg-animation.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-animation.rng lib/LaTeXML/resources/RelaxNG/svg/svg-animevents-attrib.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-animevents-attrib.rng lib/LaTeXML/resources/RelaxNG/svg/svg-basic-clip.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-basic-clip.rng lib/LaTeXML/resources/RelaxNG/svg/svg-basic-filter.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-basic-filter.rng lib/LaTeXML/resources/RelaxNG/svg/svg-basic-font.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-basic-font.rng lib/LaTeXML/resources/RelaxNG/svg/svg-basic-graphics-attrib.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-basic-graphics-attrib.rng lib/LaTeXML/resources/RelaxNG/svg/svg-basic-structure.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-basic-structure.rng lib/LaTeXML/resources/RelaxNG/svg/svg-basic-text.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-basic-text.rng lib/LaTeXML/resources/RelaxNG/svg/svg-clip.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-clip.rng lib/LaTeXML/resources/RelaxNG/svg/svg-conditional.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-conditional.rng lib/LaTeXML/resources/RelaxNG/svg/svg-container-attrib.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-container-attrib.rng lib/LaTeXML/resources/RelaxNG/svg/svg-core-attrib.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-core-attrib.rng lib/LaTeXML/resources/RelaxNG/svg/svg-cursor.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-cursor.rng lib/LaTeXML/resources/RelaxNG/svg/svg-datatypes.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-datatypes.rng lib/LaTeXML/resources/RelaxNG/svg/svg-docevents-attrib.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-docevents-attrib.rng lib/LaTeXML/resources/RelaxNG/svg/svg-extensibility.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-extensibility.rng lib/LaTeXML/resources/RelaxNG/svg/svg-extresources-attrib.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-extresources-attrib.rng lib/LaTeXML/resources/RelaxNG/svg/svg-filter.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-filter.rng lib/LaTeXML/resources/RelaxNG/svg/svg-font.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-font.rng lib/LaTeXML/resources/RelaxNG/svg/svg-gradient.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-gradient.rng lib/LaTeXML/resources/RelaxNG/svg/svg-graphevents-attrib.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-graphevents-attrib.rng lib/LaTeXML/resources/RelaxNG/svg/svg-graphics-attrib.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-graphics-attrib.rng lib/LaTeXML/resources/RelaxNG/svg/svg-hyperlink.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-hyperlink.rng lib/LaTeXML/resources/RelaxNG/svg/svg-image.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-image.rng lib/LaTeXML/resources/RelaxNG/svg/svg-marker.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-marker.rng lib/LaTeXML/resources/RelaxNG/svg/svg-mask.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-mask.rng lib/LaTeXML/resources/RelaxNG/svg/svg-opacity-attrib.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-opacity-attrib.rng lib/LaTeXML/resources/RelaxNG/svg/svg-paint-attrib.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-paint-attrib.rng lib/LaTeXML/resources/RelaxNG/svg/svg-pattern.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-pattern.rng lib/LaTeXML/resources/RelaxNG/svg/svg-profile.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-profile.rng lib/LaTeXML/resources/RelaxNG/svg/svg-qname.rng lib/LaTeXML/resources/RelaxNG/svg/svg-script.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-script.rng lib/LaTeXML/resources/RelaxNG/svg/svg-shape.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-shape.rng lib/LaTeXML/resources/RelaxNG/svg/svg-structure.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-structure.rng lib/LaTeXML/resources/RelaxNG/svg/svg-style.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-style.rng lib/LaTeXML/resources/RelaxNG/svg/svg-text.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-text.rng lib/LaTeXML/resources/RelaxNG/svg/svg-view.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-view.rng lib/LaTeXML/resources/RelaxNG/svg/svg-viewport-attrib.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-viewport-attrib.rng lib/LaTeXML/resources/RelaxNG/svg/svg-xlink-attrib.rnc lib/LaTeXML/resources/RelaxNG/svg/svg-xlink-attrib.rng lib/LaTeXML/resources/RelaxNG/svg/svg11-basic.rng lib/LaTeXML/resources/RelaxNG/svg/svg11-tiny.rng lib/LaTeXML/resources/RelaxNG/svg/svg11.rnc lib/LaTeXML/resources/RelaxNG/svg/svg11.rng lib/LaTeXML/resources/DTD/LaTeXML.dtd #================================================== # XSLT & CSS Support #================================================== lib/LaTeXML/resources/XSLT/LaTeXML-html4.xsl lib/LaTeXML/resources/XSLT/LaTeXML-html5.xsl lib/LaTeXML/resources/XSLT/LaTeXML-xhtml.xsl lib/LaTeXML/resources/XSLT/LaTeXML-epub3.xsl lib/LaTeXML/resources/XSLT/LaTeXML-common.xsl lib/LaTeXML/resources/XSLT/LaTeXML-all-xhtml.xsl lib/LaTeXML/resources/XSLT/LaTeXML-bib-xhtml.xsl lib/LaTeXML/resources/XSLT/LaTeXML-block-xhtml.xsl lib/LaTeXML/resources/XSLT/LaTeXML-inline-xhtml.xsl lib/LaTeXML/resources/XSLT/LaTeXML-math-xhtml.xsl lib/LaTeXML/resources/XSLT/LaTeXML-meta-xhtml.xsl lib/LaTeXML/resources/XSLT/LaTeXML-misc-xhtml.xsl lib/LaTeXML/resources/XSLT/LaTeXML-para-xhtml.xsl lib/LaTeXML/resources/XSLT/LaTeXML-picture-xhtml.xsl lib/LaTeXML/resources/XSLT/LaTeXML-structure-xhtml.xsl lib/LaTeXML/resources/XSLT/LaTeXML-tabular-xhtml.xsl lib/LaTeXML/resources/XSLT/LaTeXML-webpage-xhtml.xsl lib/LaTeXML/resources/XSLT/LaTeXML-jats.xsl lib/LaTeXML/resources/CSS/LaTeXML.css lib/LaTeXML/resources/CSS/LaTeXML-marginpar.css lib/LaTeXML/resources/CSS/LaTeXML-navbar-left.css lib/LaTeXML/resources/CSS/LaTeXML-navbar-right.css lib/LaTeXML/resources/CSS/LaTeXML-blue.css lib/LaTeXML/resources/CSS/ltx-article.css lib/LaTeXML/resources/CSS/ltx-report.css lib/LaTeXML/resources/CSS/ltx-book.css lib/LaTeXML/resources/CSS/ltx-amsart.css lib/LaTeXML/resources/CSS/ltx-apj.css lib/LaTeXML/resources/CSS/ltx-listings.css lib/LaTeXML/resources/CSS/ltx-svjour.css lib/LaTeXML/resources/CSS/ltx-ulem.css lib/LaTeXML/resources/javascript/LaTeXML-maybeMathjax.js lib/LaTeXML/resources/Profiles/fragment-html.opt lib/LaTeXML/resources/Profiles/fragment-xhtml.opt lib/LaTeXML/resources/Profiles/fragment.opt lib/LaTeXML/resources/Profiles/math.opt lib/LaTeXML/resources/Profiles/modern.opt lib/LaTeXML/resources/Profiles/standard.opt lib/LaTeXML/resources/Profiles/stex-migration.opt lib/LaTeXML/resources/Profiles/stex-module.opt lib/LaTeXML/resources/Profiles/stex.opt #================================================== # Supported Packages #================================================== lib/LaTeXML/Package.pm lib/LaTeXML/Package/a0poster.cls.ltxml lib/LaTeXML/Package/a0size.sty.ltxml lib/LaTeXML/Package/a4.sty.ltxml lib/LaTeXML/Package/a4wide.sty.ltxml lib/LaTeXML/Package/aa.cls.ltxml lib/LaTeXML/Package/aa_support.sty.ltxml lib/LaTeXML/Package/aastex.cls.ltxml lib/LaTeXML/Package/aastex.sty.ltxml lib/LaTeXML/Package/aasms.sty.ltxml lib/LaTeXML/Package/aaspp.sty.ltxml lib/LaTeXML/Package/aas_macros.sty.ltxml lib/LaTeXML/Package/aas_support.sty.ltxml lib/LaTeXML/Package/acronym.sty.ltxml lib/LaTeXML/Package/ae.sty.ltxml lib/LaTeXML/Package/afterpage.sty.ltxml lib/LaTeXML/Package/algc.sty.ltxml lib/LaTeXML/Package/algcompatible.sty.ltxml lib/LaTeXML/Package/algmatlab.sty.ltxml lib/LaTeXML/Package/algorithm.sty.ltxml lib/LaTeXML/Package/algorithmic.sty.ltxml lib/LaTeXML/Package/algorithmicx.sty.ltxml lib/LaTeXML/Package/algpascal.sty.ltxml lib/LaTeXML/Package/algpseudocode.sty.ltxml lib/LaTeXML/Package/alltt.sty.ltxml lib/LaTeXML/Package/amsart.cls.ltxml lib/LaTeXML/Package/amsbook.cls.ltxml lib/LaTeXML/Package/amsbsy.sty.ltxml lib/LaTeXML/Package/amscd.sty.ltxml lib/LaTeXML/Package/amsgen.sty.ltxml lib/LaTeXML/Package/ams_core.cls.ltxml lib/LaTeXML/Package/ams_support.sty.ltxml lib/LaTeXML/Package/amsfonts.sty.ltxml lib/LaTeXML/Package/amsmath.sty.ltxml lib/LaTeXML/Package/amsopn.sty.ltxml lib/LaTeXML/Package/amsppt.sty.ltxml lib/LaTeXML/Package/amsproc.cls.ltxml lib/LaTeXML/Package/amsrefs.sty.ltxml lib/LaTeXML/Package/amssymb.sty.ltxml lib/LaTeXML/Package/AmSTeX.pool.ltxml lib/LaTeXML/Package/amstex.sty.ltxml lib/LaTeXML/Package/amstex.tex.ltxml lib/LaTeXML/Package/amstext.sty.ltxml lib/LaTeXML/Package/amsthm.sty.ltxml lib/LaTeXML/Package/amsxtra.sty.ltxml lib/LaTeXML/Package/apjfonts.sty.ltxml lib/LaTeXML/Package/applemac.def.ltxml lib/LaTeXML/Package/array.sty.ltxml lib/LaTeXML/Package/article.cls.ltxml lib/LaTeXML/Package/attachfile.sty.ltxml lib/LaTeXML/Package/authblk.sty.ltxml lib/LaTeXML/Package/avant.sty.ltxml lib/LaTeXML/Package/babel.sty.ltxml lib/LaTeXML/Package/babel.def.ltxml lib/LaTeXML/Package/balance.sty.ltxml lib/LaTeXML/Package/beton.sty.ltxml lib/LaTeXML/Package/BibTeX.pool.ltxml lib/LaTeXML/Package/bbold.sty.ltxml lib/LaTeXML/Package/bbm.sty.ltxml lib/LaTeXML/Package/bm.sty.ltxml lib/LaTeXML/Package/book.cls.ltxml lib/LaTeXML/Package/bookman.sty.ltxml lib/LaTeXML/Package/booktabs.sty.ltxml lib/LaTeXML/Package/braket.sty.ltxml lib/LaTeXML/Package/breakurl.sty.ltxml lib/LaTeXML/Package/calc.sty.ltxml lib/LaTeXML/Package/caption.sty.ltxml lib/LaTeXML/Package/cancel.sty.ltxml lib/LaTeXML/Package/ccfonts.sty.ltxml lib/LaTeXML/Package/chancery.sty.ltxml lib/LaTeXML/Package/charter.sty.ltxml lib/LaTeXML/Package/circuitikz.sty.ltxml lib/LaTeXML/Package/cite.sty.ltxml lib/LaTeXML/Package/citesort.sty.ltxml lib/LaTeXML/Package/cmbright.sty.ltxml lib/LaTeXML/Package/color.sty.ltxml lib/LaTeXML/Package/colordvi.sty.ltxml lib/LaTeXML/Package/colortbl.sty.ltxml lib/LaTeXML/Package/comment.sty.ltxml lib/LaTeXML/Package/concmath.sty.ltxml lib/LaTeXML/Package/courier.sty.ltxml lib/LaTeXML/Package/cp852.def.ltxml lib/LaTeXML/Package/crop.sty.ltxml lib/LaTeXML/Package/cropmark.sty.ltxml lib/LaTeXML/Package/deluxetable.sty.ltxml lib/LaTeXML/Package/dcolumn.sty.ltxml lib/LaTeXML/Package/doublespace.sty.ltxml lib/LaTeXML/Package/dsfont.sty.ltxml lib/LaTeXML/Package/ellipsis.sty.ltxml lib/LaTeXML/Package/elsart.cls.ltxml lib/LaTeXML/Package/elsarticle.cls.ltxml lib/LaTeXML/Package/elsart.sty.ltxml lib/LaTeXML/Package/elsart_support.sty.ltxml lib/LaTeXML/Package/emulateapj.cls.ltxml lib/LaTeXML/Package/emulateapj.sty.ltxml lib/LaTeXML/Package/emulateapj5.sty.ltxml lib/LaTeXML/Package/enumerate.sty.ltxml lib/LaTeXML/Package/epigraph.sty.ltxml lib/LaTeXML/Package/epsfig.sty.ltxml lib/LaTeXML/Package/epsf.sty.ltxml lib/LaTeXML/Package/epsf.tex.ltxml lib/LaTeXML/Package/epstopdf.sty.ltxml lib/LaTeXML/Package/esint.sty.ltxml lib/LaTeXML/Package/eTeX.pool.ltxml lib/LaTeXML/Package/eucal.sty.ltxml lib/LaTeXML/Package/eufrak.sty.ltxml lib/LaTeXML/Package/euler.sty.ltxml lib/LaTeXML/Package/eulervm.sty.ltxml lib/LaTeXML/Package/eurosym.sty.ltxml lib/LaTeXML/Package/euscript.sty.ltxml lib/LaTeXML/Package/exscale.sty.ltxml lib/LaTeXML/Package/fancyhdr.sty.ltxml lib/LaTeXML/Package/fix-cm.sty.ltxml lib/LaTeXML/Package/fixltx2e.sty.ltxml lib/LaTeXML/Package/flafter.sty.ltxml lib/LaTeXML/Package/fleqn.sty.ltxml lib/LaTeXML/Package/float.sty.ltxml lib/LaTeXML/Package/floatfig.sty.ltxml lib/LaTeXML/Package/floatflt.sty.ltxml lib/LaTeXML/Package/floatpag.sty.ltxml lib/LaTeXML/Package/fontenc.sty.ltxml lib/LaTeXML/Package/fontspec.sty.ltxml lib/LaTeXML/Package/footmisc.sty.ltxml lib/LaTeXML/Package/fourier.sty.ltxml lib/LaTeXML/Package/framed.sty.ltxml lib/LaTeXML/Package/frenchb.ldf.ltxml lib/LaTeXML/Package/fullpage.sty.ltxml lib/LaTeXML/Package/gen-j-l.cls.ltxml lib/LaTeXML/Package/gen-m-l.cls.ltxml lib/LaTeXML/Package/gen-p-l.cls.ltxml lib/LaTeXML/Package/geometry.sty.ltxml lib/LaTeXML/Package/german.sty.ltxml lib/LaTeXML/Package/graphics.sty.ltxml lib/LaTeXML/Package/graphicx.sty.ltxml lib/LaTeXML/Package/grffile.sty.ltxml lib/LaTeXML/Package/here.sty.ltxml lib/LaTeXML/Package/helvet.sty.ltxml lib/LaTeXML/Package/hhline.sty.ltxml lib/LaTeXML/Package/html.sty.ltxml lib/LaTeXML/Package/hyperref.sty.ltxml lib/LaTeXML/Package/hyperxmp.sty.ltxml lib/LaTeXML/Package/ifluatex.sty.ltxml lib/LaTeXML/Package/ifpdf.sty.ltxml lib/LaTeXML/Package/ifthen.sty.ltxml lib/LaTeXML/Package/ifvtex.sty.ltxml lib/LaTeXML/Package/ifxetex.sty.ltxml lib/LaTeXML/Package/import.sty.ltxml lib/LaTeXML/Package/indentfirst.sty.ltxml lib/LaTeXML/Package/inputenc.sty.ltxml lib/LaTeXML/Package/inst_support.sty.ltxml lib/LaTeXML/Package/iopams.sty.ltxml lib/LaTeXML/Package/iopart.cls.ltxml lib/LaTeXML/Package/iopart_support.sty.ltxml lib/LaTeXML/Package/JHEP.cls.ltxml lib/LaTeXML/Package/JHEP2.cls.ltxml lib/LaTeXML/Package/JHEP3.cls.ltxml lib/LaTeXML/Package/keyval.sty.ltxml lib/LaTeXML/Package/latexml.sty.ltxml lib/LaTeXML/Package/LaTeX.pool.ltxml lib/LaTeXML/Package/latexsym.sty.ltxml lib/LaTeXML/Package/latin10.def.ltxml lib/LaTeXML/Package/lineno.sty.ltxml lib/LaTeXML/Package/listings.sty.ltxml lib/LaTeXML/Package/listingsutf8.sty.ltxml lib/LaTeXML/Package/llncs.cls.ltxml lib/LaTeXML/Package/lmodern.sty.ltxml lib/LaTeXML/Package/longtable.sty.ltxml lib/LaTeXML/Package/lscape.sty.ltxml lib/LaTeXML/Package/luximono.sty.ltxml lib/LaTeXML/Package/lxRDFa.sty.ltxml lib/LaTeXML/Package/makeidx.sty.ltxml lib/LaTeXML/Package/marvosym.sty.ltxml lib/LaTeXML/Package/mathbbol.sty.ltxml lib/LaTeXML/Package/mathpazo.sty.ltxml lib/LaTeXML/Package/mathpple.sty.ltxml lib/LaTeXML/Package/mathptm.sty.ltxml lib/LaTeXML/Package/mathptmx.sty.ltxml lib/LaTeXML/Package/mathrsfs.sty.ltxml lib/LaTeXML/Package/mathtools.sty.ltxml lib/LaTeXML/Package/mn.cls.ltxml lib/LaTeXML/Package/mn2e.cls.ltxml lib/LaTeXML/Package/mn2e_support.sty.ltxml lib/LaTeXML/Package/multicol.sty.ltxml lib/LaTeXML/Package/multido.sty.ltxml lib/LaTeXML/Package/multirow.sty.ltxml lib/LaTeXML/Package/nameref.sty.ltxml lib/LaTeXML/Package/natbib.sty.ltxml lib/LaTeXML/Package/newcent.sty.ltxml lib/LaTeXML/Package/newlfont.sty.ltxml lib/LaTeXML/Package/nicefrac.sty.ltxml lib/LaTeXML/Package/ngerman.sty.ltxml lib/LaTeXML/Package/ntheorem.sty.ltxml lib/LaTeXML/Package/numprint.sty.ltxml lib/LaTeXML/Package/OmniBus.cls.ltxml lib/LaTeXML/Package/palatino.sty.ltxml lib/LaTeXML/Package/paralist.sty.ltxml lib/LaTeXML/Package/parskip.sty.ltxml lib/LaTeXML/Package/pdfsync.sty.ltxml lib/LaTeXML/Package/pdfTeX.pool.ltxml lib/LaTeXML/Package/pdflscape.sty.ltxml lib/LaTeXML/Package/pgf.sty.ltxml lib/LaTeXML/Package/pgfkeys.code.tex.ltxml lib/LaTeXML/Package/pgfplots.sty.ltxml lib/LaTeXML/Package/pgfsys-latexml.def.ltxml lib/LaTeXML/Package/pifont.sty.ltxml lib/LaTeXML/Package/placeins.sty.ltxml lib/LaTeXML/Package/preview.sty.ltxml lib/LaTeXML/Package/psfig.sty.ltxml lib/LaTeXML/Package/psfig.tex.ltxml lib/LaTeXML/Package/pslatex.sty.ltxml lib/LaTeXML/Package/pspicture.sty.ltxml lib/LaTeXML/Package/pst-grad.sty.ltxml lib/LaTeXML/Package/pst-node.sty.ltxml lib/LaTeXML/Package/pstricks.sty.ltxml lib/LaTeXML/Package/pxfonts.sty.ltxml lib/LaTeXML/Package/relsize.sty.ltxml lib/LaTeXML/Package/report.cls.ltxml lib/LaTeXML/Package/revsymb.sty.ltxml lib/LaTeXML/Package/revtex3_support.sty.ltxml lib/LaTeXML/Package/revtex4_support.sty.ltxml lib/LaTeXML/Package/revtex4.cls.ltxml lib/LaTeXML/Package/revtex4.sty.ltxml lib/LaTeXML/Package/revtex.cls.ltxml lib/LaTeXML/Package/revtex.sty.ltxml lib/LaTeXML/Package/rotate.sty.ltxml lib/LaTeXML/Package/rotating.sty.ltxml lib/LaTeXML/Package/rsfs.sty.ltxml lib/LaTeXML/Package/scalefnt.sty.ltxml lib/LaTeXML/Package/setspace.sty.ltxml lib/LaTeXML/Package/showkeys.sty.ltxml lib/LaTeXML/Package/slashed.sty.ltxml lib/LaTeXML/Package/slides.cls.ltxml lib/LaTeXML/Package/soul.sty.ltxml lib/LaTeXML/Package/srcltx.sty.ltxml lib/LaTeXML/Package/stmaryrd.sty.ltxml lib/LaTeXML/Package/subfig.sty.ltxml lib/LaTeXML/Package/subfigure.sty.ltxml lib/LaTeXML/Package/subfloat.sty.ltxml lib/LaTeXML/Package/supertabular.sty.ltxml lib/LaTeXML/Package/svjour.cls.ltxml lib/LaTeXML/Package/svg.sty.ltxml lib/LaTeXML/Package/svmult.cls.ltxml lib/LaTeXML/Package/sv_support.sty.ltxml lib/LaTeXML/Package/tabularx.sty.ltxml lib/LaTeXML/Package/tabulary.sty.ltxml lib/LaTeXML/Package/TeX.pool.ltxml lib/LaTeXML/Package/textcomp.sty.ltxml lib/LaTeXML/Package/texvc.sty.ltxml lib/LaTeXML/Package/theorem.sty.ltxml lib/LaTeXML/Package/threeparttable.sty.ltxml lib/LaTeXML/Package/tikz.sty.ltxml lib/LaTeXML/Package/tikz-3dplot.sty.ltxml lib/LaTeXML/Package/times.sty.ltxml lib/LaTeXML/Package/tocbibind.sty.ltxml lib/LaTeXML/Package/transparent.sty.ltxml lib/LaTeXML/Package/txfonts.sty.ltxml lib/LaTeXML/Package/t1enc.def.ltxml lib/LaTeXML/Package/t1enc.sty.ltxml lib/LaTeXML/Package/units.sty.ltxml lib/LaTeXML/Package/upgreek.sty.ltxml lib/LaTeXML/Package/upref.sty.ltxml lib/LaTeXML/Package/url.sty.ltxml lib/LaTeXML/Package/utopia.sty.ltxml lib/LaTeXML/Package/verbatim.sty.ltxml lib/LaTeXML/Package/wrapfig.sty.ltxml lib/LaTeXML/Package/xargs.sty.ltxml lib/LaTeXML/Package/xcolor.sty.ltxml lib/LaTeXML/Package/xspace.sty.ltxml lib/LaTeXML/Package/yfonts.sty.ltxml lib/LaTeXML/Package/t1.fontmap.ltxml lib/LaTeXML/Package/ts1.fontmap.ltxml lib/LaTeXML/Package/t2a.fontmap.ltxml lib/LaTeXML/Package/t2b.fontmap.ltxml lib/LaTeXML/Package/t2c.fontmap.ltxml lib/LaTeXML/Package/type1cm.sty.ltxml lib/LaTeXML/Package/lgr.fontmap.ltxml lib/LaTeXML/Package/ly1.fontmap.ltxml lib/LaTeXML/Package/amsa.fontmap.ltxml lib/LaTeXML/Package/amsb.fontmap.ltxml lib/LaTeXML/Package/ot4.fontmap.ltxml lib/LaTeXML/Package/ulem.sty.ltxml lib/LaTeXML/Package/utf8.def.ltxml lib/LaTeXML/Package/wasysym.sty.ltxml lib/LaTeXML/Package/xunicode.sty.ltxml #================================================== # TeX packages #================================================== lib/LaTeXML/texmf/latexml.sty lib/LaTeXML/texmf/lxRDFa.sty #================================================== # Test Suite. #================================================== t/00_tokenize.t t/10_expansion.t t/12_grouping.t t/20_digestion.t t/22_fonts.t t/30_encoding.t t/40_math.t t/50_structure.t t/52_namespace.t t/53_alignment.t t/55_theorem.t t/56_ams.t t/65_graphics.t t/70_parse.t t/80_complex.t t/81_babel.t t/90_latexmlpost.t t/91_latexmlc_api.t t/92_profiles.t t/93_formats.t t/94_runtimes.t t/95_complex_config.t t/alignment/array.pdf t/alignment/array.tex t/alignment/array.xml t/alignment/foo.png t/alignment/badeqnarray.pdf t/alignment/badeqnarray.tex t/alignment/badeqnarray.xml t/alignment/colortbls.pdf t/alignment/colortbls.tex t/alignment/colortbls.xml t/alignment/eqnarray.pdf t/alignment/eqnarray.tex t/alignment/eqnarray.xml t/alignment/halign.pdf t/alignment/halign.tex t/alignment/halign.xml t/alignment/halignatt.pdf t/alignment/halignatt.tex t/alignment/halignatt.xml t/alignment/mathmix.pdf t/alignment/mathmix.tex t/alignment/mathmix.xml t/alignment/listing.pdf t/alignment/listing.tex t/alignment/listing.xml t/alignment/any.sty.ltxml t/alignment/longtable.pdf t/alignment/longtable.tex t/alignment/longtable.xml t/alignment/morse.pdf t/alignment/morse.tex t/alignment/morse.xml t/alignment/plainmath.pdf t/alignment/plainmath.tex t/alignment/plainmath.xml t/alignment/supertabular.pdf t/alignment/supertabular.tex t/alignment/supertabular.xml t/alignment/tabtab.pdf t/alignment/tabtab.tex t/alignment/tabtab.xml t/alignment/tabular.pdf t/alignment/tabular.tex t/alignment/tabular.xml t/alignment/tabularstar.pdf t/alignment/tabularstar.tex t/alignment/tabularstar.xml t/alignment/vmode.pdf t/alignment/vmode.tex t/alignment/vmode.xml t/ams/amsdisplay.pdf t/ams/amsdisplay.tex t/ams/amsdisplay.xml t/ams/matrix.pdf t/ams/matrix.tex t/ams/matrix.xml t/ams/cd.pdf t/ams/cd.tex t/ams/cd.xml t/ams/genfracs.pdf t/ams/genfracs.tex t/ams/genfracs.xml t/ams/mathtools.pdf t/ams/mathtools.tex t/ams/mathtools.xml t/ams/sideset.pdf t/ams/sideset.tex t/ams/sideset.xml t/babel/french.pdf t/babel/french.tex t/babel/french.xml t/babel/german.pdf t/babel/german.tex t/babel/german.xml t/babel/greek.pdf t/babel/greek.tex t/babel/greek.xml t/babel/page545.pdf t/babel/page545.tex t/babel/page545.xml t/babel/numprints.pdf t/babel/numprints.tex t/babel/numprints.xml t/complex/aliceblog.pdf t/complex/aliceblog.tex t/complex/aliceblog.xml t/complex/sunset.jpg t/complex/xii.dtd t/complex/xii.pdf t/complex/xii.latexml t/complex/xii.tex t/complex/xii.xml t/complex/hypertest.pdf t/complex/hypertest.tex t/complex/hypertest.xml t/digestion/box.pdf t/digestion/box.tex t/digestion/box.xml t/digestion/def.pdf t/digestion/def.tex t/digestion/def.xml t/digestion/dollar.pdf t/digestion/dollar.tex t/digestion/dollar.xml t/digestion/chardefs.pdf t/digestion/chardefs.tex t/digestion/chardefs.xml t/digestion/defaultunits.pdf t/digestion/defaultunits.tex t/digestion/defaultunits.xml t/digestion/io.pdf t/digestion/io.tex t/digestion/io.xml t/digestion/exists.data t/digestion/primes.pdf t/digestion/primes.tex t/digestion/primes.xml t/digestion/testctr.pdf t/digestion/testctr.tex t/digestion/testctr.xml t/digestion/xargs.pdf t/digestion/xargs.tex t/digestion/xargs.xml t/encoding/ansinew.pdf t/encoding/ansinew.tex t/encoding/ansinew.xml t/encoding/applemac.pdf t/encoding/applemac.tex t/encoding/applemac.xml t/encoding/cp437de.pdf t/encoding/cp437de.tex t/encoding/cp437de.xml t/encoding/cp437.pdf t/encoding/cp437.tex t/encoding/cp437.xml t/encoding/cp850.pdf t/encoding/cp850.tex t/encoding/cp850.xml t/encoding/cp852.pdf t/encoding/cp852.tex t/encoding/cp852.xml t/encoding/cp858.pdf t/encoding/cp858.tex t/encoding/cp858.xml t/encoding/cp865.pdf t/encoding/cp865.tex t/encoding/cp865.xml t/encoding/cp1250.pdf t/encoding/cp1250.tex t/encoding/cp1250.xml t/encoding/cp1252.pdf t/encoding/cp1252.tex t/encoding/cp1252.xml t/encoding/decmulti.pdf t/encoding/decmulti.tex t/encoding/decmulti.xml t/encoding/latin1.pdf t/encoding/latin1.tex t/encoding/latin1.xml t/encoding/latin2.pdf t/encoding/latin2.tex t/encoding/latin2.xml t/encoding/latin3.pdf t/encoding/latin3.tex t/encoding/latin3.xml t/encoding/latin4.pdf t/encoding/latin4.tex t/encoding/latin4.xml t/encoding/latin5.pdf t/encoding/latin5.tex t/encoding/latin5.xml t/encoding/latin9.pdf t/encoding/latin9.tex t/encoding/latin9.xml t/encoding/latin10.pdf t/encoding/latin10.tex t/encoding/latin10.xml t/encoding/ot1.pdf t/encoding/ot1.tex t/encoding/ot1.xml t/encoding/t1.pdf t/encoding/t1.tex t/encoding/t1.xml t/encoding/t2a.pdf t/encoding/t2a.tex t/encoding/t2a.xml t/encoding/t2b.pdf t/encoding/t2b.tex t/encoding/t2b.xml t/encoding/t2c.pdf t/encoding/t2c.tex t/encoding/t2c.xml t/encoding/ts1.pdf t/encoding/ts1.tex t/encoding/ts1.xml t/encoding/ly1.pdf t/encoding/ly1.tex t/encoding/ly1.xml t/expansion/aftergroup.pdf t/expansion/aftergroup.tex t/expansion/aftergroup.xml t/expansion/definedness.pdf t/expansion/definedness.tex t/expansion/definedness.xml t/expansion/env.pdf t/expansion/env.tex t/expansion/env.xml t/expansion/environments.pdf t/expansion/environments.tex t/expansion/environments.xml t/expansion/etex.pdf t/expansion/etex.tex t/expansion/etex.xml t/expansion/for.pdf t/expansion/for.tex t/expansion/for.xml t/expansion/ifthen.pdf t/expansion/ifthen.tex t/expansion/ifthen.xml t/expansion/keywords.pdf t/expansion/keywords.tex t/expansion/keywords.xml t/expansion/lettercase.pdf t/expansion/lettercase.tex t/expansion/lettercase.xml t/expansion/meaning.pdf t/expansion/meaning.tex t/expansion/meaning.xml t/expansion/noexpand.pdf t/expansion/noexpand.tex t/expansion/noexpand.xml t/expansion/testchar.pdf t/expansion/testchar.tex t/expansion/testchar.xml t/expansion/testexpand.pdf t/expansion/testexpand.tex t/expansion/testexpand.xml t/expansion/testif.pdf t/expansion/testif.tex t/expansion/testif.xml t/expansion/testinput.pdf t/expansion/testinput.tex t/expansion/testinput.xml t/expansion/testinput.foo t/expansion/fragment1.tex t/expansion/fragment2.tex t/expansion/testmultido.pdf t/expansion/testmultido.tex t/expansion/testmultido.xml t/expansion/toks.pdf t/expansion/toks.tex t/expansion/toks.xml t/expansion/whichinput.pdf t/expansion/whichinput.tex t/expansion/whichinput.xml t/expansion/whichinput.latexml t/expansion/whichcache.pdf t/expansion/whichcache.tex t/expansion/whichcache.xml t/expansion/whichcache.latexml t/expansion/whichfrag1 t/expansion/whichfrag1.tex t/expansion/whichfrag1.tex.tex t/expansion/whichfrag2 t/expansion/whichfrag2.tex t/expansion/whichfrag3 t/expansion/whichpkga t/expansion/whichpkga.sty t/expansion/whichpkgb t/expansion/whichpkgb.sty t/expansion/whichpkgb.sty.sty t/expansion/whichpkgc.sty t/expansion/subdir/whichpkga.sty t/fonts/accents.pdf t/fonts/accents.xml t/fonts/accents.tex t/fonts/bbold.pdf t/fonts/bbold.xml t/fonts/bbold.tex t/fonts/cancels.tex t/fonts/cancels.xml t/fonts/cancels.pdf t/fonts/esint.pdf t/fonts/esint.tex t/fonts/esint.xml t/fonts/fonts.pdf t/fonts/fonts.tex t/fonts/fonts.xml t/fonts/marvosym.pdf t/fonts/marvosym.xml t/fonts/marvosym.tex t/fonts/mathaccents.pdf t/fonts/mathaccents.xml t/fonts/mathaccents.tex t/fonts/mathbbol.pdf t/fonts/mathbbol.xml t/fonts/mathbbol.tex t/fonts/omencodings.pdf t/fonts/omencodings.tex t/fonts/omencodings.xml t/fonts/mixed.pdf t/fonts/mixed.tex t/fonts/mixed.xml t/fonts/mathcolor.pdf t/fonts/mathcolor.tex t/fonts/mathcolor.xml t/fonts/soul.pdf t/fonts/soul.tex t/fonts/soul.xml t/fonts/stmaryrd.pdf t/fonts/stmaryrd.tex t/fonts/stmaryrd.xml t/fonts/textcomp.pdf t/fonts/textcomp.tex t/fonts/textcomp.xml t/fonts/textsymbols.pdf t/fonts/textsymbols.tex t/fonts/textsymbols.xml t/fonts/ulem.pdf t/fonts/ulem.tex t/fonts/ulem.xml t/fonts/wasysym.pdf t/fonts/wasysym.tex t/fonts/wasysym.xml t/graphics/none.png t/graphics/colors.pdf t/graphics/colors.tex t/graphics/colors.xml t/graphics/calc.pdf t/graphics/calc.tex t/graphics/calc.xml t/graphics/framed.pdf t/graphics/framed.tex t/graphics/framed.xml t/graphics/graphrot.pdf t/graphics/graphrot.tex t/graphics/graphrot.xml t/graphics/keyval.pdf t/graphics/keyval.tex t/graphics/keyval.xml t/graphics/mykeyval.sty.ltxml t/graphics/mykeyval.sty t/graphics/picture.pdf t/graphics/picture.tex t/graphics/picture.xml t/graphics/simplekv.pdf t/graphics/simplekv.tex t/graphics/simplekv.xml t/graphics/xcolors.pdf t/graphics/xcolors.tex t/graphics/xcolors.xml t/grouping/mathgroup.pdf t/grouping/mathgroup.tex t/grouping/mathgroup.xml t/grouping/scopemacro.pdf t/grouping/scopemacro.latexml t/grouping/scopemacro.tex t/grouping/scopemacro.xml t/math/array.pdf t/math/array.tex t/math/array.xml t/math/arrows.pdf t/math/arrows.tex t/math/arrows.xml t/math/choose.pdf t/math/choose.tex t/math/choose.xml t/math/fracs.pdf t/math/fracs.tex t/math/fracs.xml t/math/niceunits.pdf t/math/niceunits.tex t/math/niceunits.xml t/math/not.pdf t/math/not.tex t/math/not.xml t/math/simplemath.pdf t/math/simplemath.latexml t/math/simplemath.tex t/math/simplemath.xml t/math/testover.pdf t/math/testover.tex t/math/testover.xml t/math/testscripts.pdf t/math/testscripts.tex t/math/testscripts.xml t/namespace/ns1.dtd t/namespace/ns1.pdf t/namespace/ns1.latexml t/namespace/ns1.tex t/namespace/ns1.xml t/namespace/ns2.dtd t/namespace/ns2.pdf t/namespace/ns2.latexml t/namespace/ns2.tex t/namespace/ns2.xml t/namespace/ns3.dtd t/namespace/ns3.pdf t/namespace/ns3.latexml t/namespace/ns3.tex t/namespace/ns3.xml t/namespace/ns4.dtd t/namespace/ns4.pdf t/namespace/ns4.latexml t/namespace/ns4.tex t/namespace/ns4.xml t/namespace/ns5.dtd t/namespace/ns5.pdf t/namespace/ns5.latexml t/namespace/ns5.tex t/namespace/ns5.xml t/parse/compose.pdf t/parse/compose.tex t/parse/compose.xml t/parse/functions.pdf t/parse/functions.tex t/parse/functions.xml t/parse/kludge.pdf t/parse/kludge.tex t/parse/kludge.xml t/parse/mixedfrac.pdf t/parse/mixedfrac.tex t/parse/mixedfrac.xml t/parse/operators.pdf t/parse/operators.tex t/parse/operators.xml t/parse/parens.pdf t/parse/parens.tex t/parse/parens.xml t/parse/scripts.pdf t/parse/scripts.tex t/parse/scripts.xml t/parse/qm.pdf t/parse/qm.tex t/parse/qm.xml t/parse/relations.pdf t/parse/relations.tex t/parse/relations.xml t/parse/sets.pdf t/parse/sets.tex t/parse/sets.xml t/parse/spacing.pdf t/parse/spacing.tex t/parse/spacing.xml t/parse/terms.pdf t/parse/terms.tex t/parse/terms.xml t/post/simplemath-post.xml t/post/simplemath.xml t/post/hyperref-post.xml t/post/hyperref.xml t/structure/abstract.pdf t/structure/abstract.tex t/structure/abstract.xml t/structure/amsarticle.pdf t/structure/amsarticle.tex t/structure/amsarticle.xml t/structure/article.pdf t/structure/article.tex t/structure/article.xml t/structure/authors.pdf t/structure/authors.tex t/structure/authors.xml t/structure/badabstract.pdf t/structure/badabstract.tex t/structure/badabstract.xml t/structure/beforeafter.pdf t/structure/beforeafter.tex t/structure/beforeafter.xml t/structure/book.pdf t/structure/book.tex t/structure/book.xml t/structure/epitest.pdf t/structure/epitest.tex t/structure/epitest.xml t/structure/fancyhdr.pdf t/structure/fancyhdr.tex t/structure/fancyhdr.xml t/structure/figures.pdf t/structure/figures.tex t/structure/figures.xml t/structure/hyperref.pdf t/structure/hyperref.tex t/structure/hyperref.xml t/structure/itemize.pdf t/structure/itemize.tex t/structure/itemize.xml t/structure/options.pdf t/structure/options.tex t/structure/options.xml t/structure/myclass.cls t/structure/myclass.cls.ltxml t/structure/apackage.sty t/structure/apackage.sty.ltxml t/structure/para.pdf t/structure/para.tex t/structure/para.xml t/structure/paralists.pdf t/structure/paralists.tex t/structure/paralists.xml t/structure/report.pdf t/structure/report.tex t/structure/report.xml t/structure/sec.pdf t/structure/sec.tex t/structure/sec.xml t/structure/svabstract.pdf t/structure/svabstract.tex t/structure/svabstract.xml t/theorem/amstheorem.pdf t/theorem/amstheorem.tex t/theorem/amstheorem.xml t/theorem/latextheorem.pdf t/theorem/latextheorem.tex t/theorem/latextheorem.xml t/theorem/theorem.pdf t/theorem/theorem.tex t/theorem/theorem.xml t/theorem/ntheorem.pdf t/theorem/ntheorem.tex t/theorem/ntheorem.xml t/tokenize/alltt.pdf t/tokenize/alltt.tex t/tokenize/alltt.xml t/tokenize/comment.pdf t/tokenize/comment.tex t/tokenize/comment.xml t/tokenize/equality.pdf t/tokenize/equality.tex t/tokenize/equality.xml t/tokenize/ligatures.pdf t/tokenize/ligatures.tex t/tokenize/ligatures.xml t/tokenize/mathtokens.pdf t/tokenize/mathtokens.tex t/tokenize/mathtokens.xml t/tokenize/percent.pdf t/tokenize/percent.tex t/tokenize/percent.xml t/tokenize/url.pdf t/tokenize/url.tex t/tokenize/url.xml t/tokenize/verb.pdf t/tokenize/verb.tex t/tokenize/verb.xml t/tokenize/verbata.pdf t/tokenize/verbata.tex t/tokenize/verbata.xml t/daemon/citations.tex t/daemon/document.tex t/daemon/fragment.tex t/daemon/post.tex t/daemon/pre.tex t/daemon/tiny.bib t/daemon/api/port.spec t/daemon/api/port.status t/daemon/api/port.xml t/daemon/complex/exhaustive.spec t/daemon/complex/exhaustive.status t/daemon/complex/exhaustive.xml t/daemon/formats/citation.spec t/daemon/formats/citation.status t/daemon/formats/citation.xml t/daemon/formats/citationraw.spec t/daemon/formats/citationraw.status t/daemon/formats/citationraw.xml t/daemon/formats/makebib.spec t/daemon/formats/makebib.status t/daemon/formats/makebib.xml t/daemon/formats/noparse.spec t/daemon/formats/noparse.status t/daemon/formats/noparse.xml t/daemon/formats/parallel-math-cmml.spec t/daemon/formats/parallel-math-cmml.status t/daemon/formats/parallel-math-cmml.xml t/daemon/formats/parallel-math-om.spec t/daemon/formats/parallel-math-om.status t/daemon/formats/parallel-math-om.xml t/daemon/formats/parallel-math-pmml.spec t/daemon/formats/parallel-math-pmml.status t/daemon/formats/parallel-math-pmml.xml t/daemon/formats/parallel-math-xmath.spec t/daemon/formats/parallel-math-xmath.status t/daemon/formats/parallel-math-xmath.xml t/daemon/profiles/default.spec t/daemon/profiles/default.status t/daemon/profiles/default.xml t/daemon/profiles/fragment.spec t/daemon/profiles/fragment.status t/daemon/profiles/fragment.xml t/daemon/profiles/math.spec t/daemon/profiles/math.status t/daemon/profiles/math.xml t/daemon/profiles/standard.spec t/daemon/profiles/standard.status t/daemon/profiles/standard.xml t/daemon/profiles/stex/stex.spec t/daemon/profiles/stex/stex.status t/daemon/profiles/stex/stex.tex t/daemon/profiles/stex/stex.xml t/daemon/runtimes/timeout.spec t/daemon/runtimes/timeout.status # t/daemon/runtimes/timeout.xml [intentionally omitted] ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������LaTeXML-0.8.2/MANIFEST.SKIP�������������������������������������������������������������������������0000664�0000000�0000000�00000000157�12740445272�0014637�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������~$ ^\# ^\. ^Makefile$ ^Makefile.old$ \.bak$ ($|/)TAGS$ (^|/)\.svn/ ^doc/ ^blib/ ^release/ ^tools/ ^pm_to_blib$ �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������LaTeXML-0.8.2/Makefile.PL���������������������������������������������������������������������������0000664�0000000�0000000�00000027431�12740445272�0014717�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# -*- CPERL -*- #====================================================================== # Makefile Maker for LaTeXML # Bruce.Miller@NIST.gov #====================================================================== use ExtUtils::MakeMaker; use strict; use warnings; use FindBin; #====================================================================== # Use "perl Makefile.PL " # Build options are: # OLD_LIBXML : if you only have access to an old version of XML::LibXML (ie. before 1.61). # This is necessary because we will have an additional dependency # (XML::LibXML::XPathContext), and it would be too late to add that # dependence when we discover which version of XML::LibXML we end up with. # "Enterprise" Linuxes, like Centos and RedHat Enterprise are likely # to be stuck with such older versions (till now). # TEXMF= : Installs the tex style files to this texmf tree, # rather than where kpsewhich says TEXMFLOCAL is (useful for spec files?) # NOMKTEXLSR : disables running mktexlsr (to re-index the texmf directories # after installing our style files). This is to be used when Makefile.PL # is invoked within a staged installation system like rpm, macports, etc. # In those cases you'll need to run "mktexlsr" within the post-install # and post-uninstall stages of the build. #====================================================================== our $OLD_LIBXML = grep { /OLD_LIBXML/ } @ARGV; our $NOMKTEXLSR = grep { /NOMKTEXLSR/ } @ARGV; our $TEXMF; my ($texmfspec) = grep { /^TEXMF/ } @ARGV; if ($texmfspec && $texmfspec =~ /^TEXMF\s*=(.*)$/) { $TEXMF = $1; @ARGV = grep { $_ ne $texmfspec } @ARGV; # Remove so MakeMaker doesn't fret. } our @EXCLUSIONS = (); our $MORE_MACROS = {}; our $MORE_MAKERULES = ''; record_revision(); compile_MathGrammar(); install_TeXStyles(); extra_Tests(); WriteMakefile(NAME => 'LaTeXML', AUTHOR => 'Bruce Miller ', ABSTRACT => "transforms TeX and LaTeX into XML/HTML/MathML", VERSION_FROM => 'lib/LaTeXML.pm', MIN_PERL_VERSION => 5.010001, # A very restricted set of licenses are allowed here. No Creative Commons, eg.! # The tag open_source should be an Open Source Initiative approved license; # public domain is sorta included. See http://opensource.org/faq#public-domain LICENSE => 'open_source', CONFIGURE_REQUIRES => { 'version' => 0.77, }, PREREQ_PM => { 'Archive::Zip' => 0, 'DB_File' => 0, 'File::Which' => 0, 'Getopt::Long' => 2.37, 'Image::Size' => 0, 'IO::String' => 0, 'JSON::XS' => 0, 'LWP' => 0, 'MIME::Base64' => 0, # Core 'Parse::RecDescent' => 0, 'Pod::Parser' => 0, # for Pod::Find 'Text::Unidecode' => 0, 'Test::More' => 0, # part of Test::Simple 'Time::HiRes' => 0, 'URI' => 0, 'version' => 0, # If we have an "old" version of XML::LibXML, # we also need XPathContext. # But we can't determine that additional dependence # after we've already started resolving dependences! ($OLD_LIBXML ? ('XML::LibXML' => 1.58, 'XML::LibXML::XPathContext' => 0) : ('XML::LibXML' => 1.61)), # But > 1.62 is better 'XML::LibXSLT' => 1.58, }, EXE_FILES => ['bin/latexml', 'bin/latexmlpost', 'bin/latexmlfind', 'bin/latexmlmath', 'bin/latexmlc'], macro => $MORE_MACROS, # link to github location to newer MakeMaker (eval { ExtUtils::MakeMaker->VERSION(6.46) } ? (META_MERGE => { 'meta-spec' => { version => 2 }, resources => { repository => { type => 'git', url => 'https://github.com/brucemiller/LaTeXML.git', web => 'https://github.com/brucemiller/LaTeXML'}}}) : () ), ); print STDERR ('=' x 55), "\n", "| If you plan on developing code, please consider using\n", "| the git pre-commit hook to assure style compliant code.\n", "| To install:\n", "| ln -s ../../tools/pre-commit .git/hooks\n", ('=' x 55), "\n" unless -x '.git/hooks/pre-commit'; #********************************************************************** # Overriding ExtUtils::MM methods #********************************************************************** # Exclude the sources used to generate others from the build (See below). sub MY::libscan { my ($self, $path) = @_; if (($path =~ /~$/) || grep { $path eq $_ } @EXCLUSIONS) { return ""; } return $self->MY::SUPER::libscan($path); } # Append any additional Makefile rules added by the following. sub MY::postamble { my ($self, @rules) = @_; return $self->MY::SUPER::postamble(@rules) . $MORE_MAKERULES; } #********************************************************************** # Special Cases #********************************************************************** #====================================================================== # Record the current (svn) repository revision number sub record_revision { # Don't copy the Version template to the installation; it's not needed push(@EXCLUSIONS, 'blib/lib/LaTeXML/Version.in'); # This should be the top-level directory, so it's revision should represent the whole project $$MORE_MACROS{REVISION_BASE} = $FindBin::RealBin; # This is where the REVISION gets stored (along with VERSION, etc) $$MORE_MACROS{REVISION_FILE} = '$(INST_LIBDIR)/LaTeXML/Version.pm'; # Get the current revision # This should be done SAFELY; and work even if svnversion isn't available (esp, windows, mac...) # (When it isn't there's an error, but REVISION ends up "" ... exactly right, I think?) ## This command is appropriate for svn ## $$MORE_MACROS{REVISION} = '$(shell svnversion $(REVISION_BASE))'; ## This command is appropriate for git (I think) if ((-d '.git') && (system("git --version") == 0) ) { # If a git checkout & can run git? $$MORE_MACROS{REVISION} = '$(shell git log --max-count=1 --abbrev-commit --pretty="%h")'; } # Extract the previously recorded revision from the revision file (awkward) $$MORE_MACROS{OLD_REVISION} = '`$(PERLRUN) -ne \'chomp;if(s/.*?REVISION\\s*=\\s*\\"// && s/\\".*//){print;}\' < $(REVISION_FILE)`'; # Substitute the revision into the revision template $$MORE_MACROS{RECORD_REVISION} = '$(PERLRUN) -pe "s@__REVISION__@$(REVISION)@" '; # Have concerns about the $(noecho), but otherwise, it's annoying! # it prints _every_ time you make, even if it doesn't update! $MORE_MAKERULES .= <<'RecordRevision'; # Record the svn revision in the Version module, for more informative diagnostics pure_all :: $(REVISION_FILE) update_revision # Always set version if version module template is newer $(REVISION_FILE): lib/LaTeXML/Version.in $(NOECHO) $(MKPATH) $(INST_LIBDIR)/LaTeXML $(RECORD_REVISION) lib/LaTeXML/Version.in > $(REVISION_FILE) # update version if stored revision if not current update_revision: $(NOECHO) $(MKPATH) $(INST_LIBDIR)/LaTeXML - $(NOECHO) test $(REVISION) = $(OLD_REVISION) \ || $(RECORD_REVISION) lib/LaTeXML/Version.in > $(REVISION_FILE) RecordRevision return; } #====================================================================== # We'll compile the RecDescent grammar during make; don't need to install grammar. sub compile_MathGrammar { push(@EXCLUSIONS, 'blib/lib/LaTeXML/MathGrammar'); $MORE_MAKERULES .= <<'MakeGrammar'; # Precompile the (Recursive Descent) MathGrammar pure_all :: $(INST_LIBDIR)/LaTeXML/MathGrammar.pm $(INST_LIBDIR)/LaTeXML/MathGrammar.pm: lib/LaTeXML/MathGrammar $(PERLRUN) -MParse::RecDescent - lib/LaTeXML/MathGrammar LaTeXML::MathGrammar $(NOECHO) $(MKPATH) $(INST_LIBDIR)/LaTeXML $(MV) MathGrammar.pm blib/lib/LaTeXML/MathGrammar.pm MakeGrammar return; } #====================================================================== # If there appears to be a TeX installation, install our included TeX style # file(s) into the standard TEXMFLOCAL, so that tex/latex can find & use them. # # Note the following complications: # * MakeMaker doesn't natively know how to install TeX styles, # so we have to add explicit rules to the Makefile. # * "staged builds", such as when building & installing rpms # install files to a temporary root directory $(DESTDIR). # (DESTDIR is generally empty for manual make) # * We'll need to run mktexlsr once the files are installed in # their _final_ location, so that they are indexed for tex. # * We need to be careful constructing pathnames to avoid fouling # Windows installations where the pathnames may have spaces. # Not to mention working around dmake's limitations. # # Strategy: # * During "perl Makefile.PL", tentatively use kpsewhich to find # if kpsewhich exists, and if so, where the style files should go. # This directory is stored in the Makefile (hopefully doesn't change later?) # * During "make pure_install", including staged builds, # if we've been supplied with a texmf directory, create the appropriate # subdirectories and install the style files there (but under $(DESTDIR)) # * During "make pure_install", but NOT during staged builds, run mktexlsr. # We test this simply by checking if texmf is writable. # * Add "post install" operations to staged build specfiles # to run mktexlsr. # * Wrap each entire TeX-related pathname in ONE set of double quotes to protect # embedded spaces. sub install_TeXStyles { if (!$TEXMF) { if (system("kpsewhich --expand-var='\$TEXMFLOCAL'") == 0) { # can run kpsewhich? $TEXMF = `kpsewhich --expand-var='\$TEXMFLOCAL'`; # Strip the quotes (they appear in windows, when spaces in pathnames(?)) # These quotes inhibit pasting pathnames togheter, # but we DO need to wrap quotes around all completed paths!! chomp($TEXMF); $TEXMF =~ s/^'//; $TEXMF =~ s/'$//; } } if (!$TEXMF) { warn "Warning: no TeX installation found.\n", " TeX is NOT required, but LaTeXML will have limited functionality.\n"; return; } $$MORE_MACROS{INST_TEXMFDIR} = '$(INST_LIB)/LaTeXML/texmf'; $$MORE_MACROS{INSTALLTEXMFDIR} = "$TEXMF/tex/latex/latexml"; $$MORE_MACROS{DESTINSTALLTEXMFDIR} = '$(DESTDIR)$(INSTALLTEXMFDIR)'; $$MORE_MACROS{INSTALLTEXMFBASEDIR} = "$TEXMF"; $$MORE_MACROS{DESTINSTALLTEXMFBASEDIR} = '$(DESTDIR)$(INSTALLTEXMFBASEDIR)'; $MORE_MAKERULES .= <<'InstallTeXStyles'; pure_install :: $(NOECHO) (($(PERLRUN) -e "exit(1) unless shift;" -- "$(INSTALLTEXMFBASEDIR)") && \ $(MKPATH) "$(DESTINSTALLTEXMFDIR)" && \ $(MOD_INSTALL) \ read "$(INSTALLTEXMFDIR)/.packlist" \ write "$(DESTINSTALLTEXMFDIR)/.packlist" \ "$(INST_TEXMFDIR)" "$(DESTINSTALLTEXMFDIR)" ) \ || echo "No TeX installation, skipping installing LaTeXML TeX packages" uninstall :: $(NOECHO) (($(PERLRUN) -e "exit(1) unless -w shift;" -- "$(DESTINSTALLTEXMFBASEDIR)") && \ $(UNINSTALL) "$(INSTALLTEXMFDIR)/.packlist") \ || echo "No write permission for $(INSTALLTEXMFBASEDIR), skipping uninstalling LaTeXML TeX packages" InstallTeXStyles if(! $NOMKTEXLSR){ $MORE_MAKERULES .= <<'InstallTeXStyles'; pure_install :: $(NOECHO) ($(PERLRUN) -e "exit(1) if -w shift;" -- "$(INSTALLTEXMFBASEDIR)" || mktexlsr) \ || echo "No write permission for $(INSTALLTEXMFBASEDIR), skipping mktexlsr" uninstall :: $(NOECHO) ($(PERLRUN) -e "exit(1) if -w shift;" -- "$(INSTALLTEXMFBASEDIR)" || mktexlsr) \ || echo "No write permission for $(INSTALLTEXMFBASEDIR), skipping mktexlsr" InstallTeXStyles } return; } #====================================================================== # Extra tests for Tikz; too slow for everyday tests. sub extra_Tests { $MORE_MAKERULES .= <<'ExtraTests'; EXTRA_TEST_FILES = t/*.tt fulltest : test extratest extratest :: PERL_DL_NONLAZY=1 $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(EXTRA_TEST_FILES) ExtraTests return; } #====================================================================== ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������LaTeXML-0.8.2/README.pod����������������������������������������������������������������������������0000664�0000000�0000000�00000003152�12740445272�0014400�0����������������������������������������������������������������������������������������������������ustar�00root����������������������������root����������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������=pod =head1 L =for html license CPAN version LaTeXML is a TeX & LaTeX to XML, HTML, MathML, ePub, JATS, ... converter. See the included L for documentation. The official project home page is at L. LaTeXML development is currently hosted on L, where you can retrieve and browse the current source, along with an L and L. For general discussion feel free to join the L. =head1 L See the L file for copyright and licensing information. =head1 L Bruce R. Miller, L =cut LaTeXML-0.8.2/bin/000077500000000000000000000000001274044527200135065ustar00rootroot00000000000000LaTeXML-0.8.2/bin/latexml000077500000000000000000000265111274044527200151070ustar00rootroot00000000000000#!/usr/bin/perl -w # /=====================================================================\ # # | latexml | # # | main conversion program | # # |=====================================================================| # # | Part of LaTeXML: | # # | Public domain software, produced as part of work done by the | # # | United States Government & not subject to copyright in the US. | # # |---------------------------------------------------------------------| # # | Bruce Miller #_# | # # | http://dlmf.nist.gov/LaTeXML/ (o o) | # # \=========================================================ooo==U==ooo=/ # use strict; use warnings; use FindBin; use lib "$FindBin::RealBin/../lib"; use Getopt::Long qw(:config no_ignore_case); use Pod::Usage; use LaTeXML::Core; use LaTeXML; # Currently, just for version information. use LaTeXML::Util::Pathname; #********************************************************************** # Parse command line my ($verbosity, $strict, $comments, $noparse, $includestyles) = (0, 0, 1, 0, 0); my ($format, $destination, $help, $showversion) = ('xml', ''); my ($preamble, $postamble) = (undef, undef); my ($documentid); my $inputencoding; my $mode = undef; my @paths = (); my (@preload); GetOptions("destination=s" => \$destination, "output=s" => \$destination, "preload=s" => \@preload, "path=s" => \@paths, "preamble=s" => \$preamble, "postamble=s" => \$postamble, "quiet" => sub { $verbosity--; }, "verbose" => sub { $verbosity++; }, "strict" => \$strict, "xml" => sub { $format = 'xml'; }, "tex" => sub { $format = 'tex'; }, "box" => sub { $format = 'box'; }, "bibtex" => sub { $mode = 'BibTeX'; }, "noparse" => \$noparse, "includestyles" => \$includestyles, "inputencoding=s" => \$inputencoding, "comments!" => \$comments, "VERSION" => \$showversion, "debug=s" => sub { no strict 'refs'; ${ 'LaTeXML::' . $_[1] . '::DEBUG' } = 1; }, "documentid=s" => \$documentid, "help" => \$help, ) or pod2usage(-message => $LaTeXML::IDENTITY, -exitval => 1, -verbose => 0, -output => \*STDERR); pod2usage(-message => $LaTeXML::IDENTITY, -exitval => 1, -verbose => 2, -output => \*STDOUT) if $help; if ($showversion) { print STDERR "$LaTeXML::IDENTITY\n"; exit(1); } pod2usage(-message => "$LaTeXML::IDENTITY\nMissing input TeX file", -exitval => 1, -verbose => 0, -output => \*STDERR) unless @ARGV; my $source = $ARGV[0]; #********************************************************************** # Set up the processing. print STDERR "$LaTeXML::IDENTITY\n" if $verbosity > -1; print STDERR "processing started " . localtime() . "\n" if $verbosity > -1; @paths = map { pathname_canonical($_) } @paths; if (my @baddirs = grep { !-d $_ } @paths) { warn "These path directories do not exist: " . join(', ', @baddirs) . "\n"; } my $latexml = LaTeXML::Core->new( preload => [@preload], searchpaths => [grep { -d $_ } reverse(@paths)], graphicspaths => ['.'], verbosity => $verbosity, strict => $strict, includeComments => $comments, inputencoding => $inputencoding, includeStyles => $includestyles, documentid => $documentid, nomathparse => $noparse); # Check that destination is valid before wasting any time... if ($destination) { $destination = pathname_canonical($destination); if (my $dir = pathname_directory($destination)) { pathname_mkdir($dir) or die "Couldn't create destination directory $dir: $!"; } } binmode(STDERR, ":encoding(UTF-8)"); $mode = 'BibTeX' if !defined $mode && ($source =~ /\.bib$/); $mode = 'TeX' unless defined $mode; # ======================================== # First read and digest whatever we're given. my $digested; my $serialized; eval { if ($source eq '-') { { local $/ = undef; $source = "literal:" . <>; } } $digested = $latexml->digestFile($source, mode => $mode, preamble => $preamble, postamble => $postamble); # ======================================== # Now, convert to DOM and output, if desired. if ($digested) { $latexml->withState(sub { if ($format eq 'tex') { $serialized = LaTeXML::Core::Token::UnTeX($digested); } elsif ($format eq 'box') { $serialized = ($verbosity > 0 ? $digested->stringify : $digested->toString); } else { my $dom = $latexml->convertDocument($digested); $serialized = $dom->toString(1); } }); } }; if ($@) { # Fatal error? print STDERR $@; } $latexml->showProfile(); # Show profile (if any) print STDERR "\nConversion complete: " . $latexml->getStatusMessage . ".\n"; print STDERR "processing finished " . localtime() . "\n" if $verbosity > -1; if (!$serialized) { } elsif ($destination) { my $OUTPUT; open($OUTPUT, ">", $destination) or die "Couldn't open output file $destination: $!"; binmode($OUTPUT, ":encoding(UTF-8)"); print $OUTPUT $serialized; close($OUTPUT); } else { print $serialized; } # ======================================== # Now, unbind stuff, so we can clear memory $latexml = undef; $digested = undef; $serialized = undef; #********************************************************************** __END__ =head1 NAME C - transforms a TeX/LaTeX file into XML. =head1 SYNOPSIS latexml [options] I Options: --destination=file sets destination file (default stdout). --output=file [obsolete synonym for --destination] --preload=module requests loading of an optional module; can be repeated --preamble=file sets a preamble file which will effectively be prepended to the main file. --postamble=file sets a postamble file which will effectively be appended to the main file. --includestyles allows latexml to load raw *.sty file; by default it avoids this. --path=dir adds to the paths searched for files, modules, etc; --documentid=id assign an id to the document root. --quiet suppress messages (can repeat) --verbose more informative output (can repeat) --strict makes latexml less forgiving of errors --bibtex processes as a BibTeX bibliography. --xml requests xml output (default). --tex requests TeX output after expansion. --box requests box output after expansion and digestion. --noparse suppresses parsing math --nocomments omit comments from the output --inputencoding=enc specify the input encoding. --VERSION show version number. --debug=package enables debugging output for the named package --help shows this help message. If I is '-', latexml reads the TeX source from standard input. If I has an explicit extention of C<.bib>, it is processed as a BibTeX bibliography. =head1 OPTIONS AND ARGUMENTS =over 4 =item C<--destination>=I Specifies the destination file; by default the XML is written to stdout. =item C<--preload>=I Requests the loading of an optional module or package. This may be useful if the TeX code does not specificly require the module (eg. through input or usepackage). For example, use C<--preload=LaTeX.pool> to force LaTeX mode. =item C<--preamble>=I, C<--postamble>=I Specifies a file whose contents will effectively be prepended or appended to the main document file's content. This can be useful when processing TeX fragments, in which case the preamble would contain documentclass and begindocument control sequences. This option is not used when processing BibTeX files. =item C<--includestyles> This optional allows processing of style files (files with extensions C, C, C, C). By default, these files are ignored unless a latexml implementation of them is found (with an extension of C). These style files generally fall into two classes: Those that merely affect document style are ignorable in the XML. Others define new markup and document structure, often using deeper LaTeX macros to achieve their ends. Although the omission will lead to other errors (missing macro definitions), it is unlikely that processing the TeX code in the style file will lead to a correct document. =item C<--path>=I

Add I to the search paths used when searching for files, modules, style files, etc; somewhat like TEXINPUTS. This option can be repeated. =item C<--documentid>=I Assigns an ID to the root element of the XML document. This ID is generally inherited as the prefix of ID's on all other elements within the document. This is useful when constructing a site of multiple documents so that all nodes have unique IDs. =item C<--quiet> Reduces the verbosity of output during processing, used twice is pretty silent. =item C<--verbose> Increases the verbosity of output during processing, used twice is pretty chatty. Can be useful for getting more details when errors occur. =item C<--strict> Specifies a strict processing mode. By default, undefined control sequences and invalid document constructs (that violate the DTD) give warning messages, but attempt to continue processing. Using --strict makes them generate fatal errors. =item C<--bibtex> Forces latexml to treat the file as a BibTeX bibliography. Note that the timing is slightly different than the usual case with BibTeX and LaTeX. In the latter case, BibTeX simply selects and formats a subset of the bibliographic entries; the actual TeX expansion is carried out when the result is included in a LaTeX document. In contrast, latexml processes and expands the entire bibliography; the selection of entries is done during postprocessing. This also means that any packages that define macros used in the bibliography must be specified using the C<--preload> option. =item C<--xml> Requests XML output; this is the default. =item C<--tex> Requests TeX output for debugging purposes; processing is only carried out through expansion and digestion. This may not be quite valid TeX, since Unicode may be introduced. =item C<--box> Requests Box output for debugging purposes; processing is carried out through expansion and digestions, and the result is printed. =item C<--nocomments> Normally latexml preserves comments from the source file, and adds a comment every 25 lines as an aid in tracking the source. The option --nocomments discards such comments. =item C<--inputencoding=>I Specify the input encoding, eg. C<--inputencoding=iso-8859-1>. The encoding must be one known to Perl's Encode package. Note that this only enables the translation of the input bytes to UTF-8 used internally by LaTeXML, but does not affect catcodes. It is usually better to use LaTeX's inputenc package. Note that this does not affect the output encoding, which is always UTF-8. =item C<--VERSION> Shows the version number of the LaTeXML package.. =item C<--debug>=I Enables debugging output for the named package. The package is given without the leading LaTeXML::. =item C<--help> Shows this help message. =back =head1 SEE ALSO L, L, L =cut LaTeXML-0.8.2/bin/latexmlc000077500000000000000000000221161274044527200152470ustar00rootroot00000000000000#!/usr/bin/perl -w # /=====================================================================\ # # | latexmlc | # # | client/server conversion program | # # |=====================================================================| # # | Part of LaTeXML: | # # | Public domain software, produced as part of work done by the | # # | United States Government & not subject to copyright in the US. | # # |---------------------------------------------------------------------| # # | Bruce Miller #_# | # # | http://dlmf.nist.gov/LaTeXML/ (o o) | # # \=========================================================ooo==U==ooo=/ # use strict; use warnings; use Cwd qw(cwd abs_path); use IO::Socket; my $RealBin_safe; use FindBin; use File::Spec::Functions; use File::Which; BEGIN { if ($FindBin::RealBin =~ /^([^\0]+)\z/) { # Valid Unix path TODO: Windows, revisit regexp $RealBin_safe = $1; } die 'Fatal:I/O:tainted RealBin was tainted! Failing...' unless ($RealBin_safe && (-e catfile($RealBin_safe, 'latexmlc'))); } # TODO: We probably want file cat for things like /../lib instead of spelling out a Unix path use lib catdir($RealBin_safe, "..", "lib"); #TODO: Do we ever care about ENV PATH that much? Do we miss on some feature like that? #$ENV{PATH} = "$RealBin_safe:/usr/bin:/usr/local/bin:"; use LaTeXML; use LaTeXML::Common::Config; use URI::Escape; use HTTP::Response; use HTTP::Request; use JSON::XS qw(decode_json); binmode(STDERR, ":encoding(UTF-8)"); # Determine if a socket server is installed locally and obtain its pathname: my $latexmls; $latexmls = catfile($RealBin_safe, 'latexmls') if (-e catfile($RealBin_safe, 'latexmls')); $latexmls = which('latexmls') unless defined $latexmls; # Some defaults: my $opts = LaTeXML::Common::Config->new(input_limit => 100); # Parse and load command-line options $opts->read(\@ARGV); my $keyvals = $opts->scan_to_keyvals(\@ARGV); # Client-side options: my ($port, $address, $expire, $local) = map { $opts->get($_) } qw(port address expire); $address = '127.0.0.1' if !$address || ($address eq 'localhost'); $address =~ s/^(\w+)\:\/\///; # strip away any protocol my $route = '/'; if ($address =~ s/\/(.+)$//) { # strip away route $route = '/' . $1; } # Local if peerhost is localhost: $local = ($expire && ($expire == -1)) || ($address eq '127.0.0.1'); $expire = -1 unless ((defined $expire) && $latexmls); $port = ($local ? 3334 : 80) unless $port; #Fall back if all fails... #*************************************************************************** #Add some base, so that relative paths work my $cdir = abs_path(cwd()); $cdir =~ s/ /\\ /g; if (!$opts->get('base')) { $opts->set('base', $cdir); push @$keyvals, ['base', $cdir]; } # Record if destination exists, for summary my $deststat; $deststat = (stat($opts->get('destination')))[9] if $opts->get('destination'); $deststat = 0 unless defined $deststat; push @$keyvals, ['path', $cdir]; #add current path, to ensure never empty push @{ $opts->get('paths') }, $cdir; # Get the full source of interest my $source = $opts->get('source'); $opts->delete('source'); if (!$source) { print STDERR "Input was empty.\n"; exit 1; } if ($source eq '-') { { local $/ = undef; $source = "literal:" . ; # Set the source in the keyvals to be sent over the wire: @$keyvals = grep { $_->[0] !~ /source|tex/ } @$keyvals; push @$keyvals, $source; } } #*************************************************************************** # Prepare output variables: my ($result, $status, $log); # TODO: Talk to the web service via HTTP #Setup client and communicate my $sock = $latexmls && IO::Socket::INET->new( PeerAddr => $address, PeerPort => $port, Proto => 'tcp', ); #Attempt connecting to a service if ((!$sock) && $local && ($expire == -1)) { # Don't boot a server, single job requested: require LaTeXML; $opts->set('local', 1); $opts->push('debug', 'LaTeXML') unless $opts->get('log'); # If we don't request log, print to STDERR my $converter = LaTeXML->get_converter($opts); $converter->prepare_session($opts); my $response = $converter->convert($source); ($result, $status, $log) = map { $$response{$_} } qw(result status log) if defined $response; } else { my $message = q{}; foreach my $entry (@$keyvals) { my ($key, $value) = ($$entry[0], $$entry[1]); $message .= uri_escape($key) . ($value ? '=' . uri_escape($value) : '') . '&'; } chop $message; #Startup daemon and feed in args, if needed system($latexmls, "--port=$port", "--expire=$expire", "--autoflush=" . $opts->get('input_limit')) if !$sock && $local; my $http_response = ($local ? process_local($address, $port, $route, $message, $sock) : process_remote($address, $port, $route, $message, $sock)); if ($http_response->is_success) { my $response = decode_json($http_response->content); ($result, $status, $log) = map { $$response{$_} } qw(result status log) if defined $response; } else { print STDERR "Fatal:HTTP:" . $http_response->code() . " " . $http_response->message() . "\n"; exit 1; } } #*************************************************************************** ### Common treatment of output: # Special features for latexmls: my $whatsout = $opts->get('whatsout'); my $is_archive = $whatsout && ($whatsout =~ /^archive/); if ($log) { if ($opts->get('log')) { if (!$is_archive) { # archives only have the archive file my $clog = $opts->get('log'); my $log_handle; if (!open($log_handle, ">", $clog)) { print STDERR "Fatal:I/O:forbidden Couldn't open log file $clog : $!\n"; exit 1; } print $log_handle $log; close $log_handle; } } else { print STDERR $log, "\n"; } #STDERR log otherwise } if ($result) { if ($opts->get('destination')) { my $output_handle; if (!open($output_handle, ">", $opts->get('destination'))) { print STDERR "Fatal:I/O:forbidden Couldn't open output file " . $opts->get('destination') . ": $!"; exit 1; } if (!$is_archive) { # If we're not outputing binary data, encode to UTF-8 binmode($output_handle, ":encoding(UTF-8)"); } print $output_handle $result; close $output_handle; } else { if (!$is_archive) { # If we're not outputing binary data, encode to UTF-8 binmode(STDOUT, ":encoding(UTF-8)"); } print STDOUT $result, "\n"; } #Output to STDOUT } # Print summary, if requested, to STDERR if ($opts->get('destination')) { print STDERR $status; print STDERR summary($opts->get('destination'), $deststat); } # == Helpers == sub summary { my ($destination, $prior_stat) = @_; my $new_stat = (stat($destination))[9] || 0; return ($new_stat && ($prior_stat != $new_stat)) ? "\nWrote $destination\n" : "\nError! Did not write file $destination\n"; } sub process_local { my ($req_address, $req_port, $req_route, $req_message, $req_sock) = @_; #daemon is running, reconnect and feed in request $req_sock = IO::Socket::INET->new( PeerAddr => $req_address, PeerPort => $req_port, Proto => 'tcp', ) unless $req_sock; if (!$req_sock) { print STDERR "Fatal:perl:socket-create Could not create socket: $!\n"; exit 1; } my $req_message_length = length($req_message); $req_route = "$req_address:$req_port" unless $req_route; my $payload = <<"PAYLOADEND"; POST $req_route HTTP/1.0 Host: $req_address:$req_port User-Agent: latexmlc Content-Type: application/x-www-form-urlencoded Content-Length: $req_message_length $req_message PAYLOADEND $req_sock->send($payload); my $response_string = q{}; { local $/ = undef; $response_string = <$req_sock>; } close($req_sock); return ($response_string ? HTTP::Response->parse($response_string) : HTTP::Response->new(500, 'Internal Server Error')); } sub process_remote { my ($req_address, $req_port, $req_route, $req_message, $req_sock) = @_; $req_sock->close if $req_sock; # No need of the socket here, using LWP instead my $payload = HTTP::Request->new(POST => "http://$req_address:$req_port$req_route"); $payload->header('User-Agent', 'latexmlc'); $payload->header('Content-Type', 'application/x-www-form-urlencoded'); $payload->content($req_message); require LWP::UserAgent; my $ua = LWP::UserAgent->new; $ua->timeout(10); return $ua->request($payload); } #********************************************************************** __END__ =head1 NAME C - A omni-executable for LaTeXML, capable of stand-alone socket-server and (soon) web service conversion. =head1 SYNOPSYS See the OPTIONS section in L for usage information. Also consult latexmlc --help =head1 DESCRIPTION L provides a client which automatically sets up a LaTeXML local server if necessary (via L). If such server already exists, the client proceeds to communicate normally. A stand-alone conversion (the default) can also be requested via --timeout=-1 =head1 SEE ALSO L, L, L =cut LaTeXML-0.8.2/bin/latexmlfind000077500000000000000000000213631274044527200157500ustar00rootroot00000000000000#!/usr/bin/perl -w # /=====================================================================\ # # | latexmlfind | # # | xml search utility program | # # |=====================================================================| # # | Part of LaTeXML: | # # | Public domain software, produced as part of work done by the | # # | United States Government & not subject to copyright in the US. | # # |---------------------------------------------------------------------| # # | Bruce Miller #_# | # # | http://dlmf.nist.gov/LaTeXML/ (o o) | # # \=========================================================ooo==U==ooo=/ # use strict; use warnings; use FindBin; use lib "$FindBin::RealBin/../lib"; use Getopt::Long qw(:config no_ignore_case); use Pod::Usage; use LaTeXML::Common::XML; use Text::Wrap; use LaTeXML; # Currently, just for version information. #********************************************************************** # Parse command line my ($verbosity) = (0); my ($help, $showversion, $SKELETON) = (0, 0, 0); my (@symbols, @unknowns, @posfuncs, @labels, @refnums); GetOptions("symbol=s" => \@symbols,, "unknown=s" => \@unknowns, "possiblefunction=s" => \@posfuncs, "label=s" => \@labels, "refnum=s" => \@refnums, "skeleton" => \$SKELETON, "quiet" => sub { $verbosity--; }, "verbose" => sub { $verbosity++; }, "VERSION" => \$showversion, "help" => \$help, ) or pod2usage(-message => $LaTeXML::IDENTITY, -exitval => 1, -verbose => 0, -output => \*STDERR); pod2usage(-message => $LaTeXML::IDENTITY, -exitval => 1, -verbose => 2, -output => \*STDOUT) if $help; if ($showversion) { print STDERR "$LaTeXML::IDENTITY\n"; exit(1); } pod2usage(-message => "$LaTeXML::IDENTITY\nMissing input TeX file", -exitval => 1, -verbose => 0, -output => \*STDERR) unless @ARGV; my $source = $ARGV[0]; #********************************************************************** # Do the processing. print STDERR "$LaTeXML::IDENTITY\n" if $verbosity > -1; binmode(STDOUT, ":encoding(UTF-8)"); # Make sure output can handle UTF8 my $DOC = LaTeXML::Common::XML::Parser->new()->parseFile($source); my $XPATH = LaTeXML::Common::XML::XPath->new(ltx => "http://dlmf.nist.gov/LaTeXML"); $XPATH->registerFunction('match-font', \&LaTeXML::Common::Font::match_font); # Objects being labelled sections, equations, etc. our %OBJECTS = (); our $ROOT_OBJECT = { type => 'Document', subobjects => [], items => [] }; foreach my $symbol (@symbols) { collect_matches("Symbols \"$symbol\"", "//ltx:Math[descendant::ltx:XMTok[\@name='$symbol' or text()='$symbol']" # BUT which isn't in presentation branch of an XMDual!! # ie. no ancestor w/preceding sibling has parent = XMDual . "[not(ancestor-or-self::*[preceding-sibling::*][parent::ltx:XMDual])]" . "]"); } foreach my $spec (@unknowns) { my $symbol = $spec; my $font; $font = $1 if $symbol =~ s/\{([\w\s]*)\}$//; collect_matches("Unknown \"$spec\"", # Find Math containing an XMTok, with role=UNKNOWN "//ltx:Math[descendant::ltx:XMTok[\@role='UNKNOWN']" # whose name or content is the requested symbol . "[\@name='$symbol' or text()='$symbol']" . ($font ? "[\@font='$font']" : '') # BUT which isn't in presentation branch of an XMDual!! # ie. no ancestor w/preceding sibling has parent = XMDual . "[not(ancestor-or-self::*[preceding-sibling::*][parent::ltx:XMDual])]" . "]"); } foreach my $symbol (@posfuncs) { collect_matches("Possible function \"$symbol\"", "//ltx:Math[descendant::ltx:XMTok[\@possibleFunction='yes']" . "[\@name='$symbol' or text()='$symbol']" . "]"); } show_matches($ROOT_OBJECT); #********************************************************************** # This matches fonts when both are converted to strings (toString), # such as when they are set as attributes. sub match_font { my ($font1, $font2) = @_; #print STDERR "Match font \"".($font1 || 'none')."\" to \"".($font2||'none')."\"\n"; return 0 unless $font1 && $font2; my @comp1; my @comp2; if ($font1 =~ /^Font\[(.*)\]$/) { @comp1 = split(',', $1); } if ($font2 =~ /^Font\[(.*)\]$/) { @comp2 = split(',', $1); } while (@comp1) { my $c1 = shift @comp1; my $c2 = shift @comp2; return 0 if ($c1 ne '*') && ($c2 ne '*') && ($c1 ne $c2); } return 1; } #********************************************************************** sub collect_matches { my ($description, $xpath) = @_; my @nodes = $XPATH->findnodes($xpath, $DOC); print "Query $description appears in " . scalar(@nodes) . " places\n"; print " [XPath = \"$xpath\"]\n" if $verbosity > 0; foreach my $node (@nodes) { my $object = id_object($node); push(@{ $$object{items} }, $node); } return; } sub id_object { my ($node) = @_; my $id; while (1) { $node = $node->parentNode; return $ROOT_OBJECT if $node->nodeType != XML_ELEMENT_NODE; last if $id = $node->getAttribute('xml:id'); } if (my $object = $OBJECTS{$id}) { return $object; } else { my $parent_object = id_object($node); my $type = $node->localname; my $labels = $node->getAttribute('labels'); my $refnum = $node->getAttribute('refnum'); my ($title) = $XPATH->findnodes("child::ltx:toctitle | child::ltx:title", $node); my $desc = ($refnum ? ($title ? "$refnum. " . $title->textContent : $refnum) : ($title ? $title->textContent : '')); $desc =~ s/\s+/ /g; $OBJECTS{$id} = $object = { id => $id, labels => $labels, type => $type, description => $desc, children => [], items => [] }; push(@{ $$parent_object{children} }, $object); return $object; } } sub show_matches { my ($object, $indent) = @_; $indent = '' unless defined $indent; print $indent. "$$object{type}:" . ($$object{id} ? " ID=$$object{id}" : '') . ($$object{labels} ? " Labels=$$object{labels}" : '') . ($$object{description} ? " \"$$object{description}\"" : "") . "\n"; if (!$SKELETON) { foreach my $item (@{ $$object{items} }) { show_node($item, $indent . ' | '); } } foreach my $child (@{ $$object{children} }) { show_matches($child, $indent . ' | '); } return; } sub show_node { my ($node, $indent) = @_; if ($node->localname eq 'Math') { my $ptex = $node->getAttribute('tex'); my $ctex = $node->getAttribute('content-tex'); if ($verbosity > 1) { print $indent. $node->toString . "\n"; } else { print wrap($indent, $indent, $ctex || $ptex) . "\n"; } } else { print $indent. $node->toString . "\n"; } return; } #********************************************************************** __END__ =head1 NAME C - finds interesting things in LaTeXML generated XML. =head1 SYNOPSIS latexmlfind [options] xmlfile Options: --symbol=symbol finds equations where the symbol appears. --unknown=symbol finds equations where the unknown symbol appears (ie role=UNKNOWN). --possiblefunction=symbol finds equations where symbol is possibly used as a function. --label=symbol finds objects with the given label. --refnum=symbol finds objects with the given refnum (reference number). --quiet suppress messages (can repeat) --verbose more informative output (can repeat) --VERSION show version number. --help shows help message. =head1 OPTIONS AND ARGUMENTS latexmlfind is useful for finding objects within an XML file generated by LaTeXML. =over 4 =item B<--output=>I Specifies the output file; by default the XML is written to stdout. =item B<--unknown=>I Finds equations where the unknown symbol appears. =item B<--possiblefunction=>I Finds equations where symbol is possibly used as a function. =item B<--label=>I