wolfram alpha accepts latex, but it does not export to latex,
it exports plaintext,rendered images and mathematica sytax.
Is there any javascript library that converts the output to latex?
Mathematica syntax:
Cell[BoxData[FormBox[TagBox[RowBox[List[FractionBox["1", "2"], " ", RowBox[List["(", RowBox[List[RowBox[List["4", " ", SuperscriptBox["x", "2"]]], "+", "x", "+", "2"]], ")"]]]], Identity, Rule[TagBoxNote, List[Rule["Hyperlink", "1/2 (2+x+4 x^2)"]]]], TraditionalForm]], "Output", Rule[PageWidth, 500], Rule[Magnification, 1], Rule[CellMargins, List[List[0, 0], List[0, 0]]], Rule[ShowCellBracket, False], Rule[FontFamily, "Bitstream Charter"], Rule[FontSize, 14], Rule[NumberSeparator, "\[ThinSpace]"]]
Latex syntax
2x^2+\frac{x}{2} +1
To bring a whole Mathematica Notebook into LaTeX format, you can do this via the File > Export menu. However, there are some restrictions that one should keep in mind to avoid surprises: Use a simple style sheet.
Navigate to the menu item Format ► Option Inspector. The Option Inspector window appears. Select Global Preferences from the first drop-down menu. Search for “CommonDefaultFormatTypes,” or navigate to it directly via Cell Options ► New Cell Default ► CommonDefaultFormatTypes.
The MaTeX function can be used either with a string containing math-mode LaTeX code, or with an arbitrary Mathematica expression. It will automatically apply TeXForm to non-string expressions. When writing TeX code in Mathematica strings, remember to always escape backslashes. Thus \sum must be written as "\\sum" .
I know that you can do it within Mathematica itself using TeXForm
So you would do something like ToExpression["\\frac{a}{b}", TeXForm]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With