lilypond-user
[Top][All Lists]
Advanced

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

Re: Setting a global default for the \paragraph macro (NR Section 7.4.4)


From: Nicolas Sceaux
Subject: Re: Setting a global default for the \paragraph macro (NR Section 7.4.4)?
Date: Sun, 18 May 2008 18:19:12 +0200

Le 18 mai 08 à 16:46, Reinhold Kainhofer a écrit :

In the NR in Section 7.4.4
(http://lilypond.org/doc/v2.11/Documentation/user/lilypond/New-markup-list-command-definition ) there is a definition of the \paragraph markup list command, which indents the first line by the value of the property 'par-indent. There is also an example how to override that property to a different value, but apparently the \override-lines macro works like \once\override and not like \override,
i.e. it works only for the very next call of \paragraph, but not for
subsequent calls.

This also means that I cannot globally change the indentation of the
paragraphs (except changing the hard-coded default in the definition, which is not what I want, because the definition is in an external style sheet, included by multiple different scores with different formatting styles).

So, how can I globally change a property like par-indent or line- width?

With the following definition of the \paragraph command, you can
globally change the indentation by setting a paper variable at
top-level:

#(define-markup-list-command (paragraph layout props args) (markup- list?)
   (let ((indent (chain-assoc-get 'par-indent props
                  (ly:output-def-lookup layout 'par-indent 2))))
     (interpret-markup-list layout props
(make-justified-lines-markup-list (cons (make-hspace-markup indent)
                                               args)))))

\paper { par-indent = #3 }





reply via email to

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