2

I usually work with software called Wolfram Mathematica. With this software I perform mathematical calculations and get their results.

I usually do the following:

Button Right Click -> Copy As -> LaTeX

enter image description here

With that I get my TeX code.

I would like to know if there is any script (macro) or if it is possible to compile a TeX file so that it can import this data from an external file.

MWE

\documentclass{article}
\usepackage{amsmath, amssymb, graphics, setspace}

\begin{document}

\begin{doublespace}
\({\int_0^{10} \left(x^2 + 3x - \frac{1}{3}\right) \, dx}\)
\end{doublespace}

\begin{doublespace}
\(480\)
\end{doublespace}

\end{document}

enter image description here

LCarvalho
  • 1,611
  • Unclear exactly what you're asking to do. If you use Mathematica's Copy As > LaTeX, then you just paste the successive Input and Output expressions to the same .txt file; from there you can copy them and paste into the LaTeX source file. Otherwise, how would you expect some (LaTeX editor/IDE?) script to know where to place what? – murray Oct 31 '17 at 15:07
  • It sounds like you might want to look into the sagetex package. That gives you access to an open source computer algebra system version (similar to Mathematica). Search this site for various examples, such as my answer here. – DJP Oct 31 '17 at 15:13
  • Sorry for not being clear. My concern is to change information in the calculations software and forget to paste the new results into the TeX editor. I would like to know some possible solution for this. – LCarvalho Oct 31 '17 at 15:15
  • Then it really sound like sagetex. Changing some entries in the matrix will result in the CAS Sage calculating a new transpose and calculating a new product. You don't have to update the result--it does it for you. See link I gave in earlier comment. The documentation for the package is here. – DJP Oct 31 '17 at 15:20
  • I would expect some script that I could link a certain line of TeX code (through a command from some package) with a specific line of code from the other program. – LCarvalho Oct 31 '17 at 15:21
  • @DJP Thanks for the comments and I'll study about what you indicated – LCarvalho Oct 31 '17 at 15:23

0 Answers0