lilypond-user
[Top][All Lists]
Advanced

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

Re: Word wrapping section headers (book-titling.ily)


From: Thomas Morley
Subject: Re: Word wrapping section headers (book-titling.ily)
Date: Sun, 28 Oct 2012 20:29:39 +0100

2012/10/28 Olivier Biot <address@hidden>:
> Hi all,
>
> I'm using the book-titling.ily macros by Nicolas Sceaux to create an etude 
> book.
>
> I can't however get long section titles to word wrap.
>
> I suppose the code I have to edit is this but I am no Scheme expert:
>
> section =
> #(define-music-function (parser location title) (string?)
>   (add-toc-item parser 'tocSectionMarkup title)
>   (add-toplevel-markup parser (markup #:section-title
> (string-upper-case title)))
>   (add-no-page-break parser)
>   (make-music 'Music 'void #t))
>
> Can some helpful mind shed some light on how to do so?
>
> Best regards,
>
> Olivier
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user

Hi Oliver,

Nicolas' template is a very special one. He deals a lot with strings,
formating them in different ways.
And it works with 2.14.2 only (if you use the LSR-version)

You could try:

section =
#(define-music-function (parser location title) (markup?)
  (add-toc-item parser 'tocSectionMarkup title)
  ;(add-toplevel-markup parser (markup #:section-title
(string-upper-case title)))
  (add-toplevel-markup parser (markup #:section-title title))
  (add-no-page-break parser)
  (make-music 'Music 'void #t))

with

  \section \markup {
  \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"
}


But I'm not sure you realy want this output. :)

Please note that the string-upper-case-feature of \section doesn't
work any more.


-Harm



reply via email to

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