X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fsnippets%2Fincipit.ly;h=e78a5f3425498b5737e7f6c5dbf476c26a673a72;hb=cff7f06c64f984af1732679c2c918f77c2b0dbbb;hp=46710df5a18c9af6e9e6386149130c2f3acfd923;hpb=71243e9548e9146da4a90e6347dbca6430346be8;p=lilypond.git diff --git a/Documentation/snippets/incipit.ly b/Documentation/snippets/incipit.ly index 46710df5a1..e78a5f3425 100644 --- a/Documentation/snippets/incipit.ly +++ b/Documentation/snippets/incipit.ly @@ -1,12 +1,14 @@ -%% Do not edit this file; it is automatically -%% generated from LSR http://lsr.dsi.unimi.it -%% This file is in the public domain. -\version "2.13.4" +% DO NOT EDIT this file manually; it is automatically +% generated from Documentation/snippets/new +% Make any changes in Documentation/snippets/new/ +% and then run scripts/auxiliar/makelsr.py +% +% This file is in the public domain. +%% Note: this file works from version 2.14.0 +\version "2.14.0" \header { - lsrtags = "staff-notation, ancient-notation" - -%% Translation of GIT committish: b2d4318d6c53df8469dfa4da09b27c15a374d0ca +%% Translation of GIT committish: 70f5f30161f7b804a681cd080274bfcdc9f4fe8c texidoces = " Los «incipit» se pueden escribir utilizando el grob del nombre del instruemento, pero manteniendo independientes las definiciones del @@ -14,48 +16,56 @@ nombre del instrumento y del incipit." doctitlees = "Incipit" + lsrtags = "staff-notation, ancient-notation" texidoc = " Incipits can be added using the instrument name grob, but keeping separate the instrument name definition and the incipit definition. - " doctitle = "Incipit" } % begin verbatim + incipit = #(define-music-function (parser location incipit-music) (ly:music?) #{ \once \override Staff.InstrumentName #'self-alignment-X = #RIGHT \once \override Staff.InstrumentName #'self-alignment-Y = #UP - \once \override Staff.InstrumentName #'Y-offset = #4 + \once \override Staff.InstrumentName #'Y-offset = + #(lambda (grob) + (+ 4 (system-start-text::calc-y-offset grob))) \once \override Staff.InstrumentName #'padding = #0.3 \once \override Staff.InstrumentName #'stencil = - #(lambda (grob) - (let* ((instrument-name (ly:grob-property grob 'long-text)) - (layout (ly:output-def-clone (ly:grob-layout grob))) - (music (make-music 'SequentialMusic - 'elements (list (make-music 'ContextSpeccedMusic - 'context-type 'MensuralStaff - 'element (make-music 'PropertySet - 'symbol 'instrumentName - 'value instrument-name)) - $incipit-music))) - (score (ly:make-score music)) - (mm (ly:output-def-lookup layout 'mm)) - (indent (ly:output-def-lookup layout 'indent)) - (width (ly:output-def-lookup layout 'incipit-width)) - (incipit-width (if (number? width) - (* width mm) - (* indent 0.5)))) - (ly:output-def-set-variable! layout 'indent (- indent incipit-width)) - (ly:output-def-set-variable! layout 'line-width indent) - (ly:output-def-set-variable! layout 'ragged-right #f) - (ly:output-def-set-variable! layout 'ragged-last #f) - (ly:output-def-set-variable! layout 'system-count 1) - (ly:score-add-output-def! score layout) - (ly:grob-set-property! grob 'long-text - (markup #:score score)) - (ly:system-start-text::print grob))) + #(lambda (grob) + (let* ((instrument-name (ly:grob-property grob 'long-text)) + (layout (ly:output-def-clone (ly:grob-layout grob))) + (music (make-sequential-music + (list (context-spec-music + (make-sequential-music + (list (make-property-set + 'instrumentName instrument-name) + (make-grob-property-set + 'VerticalAxisGroup + 'Y-extent '(-4 . 4)))) + 'MensuralStaff) + $incipit-music))) + (score (ly:make-score music)) + (mm (ly:output-def-lookup layout 'mm)) + (indent (ly:output-def-lookup layout 'indent)) + (width (ly:output-def-lookup layout 'incipit-width)) + (incipit-width (if (number? width) + (* width mm) + (* indent 0.5)))) + + (ly:output-def-set-variable! layout 'indent (- indent + incipit-width)) + (ly:output-def-set-variable! layout 'line-width indent) + (ly:output-def-set-variable! layout 'ragged-right #f) + (ly:output-def-set-variable! layout 'ragged-last #f) + (ly:output-def-set-variable! layout 'system-count 1) + (ly:score-add-output-def! score layout) + (ly:grob-set-property! grob 'long-text + (markup #:score score)) + (system-start-text::print grob))) #}) %%%%%%%%%%%%%%%%%%%%%%%%% @@ -165,7 +175,6 @@ tenorIncipit = << tenorNotes = { \transpose c' c' { - \once \override Staff.VerticalAxisGroup #'minimum-Y-extent = #'(-6 . 3) \clef "treble_8" R1 | R1 |