#6089: [with patch, needs work] 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):

 Works very well, and the examples class will be very useful.

 Passes   sage -t devel/sage-avoid-jsmath/sage/misc/latex.py and additions
 have doctests.

 Comments:

 1.  For {{{g = latex_examples.graph()}}} at the sage command-line
 {{{view(g)}}} creates a DVI file which doesn't render properly in xdvi or
 evince.  However, {{{view(g pdflatex=True)}}} produces a PDF that is fine.
 DVI behavior was variable depending on the two viewers, so maybe it was my
 setup.  If some DVI's really are problematic, could {{{dvipng --picky}}}
 be used to test for complicated DVI's, and then pdflatex/convert could be
 called as a fallback?

 2.  Passing a list of objects to {{{view()}}} at the command line creates
 a list of the objects properly rendered, line-by-line, in a DVI.  The same
 command from the notebook, goes into jsmath-avoidance mode if just one
 object is problematic, and makes one giant image of everything in the
 list, including the [].  Is it possible to examine each object in the list
 for jsmath-avoidance, handle those individually and return as PNG's
 wrapped in html <img> tags?  This way, a user in the notebook could right-
 click on pieces of the list to get individual images of individual
 objects.

 3.  The {{{add_to_jsmath_avoid_list()}}} adds strings without checking to
 see if they are present already.  I could see a user repeatedly adding a
 string inside of a loop, without perhaps realizing it got repeated over
 and over.  Seems it would be easy enough to test for presence before
 adding.  {{{add_to_preamble()}}} behaves similarly.

 I think (3) is easy and should probably be adjusted, (1) feels a bit like
 an error if we want every combination to "just work" while (2) is more
 wishlist/suggestion.  This will be another good piece of the puzzle, and
 it will be very good to have the canonical examples always available for
 testing and demos.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6089#comment:2>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to