Discussion:
Add Sumatra PDF reader to configure before Adobe Reader?
Scott Kostyshak
2014-05-23 20:36:19 UTC
Permalink
I see quite often Windows users experiencing problems with Adobe
Reader that are solved by using Sumatra PDF reader, an open source,
Windows only PDF reader. One problem that just recently came up is:
http://tex.stackexchange.com/questions/179639/pdf-crashes-after-previewing-from-lyx

Any thoughts?

Also, is there a Windows user around that can test that Sumatra is
found correctly?

Scott
Richard Heck
2014-05-23 21:05:42 UTC
Permalink
Post by Scott Kostyshak
I see quite often Windows users experiencing problems with Adobe
Reader that are solved by using Sumatra PDF reader, an open source,
http://tex.stackexchange.com/questions/179639/pdf-crashes-after-previewing-from-lyx
Any thoughts?
Also, is there a Windows user around that can test that Sumatra is
found correctly?
I'd support this. If someone has Sumatra installed, they're likely to
want to use it.

Richard
Enrico Forestieri
2014-05-23 23:40:34 UTC
Permalink
Post by Richard Heck
Post by Scott Kostyshak
I see quite often Windows users experiencing problems with Adobe
Reader that are solved by using Sumatra PDF reader, an open source,
http://tex.stackexchange.com/questions/179639/pdf-crashes-after-previewing-from-lyx
Any thoughts?
Also, is there a Windows user around that can test that Sumatra is
found correctly?
I'd support this. If someone has Sumatra installed, they're likely
to want to use it.
Note that on Windows the default viewer configured in the OS is used
for a given format, so its position in the list does not really matter,
unless there is no association for the format. However, mentioning
the viewer makes it available in the drop down list.
That said, SumatraPDF is far superior to Adobe Reader when used as
a viewer for documents produced by LaTeX, because a document gets
autoreloaded on change and forward/reverse search is supported.
--
Enrico
Scott Kostyshak
2014-05-24 02:03:56 UTC
Permalink
Post by Enrico Forestieri
Post by Richard Heck
Post by Scott Kostyshak
I see quite often Windows users experiencing problems with Adobe
Reader that are solved by using Sumatra PDF reader, an open source,
http://tex.stackexchange.com/questions/179639/pdf-crashes-after-previewing-from-lyx
Any thoughts?
Also, is there a Windows user around that can test that Sumatra is
found correctly?
I'd support this. If someone has Sumatra installed, they're likely
to want to use it.
Note that on Windows the default viewer configured in the OS is used
for a given format, so its position in the list does not really matter,
unless there is no association for the format.
I didn't know this.
Post by Enrico Forestieri
However, mentioning
the viewer makes it available in the drop down list.
Indeed, this seems like reason enough.
Post by Enrico Forestieri
That said, SumatraPDF is far superior to Adobe Reader when used as
a viewer for documents produced by LaTeX, because a document gets
autoreloaded on change and forward/reverse search is supported.
I didn't know this either. I thought it was just more simple and humble.
In this case, and I'm not convinced myself that we should do this, but
I would be interested in your thoughts:
What about bundling SumatraPDF (only in the Bundle installer) and
optionally installing it? The stand-alone is 2.7 MB so this would
increase the bundle size from 200 MB to 203MB. Apparently we already
bundle eLyXer and JabRef.
This way, forward/reverse search would work out of the box and we
would have fewer "why does LyX crash when I view a PDF?" questions.

Enrico, can you confirm that SumatraPDF is the correct name of the
binary to search for in configure?

Scott
Enrico Forestieri
2014-05-24 10:56:45 UTC
Permalink
Post by Scott Kostyshak
Post by Enrico Forestieri
That said, SumatraPDF is far superior to Adobe Reader when used as
a viewer for documents produced by LaTeX, because a document gets
autoreloaded on change and forward/reverse search is supported.
I didn't know this either. I thought it was just more simple and humble.
I don't think it is so simple and humble. It has all you need for
previewing a document and, if you need doing something fancy that
it does not support, there is a menu option for opening the pdf
in Adobe Reader.
Post by Scott Kostyshak
In this case, and I'm not convinced myself that we should do this, but
What about bundling SumatraPDF (only in the Bundle installer) and
optionally installing it?
There is nothing to install. The stand-alone version is simply an
executable that you can drop everywhere in your PATH and you are done.
I think that in this case it doesn't even write in the registry and
the preferences are stored in a text file placed alongside the exe.
Post by Scott Kostyshak
The stand-alone is 2.7 MB so this would
increase the bundle size from 200 MB to 203MB. Apparently we already
bundle eLyXer and JabRef.
This way, forward/reverse search would work out of the box and we
would have fewer "why does LyX crash when I view a PDF?" questions.
It would suffice placing the executable in a directory under the LyX
directory tree that is already in the PATH prefix. If LyX is installed
in the Windows programs folder, every time a user changes preferences,
due to a sort of virtualization, the preferences file gets written
somewhere else but it would always appear at that same location.
In this way, different users can see different preferences by reading
the (seemingly) same file. It seems that they have write permissions
to the program folder, but it is really not so.
An initial preferences file containing the InverseSearchCmdLine could
be provided and a corresponding batch file placed alongside the exe.
For example, given the following setting in the SumatraPDF prefs:
InverseSearchCmdLine = lyxeditorwin %f %l
the batch file would be the following one:
$ cat lyxeditorwin.bat
@echo off
setlocal
set file=%1
set row=%2
echo LYXCMD:revdvi:server-goto-file-row:%file% %row%> \\.\pipe\lyxpipe.in
type \\.\pipe\lyxpipe.out > nul

