LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Re: Latex and xdvi command (https://www.linuxquestions.org/questions/programming-9/re-latex-and-xdvi-command-4175604324/)

prudra 04-21-2017 09:48 AM

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.

astrogeek 04-21-2017 01:40 PM

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.

prudra 04-22-2017 08:17 AM

Quote:

Originally Posted by astrogeek (Post 5700339)
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?

prudra 04-22-2017 10:04 AM

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.

astrogeek 04-22-2017 01:14 PM

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!


All times are GMT -5. The time now is 02:39 PM.