#11795: Support environment variables for different viewers (e.g. PNG, DVI, PDF)
------------------------------+---------------------------------------------
   Reporter:  leif            |          Owner:  was         
       Type:  enhancement     |         Status:  new         
   Priority:  major           |      Milestone:  sage-4.7.2  
  Component:  user interface  |       Keywords:  plot browser
Work_issues:                  |       Upstream:  N/A         
   Reviewer:                  |         Author:              
     Merged:                  |   Dependencies:              
------------------------------+---------------------------------------------

Comment(by jhpalmieri):

 On further thought, I think this is a bad idea. These variables are only
 used within Sage, so rather than environment variables, they should be set
 in `.sage/init.sage`.  I'm attaching a patch (which needs work: no
 doctests and not really tested at all), which allows for this sort of
 behavior:
 {{{
 # init.sage file
 from sage.misc.viewer import viewer
 viewer.pdf_viewer('open -a /Applications/Adobe\ Reader.app')
 }}}
 Then if `a` is some Sage object, this opens up Adobe Reader on my Mac:
 {{{
 view(a, pdflatex=True)
 }}}
 (The attached patch also fixes a few bugs in latex.py so that this
 actually works.)

 Opinions about using init.sage instead of environment variables?

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