Mikado ha scritto:
> I am trying to create a simple slope of a line function that shows all
> the steps in calculating a slope. It takes four numeric values. In
> the first step I would like the user to see m =(1-2)/(3+8). Pretty
> print. Using latex? I would then do some simplifying and show m=
> (-1/11). I have tried several approaches with not success. Is there
> anyway to do this?
> Thanx
>
You can *really* use LaTeX ;)
Namely, you can make Sage (and, more generally, python) create the LaTeX
code.
a = 1
b = 2
c = 3
d = 8
print "\\frac{",a,"-",b,"}{",c,"-",d,"}=",(a-b)/(c-d)
That produces you a string that is ready to be included in your LaTeX
file by \input.
Depending on your case, that could be a fruitful approach.
An other approach is to embed your Sage code into a LaTex file. You
should take[1] a look at
http://archive.cs.uu.nl/mirror/CTAN/macros/latex/contrib/sagetex/example.pdf
http://www.ctan.org/tex-archive/macros/latex/contrib/sagetex/
[1] One says "to take a look at" or "to have a look at" ?? I'm not sure...
Have a good night
Laurent
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---