Allgemein > Hilfe beim Einstieg in Lilypond
Variablen in Lilypond
Lebostein:
Hab die Syntax nach vielen rumprobieren rausbekommen. Hab mal die Standard-Formatierung und die Makroformatierung ("Formatvorlagen") gegenübergestellt. Jeweils soll die Schriftart "Comic Sans MS" mit der Schriftgröße 8 verwendet werden. Leider klappt das mit der Schriftart nicht im Makro (bug??)....
--- Code: ---\version "2.11.38"
% ------------------------------ WORKS:
\markup {
\override #'(font-name . "Comic Sans MS")
\override #'(font-size . 8)
"All work and no play makes Jack a dull boy"
}
% ------------------------------ DON'T WORK (the size 8 is correct, but font is default still):
#(define-markup-command (titlefont layout props text) (string?)
(interpret-markup layout props (markup
#:override '(font-family . "Comic Sans MS")
#:override '(font-size . 8)
text
)))
\markup \titlefont #"All work and no play makes Jack a dull boy"
% ------------------------------
--- Ende Code ---
Andre:
Ist schon richtig, hast nur das falsche genommen.
Die Font-Family ist Roman, Sans oder Typesetter.
Aber was du willst ist Font-Name:
--- Code: ---\version "2.10.33"
\include "deutsch.ly"
#(define-markup-command
(FontArial layout props text) (string?)
(interpret-markup layout props
(markup
#:override '(font-name . "Arial")
#:override '(font-size . 8)
text
)
)
)
#(define-markup-command
(FontComic layout props text) (string?)
(interpret-markup layout props
(markup
#:override '(font-name . "Comic Sans MS")
#:override '(font-size . 8)
text
)
)
)
\relative c' { c^\markup \FontArial #"Hellau" d e f^\markup \FontComic #"Allaf" g a h }
--- Ende Code ---
Lebostein:
:D Mein Gott! Manchmal sieht man den Wald vor lauter Bäumen nicht!
Warum mir das nicht aufgefallen ist. Oben verwende ich font-name und unten font-family... Naja vergesst es.
Vielen Dank Andre!
Jetzt hab ich meine Formatierung ausgelagert, so dass ich nur noch an einer Stelle Anpassen muss, damit alle Notenblätter gleich aussehen:
--- Code: ---\version "2.11.38"
\include "deutsch.ly"
\include "format.ly"
\header {
title = \markup \formatTitel #"Das Lied hat keinen Namen"
subtitle = \markup \formatUnter #"Trad. 19. Jh."
tagline = \markup \formatUnter #"S1, S2, Flöte, Zwischenspiel"
}
--- Ende Code ---
mit der Formatdatei:
--- Code: ---#(define-markup-command (formatTitel layout props text) (string?)
(interpret-markup layout props
(markup
#:override '(font-name . "Heidelbe-Normal")
#:override '(font-size . 6)
text
)))
#(define-markup-command (formatUnter layout props text) (string?)
(interpret-markup layout props
(markup
#:override '(font-name . "Palatino")
#:override '(font-size . 0)
text
)))
--- Ende Code ---
Navigation
[0] Themen-Index
[*] Vorherige Sete
Zur normalen Ansicht wechseln