# Convert WolframAlpha output to $\LaTeX$

I am using WolframAlpha app on my iPad and would like to confirm that there is no way to convert its output to $$\LaTeX$$ form?

It would be nice to have this feature so as to copy it to Stack Exchange for questions. I do not have Wolfram Mathematica

Thanks

You can do the following. Once you get the output in Wolfram Alpha web page, say you have typed solve y'+x=0, then in the output window, hover the mouse there, and select plain text option

Then in the window which opens, select continue in computable notebook

Then a Wolfram Alpha notebook now opens showing the commands it used to generate the output on the web page. Like this

The commands are not evaluated. To evaluate them, hit the enter key in the first cell. This will now generate the output you saw at the Wolfram web page.

Then below the output cell, now type the command TeXForm[%] to generate the Latex, like this

Then copy the Latex to clipboard and paste the latex to your Latex editor.

• Strange...I get output as "0.01 TeXForm" Feb 11, 2021 at 13:22
• @user9106985 did you evaluate the CELL and type TeXForm[%] in new cell below it? Feb 11, 2021 at 16:11
• got it! Thanks a lot! Feb 11, 2021 at 16:40

You can copy the plain text and use http://asciimath.org/ to convert it to MathML, and then on https://npm.runkit.com you can do:

const Mathml2latex = require('mathml-to-latex');

const mathml = 
<math xmlns="http://www.w3.org/1998/Math/MathML">
.
.
.
[/itex]
;

Mathml2latex.convert(mathml);


And then run it

Or alternatively paste it to a text file, save as mathml.xml, download the XSLT MathML library, download an XSLT processor like saxon on the XML file, and then put it all in the same folder and execute:

Alternatively you can sign up at https://www.wolframcloud.com and then go to https://www.wolframcloud.com and create a new notebook and then paste in the wolfram language code for the computation and then press shift enter and then type in TeXForm[%] and then shift enter as Nasser says.