New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Easily customize different viewers for PNG, DVI, PDF #11795
Comments
comment:1
Oh, good, more environment variables. ;) |
comment:2
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
Then if
(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? |
comment:3
Okay, this has doctests and is ready for review. |
Author: John Palmieri |
This comment has been minimized.
This comment has been minimized.
comment:5
Just rebased the patch on 5.5.rc0 |
comment:6
Attachment: trac_11795-rev.patch.gz ellooooooooooooo John !! Thank you very much for this patch ! I had actually begun to write a (much worse) version of it, then noticed you had already done the job ! I joined a patch adding unimportant details to yours, and there's one question keeping me from giving a positive review to your patch immediately : why isn't This should get in quickly Nathann |
Attachment: trac_11795.v2.patch.gz |
This comment has been minimized.
This comment has been minimized.
comment:8
I don't know why |
comment:9
Well, then... Thank you again ! Nathann Apply trac_11795.v2.patch, trac_11795-rev.patch |
This comment has been minimized.
This comment has been minimized.
Reviewer: Nathann Cohen |
comment:11
hi. fwiw, i downloaded an applied these two patches on my macosx 10.8 system (using fink). i added the following to my init.sage: from sage.misc.viewer import viewer
viewer.browser('/sw/bin/w3m')
viewer.dvi_viewer('/sw/bin/xdvi')
viewer.pdf_viewer('/sw/bin/xpdf')
viewer.png_viewer('/sw/bin/display') and ran simple tests. everything worked just fine. (i had a separate issue with error reporting for non-existent viewers, but i don't think that's in the scope of this patch.) i would also like the ability to get plot3d to use other than jmol. i suspect that's also out of scope for this patch. so, i'm basically happy. cheers. |
comment:12
Helloooooooooooo !! Well, as this one has been reviewed and fixes something already let's not disturb it. This being said, if you create a ticket to fix your problem do add me as a Cc, if I understand it the review will be fast Nathann |
comment:14
Hellooooooooooo !!! Well, you can add as a CC whoever may feel involved by the patch. Like me, as I reviewed this, or John (who did all the smart work). This being said, it is very likely that these tickets will remain open for a while unless you write a patch yourself and want it to be reviewed Nathann |
Merged: sage-5.6.beta1 |
Currently, all viewers default to
$SAGE_BROWSER
if it is set,$BROWSER
or some other system-specific defaults (likexdg-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
, andsage.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:
(or of course to use these interactively from the command line) and then the appropriate program will be used.
Apply :
CC: @kcrisman
Component: user interface
Keywords: plot browser
Author: John Palmieri
Reviewer: Nathann Cohen
Merged: sage-5.6.beta1
Issue created by migration from https://trac.sagemath.org/ticket/11795
The text was updated successfully, but these errors were encountered: