#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.1
Component:  misc         |    Keywords:            
-------------------------+--------------------------------------------------

Comment(by jhpalmieri):

 Here's a new patch.  In addition to the changes listed earlier, this:

  1. rewrites {{{list_function}}} etc.  These were a little broken before
 (e.g., putting {{{\sage{range(10)}}}} in a %latex cell should have
 produced a list with each number on a different line, but it didn't;
 putting {{{\sage{range(100)}}}} did put each number on a different line,
 which looks horrible).  Now lists and tuples are typeset with all of their
 entries on a single line.  This is I think what you would expect: if you
 ask to typeset {{{[2,3,5,7]}}}, then you expect the list to be typeset in
 the obvious way.   (This is only in the notebook; the command-line
 behavior is unchanged.)

 2. it slightly changes {{{bool_function}}} -- changes {{{\rm blah}}} to
 {{{\mathrm{blah}}}}

 3. the command {{{_run_latex_on_file}}} now takes arguments "png" (whether
 to produce a png file) and "do_in_background".  It tries to check whether
 a dvi file was created correctly by processing it with dvipng (if dvipng
 is present).  If something goes wrong, it calls dvips and ps2pdf.  (It
 doesn't just call pdflatex, because some packages, like pstricks, don't
 work with pdflatex.)

 4. Unfortunately, lists are now typeset all-in-one: if any part of the
 list contains jsmath avoidance text, then the whole thing turns into a png
 file.  This is partly because I couldn't write the code cleanly to deal
 with all of the cases (lists, tuples, nesting, etc.), and partly for speed
 issues: if A and B each require jsmath avoidance, for example, then
 {{{view([A, ZZ, B])}}} would run two separate latex processes, and this
 seemed slow on the machines I was using.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6089#comment:15>
Sage <http://sagemath.org/>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

--~--~---------~--~----~------------~-------~--~----~
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