[ << Tweaks and overrides ] | [Arriba][Índice general] | [ Titles >> ] |
[ < ] | [ Subir : Top ] | [ > ] |
Paper and layout
[ << Paper and layout ] | [Arriba][Índice general] | [ Titles >> ] |
[ < Paper and layout ] | [ Subir : Paper and layout ] | [ > ] |
Alinear y centrar los nombres de instrumento
La alineación horizontal de los nombres de instrumento se puede
trucar modificando la propiedad Staff.InstrumentName
#'self-alignment-X
. Las variables de \layout
indent
y short-indent
definen el espacio en que se
alinean los nombres de instrumento antes del primer sistema y de
los siguientes, respectivamente.
\paper { left-margin = 3\cm } \score { \new StaffGroup << \new Staff \with { \override InstrumentName.self-alignment-X = #LEFT instrumentName = \markup \left-column { "Left aligned" "instrument name" } shortInstrumentName = "Left" } { c''1 \break c''1 } \new Staff \with { \override InstrumentName.self-alignment-X = #CENTER instrumentName = \markup \center-column { Centered "instrument name" } shortInstrumentName = "Centered" } { g'1 g'1} \new Staff \with { \override InstrumentName.self-alignment-X = #RIGHT instrumentName = \markup \right-column { "Right aligned" "instrument name" } shortInstrumentName = "Right" } { e'1 e'1 } >> \layout { ragged-right = ##t indent = 4\cm short-indent = 2\cm } }
[ << Paper and layout ] | [Arriba][Índice general] | [ Titles >> ] |
[ < ] | [ Subir : Paper and layout ] | [ > ] |
Arranging separate lyrics on a single line
Sometimes you may want to put lyrics for different performers on a
single line: where there is rapidly alternating text, for
example. This snippet shows how this can be done with
\override VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance = ##f
.
\layout { \context { \Lyrics \override VerticalAxisGroup.nonstaff-nonstaff-spacing.minimum-distance = ##f } } aliceSings = \markup { \smallCaps "Alice" } eveSings = \markup { \smallCaps "Eve" } << \new Staff << \new Voice = "alice" { f'4^\aliceSings g' r2 | s1 | f'4^\aliceSings g' r2 | s1 | \break % ... \voiceOne s2 a'8^\aliceSings a' b'4 | \oneVoice g'1 } \new Voice = "eve" { s1 | a'2^\eveSings g' | s1 | a'2^\eveSings g' % ... \voiceTwo f'4^\eveSings a'8 g' f'4 e' | \oneVoice s1 } >> \new Lyrics \lyricsto "alice" { may -- be sec -- ond % ... Shut up, you fool! } \new Lyrics \lyricsto "eve" { that the words are % ... …and then I was like– } >>
[ << Paper and layout ] | [Arriba][Índice general] | [ Titles >> ] |
[ < ] | [ Subir : Paper and layout ] | [ > ] |
Partes de libro
Se puede usar \bookpart
para dividir un libro en varias
partes. La última página de cada parte vùede quedar afectada por el
valor de ragged-last-bottom
. Los elementos de marcado de
encabezamiento y pie de página pueden detectar que están en la última
página de una parte, y presentar diferencias con la última página del
libro.
#(set-default-paper-size "a6") \book { %% book paper, which is inherited by all children bookparts \paper { ragged-last-bottom = ##t %% Page footer: add a different part-tagline at part last page oddFooterMarkup = \markup { \column { \fill-line { %% Copyright header field only on book first page. \if \on-first-page \fromproperty #'header:copyright } \fill-line { %% Part tagline header field only on each part last page. \if \on-last-page-of-part \fromproperty #'header:parttagline } \fill-line { %% Tagline header field only on book last page. \if \on-last-page \fromproperty #'header:tagline } } } } %% book header, which is inherited by the first bookpart \header { title = "Book title" copyright = "Copyright line on book first page" parttagline = "Part tagline" tagline = "Book tagline" } \bookpart { %% a different page breaking function may be used on each part \paper { page-breaking = #ly:minimal-breaking } \header { subtitle = "First part" } \markup { The first book part } \markup { a page break } \pageBreak \markup { first part last page } \markup \wordwrap { with ragged-last-bottom (see the space below this text) } } \bookpart { \header { subtitle = "Second part" } { c'4 } } }
[ << Paper and layout ] | [Arriba][Índice general] | [ Titles >> ] |
[ < ] | [ Subir : Paper and layout ] | [ > ] |
Modificar el tamaño de la pauta
Aunque la manera más sencilla de redimensionar los pentagramas es usar
#(set-global-staff-size xx)
, el tamaño de una pauta individual
se puede cambiar escalando las propiedades de 'staff-space
y de
fontSize
.
<< \new Staff { \relative c'' { \dynamicDown c8\ff c c c c c c c } } \new Staff \with { fontSize = #-3 \override StaffSymbol.staff-space = #(magstep -3) } { \clef bass c8 c c c c\f c c c } >>
[ << Paper and layout ] | [Arriba][Índice general] | [ Titles >> ] |
[ < ] | [ Subir : Paper and layout ] | [ > ] |
Recorte de sistemas
Este código muestra cómo recortar (extraer) fragmentos a partir de una partitura completa.
Este archivo tiene que procesarse de forma separada con la opción ‘-dclip-systems’; la página de fragmentos de código podría no mostrar el resultado adecuadamente.
La salida consiste en archivos con los nombres ‘base-from-inicio-to-final[-número].eps’.
Si se incluyen los comienzos y finales de los sistemas, incluyen las dimensiones del grob del sistema, por ejemplo los nombres de instrumento.
Las notas de adorno en el punto final de la región no se incluyen.
Las regiones pueden abarcar varios sistemas. En este caso, se generan varios archivos EPS.
#(ly:set-option 'clip-systems) #(define output-suffix "1") origScore = \score { \relative c' { \new Staff \with { instrumentName = "Instrument" } c1 d1 \grace c16 e1 \key d \major f1 \break \clef bass g,1 fis1 } } \book { \score { \origScore \layout { % Each clip-region is a (START . END) pair % where both are rhythmic-locations. % (make-rhythmic-locations BAR-NUMBER NUM DEN) % means NUM/DEN whole-notes into bar numbered BAR-NUMBER clip-regions = #(list (cons (make-rhythmic-location 2 0 1) (make-rhythmic-location 4 0 1)) (cons (make-rhythmic-location 0 0 1) (make-rhythmic-location 4 0 1)) (cons (make-rhythmic-location 0 0 1) (make-rhythmic-location 6 0 1)) ) } } } #(ly:set-option 'clip-systems #f) #(define output-suffix #f) \book { \score { \origScore } \markup { \bold \fontsize #6 clips } \score { \lyrics { \markup { from-2.0.1-to-4.0.1-clip.eps } \markup { \epsfile #X #30.0 #(format #f "~a-1-from-2.0.1-to-4.0.1-clip.eps" (ly:parser-output-name)) } } } }
[ << Paper and layout ] | [Arriba][Índice general] | [ Titles >> ] |
[ < ] | [ Subir : Paper and layout ] | [ > ] |
Crear pentagramas en blanco
Para crear pentagramas en blanco, genere compases vacíos y después
elimine el grabador de números de compás Bar_number_engraver
del contexto Score
, y los grabadores de la indicación de compás
Time_signature_engraver
, de la clave Clef_engraver
y de
los compases Bar_engraver
del contexto de Staff
.
#(set-global-staff-size 20) \score { { \repeat unfold 12 { s1 \break } } \layout { indent = 0\in \context { \Staff \remove "Time_signature_engraver" \remove "Clef_engraver" \remove "Bar_engraver" } \context { \Score \remove "Bar_number_engraver" } } } % uncomment these lines for "letter" size %{ \paper { #(set-paper-size "letter") ragged-last-bottom = ##f line-width = 7.5\in left-margin = 0.5\in bottom-margin = 0.25\in top-margin = 0.25\in } %} % uncomment these lines for "A4" size %{ \paper { #(set-paper-size "a4") ragged-last-bottom = ##f line-width = 180 left-margin = 15 bottom-margin = 10 top-margin = 10 } %}
[ << Paper and layout ] | [Arriba][Índice general] | [ Titles >> ] |
[ < ] | [ Subir : Paper and layout ] | [ > ] |
Muestra de cada uno de los encabezamientos posibles
Muestra de todos los tipos de encabezamiento.
\header { copyright = "copyright" title = "title" subtitle = "subtitle" composer = "composer" arranger = "arranger" instrument = "instrument" meter = "meter" opus = "opus" piece = "piece" poet = "poet" texidoc = "All header fields with special meanings." copyright = "public domain" enteredby = "jcn" source = "urtext" } \layout { ragged-right = ##f } \score { \relative c'' { c1 | c | c | c } } \score { \relative c'' { c1 | c | c | c } \header { title = "localtitle" subtitle = "localsubtitle" composer = "localcomposer" arranger = "localarranger" instrument = "localinstrument" metre = "localmetre" opus = "localopus" piece = "localpiece" poet = "localpoet" copyright = "localcopyright" } }
[ << Paper and layout ] | [Arriba][Índice general] | [ Titles >> ] |
[ < ] | [ Subir : Paper and layout ] | [ > ] |
Fijar un separador entre los sistemas
Se pueden insertar separadores sistema entre los sistemas de una
página. Se puede usar cualquier elemento de marcado, pero
\slashSeparator
está disponible como una elección
predeterminada adecuada.
\paper { system-separator-markup = \slashSeparator line-width = 120 } notes = \relative c' { c1 | c \break c1 | c \break c1 | c } \book { \score { \new GrandStaff << \new Staff \notes \new Staff \notes >> } }
[ << Paper and layout ] | [Arriba][Índice general] | [ Titles >> ] |
[ < ] | [ Subir : Paper and layout ] | [ > ] |
Índice general (tabla de contenidos)
Se puede incluir un índice general (tabla de contenidos) mediante el
uso de \markuplist \table-of-contents
. Los elementos de la
TDC se añaden con la instrucción \tocItem
.
#(set-default-paper-size "a6") \book { \markuplist \table-of-contents \pageBreak \tocItem \markup { The first score } \score { { c'1 \pageBreak \mark \default \tocItem \markup { Mark A } d'1 } } \pageBreak \tocItem \markup { The second score } \score { { e'1 } \header { piece = "Second score" } } }
[ << Paper and layout ] | [Arriba][Índice general] | [ Titles >> ] |
[ < ] | [ Subir : Paper and layout ] | [ Titles > ] |
Grupos de pentagramas alineados verticalmente sin una barra SystemStartBar que los interconecte
Este fragmento de código muestra cómo obtener grupos de pentagramas StaffGroups alineados verticalmente con una barra de inicio de sistema SystemStartBar por cada StaffGroup, pero sin conectarlos entre sí.
#(set-global-staff-size 18) \paper { indent = 0 ragged-right = ##f print-all-headers = ##t } \layout { \context { \StaffGroup \consists Text_mark_engraver \consists Staff_collecting_engraver systemStartDelimiterHierarchy = #'(SystemStartBrace (SystemStartBracket a b)) } \context { \Score \remove Text_mark_engraver \remove Staff_collecting_engraver \override SystemStartBrace.style = #'bar-line \omit SystemStartBar \override SystemStartBrace.padding = #-0.1 \override SystemStartBrace.thickness = #1.6 \override StaffGrouper.staffgroup-staff-spacing.basic-distance = #15 } } %%%% EXAMPLE txt = \lyricmode { Wer4 nur den lie -- ben Gott läßt wal2 -- ten4 und4 hof -- fet auf ihn al -- le Zeit2. } % First StaffGroup "exercise" eI = \relative c' { \textMark \markup { \bold Teacher: This is a simple setting of the choral. Please improve it. } \key a \minor \time 4/4 \voiceOne \partial 4 e4 a b c b a b gis2 e4\fermata g! g f e a a gis a2.\fermata \bar ":|." } eII = \relative c' { \key a \minor \time 4/4 \voiceTwo \partial 4 c4 e e e gis a f e2 b4 b d d c c d d c2. \bar ":|." } eIII = \relative c' { \key a \minor \time 4/4 \clef bass \voiceOne \partial 4 a4 c b a b c d b2 gis4 g g b c a f e e2. } eIV = \relative c' { \key a \minor \time 4/4 \clef bass \voiceTwo \partial 4 a,4 a' gis a e a, d e2 e,4\fermata e' b g c f d e a,2.\fermata \bar ":|." } exercise = \new StaffGroup = "exercise" << \new Staff << \new Voice \eI \new Voice \eII >> \new Lyrics \txt \new Staff << \new Voice \eIII \new Voice \eIV >> >> % Second StaffGroup "simple Bach" sbI = \relative c' { \textMark \markup { \bold" Pupil:" Here's my version! } \key a \minor \time 4/4 \voiceOne \partial 4 e4 a b c b a b gis2 e4\fermata g! g f e a a gis a2.\fermata \bar ":|." } sbII = \relative c' { \key a \minor \time 4/4 \voiceTwo \partial 4 c8 d e4 e e8 f g4 f f e2 b4 b8 c d4 d e8 d c4 b8 c d4 c2. \bar ":|." } sbIII = \relative c' { \key a \minor \time 4/4 \clef bass \voiceOne \partial 4 a8 b c4 b a b8 c d4 d8 c b2 gis4 g g8 a b4 b a8 g f4 e e2. } sbIV = \relative c' { \key a \minor \time 4/4 \clef bass \voiceTwo \partial 4 a,4 a' gis a e f8 e d4 e2 e,4\fermata e' b a8 g c4 f8 e d4 e a,2.\fermata \bar ":|." } simpleBach = \new StaffGroup = "simple Bach" << \new Staff << \new Voice \sbI \new Voice \sbII >> \new Lyrics \txt \new Staff << \new Voice \sbIII \new Voice \sbIV >> >> % Third StaffGroup "chromatic Bach" cbI = \relative c' { \textMark \markup { \bold "Teacher:" \column { "Well, you simply copied and transposed a version of J.S.Bach." "Do you know this one?" } } \key a \minor \time 4/4 \voiceOne \partial 4 e4 a b c b a b gis4. fis8 e4\fermata g! g f e a a8 b gis4 a2.\fermata \bar ":|." } cbII = \relative c' { \key a \minor \time 4/4 \voiceTwo \partial 4 c8 d e4 e e8 fis gis4 a8 g! f!4 e2 b4 e e d d8[ cis] d dis e fis e4 e2. \bar ":|." } cbIII = \relative c' { \key a \minor \time 4/4 \clef bass \voiceOne \partial 4 a8 b c[ b] a gis8 a4 d, e8[ e'] d c b4. a8 gis4 b c d8 c b[ a] a b c b b c16 d c2. } cbIV = \relative c' { \key a \minor \time 4/4 \clef bass \voiceTwo \partial 4 a4 c, e a, b c d e2 e4\fermata e a b8 c gis[ g] fis f e dis e4 a,2.\fermata \bar ":|." } chromaticBach = \new StaffGroup = "chromatic Bach" << \new Staff << \new Voice \cbI \new Voice \cbII >> \new Lyrics \txt \new Staff << \new Voice \cbIII \new Voice \cbIV >> >> % Score \score { << \exercise \simpleBach \chromaticBach >> \header { title = \markup \column { \combine \null \vspace #1 "Exercise: Improve the given choral" " " } } \layout { \context { \Lyrics \override LyricText.X-offset = #-1 } } }
[ << Paper and layout ] | [Arriba][Índice general] | [ Titles >> ] |
[ < ] | [ Subir : Paper and layout ] | [ Titles > ] |