Ticket #3137 (closed enhancement: fixed)
[with patch, positive review] view command in misc/latex.py -- fix to not hardcode xdvi command
| Reported by: | was | Owned by: | was |
|---|---|---|---|
| Priority: | major | Milestone: | sage-3.0.2 |
| Component: | user interface | Keywords: | |
| Cc: | Work issues: | ||
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
On Wed, May 7, 2008 at 12:26 PM, John H Palmieri <jhpalmieri64@gmail.com> wrote: > > A problem: on my linux box, if I use 'view' (not in a notebook), an > xdvi window appears then immediately disappears. If I run view with > 'debug=True', toward the end I get this: > > Output written on sage.dvi (1 page, 740 bytes). > Transcript written on sage.log. > gs: Unrecoverable error: limitcheck in .putdeviceprops > xdvik gs_io: Broken pipe > xdvik gs_io: Broken pipe > xdvik gs_io: Broken pipe > ghostscript died unexpectedly. > xdvi.bin: spcl_scan: shouldn't happen: POST encountered, offset 659 > > Has anyone seen this before? (This works on my mac, just not on my > linux box.) > I have never seen that before. > And a question: on my mac, suppose I want to use TeXShop instead of > xdvi to display the output of the view command. Is there a way to do > this? > The use of xdvi is hardcoded in sage/misc/latex.py so the answer is I guess to change this and submit a patch or make it a trac ticket. It's reasonable to consider this a bug, since view should I think just use the OS X open command as defined in sage/misc/viewer.py, i.e., use whatever is the default opener for a dvi file on your system. It's hardcoded xdvi right now since that was some of the first sage code I ever wrote and that was long before I ported Sage to run on OS X...
Attachments
Change History
Changed 5 years ago by yi
-
attachment
view_trac_3137.patch
added
comment:1 Changed 5 years ago by yi
- Summary changed from view command in misc/latex.py -- fix to not hardcode xdvi command to [with patch, needs review] view command in misc/latex.py -- fix to not hardcode xdvi command
This has annoyed me for a while now so I fixed it to use the sage/misc/viewer.py helper file to determine the correct viewer.
Please test on Linux (only tested on OS X).
comment:2 Changed 5 years ago by jhpalmieri
- Summary changed from [with patch, needs review] view command in misc/latex.py -- fix to not hardcode xdvi command to [with patch, one positive review] view command in misc/latex.py -- fix to not hardcode xdvi command
Works for me on my linux box. I'm using some version of Red Hat; perhaps people using other linux distributions should test it on their machines, too.
comment:3 Changed 5 years ago by mabshoff
- Status changed from new to closed
- Resolution set to fixed
- Summary changed from [with patch, one positive review] view command in misc/latex.py -- fix to not hardcode xdvi command to [with patch, positive review] view command in misc/latex.py -- fix to not hardcode xdvi command
Merged in Sage 3.0.2.alpha1
Note: See
TracTickets for help on using
tickets.

patch to use dvi_viewer() from misc/viewer.py