org.das2.util.LatexToGranny
Lightweight converter for LaTeX expressions to Granny strings, for the
MMS mission. This handles strings like:
- cm^{-3}
- nA/m^{2}
- \rho^2 + 2\Gamma_{ij}
- \sqrt{a + b} (This is not handled by the IDL library either.)
The IDL project that minimally specifies is: TeXtoIDL, at http://physics.mnstate.edu/craig/textoidl/
LatexToGranny( )
isLatex
isLatex( String s ) → boolean
detect if the string is LaTeX. This currently looks for ^{ or _{,
but is expected to be changed in the future.
Parameters
s - the string
Returns:
true if the string appears to be LaTeX.
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
latexToGranny
latexToGranny( String latex ) → String
for the latex encoded string, return the granny string that
implements.
Parameters
latex - LaTeX encoded string. E.g. \rho^2 + 2\Gamma_{ij}
Returns:
the granny string. E.g. ρ!U2!n + 2Γ!Dij!N
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]
main
main( String[] args ) → void
Parameters
args - a java.lang.String[]
Returns:
void (returns nothing)
[search for examples]
[view on GitHub]
[view on old javadoc]
[view source]