From 9cf80d84e3aff8b5d67bf3db822a52f83b235f54 Mon Sep 17 00:00:00 2001 From: Trevor Daniels Date: Tue, 14 Oct 2008 23:52:29 +0100 Subject: [PATCH] Docs: NR 3.3.3 Text encoding - replace utf-8 scheme hack with \char --- Documentation/user/input.itely | 42 +++++++++++++++------------------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/Documentation/user/input.itely b/Documentation/user/input.itely index 138b658cf7..392fbb3ea0 100644 --- a/Documentation/user/input.itely +++ b/Documentation/user/input.itely @@ -1171,45 +1171,39 @@ portuguese = \lyricmode { @end lilypond To enter a single character for which the Unicode escape sequence -is known but which is not available in the editor being used, enter - -@example -#(ly:export (ly:wide-char->utf-8 #x03BE)) -@end example - -as an articulation mark or within a @code{\markup} block, -where in this example @code{x03BE} is the hexadecimal code for the -Unicode U+03BE character, which has the Unicode name @qq{Greek Small -Letter Xi}. Any Unicode hexadecimal code may be substituted, and -if all special characters are entered in this format it is not -necessary to save the input file in UTF-8 format. - -Here are three ways of entering a UTF-8 code: +is known but which is not available in the editor being used, use +@code{\char ##xhhhh} within a @code{\markup} block, where +@code{hhhh} is the hexadecimal code for the character required. +For example, @code{\char ##x03BE} enters the Unicode U+03BE +character, which has the Unicode name @qq{Greek Small Letter Xi}. +Any Unicode hexadecimal code may be substituted, and if all special +characters are entered in this format it is not necessary to save +the input file in UTF-8 format. Of course, a font containing all +such encoded characters must be installed and available to LilyPond. + +The following example shows UTF-8 coded characters being used in +four places -- in a rehearsal mark, as articulation text, in lyrics +and as stand-alone text below the score: @lilypond[quote,verbatim] \score { \relative c'' { - c2^#(ly:export (ly:wide-char->utf-8 #x03EE)) - c2_\markup { \tiny { #(ly:export (ly:wide-char->utf-8 #x03B1)) " to " - #(ly:export (ly:wide-char->utf-8 #x03C9)) } } + c1 \mark \markup { \char ##x03EE } + c1_\markup { \tiny { \char ##x03B1 " to " \char ##x03C9 } } } + \addlyrics { O \markup { \concat{ Ph \char ##x0153 be! } } } } -\markup { "Copyright 2008" #(ly:export (ly:wide-char->utf-8 #x00a9)) } +\markup { "Copyright 2008" \char ##x00A9 } @end lilypond To enter the copyright sign in the copyright notice use: @example \header @{ - copyright = \markup @{ #(ly:export (ly:wide-char->utf-8 #x00a9)) "2008" @} + copyright = \markup @{ \char ##x00A9 "2008" @} @} @end example -@knownissues - -The @code{ly:export} format may be used in text within @code{\mark} or -@code{\markup} commands but not in lyrics. - @node Displaying LilyPond notation @subsection Displaying LilyPond notation -- 2.39.2