[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Different colours in a single word
From: |
Mark Polesky |
Subject: |
Re: Different colours in a single word |
Date: |
Thu, 11 Jun 2009 00:14:38 -0700 (PDT) |
Jayaratna wrote:
> $ lilypond score.ly
> GNU LilyPond 2.12.2
> Processing `score.ly'
> Analisi...
> score.ly:25:11: error: syntax error, unexpected UNSIGNED
> %\include "
> 04_fig.ly"
> error: failed files: "score.ly"
The only explanation I can imagine is that the parser doesn't
see the % because in fact it is *inside* a quoted string. For
example, if you accidentally put a quote-mark at the end of a
line somewhere earlier in the code, like this:
#(set-global-staff-size 16)"
%\include "04_fig.ly"
the parser will actually see this:
1. scheme command: #(set-global-staff-size 16)
2. quoted string: "
%\include "
3. unsigned integer: 04
Here it will stop parsing because it doesn't have any
instructions on what to do if it reads a number in that context.
Perhaps the problem could be in one of the included files? I
don't know enough to say for sure if that's something that could
happen. Use
%{
multi-line comments
%}
to isolate potential culprits...
> \book {
>
>
>
> \header {
>
> title = \markup \center-align { \smallCaps "La Fuitte du Roi
> d'Angleterre" \fontsize #-3 "à 3. deux Violons où Flutes, & Basse ou
> Continue. par N. DEROSIER" }
> subtitle = \markup { \italic \fontsize #-2 "et se vendenz chez.
> l'Autheur, sur le Cingel devant le Doele inde Roose-Boom" }
> subsubtitle = \markup { \smallCaps "A Amsterdam, 1689."}
> %composer = \markup \center-column { "Nicolas Derosier " }
> copyright = "© A******** M******* 2009"
> % tagline = \markup {\roman "A***** M*****" \concat {\with-color
> #(x11-color "red") "M" \with-color #(x11-color "black") "vsicvs P******
> C*****"}
>
> }
> If I delete the %\include "04_fig.ly" line, Lilypond starts giving errors
> from the next " character.
I would recommend that you format your file to fit (uncompromisingly)
within at most 72 lines, to prevent certain problems. For example, I
copied your code directly into a file, which compiled with errors
because the curly braces were not matched. Here is the structure:
\book {
\header {
title = { ... }
subtitle = { ... }
subsubtitle = { ... }
%composer = { ... }
copyright = ...
% tagline = { \concat {
...}
}
I assume you meant to comment out all of the tagline? Perhaps it was
originally on one line in your file, but perhaps through e-mail it
gained one or two line-endings. Which means that
...}
}
is not commented out. Multi-line comments are done like this:
%{
tagline = { \concat {
...}
}
%}
But by doing this, it becomes clear that the \header and \book braces
are not closed. So here's a clearer indentation:
\header {
title = {
<long>
}
subtitle = {
<long>
}
subsubtitle = <short>
composer = <short>
copyright = <short>
tagline = {
<long>
}
}
Note that curly braces can safely be removed if there is only one
item:
subsubtitle = \markup \smallCaps "string"
So here's your file re-formatted with some changes:
1. title: \center-align --> \center-column
(I assume that's what you meant)
2. subtitle: used \pad-to-box to balance the vertical spacing
3. subtitle: used \concat to break 1 string into 2 lines of code.
4. subsubtitle: removed unnecessary curly braces.
5. composer: removed \markup \center-column since it does nothing.
6. tagline: removed \roman (default is roman already)
7. tagline: #(x11-color "red") --> #red
8. tagline: removed \with-color #(x11-color "black") since the
color reverts back to black automatically anyway.
HTH.
- Mark
\version "2.12.2"
#(set-global-staff-size 16)
\include "01_fl1.ly"
\include "01_fl2.ly"
\include "01_bc.ly"
%\include "01_fig.ly"
\include "02_fl1.ly"
\include "02_fl2.ly"
\include "02_bc.ly"
%\include "02_fig.ly"
\include "03_fl1.ly"
\include "03_fl2.ly"
\include "03_bc.ly"
%\include "03_fig.ly"
\include "04_fl1.ly"
\include "04_fl2.ly"
\include "04_bc.ly"
%\include "04_fig.ly"
\header {
title = \markup \center-column {
\smallCaps "La Fuitte du Roi d'Angleterre"
\fontsize #-3
"à 3. deux Violons où Flutes, & Basse ou Continue. par N. DEROSIER"
}
subtitle = \markup
\pad-to-box #'(0 . 0) #'(0 . 2.5)
\italic \fontsize #-2 \concat {
"et se vendenz chez. l'Autheur, "
"sur le Cingel devant le Doele inde Roose-Boom"
}
subsubtitle = \markup \smallCaps "A Amsterdam, 1689."
composer = "Nicolas Derosier"
copyright = "© A******** M******* 2009"
tagline = \markup \concat {
"A***** M***** "
\with-color #red "M"
"vsicvs P****** C*****"
}
}
{ c'' }
- Different colours in a single word, Jayaratna, 2009/06/10
- Re: Different colours in a single word, Graham Percival, 2009/06/10
- Re: Different colours in a single word, Jayaratna, 2009/06/10
- Re: Different colours in a single word, Trevor Daniels, 2009/06/10
- Re: Different colours in a single word, Jayaratna, 2009/06/11
- Re: Different colours in a single word, -Eluze, 2009/06/11
- Re: Different colours in a single word, Jayaratna, 2009/06/11
- Re: Different colours in a single word, James E. Bailey, 2009/06/11
- Re: Different colours in a single word, Mark Polesky, 2009/06/11
- Re: Different colours in a single word, Jayaratna, 2009/06/11
- Re: Different colours in a single word,
Mark Polesky <=
- Re: Different colours in a single word, Trevor Daniels, 2009/06/11
- Re: Different colours in a single word, Mats Bengtsson, 2009/06/11