[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to add header to markup after score
From: |
Thomas Morley |
Subject: |
Re: how to add header to markup after score |
Date: |
Fri, 8 Jan 2016 22:34:35 +0100 |
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
- how to add header to markup after score, Ryan Michael, 2016/01/08
- Re: how to add header to markup after score,
Thomas Morley <=
- Re: how to add header to markup after score, Jacques Menu, 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, 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