[texworks] PDF support for not-synctex compilers
Helge.Kruse-nospam at gmx.net
Tue Jun 1 07:13:33 CEST 2010
Am 31.05.2010 15:43, schrieb Stefan Löffler:
> First of all I'd like to say that I have no experience with Lilypond, so
> please excuse my ignorance regarding the workflow.
That's totally ok, since I use TeXworks for a purpose it wasn't
designed. But I think it could be improved for such a use anyway.
>> I use TeXworks for my LaTeX works as well as for editing Lilypond
>> scores. That works fine in general. But the PDF viewer does not close
>> the PDF file and it is locked until the PDF viewer is closed.
> I'm not sure if I understand your problem correctly. AFAIK, Tw does not
> lock the pdf (in the way Adobe Reader does, for example, causing
> subsequent LaTeX runs to fail because of "can't open file for output").
> It is of course open, and is monitored for changes, but normally the
> file can be changed by external applications without problems.
Oh, I see. I had a wrong assumption about what's going on.
Since Lilypond has parts that are written in schemer, I took a look at
backend-library.scm that is actually generating the error message.
The backend _deletes_ the PDF file before starting ghostscript to create
a new one. Fortunately this doesn't need to be compiled, so I could
change the .scm file to not deleting the PDF before.
And it works.
I will ask at the Lilypond list, if this delete-file can be removed or
if a failed removed can be accepted.
> It would help a lot if you could provide the following information:
> * What operating system, version of Tw/Lilipond, TeX-distro are you using?
Windows 7 Professional, (64-bit).
> * How are you using Lilypond? How do you run it?
I added a "processing tool" in the TeXworks preferences dialog.
Program: C:\Program Files (x86)\LilyPond\usr\bin\lilypond.exe
View PDF after running: set
> * What are its input and output files?
The input file is a text file with .ly as file name extension.
Lilypond generates primarily a postscript file. In a second step it
internally calls a postscript-pdf-convert, that fails to open the PDF
file for writing.
> * For which of those does the problem occur?
The problem occurs, when the postscript-file is converted to the PDF file.
More information about the texworks