Hello,
in my stylesheets, I usually include
germanTagline = \markup {
\italic
\pad-to-box #'(0 . 0) #'(0 . 3)
{
\with-url #"http://lilypond.org/"
\line {
#(format #f "Noten gesetzt mit LilyPond ~a ~a www.lilypond.org"
(lilypond-version)
(ly:wide-char->utf-8 #x2013) ;;2013 = en dash.
)
}
}
}
and write
\header {
tagline = \germanTagline
}
in the score.
Wouldn’t it be possible to do this automatically on the grounds of the
\language command?
As another approach one might provide a function which, in \header {},
allows to write
\Tagline "deutsch" or
\Tagline "de" or similar
and thus easily choose a preset text for the desired language. I
attached a draft of this, which I couldn’t get to work, unfortunately,
since \displayScheme can’t handle \header blocks. I think it gives an
idea, nevertheless.
What do you think?
Yours, Simon
\version "2.19.16"
\include "tagline.ly"
\header {
\Tagline "de"
}
%\void\displayScheme \header { tagline = "foo" }
{ c }\version "2.19.16"
englishTaglineText = #(format #f
"Music typeset using LilyPond ~a~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"
(lilypond-version)
(ly:wide-char->utf-8 #x2013) ;;2013 = en dash.
)
#(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/"
\line $text
}
}
#}
))
Tagline = #(define-scheme-function (parser location id) (string?)
(let
((def-tagline
(lambda (ref)
(define tagline (markup #:format-tagline ref)))))
(cond
((eq? id "de") (def-tagline germanTaglineText))
((eq? id "en") (def-tagline englishTaglineText)))))_______________________________________________
bug-lilypond mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-lilypond