lilypond-user
[Top][All Lists]
Advanced

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

Re: Long text passages: Proper use of \markup, \column, \line?


From: Thomas Morley
Subject: Re: Long text passages: Proper use of \markup, \column, \line?
Date: Sat, 6 Oct 2018 12:40:27 +0200

Hi,

Am Fr., 5. Okt. 2018 um 12:53 Uhr schrieb Tom Campbell <address@hidden>:
>
> I'm writing multiple pages of text and noticed that the bottom margin wasn't 
> being observed. I think it's because I'm placing the whole chapter inside a 
> \markup. I can't seem to find a cohesive explanation of \markup all in one 
> place. Likewise with \column, \line, \wordwrap, and \markuplist. Explanations 
> to RTFM would be warmly welcomed with links. Here's what I think I know.
>
> markup (docs at 
> http://lilypond.org/doc/v2.19/Documentation/notation/formatting-text)

Read _all_ sections of the above link. ;)

> Keeps everything inside its brackets on a single page, apparently. So should 
> pretty much be used for each paragraph, or examples in which I want a header 
> and paragraph, or header and illustration, all on one page?
>
> \column  (docs at 
> http://lilypond.org/doc/v2.18/Documentation/notation/alignhttp://lilypond.org/doc/v2.18/Documentation/notation/align)
> Observes newlines, useful with lyric stanzas, for example.
>
> \line
> Opposite of \column; keep everything on one line without wordwrap
>
> \wordwrap
> Not sure how this differs from \markup?

%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%
\markup
%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%
\markup will return _one_ stencil. So no page-break!!
It incloses \line, so \markup { whatever } is the same as \markup
\line { whatever }

Ofcourse \markup may contain nested expressions formated with other
markup-commands.
What they do and how, you can read in NR A.11

For the commands you mentioned above (I always apply \box in the to
demonstrate the "one-stencil-thingy"):

%%%%%%%
\line:
%%%%%%%
Expects a list of markups, they are stacked horizontally, see:
\markup
  \box
  \line {
    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.
  }
Line-break doesn't happen

%%%%%%%
\column:
%%%%%%%
Expects a list of markups, they are stacked vertically, see:
\markup
  \box
  \column {
    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.
    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.
  }
Page-breaks doesn't happen.

%%%%%%%
\wordwrap:
%%%%%%%
Expects a list of markups, they are stacked horizontally, line-breaks happen.
But no page-break, remember \markup returns _one_ stencil.
See:
#(set-default-paper-size "a8")
%% reduced paper size, to save same typing
\markup
  \box
  \wordwrap {
    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.
    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.
  }



>
> \markuplist
> Can't find docs on this one

%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%
\markuplist
%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%

\markuplist returns _multiple_ stencils, so page-break is possible.
http://lilypond.org/doc/v2.19/Documentation/notation/formatting-text#multi_002dpage-markup

See (most simple)
#(set-default-paper-size "a8")
\markuplist
  \box {
    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.
  }

For multi-page text you may go for markuplist-commands, see NR A.12

p.e.
%%%%%%%
\wordwrap-lines
%%%%%%%

\paper {
  ragged-last-bottom = ##t
  %annotate-spacing = ##t
  last-bottom-spacing =
    #'((basic-distance . 0)
       (minimum-distance . 0)
       (padding . 0)
       (stretchability . 0))
}

#(set-default-paper-size "a8")
\markuplist
  \box
  \wordwrap-lines {
    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.
    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.
  }

One could say a lot more, though it's mostly in the link you already
provided. ;)
You should read and reread it. The docs are sometimes very concise
(but in total, exceed hundreds of pages already).
Do some experiments. You may want to watch what you've done in
terminal as well, i.e. use \displayScheme:
\displayScheme \markup { foo }

All that said...
LilyPond is not a word-processing program. Most people find it easier
to use latex and friends for long texts, including musical examples
there.
lilypond-book is available, too.


HTH,
  Harm



reply via email to

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