\version "2.19.16"
%% Please note, \language has to be declared before 'used-language'
%% is done or included, (if stored elsewhere)
\language "deutsch"
%\language "english"
%% if no tagline for a language is defined, default-english will be
printed
%\language "catalan"
%% TODO: find better method to detect which language is actually used
#(define used-language
(car
(find
(lambda (e) (eq? (cdr e) (ly:parser-lookup parser 'pitchnames)))
language-pitch-names)))
englishTaglineText = #(format #f
"Music typeset using LilyPond
~a~awww.lilypond.org <http://awww.lilypond.org>"
(lilypond-version)
(ly:wide-char->utf-8 #x2014) ;; 2014 = em dash.
)
germanTaglineText = #(format #f
"Noten gesetzt mit LilyPond ~a ~a
www.lilypond.org <http://www.lilypond.org>"
(lilypond-version)
(ly:wide-char->utf-8 #x2013) ;;2013 = en dash.
)
#(define taglines
`(
(deutsch . ,germanTaglineText)
(english . ,englishTaglineText)
))
#(define-markup-command (format-tagline layout props text) (markup?)
(interpret-markup layout props
#{
\markup {
\italic
\pad-to-box #'(0 . 0) #'(0 . 3)
{
\with-url #"http://lilypond.org/"
$text
}
}
#}))
#(define used-tagline
(markup #:format-tagline
(let ((tagl (assoc-get used-language taglines)))
(if tagl
tagl
(assoc-get 'english taglines)))))
\header {
tagline = #used-tagline
}