Skip to content

Rhaptos Software Development

Personal tools
You are here: Home » Developer Blog » Brian's Sooth » Tralics notes

Tralics notes Tralics notes

Document Actions
Submitted by bnwest. on 2007-08-27 11:03. Development
Tralics notes

Tralics can be found here: http://www-sop.inria.fr/apics/tralics/. The linux binary can be downloaded from this site (and source code is also available there as well). Usage is

tralics my.tex # which generates a my.xml file

Tralics can convert from TeX to XML which contains Presentation MathML.  Empirically the MathML is very good. I did a by-hand cut-and-paste of the MathML islands found in the generated .xml file into Formulator. Note that without a XSL transform into XHTML, evaluating the entire TeX to XML transform is speculative.

MathML command line magic:

tralics -noentnames -math_variant my.tex

which got rid of these problems:

Bolded characters translate into numeric entity references (like bolded x == &#x1D431;) which does not display in either Formulator or IE. Need to translate '<mi>&#x1D417;</mi>' into '<mi mathvariant='bold'>X</mi>'. See -math_variant.

Named character entity references which are undefined given there is no real DTD. See -noentnames.

Remaining tralics problems:

Capital letters (as seen as limit to integral or summation) sometimes get translated into lower case letters.

RonDevore/lecture_09.tex did not translate well.  At some point the paragraph text got translated into a superscript within a math equation. TRALICS BUG.

RonDevore/lecture_07.tex did not translate well.  At some point the paragraph text got translated into a math equation. TRALICS BUG.

RonDevore/lecture_10.tex did not translate well. Straight text ('bad hbox') got place within a MathML fragment, which made that MathML invalid (no longer conformant with its DTD).  Good news: removing the bad hbox (mbox box actually) got the document to convert.  Bad news: I had to understand the xmllint error message enough to find the problem spot in the translated cnxml file, to be able to work back to the TralicsXml file and then to the tex file, i.e. not for the faint of heart (which may only apply to a small percentage of the brave-heart tex users).  TRALICS BUG.

MarkEmbree1/lecture1.tex did not translate well. Macros defined in an external package (\usepackage{453notes}) were not recognized by tralics. After moving the macro definitions from the package to the lecture1.tex file, translation worked well. Converter usage notes may be the answer to this problem, i.e. limit macro usage to those defined in the tex file and to a set of universally defined packages. USAGE NOTES.

RonDevore/lecture_02.tex: Theorems in LaTeX get translated into a <para> node.  The semantics appear to be lost by tralics (and not by us translating from tralcis xml into CNXML). An additional problem is that the available semantic tags in LaTeX may not be used (e.g. as seen in Proof and Definition in this module).

MichaelWakin1/baraniukWakin19sept2007.tex: tralics requires the \sqrt argument to be in {}, while latex does not. TRALICS BUG.

MichaelWakin1/baraniukWakin19sept2007.tex: tralics does not assign ids in order when processing .bib files. Our bib hack assumes the bib entry are ordered by ids.  TRALICS BUG?

RonDevore/lecture_04.tex: eq #14 has a matching parens of different sizes issue.  See 9/14/2007 email from Mark Davenport on how to fix the MathML by hand after conversion. TRALICS BUG.

DonJohnson1/bernoulli.tex: \MakeUpperCase{} (and \MakeLowercase{} as well) in math equations is ignored by tralics.

LaTeX packages not supported by tralics:

natbib : http://merkel.zoneo.net/Latex/natbib.php (documentation implies otherwise; see a ./confdir/natbib.plt in the source distro => USER ERROR)

LaTeX packages supported by tralics:

 alltt amssymb eufrak graphpap newlfont tracefnt
 amsbsy amstext fancyvrb ifthen oldlfont tralics-iso
 amscd amsthm fix-cm inputenc RR upref
 amsfonts amsxtra fixltx2e latexsym shortvrb 
 amsgen cgloss4e flafter makeidx showidx 
 amsmath delarray fontenc mml syntonly 
 amsopn eucal gb4e natbib textcomp 

tralics will ignore all other \usepackage{} statements.  We will address in the LaTeX article template we will provide.

Other LaTeX issues:

bitex is not converted into bibtexml. FUTURE TRALICS WORK.

LaTeX tables were not translated into CALS tables. FUTURE TRALICS WORK.

Detritus:

license: http://www.cecill.info/index.en.html

298 pages of implementation notes for the brave at heart: Tralics, a LaTeX to XML translator; Part II

tralics documentation: We recommend to always use \newcommand instead of \def.


BibTeX to XML converters (was: Tralics notes)

Posted by cbearden at 2007-09-13 17:55
There are a couple of BibTeX to BibTeXmL translators linked to from this page:
http://bibtexml.sourceforge.net/details.html
Developer Blog
« May 2008 »
Su Mo Tu We Th Fr Sa
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31
Categories:
Content (55)
Copyright (0)
Deep Code (3)
Development (193)
Markup (22)
Metadata (1)
Printing (7)
Style (9)
Testing (2)
Usability (6)