abcjs
abcjs copied to clipboard
Special cases for formatting annotations
- How do you escape a double quote within an annotation?
e.g.
%%abc-charset utf-8
X:1
T:7.7.7.7.7.7 (St. Petersburg 8.8.8.8.8.8)
C:Dimitri S. Bortnianski, 1825
L:1/8
Q:1/4=120
M:3/4
K:D
%%score (S A) (T B)
V:S clef=treble middle=B stem=up
V:A clef=treble middle=B stem=down
V:T clef=bass,, stem=up
V:B clef=bass,, stem=down
[V:S]"_1. "Till He come!" O let the words"(A2F2) G2 | A4 d2 | (e2d2) c2 |d6 ||
"_Linger on the trembling chords;"(B2d2) B2 | A4 F2 | (A2G2) F2 | E6 ||
"_Let the little while between"(A2F2) G2 | A4 d2 | (e2d2) c2 | d6 ||
"_In their golden light be seen;"(B2d2) B2 | A4 F2 | (B2F2) ^G2 | A6 ||
"_Let us think how heaven and home"e4 c2 | d4 A2 | (f2e2) d2 | (d4c2) ||
"_Lie beyond that Till He come!"(d2c2) B2 | A4 F2 | G4 E2 | D6 |]
[V:A](F2D2) E2 | F4 F2 | (G2F2) E2 |F6 ||
(G2D2) G2 | F4 D2 | E4 D2 | C6 ||
(F2D2) E2 | F4 F2 | (G2F2) E2 | F6 ||
(G2D2) G2 | F4 D2 | F4 E2 | E6 ||
G4 E2 | F4 F2 | (A2G2) F2 | (F4E2) ||
(F2A2) G2 | F4 D2 | D4 C2 | D6 |]
[V:T]A,4 A,2 | A,4 A,2 | (C2D2) E2 | D6 ||
D4 D2 | D4 A,2 | A,4 A,2 | A,6 ||
A,4 (B,C) | D4 A,2 | (C2D2) E2 | D6 ||
D4 D2 | D4 A,2 | D4 B,2 | C6 ||
C4 E2 | D4 D2 | (D2C2) D2 | A,6 ||
A,4 (B,C) | D4 A,2 | B,4 (A,G,) | F,6 |]
[V:B]D,4 D,2 | D,4 D,2 | A,,4 A,,2 | D,6 ||
G,4 G,2 | D,4 D,2 | C,4 D,2 | A,,6 ||
D,4 D,2 | D,4 D,2 | A,,4 A,,2 | D,6 ||
G,4 G,2 | D,4 D,2 | B,,4 E,2 | A,,6 ||
A,,4 A,,2 | D,4 D,2 | (D,2E,2) (F,G,) | A,6 ||
D,4 D,2 | D,4 D,2 | G,,4 A,,2 | D,6 |]
- Are there any workarounds for a case like this? I'm using responsive: "resize" option.
For the first thing, I would use curly quotes - I think they look better. So you would put "_1. “Till He come!” O let the words"
instead. I think there is a way to escape characters but I forget how if you really want the straight quotes.
For the second thing, that's a little harder. You could try adding "y" to the music line to make it longer. You have to add the same amount to each voice. That is, something like:
E E G|B3 G G F|E3 y8||
y
is a spacer and it has the same syntax as a note but it doesn't count in time - it just counts visually.
- Curly quotes will work, though it will take some time to go through and change everything.
- That would work if I were not automating the entry of the lyrics, but I'm not sure how to predict when more space will be needed when I'm inserting them programmatically (different lyrics can be used with the same tune). The main thing I was wondering was if there was some way to automatically adjust for the length of the lyrics, or to wrap them. If there isn't, I may have to just count characters and make the score wider/adjust zoom/use y spacer if it is over x characters or something. (Which brings me to side comment on enabling wrapping-- I noticed that when I have a semicolon within the text, it goes to the next line. Am I doing that somehow or is that part of your comments code?)
Does "Recognize backslash to escape lyrics." in 6.0.4 address this or is it only for lyrics?
That is just for lyrics, but I'll make it work for annotations, too.
That would be great; currently I don't have a way to use a semicolon in annotations. It creates a new line for some reason. And anything entered as an html symbol creates a new line also due to the semicolon.