[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to add header to markup after score
From: |
Jacques Menu |
Subject: |
Re: how to add header to markup after score |
Date: |
Sat, 9 Jan 2016 08:24:11 +0100 |
Hello Harm,
It’s always a pleasure to see Scheme virtuosi at work, thanks!
As is happens, 2.19.33 doesn’t succeed on the semi-manual example:
Starting lilypond 2.19.33 [MarkupAfterScoresExample.ly]...
Processing
`/Users/menu/Documents/LaTeX/PartitionsLilypond/MarkupAfterScoresExample.ly'
Parsing...
Interpreting music...
Preprocessing graphical
objects.../Users/menu/Documents/LaTeX/PartitionsLilypond/MarkupAfterScoresExample.ly:40:4:
In procedure memoization in expression (let* (block, too! # ...)
(interpret-markup layout props ...)):
/Users/menu/Documents/LaTeX/PartitionsLilypond/MarkupAfterScoresExample.ly:40:4:
In file
"/Users/menu/Documents/LaTeX/PartitionsLilypond/MarkupAfterScoresExample.ly",
line 39: Bad binding block, in expression (let* (block, too! (scopes (list
$defaultheader)) (alists (map ly:module->alist scopes)) (prefixed-alist (map
(lambda (alist) (map (lambda # #) alist)) alists)) (props (append
prefixed-alist props (layout-extract-page-properties layout))))
(interpret-markup layout props markup)).
Exited with return code 1.
JM
> Le 8 janv. 2016 à 22:34, Thomas Morley <address@hidden> a écrit :
>
> 2016-01-08 20:27 GMT+01:00 Ryan Michael <address@hidden>:
>> I have the following basic lilypond layout
>> \header{
>> title = "Title of My Piece"
>> composer = "Ryan Wieghard"
>> }
>>
>> \score{
>>
>> %score stuff%
>> }
>>
>> \pageBreak
>>
>> \markup{
>> %Text formatting, columns, etc.%
>> }
>>
>>
>>
>> I would like to add a header to the markup that follows the score. When I
>> write:
>>
>> \header {
>> title = "APPENDIX"
>> }
>>
>> within the scope of last \markup{}
>> I get the following error:
>>
>> syntax error, unexpected \header
>>
>> Thanks for your help!
>>
>>
>> --
>> ॐ नमः शिवाय
>>
>
>
> Below three possibilities.
> - manually: don't use \header at all, spell it out
> - semi-manually: refer to a header-field
> - use \bookpart
>
> \version "2.18.2"
>
> %%%% manually
> %%{
> \header{
> title = "Title of My Piece"
> composer = "Ryan Wieghard"
> }
>
> \score { \new Staff { c''1 } }
>
> \pageBreak
>
> \markup \column {
> \huge \larger \larger \bold
> \fill-line { "Appendix-I" }
> "Text formatting, columns, etc."
> }
> %}
>
> %%%% semi-manually with use of `markupWithHeader'
> %%%% from: http://lsr.di.unimi.it/LSR/Item?id=467
> %{
> #(define-markup-command (markupWithHeader layout props markup) (markup?)
> "Interpret the given markup with the header fields added to the props.
> This way, one can re-use the same functions (using fromproperty
> #'header:field) in the header block and as top-level markup."
> (let* (
> ;; TODO: If we are inside a score, add the score's local header
> block, too!
> ;; Currently, I only use the global header block, stored in
> $defaultheader
> (scopes (list $defaultheader))
> (alists (map ly:module->alist scopes))
> (prefixed-alist
> (map (lambda (alist)
> (map (lambda (entry)
> (cons
> (string->symbol (string-append "header:"
> (symbol->string
> (car entry))))
> (cdr entry)))
> alist))
> alists))
> (props (append prefixed-alist
> props
> (layout-extract-page-properties layout))))
> (interpret-markup layout props markup)))
>
>
> \header{
> title = "Title of My Piece"
> composer = "Ryan Wieghard"
> appendix = "Appendix-II"
> }
>
> \score { \new Staff { c''1 } }
>
> \pageBreak
>
> \markup \markupWithHeader \column {
> \huge \larger \larger \bold
> \fill-line { \fromproperty #'header:appendix }
> "Text formatting, columns, etc."
> }
> %}
>
> %%%% using bookparts
> %%%% this may need to clear some header-fields, otherwise the book-header
> %%%% (if any), will step in
> %{
> \bookpart {
> \header{
> title = "Title of My Piece"
> composer = "Ryan Wieghard"
> }
>
> \score { \new Staff { c''1 } }
> }
>
> \bookpart {
> \header { title = "Appendix-III" }
> \markup "Text formatting, columns, etc."
> }
> %}
>
>
> HTH,
> Harm
>
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
- how to add header to markup after score, Ryan Michael, 2016/01/08
- Re: how to add header to markup after score, Thomas Morley, 2016/01/08
- Re: how to add header to markup after score,
Jacques Menu <=
- Re: how to add header to markup after score, Marc Hohl, 2016/01/09
- Re: how to add header to markup after score, Thomas Morley, 2016/01/09
- Re: how to add header to markup after score, Marc Hohl, 2016/01/09
- Re: how to add header to markup after score, Jacques Menu, 2016/01/10
- Re: how to add header to markup after score, David Kastrup, 2016/01/10