lilypond-user
[Top][All Lists]

## Re: subsubsection lilypondfile

 From: Bernard Hurley Subject: Re: subsubsection lilypondfile Date: Thu, 21 Apr 2005 12:13:54 +0100

```You are right there are restrictions on what can go in a section header
which is why I said in a previous e-mail that this \section and
\subsection etc macros might need to be re-defined.

Your solution does not work for a multi-line score because you don't
want all the lines in the same savebox. Also the section number appears
in the "wrong place" in a multi-staff score - in line with the bottom
staff.

I think the real solution to this sort of formatting problem is to have
lilypond-book produce an extra file that can give LaTeX information
about embedded scores and have the formatting dealt with by macros in a
new LaTeX package. The fact that lp-book now produces eps files makes
this approach easier than it was before.

/Bernard

On Thu, 2005-04-21 at 11:29 +0200, Mats Bengtsson wrote:
> In principle, lilypond-book does not put any limitations on
> where in your LaTeX document you put your music. However, when
> trying the obvious
> \section{\lilypond[fragment]{c d e f}}
> latex will complain, probably there are some limitations in LaTeX on
> what can go into the argument of \section{...}. However, the following
> trick works:
>
> \newsavebox{\music}
> \savebox{\music}{\lilypond[fragment]{c d e f}}
> \section{\usebox{\music}}
>
>     /Mats
>
> David Raleigh Arnold wrote:
> > Is there a way to use a lilypond file instead of the contents
> > of the curlies in \section, \subsection, and \subsubsection, as if
> > to have the appropriate numbers as instrument names in the first
> > indent.  e.g., in example.lytex:
> >
> >  2.3 Section I
> > text.......................
> >   2.3.2  a piece of music....
> > .......
> > ......
> > more text...........
> > etc.
> >
> > As a feature, I think it would be very worthwhile feature in
> > a lilypond book.
> >
> > \subsection{}\lilypondfile{name.ly}
> >
> > All it would take is to start the lilypond file immediately after the
> > [sub]section number.  It would be helpful if every example had a
> > reference number in the docs, IMO.  daveA
> >
>
--