and it would require setting the correct lyxpipe in lyxrc.dist:
\serverpipe "\\.\pipe\lyxpipe"
Post by Scott Kostyshak
Enrico, can you confirm that SumatraPDF is the correct name of the
binary to search for in configure?
Yes, it is.
--
Enrico
Scott Kostyshak
2014-05-24 11:40:18 UTC
Permalink
Post by Enrico Forestieri
Post by Scott Kostyshak
Post by Enrico Forestieri
That said, SumatraPDF is far superior to Adobe Reader when used as
a viewer for documents produced by LaTeX, because a document gets
autoreloaded on change and forward/reverse search is supported.
I didn't know this either. I thought it was just more simple and humble.
I don't think it is so simple and humble. It has all you need for
previewing a document and, if you need doing something fancy that
it does not support, there is a menu option for opening the pdf
in Adobe Reader.
Great.
Post by Enrico Forestieri
Post by Scott Kostyshak
In this case, and I'm not convinced myself that we should do this, but
What about bundling SumatraPDF (only in the Bundle installer) and
optionally installing it?
There is nothing to install. The stand-alone version is simply an
executable that you can drop everywhere in your PATH and you are done.
I think that in this case it doesn't even write in the registry and
the preferences are stored in a text file placed alongside the exe.
Indeed I checked and it does not write to registry.
Post by Enrico Forestieri
Post by Scott Kostyshak
The stand-alone is 2.7 MB so this would
increase the bundle size from 200 MB to 203MB. Apparently we already
bundle eLyXer and JabRef.
This way, forward/reverse search would work out of the box and we
would have fewer "why does LyX crash when I view a PDF?" questions.
It would suffice placing the executable in a directory under the LyX
directory tree that is already in the PATH prefix. If LyX is installed
in the Windows programs folder, every time a user changes preferences,
due to a sort of virtualization, the preferences file gets written
somewhere else but it would always appear at that same location.
In this way, different users can see different preferences by reading
the (seemingly) same file. It seems that they have write permissions
to the program folder, but it is really not so.
An initial preferences file containing the InverseSearchCmdLine could
be provided and a corresponding batch file placed alongside the exe.
InverseSearchCmdLine = lyxeditorwin %f %l
$ cat lyxeditorwin.bat
@echo off
setlocal
set file=%1
set row=%2
echo LYXCMD:revdvi:server-goto-file-row:%file% %row%> \\.\pipe\lyxpipe.in
type \\.\pipe\lyxpipe.out > nul
\serverpipe "\\.\pipe\lyxpipe"
Excellent, thank you for the details.
Post by Enrico Forestieri
Post by Scott Kostyshak
Enrico, can you confirm that SumatraPDF is the correct name of the
binary to search for in configure?
Yes, it is.
OK then I committed the patch at e716f1ef in the meantime.

I'm CC'ing Uwe and Vincent to see if they have any opinions on bundling Sumatra.

Scott
Scott Kostyshak
2014-07-14 23:08:20 UTC
Permalink
Post by Scott Kostyshak
Post by Enrico Forestieri
It would suffice placing the executable in a directory under the LyX
directory tree that is already in the PATH prefix.
If I understand correctly, it seems like another feature would be that
cygwin users could have Sumatra's inverse search automatically
configured (related to your Wiki edit [1]).
Post by Scott Kostyshak
I'm CC'ing Uwe and Vincent to see if they have any opinions on bundling Sumatra.
I haven't heard from Vincent or Uwe. I wonder what Peter (CC'ing now)
thinks of bundling Sumatra on Windows.

Scott

[1] http://wiki.lyx.org/LyX/LyXOnCygwin?action=diff#diff1405374480
Enrico Forestieri
2014-07-15 19:41:37 UTC
Permalink
Post by Scott Kostyshak
Post by Enrico Forestieri
It would suffice placing the executable in a directory under the LyX
directory tree that is already in the PATH prefix.
If I understand correctly, it seems like another feature would be that
cygwin users could have Sumatra's inverse search automatically
configured (related to your Wiki edit [1]).
This would be accomplished by not putting the real binary in the PATH,
dropping the .sh extension from the script name and by calling SumatraPDF
through its full path. However, this would also be true for a native
version, by simply writing a batch script named SumatraPDF.bat doing the
same thing and putting it in the PATH.

