From a1827ff5f46616f932645ba87aecbbef4323e6f3 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 1 Aug 2004 12:28:37 +0000 Subject: [PATCH] *** empty log message *** --- Documentation/user/notation.itely | 66 +++++++++++++++++++++++++------ input/test/force-hshift.ly | 22 ----------- input/test/volta-chord-names.ly | 21 ---------- scm/define-markup-commands.scm | 30 ++++++++++++-- scm/fret-diagrams.scm | 3 +- 5 files changed, 82 insertions(+), 60 deletions(-) delete mode 100644 input/test/force-hshift.ly delete mode 100644 input/test/volta-chord-names.ly diff --git a/Documentation/user/notation.itely b/Documentation/user/notation.itely index 48f26b0a42..f4c128b785 100644 --- a/Documentation/user/notation.itely +++ b/Documentation/user/notation.itely @@ -1428,6 +1428,22 @@ voices have @code{\shiftOn}, @code{\shiftOnn}, etc. @cindex @code{\shiftOff} @code{\shiftOff}. +When LilyPond cannot cope, the @code{force-hshift} +property of the @internalsref{NoteColumn} object and pitched rests can +be used to override typesetting decisions. + +@lilypond[verbatim,raggedright] +\relative << +{ + + +} \\ { + + \once \override NoteColumn #'force-hshift = #1.7 + +} >> +@end lilypond + @seealso @@ -1445,10 +1461,6 @@ Examples: See also example files @refbugs -Resolving collisions is a intricate subject, and only a few situations -are handled. When LilyPond cannot cope, the @code{force-hshift} -property of the @internalsref{NoteColumn} object and pitched rests can -be used to override typesetting decisions. When using @code{merge-differently-headed} with an upstem eighth or a shorter note, and a downstem half note, the eighth note gets the wrong @@ -4057,11 +4069,39 @@ This results in the following output If you have multiple voices in a single staff, and you want a single ambitus per staff rather than per each voice, add the @internalsref{Ambitus_engraver} to the @internalsref{Staff} context -rather than to the @internalsref{Voice} context. +rather than to the @internalsref{Voice} context. Here is an example, -It is possible to tune individual ambituses for multiple voices on a -single staff, for example by erasing or shifting them horizontally. An -example is in @inputfileref{input/test,ambitus-mixed.ly}. +@lilypond[verbatim,raggedright] +\new Staff << + \new Voice \with { + \consists "Ambitus_engraver" + } \relative c'' { + \override Ambitus #'X-offset-callbacks + = #(list (lambda (grob axis) -1.0)) + \voiceOne + c4 a d e f2 + } + \new Voice \with { + \consists "Ambitus_engraver" + } \relative c' { + \voiceTwo + es4 f g as b2 + } +>> +@end lilypond + +@noindent +This example uses one advanced feature, + +@example + \override Ambitus #'X-offset-callbacks + = #(list (lambda (grob axis) -1.0)) +@end example + +@noindent +This code moves the ambitus to the left. The same effect could have +been achieved with @code{extra-offset}, but then the formatting system +would not reserve space for the moved object. @seealso @@ -4069,8 +4109,7 @@ Program reference: @internalsref{Ambitus}, @internalsref{AmbitusLine}, @internalsref{AmbitusNoteHead}, @internalsref{AmbitusAccidental}. -Examples: @inputfileref{input/regression,ambitus.ly}, -@inputfileref{input/test,ambitus-mixed.ly}. +Examples: @inputfileref{input/regression,ambitus.ly}. @refbugs @@ -4422,12 +4461,15 @@ for showing repeats. @lilypond[raggedright,verbatim] \new ChordNames \with { \override BarLine #'bar-size = #4 - \consists Bar_engraver + voltaOnThisStaff = ##t + \consists Bar_engraver \consists "Volta_engraver" } \repeat volta 2 \chords { f1:maj f:7 bes:7 - c:maj es + c:maj +} \alternative { + es e } @end lilypond diff --git a/input/test/force-hshift.ly b/input/test/force-hshift.ly deleted file mode 100644 index 3e3aba399e..0000000000 --- a/input/test/force-hshift.ly +++ /dev/null @@ -1,22 +0,0 @@ - -\version "2.3.8" -\header { - texidoc="@cindex Force hshift -Horizontal shift (@code{hshift}) can be forced in order to avoid collisions. " } - -\score { - \relative c' - \context Staff << { - - - } \\ { - -\once \override NoteColumn #'force-hshift = #1.7 - - } - >> - \paper { - raggedright = ##t - } -} - diff --git a/input/test/volta-chord-names.ly b/input/test/volta-chord-names.ly deleted file mode 100644 index cfc5c8de64..0000000000 --- a/input/test/volta-chord-names.ly +++ /dev/null @@ -1,21 +0,0 @@ -\header { - - texidoc = "Volta brackets can be placed over chord names. This -requires adding an engraver to @code{ChordNames}, and setting -@code{voltaOnThisStaff} correctly." - -} - -\version "2.3.8" -<< - \new ChordNames \with { - voltaOnThisStaff = ##t - } \chords { - c1 c - } - \new Staff \with { - voltaOnThisStaff = ##f - } { - \repeat volta 2 { c'1 } \alternative { c' } - } ->> diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index e54fa745ea..a578c38b7b 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -52,13 +52,35 @@ (def-markup-command (postscript paper props str) (string?) - "This inserts @var{str} directly into the output as a PostScript command string. For example, + "This inserts @var{str} directly into the output as a PostScript +command string. Due to technicalities of the output backends, +different scales should be used for the @TeX{} and PostScript backend, +selected with @code{-f}. + + +For the TeX backend, the following string prints a rotated text @cindex rotated text -@lilypond[verbatim] -{ c^\\markup { \\postscript #\" /ecrm10 findfont 10 output-scale div scalefont 90 rotate (hello) show \" } } -@end lilypond" +@verbatim +0 0 moveto /ecrm10 findfont +1.75 scalefont setfont 90 rotate (hello) show +@end verbatim + +@noindent +The magical constant 1.75 scales from LilyPond units (staff spaces) to +TeX dimensions. + +For the postscript backend, use the following + +@verbatim +gsave /ecrm10 findfont + 10.0 output-scale div + scalefont setfont 90 rotate (hello) show grestore +@end verbatim +" + ;; FIXME + (ly:make-stencil (list 'embedded-ps str) '(0 . 0) '(0 . 0) )) diff --git a/scm/fret-diagrams.scm b/scm/fret-diagrams.scm index 50f8e76b53..c2340c9c1d 100644 --- a/scm/fret-diagrams.scm +++ b/scm/fret-diagrams.scm @@ -292,7 +292,8 @@ For example, @example - \\markup \\fret-diagram #'((mute 6) (mute 5) (open 4) (place-fret 3 2) (place-fret 2 3) (place-fret 1 2)) + \\markup \\fret-diagram #'((mute 6) (mute 5) (open 4) + (place-fret 3 2) (place-fret 2 3) (place-fret 1 2)) @end example will produce a standard D chord diagram without fingering indications. -- 2.39.5