----- Original Message ----- From: "Angus Leeming" <[EMAIL PROTECTED]>
To: <lyx-users@lists.lyx.org>
Sent: Friday, September 09, 2005 1:24 AM
Subject: Re: LyX doesn't store my PDF viewer info


Vaclav Smidl wrote:

I have seen similar problem on my colleagues computer, we resolved it
using the workaround with PATH as described by Angus.
To my understanding, the trouble is, that saving the full path
 "F:\Program Files\Adobe\Acrobat 7.0\Reader\acrord32.exe"
in the preferences, adds extra " around it, so that it looks like
 ""F:\Program Files\Adobe\Acrobat 7.0\Reader\acrord32.exe""
and, when this is read by lyx, it appears as empty string ("").

Thanks, for the diagnosis, Vasek. This is now bug #2016:
http://bugzilla.lyx.org/show_bug.cgi?id=2016

--
Angus



Angus, I am not sure that I understand how this bug is different
than the one you described before when you gave as example:
\viewer "pdf" ""C:\Program Files\Adobe\Acrobat 7.\Acrobat\acrobat.exe" $$i"
The current bug seems the same as the bug discussed below and it seems
that a solution was discovered but apparently not implemented.

Re: Putting Paths in quotes
Angus Leeming
Sun, 10 Jul 2005 03:03:14 -0700

Stephen Harris wrote:

I was reading a discussion about assigning acrord32.exe
as the the pdf file format viewer in WinLyx 1.3.5, using
the full path in quotes if just placing acrord32 in the pdf
viewer field didn't work [so this next line was the fix to this]:
"C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe"

Using quotes doesn't seem to work in 1.3.6pre (18?); a blank
field is created which appears to revert to the Acro*.exe
Modify, apply, save, does not save or apply the quoted field
change, then, or later, after closing and re-opening.

Hmmmm. First the workaround. Add the directory containing acrobat.exe to
your path_prefix entry (PATH prefix widget in the Paths pane of the
Edit->Preferences dialog).

Now for the problem (bug). If you look in your preferences file
 C:\Documents and Settings\Stephen\Application Data\lyx\preferences
you'll see that your modification is saved as:

\viewer "pdf" ""C:\Program Files\Adobe\Acrobat 7.0\Acrobat\acrobat.exe"
$$i"

Jean-Marc, how should we address this? Should we protect characters within
the "-protected string? Ie save

\viewer "pdf" "\"C:\\Program Files\\Adobe\\Acrobat
7.0\\Acrobat\\acrobat.exe\" $$i"

and adjust LyXRC::getString appropriately? Or perhaps we should read
everything after '\viewer "pdf"' as being the viewer?

Geeez! These paths with spaces get everywhere!

--
AngusJMarc replied:Angus> \viewer "pdf" "\"C:\\Program Files\\Adobe\\Acrobat
Angus> 7.0\\Acrobat\\acrobat.exe\" $$i"

Actually, lyxlex wiill work correctly provided you escape the
double-quote character. There is no need to escape the backslash
itself...

Angus> and adjust LyXRC::getString appropriately?

I do not think you need to adjust anything....3/ we should handle " in the contents of viewers and other commands.
To do this we should change the code that writes these commands to
change " to \". No other change should be necessary (because
lex.next(true) handles that).

Is that clearer? JMarcAngus replied:It is perfectly clear. But 3/ doesn't work out of the box ATM.

\viewer "pdf" "\"C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32.exe\" $$i" ..------------------------------------------------------------Regards,Stephen




Reply via email to