[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Making a lilypond-book -- IT WORKS...sort of
From: |
Mats Bengtsson |
Subject: |
Re: Making a lilypond-book -- IT WORKS...sort of |
Date: |
Mon, 05 Jul 2004 12:42:05 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616 |
Having had a look at the full files, I realize what's up, namely
a missing feature in lilypond-book!
The problem is that your file mvmt1/mvmt1.ly includes
other files from the subdirectory mvmt1, using lines such as:
\include "violino1.ly"
\include "violino2.ly"
\include "viola.ly"
The same goes for mvmt3/mvmt3.ly.
Since the lilypond program is run in the base directory, it
didn't find the include files in the subdirectories mvmt1/
and mvmt3/. To solve that, you probably used
lilypond-book -I mvmt1/ --output=out/ tchai_op35_book.tex
which means that both mvmt1/mvmt1.ly and mvmt3/mvmt3.ly will
include the files from the same directory: mvmt1/
The best solution would be if it was possible to specify a
separate include directory for each \lilypondfile{...} or
\begin{lilypond}...\end{lilypond} directive. I could imagine
a syntax like \lilypondfile[includepath="mvmt1"]{mvmt1/mvmt1.ly}
However, until this feature request has been implemented, I'm afraid
you will have to add the directory name in every \include statement,
for example
\include "mvmt1/violino1.ly"
\include "mvmt1/violino2.ly"
\include "mvmt1/viola.ly"
in the file mvmt1/mvmt1.ly
and
\include "mvmt3/violino1.ly"
\include "mvmt3/violino2.ly"
\include "mvmt3/viola.ly"
in the file mvmt3/mvmt3.ly
Then you should call lilypond-book without any additional include path
directives:
lilypond-book -o out/ tchai_op35_book.tex
Of course, this makes the solution less flexible, since if you change
the directory structure, you have to change all the \include directives.
Also, it means that the mvmt1/mvmt1.ly file will not work stand-alone
(to solve this latter problem, you could consider to move the mvmt1.ly
and mvmt3.ly files to the top directory).
/Mats
Mats Bengtsson wrote:
I don't understand what's going on here. Could you please send
the full example (in a private email if you wish) or send the
following:
- The generated .tex file that you process with latex.
- The output of 'grep renameinput lily-*.ly' (to be run in the
output directory of lilypond-book.
/Mats
Will Oram wrote:
A more serious problem is that I can't seem to have multiple
\lilypondfile's in one .tex file. This is my code:
\documentclass[a4paper]{opera}
\begin{document}
\title {Violin Concerto in D Major}
\subtitle {Opus 35}
\author {Peter Ilyitch Tchaikovsky}
\date {\today}
\maketitle
\begin{center}
{\huge{I. Allegro Moderato}} \\
\end{center}
\lilypondfile{mvmt1/mvmt1.ly}
\begin{center}
{\huge{III. Finale}} \\
\end{center}
\lilypondfile{mvmt3/mvmt3.ly}
\end{document}
The resulting output is the title page, mvmt1 header, mvmt1, NO
header at all, mvmt1 AGAIN. What's up?
I tried your example with some small files in mvmt1.ly and mvmt3.ly and
it works fine here. You can hopefully get a hint on what's up if you
run lilypond-book with the additional flag --verbose and also take a
careful look at the printouts from LaTeX.
--verbose doesn't reveal much, other than it is indeed compiling the
same mvmt1 twice. The last thing lilypond-book says that's on track
is 'input renamed to: `mvmt3/mvmt3.ly''. After that it proceeds to
reprocess mvmt1.
I recommend to remove all
lily-*.ly files first to make sure that lilypond-book reruns all the
steps.
AFAIK, I have to do that every time I build this project, else I get
'All snippets are up to date', whether or not that's actually true.
Will Oram // Genius @ Large // AIM spamguy21
spamguy (at) foxchange (dot) com // wro1 (at) cwru (dot) edu
--
=============================================
Mats Bengtsson
Signal Processing
Signals, Sensors and Systems
Royal Institute of Technology
SE-100 44 STOCKHOLM
Sweden
Phone: (+46) 8 790 8463
Fax: (+46) 8 790 7260
Email: address@hidden
WWW: http://www.s3.kth.se/~mabe
=============================================
- Re: Making a lilypond-book -- IT WORKS...sort of,
Mats Bengtsson <=