2012/12/9 Xavier Noria <f...@hashref.com>: > Hi, > > I am getting familiar with the docs, but can't yet figure this out by myself. > > I am transcribing a song in C, and would like the same document to > include its transposition in E flat. The file structure I have come > with so far is: > > \version "2.16.1" > > \include "english.ly" > > melody = \relative c'' { ... } > \addlyrics { ... } > > \bookpart { > \header { > title = "title" > subtitle = "(Transcription in C)" > composer = "composer" > tagline = "tagline" > } > > \score { > { \melody } > } > } > > \bookpart { > \header { > title = "title" > subtitle = "(Transcription in E flat)" > composer = "composer" > tagline = "tagline" > } > > \score { > { \transpose ds c \melody } % "ds" because "ef" yields a weird key > } > } > > As you see some data repetition remains in the headers (title, > composer, and tagline, subtitle differs). > > Questions: > > 1) The structure and variable usage are idiomatic? > > 2) Is there a clean way to factor those common header attributes out somehow?
Depends on what you want. For your example you could use: \version "2.16.1" \include "english.ly" melody = \relative c'' { \key c\major c1 } \addlyrics { word } \header { title = "title" composer = "composer" tagline = "tagline" } \bookpart { \header { subtitle = "(Transcription in C)" } \score { { \melody } } } \bookpart { \header { subtitle = "(Transcription in E flat)" } \score { { \transpose c ef \melody } } } HTH, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user