bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lilypond-book problem


From: Maurizio Tomasi
Subject: lilypond-book problem
Date: Mon, 22 Jul 2002 11:12:38 +0200 (MET DST)

I noticed a problem with `lilypond-book' (lilypond 1.5.68) when using the
--outdir option:  the program halts while reading the following tex file:

------------------------------------------------------------------------
\documentclass[a4paper]{article}

\begin{document}

\begin{lilypond}
\score
{
  \notes \relative c' {
    c4 d e f | g1
  }
}
\end{lilypond}

\end{document}
------------------------------------------------------------------------

Here it is what I get:

------------------------------------------------------------------------
$ lilypond-book --outdir=./out test.tex
lilypond-book (GNU LilyPond) 1.5.68
Reading `/home/ziotom/t/test.tex'

[program stops; here I press Ctrl+C...]

Traceback (most recent call last):
  File "/usr/bin/lilypond-book", line 1396, in ?
    do_file(input_filename)
  File "/usr/bin/lilypond-book", line 1290, in do_file
    scan_preamble(chunks)
  File "/usr/bin/lilypond-book", line 679, in scan_preamble
    scan_latex_preamble (chunks)
  File "/usr/bin/lilypond-book", line 663, in scan_latex_preamble
    paperguru.find_latex_dims()
  File "/usr/bin/lilypond-book", line 195, in find_latex_dims
    ln = p.readline()
KeyboardInterrupt
------------------------------------------------------------------------

By having a look at find_latex_dims, I found that `lilypond-book' calls
`latex' by specifying `lily-tmp.tex' as the TeX file to process. But when
using --outdir, the program should specify in which directory the file
resides as well. I patched the python code so that the program uses the
full path for the tex file, not just its name:

------------------------------------------------------------------------
187c187
<               p = os.popen("latex lily-tmp.tex")
---
>               p = os.popen("latex '%s'" % fname)
------------------------------------------------------------------------

With this patch, `test.latex' is created without problems.

Maurizio







reply via email to

[Prev in Thread] Current Thread [Next in Thread]