lilypond-user
[Top][All Lists]
Advanced

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

Re: lilypondbook package useful?


From: David Kastrup
Subject: Re: lilypondbook package useful?
Date: Wed, 16 Jan 2013 11:54:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Urs Liska <address@hidden> writes:

> Am 16.01.2013 11:27, schrieb David Kastrup:
>
>     Urs Liska <address@hidden> writes:
>
>     ... 
>     
> Am I on the right track with this approach?
> Or is there something wrong with it?
>     
> Well, what will always be wrong with it is that without using
> LilyPond-book, you can only use embedded LilyPond in situations where
> \verb and the verbatim environment would work.  This rules out, for
> example, usage in macro arguments, the most important of those probably
> being the default \footnote command.
>
> OK, I think I see.
> Is there a way for latex to see if it is in such a context (i.e. in a
> macro argument, or in a context where verb isn't availalbe) and react
> appropriately?

\verb is always available.  It just does not work everywhere.  It is
easy enough to check whether you are in such a context: just juggle with
catcodes, read the next char, and look whether it is affected.

The problem is that where \verb does not work reliably, considerable
material (typically all) will already have been scanned and
catcode-assigned by TeX, and you can't say "oh, I intended this to be
verbatim, please reconsider".

Check out
<URL:http://www.tex.ac.uk/cgi-bin/texfaq2html?label=verbwithin>.  In
general, people manage to make do fairly well with those restrictions,
so a LaTeX-only variant of LilyPond-book (where you can compile the
original file) would certainly have its use cases.

-- 
David Kastrup




reply via email to

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