Hi,
I modified my def for Chinese font file selection, to define a function for
bilingual display:
cheng = #(define-music-function (parser location chisize chinese engsize
english)
(number? string? number? string?)
#{ \markup {
\override #'(baseline-skip . 2) \center-align {
\bold \fontsize #$chisize \override #'(font-name . "仿宋_GB2312") $chinese
\bold \fontsize #$engsize $english } }
#})
It seems right according the Notation Ref. But when I use it in the following
header markups, it produces a lot of errors:
\header {
dedication = \cheng #2 #"至武海雁" #2 #"Dedicated to Wu Haiyan"
title = \cheng #4 #"乐诗三章" #4 #"Poem In Three Parts"
composer = \cheng #3 #"胡海鹏" #3 #"Hu Haipeng"
copyright = "© 1997, All Rights Reserved"
tagline = \markup \fill-line { \override #'(font-name . "仿宋_GB2312")
\fontsize #2 \bold "19998年月" }
}
The error messages are:
Processing `f:/my documents/composition/poem in three parts/threepoe.ly'
Parsing...
<string>:1:33: error: syntax error, unexpected \markup
parseStringResult = \notemode {
\markup {
<string>:3:6: error: unknown escaped string: `\bold'
\bold \fontsize #lilyvartmpb \override #(quote (font-name .
"浠垮甛x8b_GB2312")) \lilyvartmpc
<string>:3:12: error: unknown escaped string: `\fontsize'
\bold
\fontsize #lilyvartmpb \override #(quote (font-name .
"浠垮甛x8b_GB2312")) \lilyvartmpc
<string>:4:6: error: unknown escaped string: `\bold'
\bold \fontsize #lilyvartmpd \lilyvartmpe } }
<string>:4:12: error: unknown escaped string: `\fontsize'
\bold
\fontsize #lilyvartmpd \lilyvartmpe } }
<string>:1:33: error: syntax error, unexpected \markup
parseStringResult = \notemode {
\markup {
<string>:3:6: error: unknown escaped string: `\bold'
\bold \fontsize #lilyvartmpb \override #(quote (font-name .
"浠垮甛x8b_GB2312")) \lilyvartmpc
<string>:3:12: error: unknown escaped string: `\fontsize'
\bold
\fontsize #lilyvartmpb \override #(quote (font-name .
"浠垮甛x8b_GB2312")) \lilyvartmpc
<string>:4:6: error: unknown escaped string: `\bold'
\bold \fontsize #lilyvartmpd \lilyvartmpe } }
<string>:4:12: error: unknown escaped string: `\fontsize'
\bold
\fontsize #lilyvartmpd \lilyvartmpe } }
<string>:1:33: error: syntax error, unexpected \markup
parseStringResult = \notemode {
\markup {
<string>:3:6: error: unknown escaped string: `\bold'
\bold \fontsize #lilyvartmpb \override #(quote (font-name .
"浠垮甛x8b_GB2312")) \lilyvartmpc
<string>:3:12: error: unknown escaped string: `\fontsize'
\bold
\fontsize #lilyvartmpb \override #(quote (font-name .
"浠垮甛x8b_GB2312")) \lilyvartmpc
<string>:4:6: error: unknown escaped string: `\bold'
\bold \fontsize #lilyvartmpd \lilyvartmpe } }
<string>:4:12: error: unknown escaped string: `\fontsize'
\bold
\fontsize #lilyvartmpd \lilyvartmpe } }
I think it is perhaps because of "chisize", "chinese" are not things Lily know,
and us the following:
cheng = #(define-music-function (parser location fontsize text)
(number? string?)
#{ \markup {
\override #'(baseline-skip . 2) \center-align {
\bold \fontsize #$fontsize \override #'(font-name . "仿宋_GB2312") $text
\bold \fontsize #$fontsize $text
} }
#})
but the error still exists.
I'm not familiar with Scheme, so I can't find a way to debug and create a new
function. Could anyone help me?
Haipeng
_______________________________________________
lilypond-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-user