#6089: [with patch, needs review] view command: don't always use jsMath
-------------------------+--------------------------------------------------
Reporter: jhpalmieri | Owner: jhpalmieri
Type: enhancement | Status: new
Priority: minor | Milestone: sage-4.0
Component: misc | Keywords:
-------------------------+--------------------------------------------------
Comment(by rbeezer):
Hi John,
I've been putting this all through the paces, though I'm not sure I've
covered every possible scenario. ;-) Just one hitch that I have found.
(a) Open a new worksheet, tick the typeset button, type {{{x^2+y^2}}} in a
cell, and output is the appropriate jsMath rendering.
(b) Mess around with some of the {{{latex_examples}}} - add preamble
information, and add a string to the jsmath-avoid-list, and {{{view()}}}
or evaluate with typeset ticked.
(c) Now repeat part (a). I get a graphic out (not jsMath) and the x is
missing (but the exponent of 2 on x is there and in the right place).
Its like the {{{jsMathOkay}}} boolean is still set to {{{False}}}, but I
couldn't track down where in the code there might be a problem. Certainly
it shouldn't be a graphic, but I'm also getting the missing character
problem when I try to view lists of objects. For example, suppose
{{{var('x y z')}}} and {{{k}}} and {{{g}}} are variables and the knot and
graph examples and all the preamble/avoid setup is in place, then in the
notebook
{{{view([k, z^2+x^2+y^2, gr])}}}
is a nice run of three graphics, but the x is missing from the expression,
so this is after Sage has reordered the terms of the expression.
A couple minor comments.
1. In latex _examples, the docstring might benefit from including
"\\usepackage{tkz-berge}" in the preamble addition suggestion. This
package is not needed for the example, but will be needed for the more
general latex code for graphs being built. If somebody goes to get the
one package, they might as well get the other one while they are at it.
Can you tell I made two trips to get the packages a while ago after being
very confused for the need for the second one? ;-)
2. I ran {{{_run_latex_on_file()}}} on a six-page test file I've been
using for debugging lots of this. It creates several PNG's (numbered) if
you run it this way. Maybe that can go in the doc_string. Each page of
my test file has one image that gets created by the PGF/tikz/tkz-graph
stuff, and the pages seem to get clipped on the left/right sides
appropriately, but are all 1293 pixels tall. Not a big deal, but maybe a
switch would control this better? My test file is at
http://sage.pastebin.com/m540bee4f
Great stuff - I'll keep looking at this and we can get it reviewed soon.
Rob
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6089#comment:7>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
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-trac?hl=en
-~----------~----~----~----~------~----~------~--~---