[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Centered Paragraphs
From: |
Thomas Morley |
Subject: |
Re: Centered Paragraphs |
Date: |
Wed, 11 Jun 2014 10:28:58 +0200 |
2014-06-11 5:00 GMT+02:00 Jay Anderson <address@hidden>:
> My main goal is to have some simple indented paragraphs which don't
> take the full width and are centered horizontally. With a syntax
> something like this:
>
> \markuplist
> {
> \paragraph
> {
> Some text
> }
> \vspace #0.6
>
> \paragraph
> {
> Some more text
> }
> }
>
> Any idea how to cause the paragraph command (from here:
> http://www.lilypond.org/doc/v2.18/Documentation/extending/new-markup-list-command-definition)
> to center the paragraph?
>
> I can make it more narrow:
>
> #(define-markup-list-command (paragraph layout props args) (markup-list?)
> #:properties ((par-indent 2))
> (interpret-markup-list layout props
> #{
> \markuplist \override-lines #'(line-width . 80)
> \justified-lines
> {
> \hspace #par-indent #args
> }
> #}))
>
> But this keeps the text on the left edge of the page. All of my
> attempts have failed. The mismatch between markuplist and markup
> commands is my biggest difficulty.
>
> I tried switching to a markup command:
>
> #(define-markup-command (paragraph layout props args) (markup?)
> #:properties ((par-indent 2))
> (interpret-markup layout props
> #{
> \markup
> \fill-line
> {
> \override #'(line-width . 80)
> \justify { \hspace #par-indent #args }
> }
> #}))
>
> But this resulted in each word being on its own line.
>
> Thanks for the help.
>
> -----Jay
Hi,
is
http://lsr.di.unimi.it/LSR/Snippet?id=765
of some help?
Cheers,
Harm