Skip to Content.
Sympa Menu

texmacs-users - Re: [TeXmacs] Sympy plugin

Subject: mailing-list for TeXmacs Users

List archive

Re: [TeXmacs] Sympy plugin


Chronological Thread 
  • From: Bill Eaton <address@hidden>
  • To: address@hidden
  • Subject: Re: [TeXmacs] Sympy plugin
  • Date: Tue, 14 May 2013 21:34:13 -0700

It has been pointed out to me by the SymPy community that the SymPy plugin for TexMacs is quite old and maybe hasn't kept up with the times. I can accept that. If it's simple, I'd like to see if I can fix it.

I browsed through the tm_sympy file. It looks like the SymPy plugin takes the all outputs and runs them through the sympy.printing.latex() function. So far so good.

Many outputs look good. For example
  (x**2+y**2)/a

Is formatted nicely (i.e. it looks great on screen). The LaTeX outputted from SymPy is
  '\\frac{x^{2} + y^{2}}{a}'

I run into trouble from integrals and square roots.
   TeXMacs Session   TexMacs Output     SymPy output
   sqrt(x)           <large-sqrt-0> x   '\\sqrt{x}'
   Integral(x**2,x)  <
big-int-2> x²dx   '\\int x^{2}\\,dx'

Is there something funky about SymPy's LaTeX output? Or does TexMacs have a slightly different LaTeX syntax?

Finally, I observe that the Maxima plugin works quite well. But I cannot make sense of what is happening in that plugin.

Any ideas?

--Bill Eaton





On 04/26/2013 09:45 PM, Bill Eaton wrote:
I have a partial answer to my question.

It turns out that the downloaded files from the Sympy Github repository work fine. Or mostly fine. I made a mistake and ended up saving an html file instead of a Scheme file.

tm_sympy  --> /usr/share/texmacs/TeXmacs/plugins/sympy/progs/

init-sympy.scm --> /usr/lib/texmacs/TeXmacs/bin

I had to change the permissions on tm_sympy to make it look like other files in that directory.

Now I get a Sympy menu entry under Sessions. And I can launch a session. The only problem is that result formatting is gibberish and I can't seem to figure out how to turn on LaTeX formatting.




Archive powered by MHonArc 2.6.19.

Top of Page