Open FoggyFinder opened 7 years ago
What do you mean by a "normal string"?
@FoggyFinder currently the user have the following options:
Render your "string" in a WPF control, like in an example:
<controls:FormulaControl Formula="\left(x^2 + 2 \cdot x + 2\right) = 0" />
(that string seems normal enough to me)
Render the formula to WPF DrawingVisual
object (for example, if user need to implement his/her own control): FormulaControl.xaml.cs, line 81—88.
Render the formula to SVG or bitmap from Geometry
acquired from TexRenderer
like in the example.
In all cases the input is the same LaTeX markup string. There aren't any other options for input encoding, but we're considering other possibilities: for example, MathML.
If you want to request some other functionality, then please clarify your question.
I think "normal string" is something like "1/(1-x)". Just standard mathematical notation from programming languages, that should be parsed as "\frac{1}{1-x}".
Got it. That makes sense. Although currently I have no plans to implement any alternate markups (such as MathML or this simple arithmetic language) in the nearest future. (But I'm always ready to accept community contributions like this.)
Extendable or replaceable parser will be on the list of possible features, though. @FoggyFinder, thanks for your suggestion.
@foggyfinder Best to parse into an expression, an F# DU ideally, and then convert the expression to a latex string. Math.net symbolics may be able to do that if you don't want to roll your own; if you do want to I can help.
@charlesroddie Thank you, I know about MathNet.Symbolics but its capabilities are rather limited.
I'm totally agree with you - F# would be good choice to do it.
@FoggyFinder I have a more advanced TeX parser but unfortunately it's a trade secret. Happy to help you with a simple arithmetic one though!
I'm mulling over porting this library to F# to get to know and simplify the code, in preparation for working on TeX editing.
That is the ASCII math notation, they have an asciimathml converter, we could use that to get the mathml format and then translate it to the tex format.
Do you have any plans to add possibility of rendering LaTeX formulas from a normal string?