But that still doesn't help me control the staff sizes separate from the \begin{lilypond} statement. I have Latex macros, some of which include lilypond "environments," which I include in different documents that are typeset on different sizes of paper. I assign different fond and staff sizes to the different paper sizes and want to control the staff sizes without passing my latex macros through sed or something. Command line switches that set the defaults for properties that can be set in the \begin[...]{lilypond} statement would even work. ____________________________________________________________
©2003,2010 by John M. Szwast The entirety of this signature is the intellectual property of John M. Szwast. Anything added to this signature, above or below, by any other person or party shall also be the intellectual property of John M. Szwast. By adding copyrighted or trademarked material, or any other intellectual property, to this signature, said person or party shall be transferring all rights and ownership of such material to the aforementioned copyright owner of this signature, John M. Szwast. ________________________________ From: James <pkx1...@gmail.com> To: David Kastrup <d...@gnu.org>; John Szwast <jszw...@yahoo.com> Cc: bug-lilypond@gnu.org Sent: Saturday, September 27, 2014 8:08 AM Subject: Re: lilypond-book fails when using Latex macros in options On 11/09/14 12:45, David Kastrup wrote: > John Szwast <jszw...@yahoo.com> writes: > > Newsgroups: gmane.comp.gnu.lilypond.bugs > Subject: Re: lilypond-book fails when using Latex macros in options > Organization: Organization?!? > From: David Kastrup <d...@gnu.org> > Gcc: nnfolder+archive:sent.2014-09 > --text follows this line-- > John Szwast <jszw...@yahoo.com> 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 _______________________________________________ bug-lilypond mailing list bug-lilypond@gnu.org https://lists.gnu.org/mailman/listinfo/bug-lilypond