On Thu, May 21, 2009 at 02:30:52PM -0400, Ben M. wrote: > Here are the results of your above patch when using "branch": > filename: '/tmp/lyx_tmpdir.JL6636/lyx_tmpbuf0/LaTeXConfig.tex' > abstmp: '/tmp/lyx_tmpdir.JL6636' > realtmp: '/tmp/lyx_tmpdir.JL6636'
This is OK. > I'd also like to mention another bug, which I hope should be easy to > fix. I've had marvelous results using SumatraPDF with > \usepackage{pdfsync}. For more info, see: > http://william.famille-blum.org/blog/index.php?entry=entry081007-214408 Yes, I tried SumatraPDF and reverse search works (but see below). > The problem is that SumatraPDF outputs the path in lowercase. The > command server-goto-file-row failed until I added a sed command to the > lyx server scripts which converts > lyx_tmpdir.jl6636 -> lyx_tmpdir.JL6636 > I believe we simply need to use a case-insensitive path comparison > when running under Cygwin. I think that you have SumatraPDF as the default viewer, otherwise you should have incurred in another problem. Anyway, I've committed a patch to trunk and the problem you report should be fixed. Please, let me know. If SumatraPDF is not the default pdf viewer, it has to be launched through a wrapper (see the attached SumatraPDF.sh script). In Tools->Preferences->File Handling->File formats->PDF (pdflatex) you should specify SumatraPDF.sh and then compile and put in your PATH the attached C program (a safe bet is putting SumatraPDF.exe, SumatraPDF.sh, and lyxeditor.exe in /usr/local/bin). In order to instruct SumatraPDF about the program to call for the inverse search, it suffices launching it as SumatraPDF -inverse-search "lyxeditor -g %f %l" and then quit. The program will remember the setting and using the -inverse-search option is not needed from now on. -- Enrico
SumatraPDF.sh
Description: Bourne shell script
/* This is a wrapper program for lyxeditor.sh or lyxclient, meant to be used * with yap or sumatrapdf for inverse search. * * compile this source with following options set: * * gcc lyxeditor.c -O2 -o lyxeditor -static -mwindows -e _mainCRTStartup * * Enrico Forestieri, 2009-05-22 */ #include <stdio.h> /* standard io library */ #include <stdlib.h> /* system() */ #include <limits.h> /* PATH_MAX */ #include <sys/cygwin.h> /* cygwin_conv_to_full_posix_path() */ int main(int ac, char **av) { char buf[2 * PATH_MAX]; char posixpath[PATH_MAX + 1]; if (ac < 3 | ac > 4) return 1; if (ac == 3) { cygwin_conv_to_full_posix_path(av[1], posixpath); sprintf(buf, "lyxeditor.sh '%s' %s", posixpath, av[2]); } else { cygwin_conv_to_full_posix_path(av[2], posixpath); sprintf(buf, "lyxclient %s '%s' %s", av[1], posixpath, av[3]); } system(buf); return 0; }