|
||||||||||||||||
|
What's New information on new releases
$\mbox{, solve for}$$2.8$$2,8$
will now be correctly converted to …<mn>2,8</mn>…
>java -jar mathtoweb.jar -stdout inputLatex.xml>java -jar mathtoweb.jar -help)
As stated above, a new Java utility function has been added to MathToWeb.java (the main source file). Programmers can compile the MathToWeb source code into their own projects and use the new function, called convertLatexToMathMLUtility(..), to implement conversions of LaTeX to MathML. In essence, the function takes a string (containing LaTeX) as an argument, and returns a string (containing MathML) upon completion.
The new function is simple to implement, as described below:
MathToWeb mtw = new MathToWeb("conversion_utility");
String[] sArrayReturn = new String[3];
sArrayReturn = mtw.convertLatexToMathMLUtility(sLatexInput, sCommandLineArgs); // This is the new function.
String sSuccessOrFailure = = sArrayReturn[0];
String sConversionLog = sArrayReturn[1];
String sMathMLOutput = sArrayReturn[2];
The first argument to convertLatexToMathMLUtility(..), the String sLatexInput, is just the text (containing LaTeX)
that is to be converted to MathML. A very simple example might be:
"...and the following integral, $\int_a^b f(x) \, dx$ gives rise to a ....".
The second argument, the String sCommandLineArgs, allows the program to be called with any of the command flags
available in the command-line variant. An example might be: "-unicode -line -ie UTF8 -rep".
The first returned String, sSuccessOrFailure, will contain either "Success" or "Failure". Note that "Failure" is reported if there is a LaTeX syntax error, or some other problem that makes it impossible to convert the input string.
The second returned String, sConversionLog, gives useful output related to the conversion process just run, like syntax errors etc. (more or less, the same output as seen in the command-line or Applet/GUI variants).
The third returned String, sMathMLOutput, contains the result of the conversion (i.e. the MathML, converted from LaTeX).
$\dot{x}^i$ (if not written as ${\dot{x}}^i$), for
any accent or prime , were not being interpreted correctly.
The dot{x} was not being taken as the whole base of the exponent.
$widehat{abc}$ if converted using the -unicode command (for example,
java -jar mathtoweb.jar -unicode test3.xml) were retaining the
MathML named entity ^ instead of exchanging it for the equivalent Unicode
character (which is ^).
\left of ${\left.a\right{|}}_{\left(b\right)}$
was being retained in the MathML.
>java -jar mathtoweb.jar -df fileOut.xml -force source.xml>java -jar mathtoweb.jar -help)
>java -jar mathtoweb.jar -ns mml source.xml <math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub>
<mi>A</mi>
<mi>i</mi>
</msub>
</mrow>
</math>
<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML">
<mml:mrow>
<mml:msub>
<mml:mi>A</mml:mi>
<mml:mi>i</mml:mi>
</mml:msub>
</mml:mrow>
</mml:math>
split inside gather (like the example below)
was not converting to MathML correctly. The split
was being replaced by an internal \myplaceholder0 tag
which was being retained in the final output. This has been corrected.
\begin{gather}
a_1=b+c+d \tag{1.3}\label{gather-eq1}\\
\begin{split}
a_2+a_3+a_4&=e+f+g+h\\
&\quad +i+j+k\\
&=l+m+n
\end{split} \tag{1.4}\label{gather-eq2} \\
a_5=o+p+q+r+s+t+u+v+w \tag{1.5}\label{gather-eq3}
\end{gather}
\overbrace{ABCDEF}^{abc} and
\underbrace{EFGHJK}_{abc} contained the wrong
characters for the 'overbrace' and 'underbrace'. The Unicode output
(when the '-unicode' switch was used at the command line) was also
incorrect.
$\left\{ A \right\}_{B}$ \left\{ A \right\} as the full base of the subscript.
pmatrix (or other matrix elements) had
been declared within some equation environment. Only the first pmatrix was being
completely converted.
\begin{equation*}
{
\begin{pmatrix}
a_{11}-\lambda & \dotsm & a_{1n} \\
\vdots & \ddots & \vdots \\
a_{n1} & \dotsm & a_{nn}-\lambda
\end{pmatrix}
}
{
\begin{pmatrix}
x_1 \\
\vdots \\
x_n
\end{pmatrix}
}
{
= \mathbf{0}
}
\end{equation*}
$A_{\infty} = \{ A \}$\alpha to α (this is a MathML
character). With the 'Unicode option' set,
it will be converted to α instead.-unicode flag in your command, as the
following example demonstrates:
|
|
-ncf myncf1.txt, myncf1.txt
$\log \left\lvert A \right\rvert$.
Copyright © 2008-2011 MathToWeb.com / Paul Hunter MathToWeb is Open Source software. | contact me | privacy policy |