CVSROOT: /cvsroot/lilypond Module name: lilypond Branch: Changes by: Graham Percival <[EMAIL PROTECTED]> 05/05/03 08:49:23
Modified files: . : ChangeLog Documentation/user: advanced-notation.itely instrument-notation.itely changing-defaults.itely Log message: Some minor changes and moving Text stuff into Advaned notation. CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3530&tr2=1.3531&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/user/advanced-notation.itely.diff?tr1=1.15&tr2=1.16&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/user/instrument-notation.itely.diff?tr1=1.22&tr2=1.23&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/Documentation/user/changing-defaults.itely.diff?tr1=1.127&tr2=1.128&r1=text&r2=text Patches: Index: lilypond/ChangeLog diff -u lilypond/ChangeLog:1.3530 lilypond/ChangeLog:1.3531 --- lilypond/ChangeLog:1.3530 Tue May 3 08:02:00 2005 +++ lilypond/ChangeLog Tue May 3 08:49:20 2005 @@ -7,6 +7,12 @@ advanced-notation.itely, instrument-notation.itely: minor fixes. + * ly/property-init.ly: add textSpanner{Up,Down,Neutral}. + + * Documentation/user/advanced-notation.itely, + changing-defaults.itely: consolidate Text stuff in + advanced notation. + 2005-05-03 Han-Wen Nienhuys <[EMAIL PROTECTED]> * scm/framework-ps.scm (write-preamble): extract CFF from OTF Index: lilypond/Documentation/user/advanced-notation.itely diff -u lilypond/Documentation/user/advanced-notation.itely:1.15 lilypond/Documentation/user/advanced-notation.itely:1.16 --- lilypond/Documentation/user/advanced-notation.itely:1.15 Tue May 3 08:02:01 2005 +++ lilypond/Documentation/user/advanced-notation.itely Tue May 3 08:49:22 2005 @@ -12,6 +12,7 @@ This chapter deals with rarely-used and advanced notation. @menu +* Text:: * Even more than notes:: * Preparing parts:: * Orchestral music:: @@ -21,17 +22,21 @@ @end menu [EMAIL PROTECTED] really bad section name. :( [EMAIL PROTECTED] Even more than notes [EMAIL PROTECTED] Even more than notes [EMAIL PROTECTED] Text [EMAIL PROTECTED] Text + +This section explains how to include text (with various formatting) in +your scores. @menu * Text scripts:: * Text spanners:: -* Transpose:: -* Ottava brackets:: -* Multi measure rests:: -* Time administration:: +* Text markup:: +* Text encoding:: +* Nested scores:: +* Overview of text markup commands:: +* New dynamic marks:: +* Other text markup issues:: @end menu @@ -91,11 +96,19 @@ @lilypond[quote,raggedright,fragment,relative=1,verbatim] c1 -\override TextSpanner #'direction = #-1 +\textSpannerDown \override TextSpanner #'edge-text = #'("rall " . "") c2\startTextSpan b c\stopTextSpan a @end lilypond [EMAIL PROTECTED] + [EMAIL PROTECTED] [EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED], [EMAIL PROTECTED] [EMAIL PROTECTED] @seealso @@ -105,6 +118,220 @@ Examples: @inputfileref{input/@/regression,text@/-spanner@/.ly}. [EMAIL PROTECTED] Text markup [EMAIL PROTECTED] Text markup [EMAIL PROTECTED] text markup [EMAIL PROTECTED] markup text + [EMAIL PROTECTED] typeset text + +The internal mechanism to typeset texts is accessed with the keyword [EMAIL PROTECTED] Within markup mode, you can enter texts similar to +lyrics. They are simply entered, while commands use the backslash @code{\}. [EMAIL PROTECTED] markup + [EMAIL PROTECTED],verbatim,fragment,relative=1] +c1^\markup { hello } +c1_\markup { hi there } +c1^\markup { hi \bold there, is \italic anyone home? } [EMAIL PROTECTED] lilypond + [EMAIL PROTECTED] font switching + +The markup in the example demonstrates font switching commands. The +command @code{\bold} and @code{\italic} apply to the first following +word only; enclose a set of texts with braces to apply a command +to more words: [EMAIL PROTECTED] +\markup @{ \bold @{ hi there @} @} [EMAIL PROTECTED] example + [EMAIL PROTECTED] +For clarity, you can also do this for single arguments, e.g., + [EMAIL PROTECTED] +\markup @{ is \italic @{ anyone @} home @} [EMAIL PROTECTED] example + [EMAIL PROTECTED] font size, texts + + +In markup mode you can compose expressions, similar to mathematical +expressions, XML documents, and music expressions. You can stack +expressions grouped vertically with the command @code{\column}. +Similarly, @code{\center-align} aligns texts by their center lines: + [EMAIL PROTECTED],verbatim,fragment,relative=1] +c1^\markup { \column { a bbbb \line { c d } } } +c1^\markup { \center-align { a bbbb c } } +c1^\markup { \line { a b c } } [EMAIL PROTECTED] lilypond + + +Markups can be stored in variables and these variables +may be attached to notes, like [EMAIL PROTECTED] +allegro = \markup @{ \bold \large @{ Allegro @} @} + @{ a^\allegro b c d @} [EMAIL PROTECTED] example + + +Some objects have alignment procedures of their own, which cancel out +any effects of alignments applied to their markup arguments as a +whole. For example, the @internalsref{RehearsalMark} is horizontally +centered, so using @code{\mark \markup @{ \left-align .. @}} has no +effect. + + [EMAIL PROTECTED] + +Init files: @file{scm/@/new@/-markup@/.scm}. + + [EMAIL PROTECTED] + +Kerning or generation of ligatures is only done when the @TeX{} +backend is used. In this case, LilyPond does not account for them so +texts will be spaced slightly too wide. + +Syntax errors for markup mode are confusing. + + [EMAIL PROTECTED] Text encoding [EMAIL PROTECTED] Text encoding + +LilyPond uses the Pango library to format multi-lingual texts, and +does not perform any input-encoding conversions. This means that any +text, be it title, lyric text, or musical instruction containing +non-ASCII characters, must be utf-8. Easiest to enter such texts is +by using a Unicode-aware editor, and save using utf-8 encoding. Most +popular modern editors have utf-8 support, for example, vim, Emacs, +jEdit, and GEdit do. + +Depending on the fonts installed, the following fragment shows Hebrew +and Cyrillic lyrics, + [EMAIL PROTECTED] Cyrillic [EMAIL PROTECTED] Hebrew [EMAIL PROTECTED] ASCII, non + [EMAIL PROTECTED] + + +The @TeX{} backend does not handle encoding specially at all. Strings +in the input are put in the output as-is. Extents of text items in the [EMAIL PROTECTED] backend, are determined by reading a file created via the [EMAIL PROTECTED] backend, + [EMAIL PROTECTED] +lilypond -b texstr input/les-nereides.ly +latex les-nereides.texstr [EMAIL PROTECTED] example + +The last command produces @file{les-nereides.textmetrics}, which is +read when you execute + [EMAIL PROTECTED] +lilypond -b tex input/les-nereides.ly [EMAIL PROTECTED] example + +Both @file{les-nereides.texstr} and @file{les-nereides.tex} need +suitable LaTeX wrappers to load appropriate [EMAIL PROTECTED] packages for +interpreting non-ASCII strings. + [EMAIL PROTECTED] + [EMAIL PROTECTED]/regression,utf-8.ly} + + [EMAIL PROTECTED] Nested scores [EMAIL PROTECTED] Nested scores + +It is possible to nest music inside markups, by adding a @code{\score} +block to a markup expression. Such a score must contain a @code{\layout} +block. + [EMAIL PROTECTED],verbatim,raggedright] +\relative { + c4 d^\markup { + \score { + \relative { c4 d e f } + \layout { } + } + } + e f +} [EMAIL PROTECTED] lilypond + + + [EMAIL PROTECTED] Overview of text markup commands [EMAIL PROTECTED] Overview of text markup commands + +The following commands can all be used inside @code{\markup @{ @}}. + [EMAIL PROTECTED] markup-commands.tely + + [EMAIL PROTECTED] New dynamic marks [EMAIL PROTECTED] New dynamic marks + +It is possible to print new dynamic marks or text that should be aligned +with dynamics. Use @code{make-dynamic-script} to create these marks. + [EMAIL PROTECTED] make-dynamic-script + [EMAIL PROTECTED],verbatim,raggedright] +sfzp = #(make-dynamic-script "sfzp") +\relative c' { + c4 c c\sfzp c +} [EMAIL PROTECTED] lilypond + [EMAIL PROTECTED] Dynamics, editorial [EMAIL PROTECTED] Dynamics, parenthesis + +It is also possible to print dynamics in round parenthesis or square +brackets. These are often used for adding editorial dynamics. + [EMAIL PROTECTED],verbatim,raggedright] +\version "2.4.2" +rndf = \markup{ \center-align {\line { \bold{\italic (} + \dynamic f \bold{\italic )} }} } +boxf = \markup{ \bracket { \dynamic f } } +{ c'1_\rndf c'1_\boxf } [EMAIL PROTECTED] lilypond + + [EMAIL PROTECTED] Other text markup issues [EMAIL PROTECTED] Other text markup issues + +To use a normal font within a title, you must define it manually + [EMAIL PROTECTED] +#(def-markup-command (normal-font layout props arg) (markup?) + "Switch to normal text font" + (interpret-markup layout (cons '((font-series . 'medium) (font-shape . 'upright)) props) arg)) + [EMAIL PROTECTED] + title = [EMAIL PROTECTED] ABCD \normal-font ABCD @} [EMAIL PROTECTED] [EMAIL PROTECTED] example + + [EMAIL PROTECTED] really bad section name. :( [EMAIL PROTECTED] Even more than notes [EMAIL PROTECTED] Even more than notes + [EMAIL PROTECTED] +* Transpose:: +* Ottava brackets:: +* Multi measure rests:: +* Time administration:: [EMAIL PROTECTED] menu + + + @node Transpose @subsection Transpose @cindex Transpose Index: lilypond/Documentation/user/changing-defaults.itely diff -u lilypond/Documentation/user/changing-defaults.itely:1.127 lilypond/Documentation/user/changing-defaults.itely:1.128 --- lilypond/Documentation/user/changing-defaults.itely:1.127 Mon May 2 09:20:22 2005 +++ lilypond/Documentation/user/changing-defaults.itely Tue May 3 08:49:23 2005 @@ -61,7 +61,6 @@ * Interpretation contexts:: * The \override command:: * Fonts:: -* Text markup:: @end menu @@ -1475,230 +1474,4 @@ [EMAIL PROTECTED] Text markup [EMAIL PROTECTED] Text markup [EMAIL PROTECTED] text markup [EMAIL PROTECTED] markup text - - [EMAIL PROTECTED] typeset text - -The internal mechanism to typeset texts is accessed with the keyword [EMAIL PROTECTED] Within markup mode, you can enter texts similar to -lyrics. They are simply entered, while commands use the backslash @code{\}. [EMAIL PROTECTED] markup - [EMAIL PROTECTED],verbatim,fragment,relative=1] -c1^\markup { hello } -c1_\markup { hi there } -c1^\markup { hi \bold there, is \italic anyone home? } [EMAIL PROTECTED] lilypond - [EMAIL PROTECTED] font switching - -The markup in the example demonstrates font switching commands. The -command @code{\bold} and @code{\italic} apply to the first following -word only; enclose a set of texts with braces to apply a command -to more words: [EMAIL PROTECTED] -\markup @{ \bold @{ hi there @} @} [EMAIL PROTECTED] example - [EMAIL PROTECTED] -For clarity, you can also do this for single arguments, e.g., - [EMAIL PROTECTED] -\markup @{ is \italic @{ anyone @} home @} [EMAIL PROTECTED] example - [EMAIL PROTECTED] font size, texts - - -In markup mode you can compose expressions, similar to mathematical -expressions, XML documents, and music expressions. You can stack -expressions grouped vertically with the command @code{\column}. -Similarly, @code{\center-align} aligns texts by their center lines: - [EMAIL PROTECTED],verbatim,fragment,relative=1] -c1^\markup { \column { a bbbb \line { c d } } } -c1^\markup { \center-align { a bbbb c } } -c1^\markup { \line { a b c } } [EMAIL PROTECTED] lilypond - - -Markups can be stored in variables and these variables -may be attached to notes, like [EMAIL PROTECTED] -allegro = \markup @{ \bold \large @{ Allegro @} @} - @{ a^\allegro b c d @} [EMAIL PROTECTED] example - - -Some objects have alignment procedures of their own, which cancel out -any effects of alignments applied to their markup arguments as a -whole. For example, the @internalsref{RehearsalMark} is horizontally -centered, so using @code{\mark \markup @{ \left-align .. @}} has no -effect. - -Similarly, for moving whole texts over notes with [EMAIL PROTECTED], use the following trick: [EMAIL PROTECTED],verbatim] -{ - c'^\markup { \raise #0.5 not-raised } - c'^\markup { "" \raise #0.5 raised } -} [EMAIL PROTECTED] lilypond - -On the second note, the text @code{raised} is moved relative to the -empty string @code{""} which is not visible. Alternatively, complete -objects can be moved with layout properties such as @code{padding} and [EMAIL PROTECTED] - - - - [EMAIL PROTECTED] - -Init files: @file{scm/@/new@/-markup@/.scm}. - - [EMAIL PROTECTED] - -Kerning or generation of ligatures is only done when the @TeX{} -backend is used. In this case, LilyPond does not account for them so -texts will be spaced slightly too wide. - -Syntax errors for markup mode are confusing. - - [EMAIL PROTECTED] -* Text encoding:: -* Nested scores:: -* Overview of text markup commands:: -* New dynamic marks:: -* Other text markup issues:: [EMAIL PROTECTED] menu - [EMAIL PROTECTED] Text encoding [EMAIL PROTECTED] Text encoding - -LilyPond uses the Pango library to format multi-lingual texts, and -does not perform any input-encoding conversions. This means that any -text, be it title, lyric text, or musical instruction containing -non-ASCII characters, must be utf-8. Easiest to enter such texts is -by using a Unicode-aware editor, and save using utf-8 encoding. Most -popular modern editors have utf-8 support, for example, vim, Emacs, -jEdit, and GEdit do. - -Depending on the fonts installed, the following fragment shows Hebrew -and Cyrillic lyrics, - [EMAIL PROTECTED] Cyrillic [EMAIL PROTECTED] Hebrew [EMAIL PROTECTED] ASCII, non - [EMAIL PROTECTED] - - -The @TeX{} backend does not handle encoding specially at all. Strings -in the input are put in the output as-is. Extents of text items in the [EMAIL PROTECTED] backend, are determined by reading a file created via the [EMAIL PROTECTED] backend, - [EMAIL PROTECTED] -lilypond -b texstr input/les-nereides.ly -latex les-nereides.texstr [EMAIL PROTECTED] example - -The last command produces @file{les-nereides.textmetrics}, which is -read when you execute - [EMAIL PROTECTED] -lilypond -b tex input/les-nereides.ly [EMAIL PROTECTED] example - -Both @file{les-nereides.texstr} and @file{les-nereides.tex} need -suitable LaTeX wrappers to load appropriate [EMAIL PROTECTED] packages for -interpreting non-ASCII strings. - [EMAIL PROTECTED] - [EMAIL PROTECTED]/regression,utf-8.ly} - - [EMAIL PROTECTED] Nested scores [EMAIL PROTECTED] Nested scores - -It is possible to nest music inside markups, by adding a @code{\score} -block to a markup expression. Such a score must contain a @code{\layout} -block. - [EMAIL PROTECTED],verbatim,raggedright] -\relative { - c4 d^\markup { - \score { - \relative { c4 d e f } - \layout { } - } - } - e f -} [EMAIL PROTECTED] lilypond - - - [EMAIL PROTECTED] Overview of text markup commands [EMAIL PROTECTED] Overview of text markup commands - -The following commands can all be used inside @code{\markup @{ @}}. - [EMAIL PROTECTED] markup-commands.tely - - [EMAIL PROTECTED] New dynamic marks [EMAIL PROTECTED] New dynamic marks - -It is possible to print new dynamic marks or text that should be aligned -with dynamics. Use @code{make-dynamic-script} to create these marks. - [EMAIL PROTECTED] make-dynamic-script - [EMAIL PROTECTED],verbatim,raggedright] -sfzp = #(make-dynamic-script "sfzp") -\relative c' { - c4 c c\sfzp c -} [EMAIL PROTECTED] lilypond - [EMAIL PROTECTED] Dynamics, editorial [EMAIL PROTECTED] Dynamics, parenthesis - -It is also possible to print dynamics in round parenthesis or square -brackets. These are often used for adding editorial dynamics. - [EMAIL PROTECTED],verbatim,raggedright] -\version "2.4.2" -rndf = \markup{ \center-align {\line { \bold{\italic (} - \dynamic f \bold{\italic )} }} } -boxf = \markup{ \bracket { \dynamic f } } -{ c'1_\rndf c'1_\boxf } [EMAIL PROTECTED] lilypond - - [EMAIL PROTECTED] Other text markup issues [EMAIL PROTECTED] Other text markup issues - -To use a normal font within a title, you must define it manually - [EMAIL PROTECTED] -#(def-markup-command (normal-font layout props arg) (markup?) - "Switch to normal text font" - (interpret-markup layout (cons '((font-series . 'medium) (font-shape . 'upright)) props) arg)) - [EMAIL PROTECTED] - title = [EMAIL PROTECTED] ABCD \normal-font ABCD @} [EMAIL PROTECTED] [EMAIL PROTECTED] example - - Index: lilypond/Documentation/user/instrument-notation.itely diff -u lilypond/Documentation/user/instrument-notation.itely:1.22 lilypond/Documentation/user/instrument-notation.itely:1.23 --- lilypond/Documentation/user/instrument-notation.itely:1.22 Tue May 3 08:02:01 2005 +++ lilypond/Documentation/user/instrument-notation.itely Tue May 3 08:49:23 2005 @@ -1317,7 +1317,7 @@ ambitus. @node Other vocal issues [EMAIL PROTECTED] Other vocal issue [EMAIL PROTECTED] Other vocal issues @ignore yeah, I'm giving up somewhat by stuffing a bunch of things in @@ -1838,6 +1838,11 @@ Examples: @inputfileref{input/@/test,fret@/-diagram@/.ly} [EMAIL PROTECTED] Other guitar issues [EMAIL PROTECTED] Other guitar issues + +FIXME: insert guitar fret number example here. + @node Ancient notation @section Ancient notation _______________________________________________ Lilypond-cvs mailing list Lilypond-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-cvs