X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Ftitling.scm;h=d0dde63bdfb8a8c244f1e60b20e6f17f37d94d4c;hb=bdf8a9979fbc14018078288d00e76b5b75f2fe85;hp=428c07d5cdeb0e15688f17086ba3035c72c7187b;hpb=eca9c3e7048cad8784be59db894e1531f362c9e4;p=lilypond.git diff --git a/scm/titling.scm b/scm/titling.scm index 428c07d5cd..d0dde63bdf 100644 --- a/scm/titling.scm +++ b/scm/titling.scm @@ -1,23 +1,35 @@ -;;;; titling.scm -- titling functions +;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; source file of the GNU LilyPond music typesetter +;;;; Copyright (C) 2004--2011 Jan Nieuwenhuizen +;;;; Han-Wen Nienhuys ;;;; -;;;; (c) 2004--2005 Jan Nieuwenhuizen -;;;; Han-Wen Nienhuys +;;;; LilyPond is free software: you can redistribute it and/or modify +;;;; it under the terms of the GNU General Public License as published by +;;;; the Free Software Foundation, either version 3 of the License, or +;;;; (at your option) any later version. +;;;; +;;;; LilyPond is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;;; GNU General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU General Public License +;;;; along with LilyPond. If not, see . (define-public (layout-extract-page-properties layout) - (list (append `((linewidth . ,(ly:paper-get-number - layout 'linewidth))) + (list (append `((line-width . ,(ly:paper-get-number + layout 'line-width))) (ly:output-def-lookup layout 'text-font-defaults)))) ;;;;;;;;;;;;;;;;;; -(define-public ((marked-up-headfoot what-odd what-even) layout scopes page-number last?) - - "Read variables WHAT-ODD, WHAT-EVEN from LAYOUT, and interpret them -as markup. The PROPS argument will include variables set in SCOPES and -page:last?, page:page-number-string and page:page-number -" +(define-public ((marked-up-headfoot what-odd what-even) + layout scopes page-number is-last-bookpart is-bookpart-last-page) + "Read variables @var{what-odd}, @var{what-even} from @var{layout}, +and interpret them as markup. The @var{props} argument will include +variables set in @var{scopes} and @code{page:is-bookpart-last-page}, +@code{page:is-last-bookpart}, @code{page:page-number-string}, and +@code{page:page-number}." (define (get sym) (ly:output-def-lookup layout sym)) @@ -36,17 +48,13 @@ page:last?, page:page-number-string and page:page-number (cdr entry))) alist)) alists)) - (tagline (ly:modules-lookup scopes 'tagline)) - (default-tagline (ly:output-def-lookup layout 'tagline)) - (pgnum-alist (list (cons 'header:tagline - (cond - ((markup? tagline) tagline) - ((markup? default-tagline) default-tagline) - (else ""))) - (cons 'page:last? last?) + (ly:modules-lookup scopes 'tagline + (ly:output-def-lookup layout 'tagline))) + (cons 'page:is-last-bookpart is-last-bookpart) + (cons 'page:is-bookpart-last-page is-bookpart-last-page) (cons 'page:page-number-string (number->string page-number)) (cons 'page:page-number page-number))) @@ -54,7 +62,6 @@ page:last?, page:page-number-string and page:page-number (list pgnum-alist) prefixed-alists (layout-extract-page-properties layout)))) - (interpret-markup layout props potential-markup)) empty-stencil)) @@ -66,10 +73,9 @@ page:last?, page:page-number-string and page:page-number (get what-odd)))) (define-public ((marked-up-title what) layout scopes) - "Read variables WHAT from SCOPES, and interpret it as markup. The -PROPS argument will include variables set in SCOPES (prefixed with -`header:' -" + "Read variables @var{what} from @var{scopes}, and interpret it as markup. +The @var{props} argument will include variables set in @var{scopes} (prefixed +with `header:'." (define (get sym) (let ((x (ly:modules-lookup scopes sym)))