BTW, that wiki page is quite outdated and I cannot really update it until
the upload problem is solved.
--
Enrico
Scott Kostyshak
2014-07-15 20:37:34 UTC
Permalink
Post by Enrico Forestieri
Post by Scott Kostyshak
Post by Enrico Forestieri
It would suffice placing the executable in a directory under the LyX
directory tree that is already in the PATH prefix.
If I understand correctly, it seems like another feature would be that
cygwin users could have Sumatra's inverse search automatically
configured (related to your Wiki edit [1]).
This would be accomplished by not putting the real binary in the PATH,
dropping the .sh extension from the script name and by calling SumatraPDF
through its full path. However, this would also be true for a native
version, by simply writing a batch script named SumatraPDF.bat doing the
same thing and putting it in the PATH.
Good to know.
Post by Enrico Forestieri
BTW, that wiki page is quite outdated and I cannot really update it until
the upload problem is solved.
Yes, that is annoying. I think the only current workaround is to
commit to the SVN repo and then link to it.

Scott
Scott Kostyshak
2014-08-20 01:01:54 UTC
Permalink
Post by Scott Kostyshak
Post by Enrico Forestieri
Post by Scott Kostyshak
Post by Enrico Forestieri
That said, SumatraPDF is far superior to Adobe Reader when used as
a viewer for documents produced by LaTeX, because a document gets
autoreloaded on change and forward/reverse search is supported.
I didn't know this either. I thought it was just more simple and humble.
I don't think it is so simple and humble. It has all you need for
previewing a document and, if you need doing something fancy that
it does not support, there is a menu option for opening the pdf
in Adobe Reader.
Great.
Post by Enrico Forestieri
Post by Scott Kostyshak
In this case, and I'm not convinced myself that we should do this, but
What about bundling SumatraPDF (only in the Bundle installer) and
optionally installing it?
There is nothing to install. The stand-alone version is simply an
executable that you can drop everywhere in your PATH and you are done.
I think that in this case it doesn't even write in the registry and
the preferences are stored in a text file placed alongside the exe.
Indeed I checked and it does not write to registry.
Post by Enrico Forestieri
Post by Scott Kostyshak
The stand-alone is 2.7 MB so this would
increase the bundle size from 200 MB to 203MB. Apparently we already
bundle eLyXer and JabRef.
This way, forward/reverse search would work out of the box and we
would have fewer "why does LyX crash when I view a PDF?" questions.
It would suffice placing the executable in a directory under the LyX
directory tree that is already in the PATH prefix. If LyX is installed
in the Windows programs folder, every time a user changes preferences,
due to a sort of virtualization, the preferences file gets written
somewhere else but it would always appear at that same location.
In this way, different users can see different preferences by reading
the (seemingly) same file. It seems that they have write permissions
to the program folder, but it is really not so.
An initial preferences file containing the InverseSearchCmdLine could
be provided and a corresponding batch file placed alongside the exe.
InverseSearchCmdLine = lyxeditorwin %f %l
$ cat lyxeditorwin.bat
@echo off
setlocal
set file=%1
set row=%2
echo LYXCMD:revdvi:server-goto-file-row:%file% %row%> \\.\pipe\lyxpipe.in
type \\.\pipe\lyxpipe.out > nul
\serverpipe "\\.\pipe\lyxpipe"
Excellent, thank you for the details.
Post by Enrico Forestieri
Post by Scott Kostyshak
Enrico, can you confirm that SumatraPDF is the correct name of the
binary to search for in configure?
Yes, it is.
OK then I committed the patch at e716f1ef in the meantime.
I'm CC'ing Uwe and Vincent to see if they have any opinions on bundling Sumatra.
Another user's problem was solved by using Sumatra. I have not heard
back from Vincent or Uwe. I think they are both really busy. Does
anyone else have an opinion on this?

I would personally like to see this in 2.2, but I don't have access to
Windows so I would not be able to help develop or test. Would it be
possible to test this through Peter's Windows installers or are those
only for Cygwin (in Cygwin can you access native Windows programs?)?

I'm CC'ing Peter also to see if he's interested in this discussion.

Scott
Uwe Stöhr
2014-08-24 22:30:21 UTC
Permalink
Post by Scott Kostyshak
Post by Scott Kostyshak
I'm CC'ing Uwe and Vincent to see if they have any opinions on bundling Sumatra.
Another user's problem was solved by using Sumatra. I have not heard
back from Vincent or Uwe. I think they are both really busy. Does
anyone else have an opinion on this?
At least I am indeed very busy.
However, the PDF viewer issue pops up from time to time and the result
of previous discussion was that everybody prefers his own PDF viever. In
the past I bundled Ghostscript which would also do the job but many
users opposed to that since the download size increased a lot.

Sumatra PDF is under the GPL but not free software because it uses some
unrar code. There is completely free alternative name MuPDF. However, we
can instead also use Firefox as viewer for PDF files. This can easily
be done by the Win installer for LyX. The problem is that users like to
use one program for one task. To view PDF files they set up their own
choice. In many cases this is the Adobe Reader. It would be hard to
explain average users why the PDFs created by lyX are opened ia PDF
viewer program they don't know. That would be a major drawback for new
users.

In my opinion the only real solution is to check the registry what
program is currently used to view PDF files. This program will be used
also by LyX. As I ca see this is what the LyX installer currently does.

In any case I would not bundle a PDF viewer.

regards Uwe

Loading...