On 05/28/2014 11:17 AM, Stephan Witt wrote:
Am 28.05.2014 um 16:13 schrieb Richard Heck <[email protected]>:
On 05/27/2014 04:36 PM, Stephan Witt wrote:
Am 27.05.2014 um 20:41 schrieb Richard Heck <[email protected]>:
On 05/27/2014 12:27 PM, jezZiFeR wrote:
Am 27.05.2014 um 17:41 schrieb Stephan Witt <[email protected]>:
Am 27.05.2014 um 17:13 schrieb jezZiFeR <[email protected]>:
Hello,
I do not know since when this happens, but in the moment LyX always tells me,
that I would have to install X11 to open »gs«. Why does it ask that?
I use LyX 2.0.7.1 on OSX 10.8.5. It might be, that this only happens when I
open older documents, I am not sure up to now. Does anybody have an idea about
that?
Hello Jezz,
"gs" is the program GhostScript and it needs an X11-display to present the
contents.
Apple isn't providing X11 out-of-the-box anymore since Mountain Lion (10.8.X).
Normally LyX is producing PDF documents directly and there is no need to start
"gs".
The question is: why is "gs" used by LyX? And why doesn't it happen for all
documents?
Perhaps you have some special image in use?
I have made a minimal example and add it here. The message appears already when
opening the file.
Jezz, do you have instant preview enabled for math? If so, that is probably the
reason: We use GhostScript for some of the instant preview conversions.
(Stephan, this is in legacy_lyxpreview2ppm.py, which we only use if some other
route fails. I can't remember which, though.)
Richard
I don't have the problem with the example.
I enabled the log messages for LaTeX/generation and Graphics conversion.
This leads to the following output when opening Jezz's example file:
=================
[SNIP]
Buffer.cpp (1474): Buffer validation done.
graphics/PreviewLoader.cpp (669): PreviewLoader::finishedInProgress(0): processing succeeded for
python -tt "/Applications/LyX.app/Contents/Resources/scripts/lyxpreview2bitmap.py" png
"/var/folders/1x/zm63s22x7s591xrlgm4rl9v40000gn/T/lyx_tmpdir.JL1930/lyx_tmpbuf0/0lyxpreview.tex"
216 000000 faf0e6 xelatex
support/FileName.cpp (945): Recognised Fileformat: png
That's the preview call. As I said, there are several ways that, as a result of
it, we can end up calling GhostScript. Jezz probably doesn't have dv2dt, or
some other such program, installed. See around line 396, e.g., of
lyxpreview2bitmap.py. If not, then we call to legacy_conversion_step1, which is
in legacy_lyxpreview2ppm.py, and that will call GhostScript, at least under
certain circumstances.
The dv2dt binary is part of MacTeX. Jezz, what's your TeX engine?
It would definitely help to see more output, too. The lyxpreview2bitmap
script should issue messages that will tell us why we're going the
legacy route.
You know, there might be another possibility here: If we don't produce a
dvi file, then we try the legacy route. And we could fail to produce a
dvi file for all kinds of reasons, e.g., that some package wasn't
installed. I run into this kind of issue myself whenever I upgrade my
OS, or start working on a new computer, or whatever, since Fedora does
not install preview.sty by default. Hence, compilation fails. If LaTeX
issues an error, we should return, but perhaps it is not, or perhaps the
error is not being caught?
Richard