nice view of an output and braces {} in the latex() command

10 views
Skip to first unread message

Dmitry Shkirmanov

unread,
Feb 19, 2011, 12:02:12 PM2/19/11
to sage-devel
Hello list, I use latex to receive a nice output in a notebook. (See
please http://sagenb.org/home/pub/2678/ for example).
But there is a little problem: braces in an output of latex() command.
For example the code
#
var("a,b,c")
latex((a+b)*c)
#
gives
{\left(a + b\right)} c
If braces are removed (i.e \left(a + b\right) c ) then it is
very easy to get observable output. May be it is good idea to change
the behavior of the latex() command and remove braces by default?
P.S. sorry for my rough english.

Burcin Erocal

unread,
Feb 20, 2011, 8:30:46 AM2/20/11
to sage-...@googlegroups.com
Hi Dimitry,

I will (finally) have time to work on pynac, the library that we use
for the symbolic expressions, at the end of next week. I can try to
remove the braces and see if anything breaks then.

If you want to try for yourself, you should get a development
environment for pynac [1], then look at the function print_add() in
ginac/add.cpp [2].

[1] http://wiki.sagemath.org/pynac/start
[2] http://pynac.sagemath.org/hg/file/b233d9dadcfa/ginac/add.cpp#l116

Feel free to ask here or at pynac-devel [3] for more information.

[3] http://groups.google.com/group/pynac-devel


Cheers,
Burcin

Reply all
Reply to author
Forward
0 new messages