[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texmacs-dev] TeXmacs Sympy plugin LaTeX Output Issue Solved

From: Bill Eaton
Subject: Re: [Texmacs-dev] TeXmacs Sympy plugin LaTeX Output Issue Solved
Date: Mon, 20 May 2013 12:38:00 -0700

Aha! So you have figured out how to get LaTeX output. Brilliant. Your file
also explains why the old plugin from the SymPy github site doesn't work: it
doesn't format the data correctly.

This is probably documented somewhere, but I haven't run across it yet. But
it seems there are at least three directives you can supply TeXmacs with
when you are outputting from a session:

   verbatim:<string>       TeXmacs will display <string> as is
   ps:<string>             TeXmacs will consider <string> to be PostScript 
                           and render accordingly
   latex:<string>          TeXmacs will render <string> as LaTeX

Now that you know how to get LaTeX output working with SymPy, the question
probably becomes how to modify the Python/SymPy plugins going forward. It is
arguably true that:
  not all python users are sympy users
  all sympy users are python users
So the SymPy plugin would want to inherit and possibly extend features from
the Python plugin. And straight Python users would not want any of the
SymPy/LaTeX goodness.  I don't know what the preference for implementation
would be. Maybe it could all be incorporated into the Python plugin with an
extra SymPy argument.

And here's some ideas for how to incorporate LaTeX into a SymPy session. I
propose introduction of three functions:
  * tmlatex():  single line LaTeX output. Excecutes code in () and outputs
result LaTeX format
                this would be similar to tmdisp() function used in Octave
  * beginlatex(): Sets a flag that all output will be in LaTeX format from
this point forward
  * endlatex():   unsets flag that all ouptut will be in LaTeX format.

And yet another thought: how painful is it to have Mathematical Input mode
for Python? This would probably mostly be useful for Scipy/Numpy and SymPy

--Bill Eaton

-----Original Message-----
From: David E. Miller [mailto:address@hidden 
Sent: Friday, May 17, 2013 11:15 PM
To: François Poulain; Bill Eaton; address@hidden;
Subject: TeXmacs Sympy plugin LaTeX Output Issue Solved

The attached TeXmacs file documents a proposed solution to the main issue of
developing a TeXmacs plugin for SymPy that outputs expressions to TeXmacs
formatted as LaTeX.

I think there is probably a little more work that needs to be done by those
that have an interest in this plugin, but it appears the the main hurdle of
formatting the output is solved.

Comments and suggestions are welcome.

David Miller

On 5/17/2013 3:30 PM, François Poulain wrote:
> Le Thu, 16 May 2013 04:48:49 -0006,
> tisimst <address@hidden> a écrit :
>> I would love to
>> see a good SymPy plugin!
> I think it is a shared opinion.
> François

reply via email to

[Prev in Thread] Current Thread [Next in Thread]