mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] Show directive in the TeXmacs Sage Interface


Chronological Thread 
  • From: Offray Vladimir Luna Cárdenas <address@hidden>
  • To: address@hidden, address@hidden
  • Subject: Re: [TeXmacs] Show directive in the TeXmacs Sage Interface
  • Date: Tue, 15 Sep 2009 05:49:11 -0500

Hi,

chu-ching huang wrote:

[...]
Sage plugins is similar to python plugins. They support the function
"ps_out()"
to embed the graph output (postscript format) into TeXmacs worksheet.

Best regards,

cch


Thanks cch for your quick answer. The procedure is not working. This is my TeXmacs code inside the Sage Session:

x1,y1 = 3,4;
x2,y2 = 7,9;
x3,y3 = 9,2;
A = (x1,0);
B = (x2,0);
C = (x3,0);
P1 = [x1,y1];
P2 = (x2,y2);
P3 = (x3,y3);
g = Graphics();
puntos = [A,B,C,P1,P2,P3];
g += point(puntos);
triangulo = [P1,P2,P3];
g += polygon(triangulo);
g.ps_out()


And I get after pressing enter:

<\output>
Traceback (most recent call last):
AttributeError: 'Graphics' object has no attribute 'ps_out'
</output>


This is because g is declared as an instance of Graphics() object and it has not ps_out() attribute. g.show() still shows what I'm looking for, but as a external png inside firefox. Things like "plot(sin,-2,2)" are rendered inside TeXmacs without problem.

Cheers,

Offray



Archive powered by MHonArc 2.6.19.

Top of page