#11795: Easily customize different viewers for PNG, DVI, PDF
----------------------------------+-----------------------------------------
Reporter: leif | Owner: was
Type: enhancement | Status: positive_review
Priority: major | Milestone: sage-5.6
Component: user interface | Resolution:
Keywords: plot browser | Work issues:
Report Upstream: N/A | Reviewers:
Authors: John Palmieri | Merged in:
Dependencies: | Stopgaps:
----------------------------------+-----------------------------------------
Changes (by ncohen):
* status: needs_review => positive_review
Old description:
> Currently, all viewers default to `$SAGE_BROWSER` if it is set,
> `$BROWSER` or some other system-specific defaults (like `xdg-open`, if
> present) otherwise.
>
> The original proposal on this ticket was to support environment variables
> for what is currently
>
> * `sage.misc.viewer.DVI_VIEWER`,
> * `sage.misc.viewer.PDF_VIEWER`, and
> * `sage.misc.viewer.PNG_VIEWER`.
>
> I think instead that if the user wants to change the defaults, then that
> should happen in their init.sage file. The current patch allows them to
> add lines like these:
> {{{
> from sage.misc.viewer import viewer
> viewer.browser('open -a /Applications/Chrome.app')
> viewer.png_viewer('display')
> viewer.pdf_viewer('acroread')
> viewer.dvi_viewer('/usr/bin/xdvi')
> }}}
> (or of course to use these interactively from the command line) and then
> the appropriate program will be used.
>
> ----
>
> Apply [attachment:trac_11795.v2.patch] to the main Sage library
> repository.
New description:
Currently, all viewers default to `$SAGE_BROWSER` if it is set, `$BROWSER`
or some other system-specific defaults (like `xdg-open`, if present)
otherwise.
The original proposal on this ticket was to support environment variables
for what is currently
* `sage.misc.viewer.DVI_VIEWER`,
* `sage.misc.viewer.PDF_VIEWER`, and
* `sage.misc.viewer.PNG_VIEWER`.
I think instead that if the user wants to change the defaults, then that
should happen in their init.sage file. The current patch allows them to
add lines like these:
{{{
from sage.misc.viewer import viewer
viewer.browser('open -a /Applications/Chrome.app')
viewer.png_viewer('display')
viewer.pdf_viewer('acroread')
viewer.dvi_viewer('/usr/bin/xdvi')
}}}
(or of course to use these interactively from the command line) and then
the appropriate program will be used.
----
Apply :
* [attachment:trac_11795.v2.patch]
* [attachment:trac_11795-rev.patch]
--
Comment:
Well, then...
Thank you again ! `:-)`
Nathann
Apply trac_11795.v2.patch, trac_11795-rev.patch
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11795#comment:9>
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.