Opened 13 years ago

Closed 13 years ago

#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: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
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 (1)

view_trac_3137.patch (2.1 KB) - added by yi 13 years ago.
patch to use dvi_viewer() from misc/viewer.py

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by yi

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

comment:1 Changed 13 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 13 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 13 years ago by mabshoff

  • Resolution set to fixed
  • Status changed from new to closed
  • 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.