bzr branch
http://golem.ph.utexas.edu/~distler/code/itexToMML/
|
1
by Jacques Distler
Initial commit. |
1 |
INTRODUCTION: |
2 |
||
3 |
This package contains the distribution for itex2MML. Binaries for MacOSX and |
|
4 |
Linux are provided in the itex-binaries directory. The source code is in the |
|
5 |
itex-src directory. It should compile on most platforms by simply typing "make". |
|
6 |
||
7 |
Also included is a MovableType (2.6 or greater) plugin which provides two |
|
8 |
Text Filtering options: |
|
9 |
1) itex to MathML |
|
10 |
2) itex to MathML with parbreaks |
|
11 |
||
12 |
The plugin relies on the itex2MML commandline utility to do the actual |
|
13 |
conversion. The first filter is a straight itex2MML translation. The latter |
|
14 |
uses the "TeX" (and blogger's) convention that two linebreaks in succession |
|
15 |
signify a new paragraph. (The bloggers also like to convert single linebreaks |
|
16 |
to <br />, but that would mess with TeX formula entry, so we don't support it.) |
|
17 |
||
18 |
Another plugin, which adds itex support to the Textile and Markdown text |
|
19 |
filters is available separately from |
|
20 |
||
21 |
http://golem.ph.utexas.edu/~distler/blog/archives/000374.html |
|
22 |
||
23 |
To use it, you need both this plugin and the Textile and/or Markdown plugins |
|
24 |
installed. |
|
25 |
||
26 |
See |
|
27 |
http://golem.ph.utexas.edu/~distler/blog/itex2MMLcommands.html |
|
28 |
and the itex2MML homepage |
|
29 |
http://pear.math.pitt.edu/mathzilla/itex2mml.html |
|
30 |
for more details on composing in itex and using the itex2MML program. |
|
31 |
The version of itex2MML included here is a greatly-enhanced version, with |
|
32 |
many bugfixes and support for a larger subset of LaTeX/AMSLaTeX syntax. |
|
33 |
||
34 |
Below I've put some simple notes specific to the use of this plugin. |
|
35 |
||
36 |
USAGE NOTES: |
|
37 |
||
38 |
1) Tex equations are delimited by $...$ (inline) or \[...\] (display). |
|
39 |
Alternatively, $$...$$ can also be used to delimit display equations. So, |
|
40 |
just as in a TeX document, be sure you don't have any free-floating $'s |
|
41 |
in your text. If you want to enter something that renders as a $, use |
|
42 |
the unicode entity $. |
|
43 |
||
44 |
2) If you are using the "itex to MathML with parbreaks" filter, paragraph |
|
45 |
breaks are inserted automatically. So |
|
46 |
||
47 |
Some text is here. |
|
48 |
||
49 |
Some more text |
|
50 |
\[ display equation \] |
|
51 |
Yet more text. |
|
52 |
||
53 |
And still more. |
|
54 |
||
55 |
gets turned into three paragraphs. If you are using the plain |
|
56 |
"itex to MathML" filter, you need to put in the paragraph breaks |
|
57 |
yourself, so the above would look like |
|
58 |
||
59 |
<p>Some text is here. </p> |
|
60 |
<p>Some more text |
|
61 |
\[ display equation \] |
|
62 |
Yet more text.</p> |
|
63 |
<p>And still more.</p> |
|
64 |
||
65 |
3) Mozilla only renders MathML when you serve the document as XML (ie |
|
66 |
using the MIME type application/xhtml+xml rather than text/html). You had better |
|
67 |
be producing 100% valid XHTML if you want to see *anything* when Mozilla |
|
68 |
is operating in that mode. |
|
69 |
||
70 |
4)The best way to serve up XML to Mozilla, while still catering to |
|
71 |
other browsers is to use mod_rewrite rules in the .htaccess file of your |
|
72 |
blog. See |
|
73 |
http://golem.ph.utexas.edu/~distler/blog/archives/000167.html |
|
74 |
for how to do that. |
|
75 |
||
76 |
INSTALLATION INSTRUCTIONS: |
|
77 |
||
78 |
1) Put itex2MML.pl in your MovableType plugins directory. |
|
79 |
||
80 |
2) If you are running MacOSX or Linux, I've provided a precompiled binary, |
|
81 |
so you can skip to step 3). |
|
82 |
If these don't do the trick for you, or if you prefer to compile your own, |
|
83 |
cd into the itex-src directory and type "make". The result should be an itex2MML |
|
84 |
binary for your architecture. |
|
85 |
||
86 |
3) Copy itex2MML into /usr/local/bin/, and make sure it's executable |
|
87 |
(mode 755). If you decide to put it in another location, you merely have |
|
88 |
to edit itex2MML.pl to reflect its new location. |
|
89 |
||
90 |
As with Paul Gartside's original version, |
|
91 |
||
92 |
http://pear.math.pitt.edu/mathzilla/itex2mmlBugs.html |
|
93 |
||
94 |
itex2MML is Open Source software, released under a dual license: GPL and MPL. |
|
95 |