lilypond-user
[Top][All Lists]
Advanced

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

Re: Centering / Indenting a paragraph?


From: Thomas Morley
Subject: Re: Centering / Indenting a paragraph?
Date: Sat, 24 Nov 2012 00:56:40 +0100

2012/11/23 Bric <address@hidden>:
> On November 23, 2012 at 4:08 PM Thomas Morley <address@hidden>
> wrote:
[...]
>> Deleting \hspace #4 will center it horizontally on the page.
>>
>
> Nope.  Removed all the "\hspace"s.  The third paragraph (set of \line's) is
> still rammed all the way to the left, crossing the gutter.
[...]

Please excuse, if I'm a bit grumpy today.
Being a music-teacher in germany, I can confirm: german so called
"learning-an-instrument-pupil" are the worsest you can ever imagine.
So I will not further explain anything at the end of this horrible day.

Maybe the code below will give you some hints.
Some links included. (Compile the code and you can simply click on them.)

\version "2.16.0"

\markup \rounded-box \fill-line {
            \override #'(font-name . "Comic Sans MS Bold")
                \center-column {
                    \fontsize #5  "It's all in the docs"
                    \smaller "Some examples (with links) below"
                    }
        }


\markup \fill-line {
        \center-column {

        \vspace #2
        \line \bold \large { "The \\paragraph markup-command" }
        \with-url
        #"http://lilypond.org/doc/v2.17/Documentation/extending-big-page#index";
        \line \bold \large { "From \"Extending\"" }
        \with-url
        
#"http://lilypond.org/doc/v2.17/Documentation/extending-big-page#new-markup-list-command-definition";
        \line \bold \large { "2.5.4 New markup list command definition" }
        \null
        }
}

#(define-markup-list-command (paragraph layout props args) (markup-list?)
   #:properties ((par-indent 2))
   (interpret-markup-list layout props
     #{\markuplist \justified-lines { \hspace #par-indent #args } #}))

\markuplist {
  \paragraph {
    The art of music typography is called \italic {(plate) engraving.}
    The term derives from the traditional process of music printing.
    Just a few decades ago, sheet music was made by cutting and stamping
    the music into a zinc or pewter plate in mirror image.
  }
  \override-lines #'(par-indent . 10) \paragraph {
    The plate would be inked, the depressions caused by the cutting
    and stamping would hold ink.  An image was formed by pressing paper
    to the plate.  The stamping and cutting was completely done by
    hand.
  }
  \vspace #2
}

\markup \fill-line { \center-column {
        \with-url
        #"http://lilypond.org/doc/v2.17/Documentation/notation-big-page#index";
        \line \bold \large { "From \"Notation Reference\"" }
        \with-url
        #"http://lilypond.org/doc/v2.17/Documentation/notation-big-page#align";
        \line \bold \large { "A.10.2 Align" }
        \null
        }
}

\markup \fill-line {
  \override #'(line-width . 40)
  \justify-string #"Lorem ipsum dolor sit amet, consectetur
      adipisicing elit, sed do eiusmod tempor incididunt ut labore
      et dolore magna aliqua.


      Ut enim ad minim veniam, quis nostrud exercitation ullamco
      laboris nisi ut aliquip ex ea commodo consequat.


      Excepteur sint occaecat cupidatat non proident, sunt in culpa
      qui officia deserunt mollit anim id est laborum"
}

\markup \vspace #2

\markup {
  \fill-line {
    \hspace #1
    \column {
      \line { This is my first verse  }
      \line { For Column 1 as a  supplemental }
      \line { Text blurb below the score }
      \line { This is when I don't }
      \line { Want to align multiple  }
      \line { Verses directly beneath the score staves }
    }
    \hspace #2

    \column {
      \line { This is my second verse  }
      \null
      \line { It is for Column 2 }
      \null
      \line { of the second  }
      \line { Blurb. }
      \line { Pretty cool and all is well  }
      \line { Wit these two columns }
    }
    \hspace #3
  }
}

\markup {
  \column {
    \vspace #1
    \draw-hline
  }
}

\markup {
  \fill-line {
    \column  {
      \vspace #1
      \line { \italic { I want this  } }
      \line { \italic { Centered underneath } }
      \line { \italic { The above two verses } }
      \line { \italic { Apparently, that isn't easy! } }

    }
  }
}

\markup {
  \column {
    \vspace #2
    \draw-hline
  }
}

\markup \fill-line {
        \center-column {
                \vspace #2
                \with-url
                #"http://lsr.dsi.unimi.it/LSR/";
                \line { \italic "Btw, do you know the LSR?" }
        }
}


-Harm



reply via email to

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