bug-lilypond
[Top][All Lists]
Advanced

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

Re: lilypond-book fails when using Latex macros in options


From: James
Subject: Re: lilypond-book fails when using Latex macros in options
Date: Sat, 27 Sep 2014 16:08:57 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2

On 11/09/14 12:45, David Kastrup wrote:
> John Szwast <address@hidden> writes:
> 
> Newsgroups: gmane.comp.gnu.lilypond.bugs
> Subject: Re: lilypond-book fails when using Latex macros in options
> Organization: Organization?!?
> From: David Kastrup <address@hidden>
> Gcc: nnfolder+archive:sent.2014-09
> --text follows this line--
> John Szwast <address@hidden> writes:
> 
>> I want to specify a lilypond environment option with a Latex macro, but 
>> lilypond-book fails when I try.
>>
>> \documentclass{article}
>> \newcommand\staffsize{14}
>> \begin{document}
>> %    \begin[staffsize=14]{lilypond}  % This works
>>      \begin[staffsize=\staffsize]{lilypond}  % This doesn't
>>      \end{lilypond}
>> \end{document}
> 
> I think that this is a misunderstanding about how Lilypond-book works.
> Environments like \begin{lilypond}...\end{lilypond} are not interpreted
> by LaTeX.  Instead, lilypond-book extracts those "environments" into
> files of their own, runs LilyPond on them, takes the resulting graphics,
> creates a .tex file where the \begin{lilypond}...\end{lilypond} macros
> have been replaced by graphics inclusion commands, and _then_ runs LaTeX
> for the first time.  Yes, it _will_ run LaTeX one time previously on
> what amounts to a pretty empty document in order to figure out some
> things like \linewidth.
> 
> But it would be pretty tricky for it to figure out that it has to _also_
> find things like \staffsize.
> 
> This kind of "let LaTeX do its jobs for dimensions" would be exacerbated
> by LaTeX and LilyPond having entirely different ideas of cm and \cm.
> Indeed, LilyPond complains if you are using cm, and LaTeX does not know
> \cm.
> 

I created

http://code.google.com/p/lilypond/issues/detail?id=4136

for an enhancement to the documentation.

James



reply via email to

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