2015-08-19 17:53 GMT+02:00 ClausRogge <claus.ro...@aon.at>: > I have two nearly identical pairs of code files, one calling the other. One > of them works, the other one gives me the strange error quoted. > Layout file one: > > %%%%%%% > > \version "2.18.2" > > \paper {#(set-default-paper-size "a4") > indent = 0 > top-margin = 0\cm > left-margin = 1\cm > right-margin = 1\cm > bottom-margin = 1\cm > between-system-space = 28\mm > ragged-last-bottom=##f > ragged-right=##f > } > \include "DiagG.ly" > > \book{ > \bookpart { > \header {title = " " > subtitle = " " > subsubtitle = " " > composer = ""} > > \score { > {\override Staff.Clef.color = #white > \override Staff.TimeSignature.color = #white > \clef "G_8" > \key c \major > \time 4/4 > \DiagG} > } > }%bookpart ends > } > > %%%%Data file one: > > DiagG = { > > \omit Score.BarNumber > \override TextScript.fret-diagram-details.dot-color = #'white > \override TextScript.fret-diagram-details.orientation = #'landscape > \stopStaff s2 s_\markup {\bold "G dur"}^\markup{{\fret-diagram > #"s:6;h:5;6-2;6-3;6-5;5-2;5-3;5-5;4-2;4-4;4-5;3-2;3-4;3-5;2-3;2-5;1-2;1-3;1-5;"}} > > \break > > \override TextScript.fret-diagram-details.dot-color = #'black > \override TextScript.fret-diagram-details.orientation = #'standard > s1 s1_\markup {\bold "G"}^\markup{{\fret-diagram #"s:2;h:5; > 6-3;5-5;4-5;3-4;2-3;1-3;"}} > s1_\markup {\bold "C"}^\markup{{\fret-diagram > #"s:2;h:5;6-x;5-3;4-5;3-5;2-5;1-3;"}} > s1_\markup {\bold "D"}^\markup{{\fret-diagram > #"s:2;h:5;6-x;5-5;4-4;3-2;2-3;1-2;"}} > > } > > %%%%% > > Layout File 2: > > \version "2.18.2" > > \paper {#(set-default-paper-size "a4") > indent = 0 > top-margin = 0\cm > left-margin = 1\cm > right-margin = 1\cm > bottom-margin = 1\cm > between-system-space = 28\mm > ragged-last-bottom=##f > ragged-right=##f > } > \include "DiagD.ly" > > \book{ > \bookpart { > \header {title = " " > subtitle = " " > subsubtitle = " " > composer = ""} > > \score { > {\override Staff.Clef.color = #white > \override Staff.TimeSignature.color = #white > \clef "G_8" > \key c \major > \time 4/4 > \DiagD} > } > }%bookpart ends > } > > %%%%%% > > Data file 2: > > DiagD = { > > \omit Score.BarNumber > \override TextScript.fret-diagram-details.dot-color = #'white > \override TextScript.fret-diagram-details.orientation = #'landscape > \stopStaff s2 s_\markup {\bold "D dur"}^\markup{{\fret-diagram #"s:6;h:5; > 6-2;6-3;6-5;5-2;5-4;5-5;4-2;4-4;4-5;3-2;3-4;2-2;2-3;2-5;1-2;1-3;1-5;"}} > > \break > > \override TextScript.fret-diagram-details.dot-color = #'black > \override TextScript.fret-diagram-details.orientation = #'standard > s1 s1_\markup {\bold "D"}^\markup{{\fret-diagram #"s:2;h:5; > 6-x;5-x;4-4;3-2;2-3;1-x;"}} > s1_\markup {\bold "G"}^\markup{{\fret-diagram #"s:2;h:5; > 6-x;5-x;4-5;3-4;2-3;1-x;"}} > s1_\markup {\bold "A"}^\markup{{\fret-diagram #"s:2;h:5; > 6-x;5-x;4-2;3-2;2-2;1-x;"}} > > } > > The first pair of files work, the second pair gives me this error message: > > /Applications/LilyPond.app/Contents/Resources/share/lilypond/current/scm/fret-diagrams.scm:657:42: > In procedure - in expression (- string-count (cadr mypair)): > /Applications/LilyPond.app/Contents/Resources/share/lilypond/current/scm/fret-diagrams.scm:657:42: > Wrong type: #f > > I don't understand the error message! This is going to be a book for my > guitar students so in order to not have to compile the whole book every > time, I keep the data in a special file and call it in a little "test" > layout file. But as far as I can see, the two pairs are identical except for > the variable names. > > Using LP 2.18.2 on a Mac > > Help appreciated!
Well, your code is not a minimal example and it does not compile and thus it does not show the error. All I can say for now: I suspect your linebreaking of the strings for the fret-diagram. Cheers, Harm _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user