lilypond-devel
[Top][All Lists]

## fix to lilypond-book

 From: Werner LEMBERG Subject: fix to lilypond-book Date: Sat, 16 Oct 2004 09:36:12 +0200 (CEST)

I've changed the representation of snippet_res' in lilypond-book.ly
to something which is easier to understand IMHO.  While doing the
conversion I've fixed LaTeX's lilypond_block' regexp to survive
%\end{lilypond}'.  Please have a look at the regexps for HTML: I
think there is something fishy -- I've seen address@hidden' which looks like a
remnant from texinfo...

At the same time I've also fixed find_toplevel_snippets' to not
swallow foo ' in

foo \lilypond{...} bar

Due to limited time I've only checked whether this properly works with
LaTeX.  Please test the other backends.

Note that I've not fixed yet the width of lilypond TeX output; this
will come soon.  Nested braces in \lilypond{...} won't work either
currently.

IMHO the current approach of not scanning the input data multiple
times for the various regexps is a bad idea.  First, it makes the
regexps much more complicated than necessary (e.g. for LaTeX, each
regexp has to handle comments), and it fails if comment lines are at
unexpected places.  I strongly suggest to do at least three passes:
first, remove verbatim blocks, then all comments, and finally the
rest.

Werner

`