I am writing a report in physics and I want to use a Mathematica script that produce something like a simulation. I want to know how I can add this code to my LaTeX file, so when I compile that LaTeX file, I can see the simulations in the resultant PDF file.

  • 1
    $\begingroup$ LaTeX is clearly not an interpreter for Mathematica. I'm not sure, what extent of interactivity may be possible within a pdf. In fact, when a colleague of mine was publishing a paper, he had some interactive content as online supplementary material in a separate Java applet. $\endgroup$ – LLlAMnYP Nov 26 '15 at 23:30
  • $\begingroup$ Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. $\endgroup$ – bbgodfrey Nov 26 '15 at 23:32
  • $\begingroup$ I do not agree with the downvote, but I think you will be better off to ask this on TeX.SE. In place of Mathematica, you could have almost any language other than $\TeX$ and the answer would be much the same. $\endgroup$ – Oleksandr R. Nov 27 '15 at 1:08
  • $\begingroup$ 1) Write the Latex document using Wolfram Language template tags. 2) Write a command line script that first runs the Wolfram Language interpreter on the file, thus evaluating the WL code, and then runs the Latex compiler, thus creating the PDF. $\endgroup$ – C. E. Nov 27 '15 at 1:33
  • $\begingroup$ @Pickett would, say, a Manipulate be preserved as an interactive thing though? Else one may just as well export output cells to pdf and embed into latex. $\endgroup$ – LLlAMnYP Nov 27 '15 at 12:57

Browse other questions tagged or ask your own question.