LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-21-2017, 09:48 AM   #1
prudra
Member
 
Registered: Dec 2010
Location: Kolkata, India
Distribution: Now only Debian Stable Mate DE on laptop.
Posts: 68
Blog Entries: 1

Rep: Reputation: 8
Re: Latex and xdvi command


This is properly regarding Latex; but I have not yet any answer on Latex Forum. So maybe somebody here have the solution.
On my Debian Jessie Mate DE laptop, I have texlive-latex3 installed. I have a number of `\includegraphics{figure.eps}' in the `group.tex' file. As long as the total file length was small there was no problem of showing the figures when I ran `xdvi group.dvi &' after running `latex group.tex' . But when the file grew somewhat larger, then for the figure only the boundary was appearing, but nothing inside the boundary. But if I ran `xpdf group.pdf &' after running `latex group.tex' and
`dvipdf group.dvi', then the full figure was appearing. So it seems that the full figure was being generated by latex command but was not being shown by the
xdvi command. Also after running the xdvi command on the terminal appeared

rudra@mahasagar:~/groups$ xdvi group.dvi &
[1] 2737
rudra@mahasagar:~/groups$ gs: Unknown device: x11
gs: Unrecoverable error: undefined in .uninstallpagedevice
gs: Operand stack:
gs: defaultdevice
xdvik: read_from_gs: Connection reset by peer

This is not causing any harm but is a nuisance.
I shall appreciate help in solving the problem and avoiding the nuisance. Thanks.
 
Old 04-21-2017, 01:40 PM   #2
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,264
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
If I understand your problem description corrrectly, I suspect that the problem which causes the error message is also the cause of the xdvi layout problem. Because PDF appears to be correct Latex is probably not involved.

I am not a Debian user, but a quick DuckDuckGo of the error message turns up multiple threads which indicate this to be a problem of gs version under Debian releases. For example this one.

You may also find the GNU documentation for gs devices helpful.

I would recommend trying to resolve the gs device issue first, then fix your TeX source if layout problems persist.
 
Old 04-22-2017, 08:17 AM   #3
prudra
Member
 
Registered: Dec 2010
Location: Kolkata, India
Distribution: Now only Debian Stable Mate DE on laptop.
Posts: 68

Original Poster
Blog Entries: 1

Rep: Reputation: 8
Quote:
Originally Posted by astrogeek View Post
If I understand your problem description corrrectly, I suspect that the problem which causes the error message is also the cause of the xdvi layout problem. Because PDF appears to be correct Latex is probably not involved.

I am not a Debian user, but a quick DuckDuckGo of the error message turns up multiple threads which indicate this to be a problem of gs version under Debian releases. For example this one.

You may also find the GNU documentation for gs devices helpful.

I would recommend trying to resolve the gs device issue first, then fix your TeX source if layout problems persist.
I went through the first link and one of the answers is here
07/06/07 20:33

Well, I have figured a work-around. There seem to have been two
versions of gs on my system! So when I would do:

$which gs

I would get: /usr/local/bin/gs, and doing

$/usr/local/bin/gs --help

didn't return x11 as an output driver. I figured out that there was
another 'version' of gs on my machine at /usr/bin/gs; this was
actually a soft link pointing to /etc/alternatives/gs. Luckily, this
build of gs had x11 in it - i.e. doing a

$/etc/alternatives/gs --help

did return x11 as a device driver. So I just renamed /usr/local/bin/gs
to something else, and everything (xdvi, gv etc.) began working!

In my case /usr/bin/gs --help showed that no x11 was listed as device. However, there was no other gs in
/etc/alternatives/ So that really didn't help. But there was another post in that link:

I have the same problem now, "gs - Unkown device x11".

Does someone else know how to fix it?
Re: gs - unknown device x11 jych...@gmail.com 05/07/07 03:01
OK, I figured out the how.....

I re-compiled ghostscript source code and then installed it.
everything starts working fine.

I think this is the way out for me; but HOW TO DO THE TASK? Any Tutorial?
 
Old 04-22-2017, 10:04 AM   #4
prudra
Member
 
Registered: Dec 2010
Location: Kolkata, India
Distribution: Now only Debian Stable Mate DE on laptop.
Posts: 68

Original Poster
Blog Entries: 1

Rep: Reputation: 8
After going through those discussions, I thought that maybe Debian has a suible package in its repository. And I found
ghostscript-x (9.06~dfsg-2+deb8u4)
interpreter for the PostScript language and for PDF - X11 support
#apt-get install ghostscript-x
has solvef the problem.
 
Old 04-22-2017, 01:14 PM   #5
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,264
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Very good, glad that led to a solution for you and thanks for posting back with what worked for you, that helps everyone!

Good luck!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
xdvi configurations in Slack thethinker Slackware 1 01-08-2010 06:55 AM
Program accepting Latex source as input and outputs Latex file. stf92 Slackware 5 12-10-2009 01:56 AM
latex & xdvi gives "ERROR: I can't write on file" cmk77 Linux - Software 2 08-17-2007 03:16 PM
latex command not found eye2eye Fedora 4 06-06-2007 11:51 AM
latex: command not found jpb105 Fedora 3 04-12-2004 01:46 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration