<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I work thoroughly in Mathematica and in LaTeX and would enjoy the following capability:<div><br></div><div>select some tex-math. Use a macro on it to do the following:</div><div>--expand out any short-hand I use as specified in an arbitrary style file.</div><div>--call MathKernel on the TeX line. </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>--Convert from the TeX to Mathematica standard form using Mathematica's ToExpression. </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>--Evaluate the math</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>--use Mathematica's TeXForm to convert the math output into LaTeX<br></div><div>--insert the result into the file or into the clipboard.</div><div><br></div><div>my Mathematica installation came with a command-line MathKernel program which I've been trying to call with</div><div><br></div><div>MathKernel -noprompt <<EOF</div><div>TeX expression that I want evaluated</div><div>EOF</div><div><br></div><div>However, when I tried this in bash, the escaping of the TeX backslashes on the way in and then again on the way out of the MathKernel program was causing major headaches.</div><div><br></div><div>Has anyone ever interfaced the two programs in this way? Anyone have any advice as to how to approach this problem? I can't seem to find any Mathematica interaction bundle for TM.</div><div><br></div><div>Thanks very much,</div><div><br></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px">Evan Berkowitz<br></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; min-height: 14.0px"><br></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><br class="khtml-block-placeholder"></p><p style="margin: 0.0px 0.0px 0.0px 0.0px">--------------------------------------------------<font face="Helvetica" size="3" style="font: 12.0px Helvetica"></font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica">Physics is like sex. Sure, it may give some practical results, but that's not why we do it.</font></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><br></p><p style="margin: 0.0px 0.0px 0.0px 0.0px"><font face="Helvetica" size="3" style="font: 12.0px Helvetica"><span class="Apple-converted-space"> <span class="Apple-converted-space"> </span></span>Richard Feynman</font></p><br class="Apple-interchange-newline"></span></span></span></div></span> </div><br></body></html>