]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/snippets/bar-chords-notation-for-guitar--with-text-spanner.ly
Rewrites some embedded PostScript using markup commands
[lilypond.git] / Documentation / snippets / bar-chords-notation-for-guitar--with-text-spanner.ly
index cc396fa6ba4200311342ecec72b430f949e0342e..a40fbd4ab5172e5c321daef226b37edb30025003 100644 (file)
@@ -1,7 +1,11 @@
-%% 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.10"
+% 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.15.24
+\version "2.15.24"
 
 \header {
   lsrtags = "chords, fretted-strings"
@@ -19,23 +23,13 @@ The syntax is @code{\\bbarre #'fret_number' @{ notes @} }
   doctitle = "Bar chords notation for Guitar ( with Text Spanner)"
 } % begin verbatim
 
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %% %%%%%%%  Cut here ----- Start 'bbarred.ly'
 
-%% PostScript -------------------------------
-pScript= \markup {
-       \with-dimensions #'(0 . 0.8) #'(0 . 2.0)
-       \postscript     #"
-       0.15 setlinewidth
-       /Times-Roman findfont
-       2.0 scalefont
-       setfont
-       (C)show %%change with B if you prefer
-       %(B)show %%change with C if you prefer
-       stroke
-       0.7 -0.5 moveto
-       0.7  1.7 lineto
-       stroke"
+%% C with slash -------------------------------
+cWithSlash = \markup {
+  \combine \roman C \translate #'(0.6 . -0.4) \draw-line #'(0 . 2.0)
 }
 %% Span -----------------------------------
 %% Syntax: \bbarre #"text" { notes } - text = any number of box
@@ -73,9 +67,9 @@ bbarre= #(define-music-function (barre location str music) (string? ly:music?)
                         \once \override TextSpanner #'to-barline = ##f
                         \once \override TextSpanner #'bound-details =  #'((left (Y . 0) (padding . 0.25) (attach-dir . -2)) (right (Y . 0) (padding . 0.25) (attach-dir . 2)))
                         \once  \override TextSpanner #'bound-details #'right #'text = \markup { \draw-line #'( 0 . -.5) }
-                        \once  \override TextSpanner #'bound-details #'left #'text =  \markup { \pScript $str }
+                        \once  \override TextSpanner #'bound-details #'left #'text =  \markup { \cWithSlash #str }
 %% uncomment this line for make full barred
-                       % \once  \override TextSpanner #'bound-details #'left #'text =  \markup { "B" $str }
+                       % \once  \override TextSpanner #'bound-details #'left #'text =  \markup { "B" #str }
                           #}
     spanned-music))))