From de29a27572cdbdc23122ef5290b79f184fe98f30 Mon Sep 17 00:00:00 2001 From: Graham Percival Date: Mon, 26 Nov 2007 00:50:18 -0800 Subject: [PATCH] Remove @context{} in favor of @code{}. --- Documentation/user/changing-defaults.itely | 56 ++++++++++---------- Documentation/user/fundamental.itely | 60 +++++++++++----------- Documentation/user/macros.itexi | 5 -- Documentation/user/piano.itely | 4 +- Documentation/user/spacing.itely | 2 +- 5 files changed, 61 insertions(+), 66 deletions(-) diff --git a/Documentation/user/changing-defaults.itely b/Documentation/user/changing-defaults.itely index 13030bc702..685ae4d0f8 100644 --- a/Documentation/user/changing-defaults.itely +++ b/Documentation/user/changing-defaults.itely @@ -112,10 +112,10 @@ to a single staff, while a bar line must be synchronized across the entire score. Within LilyPond, these rules and bits of information are grouped in -@emph{Contexts}. Some examples of contexts are @context{Voice}, -@context{Staff}, and @context{Score}. They are hierarchical, for -example: a @context{Staff} can contain many @context{Voice}s, and a -@context{Score} can contain many @context{Staff} contexts. +@emph{Contexts}. Some examples of contexts are @code{Voice}, +@code{Staff}, and @code{Score}. They are hierarchical, for +example: a @code{Staff} can contain many @code{Voice}s, and a +@code{Score} can contain many @code{Staff} contexts. @quotation @image{context-example,5cm,,} @@ -123,15 +123,15 @@ example: a @context{Staff} can contain many @context{Voice}s, and a Each context has the responsibility for enforcing some notation rules, creating some notation objects and maintaining the associated -properties. For example, the @context{Voice} context may introduce an -accidental and then the @context{Staff} context maintains the rule to +properties. For example, the @code{Voice} context may introduce an +accidental and then the @code{Staff} context maintains the rule to show or suppress the accidental for the remainder of the measure. The -synchronization of bar lines is handled at @context{Score} context. +synchronization of bar lines is handled at @code{Score} context. However, in some music we may not want the bar lines to be synchronized -- consider a polymetric score in 4/4 and 3/4 time. In -such cases, we must modify the default settings of the @context{Score} -and @context{Staff} contexts. +such cases, we must modify the default settings of the @code{Score} +and @code{Staff} contexts. For very simple scores, contexts are created implicitly, and you need not be aware of them. For larger pieces, such as anything with more @@ -239,7 +239,7 @@ music = @{ c4 c4 @} arts = @{ s4-. s4-> @} @end example -They are combined by sending both to the same @context{Voice} context, +They are combined by sending both to the same @code{Voice} context, @example << @@ -276,13 +276,13 @@ any context of type @var{type}, regardless of its given name. This variant is used with music expressions that can be interpreted at several levels. For example, the @code{\applyOutput} command (see @ref{Running a function on all layout objects}). Without an explicit -@code{\context}, it is usually applied to @context{Voice} +@code{\context}, it is usually applied to @code{Voice} @example \applyOutput #'@var{context} #@var{function} % apply to Voice @end example -To have it interpreted at the @context{Score} or @context{Staff} level use +To have it interpreted at the @code{Score} or @code{Staff} level use these forms @example @@ -320,8 +320,8 @@ multi-rests are condensed. The value assigned is a Scheme object. In this case, it is @code{#t}, the boolean True value. If the @var{context} argument is left out, then the current bottom-most -context (typically @context{ChordNames}, @context{Voice}, or -@context{Lyrics}) is used. In this example, +context (typically @code{ChordNames}, @code{Voice}, or +@code{Lyrics}) is used. In this example, @lilypond[quote,verbatim,relative=2,fragment] c8 c c c @@ -344,8 +344,8 @@ R1*2 @end lilypond Contexts are hierarchical, so if a bigger context was specified, for -example @context{Staff}, then the change would also apply to all -@context{Voice}s in the current stave. The change is applied +example @code{Staff}, then the change would also apply to all +@code{Voice}s in the current stave. The change is applied @q{on-the-fly}, during the music, so that the setting only affects the second group of eighth notes. @@ -551,7 +551,7 @@ The command @noindent makes stems thicker (the default is 1.3, with staff line thickness as a -unit). Since the command specifies @context{Staff} as context, it only +unit). Since the command specifies @code{Staff} as context, it only applies to the current staff. Other staves will keep their normal appearance. Here we see the command in action: @@ -564,11 +564,11 @@ c4 @end lilypond The @code{\override} command changes the definition of the @code{Stem} -within the current @context{Staff}. After the command is interpreted +within the current @code{Staff}. After the command is interpreted all stems are thickened. Analogous to @code{\set}, the @var{context} argument may be left out, -causing the default context @context{Voice} to be used. Adding +causing the default context @code{Voice} to be used. Adding @code{\once} applies the change during one timestep only. @lilypond[quote,fragment,verbatim,relative=2] @@ -707,12 +707,12 @@ after calling @code{\RemoveEmptyStaffContext}, ie @node Defining new contexts @subsection Defining new contexts -Specific contexts, like @context{Staff} and @code{Voice}, are made of +Specific contexts, like @code{Staff} and @code{Voice}, are made of simple building blocks. It is possible to create new types of contexts with different combinations of engraver plug-ins. The next example shows how to build a different type of -@context{Voice} context from scratch. It will be similar to +@code{Voice} context from scratch. It will be similar to @code{Voice}, but only prints centered slash noteheads. It can be used to indicate improvisation in jazz pieces, @@ -760,9 +760,9 @@ First it is necessary to define a name for the new context: \name ImproVoice @end example -Since it is similar to the @context{Voice}, we want commands that work -on (existing) @context{Voice}s to remain working. This is achieved by -giving the new context an alias @context{Voice}, +Since it is similar to the @code{Voice}, we want commands that work +on (existing) @code{Voice}s to remain working. This is achieved by +giving the new context an alias @code{Voice}, @example \alias Voice @@ -820,8 +820,8 @@ Put together, we get @end example @funindex \accepts -Contexts form hierarchies. We want to hang the @context{ImproVoice} -under @context{Staff}, just like normal @code{Voice}s. Therefore, we +Contexts form hierarchies. We want to hang the @code{ImproVoice} +under @code{Staff}, just like normal @code{Voice}s. Therefore, we modify the @code{Staff} definition with the @code{\accepts} command, @@ -945,7 +945,7 @@ Commands which change output generally look like To construct this tweak we must determine these bits of information: @itemize -@item the context: here @context{Voice}. +@item the context: here @code{Voice}. @item the layout object: here @code{Stem}. @item the layout property: here @code{thickness}. @item a sensible value: here @code{3.0}. @@ -1248,7 +1248,7 @@ f @end lilypond -In this case, the context for this tweak is @context{Voice}. This +In this case, the context for this tweak is @code{Voice}. This fact can also be deduced from the program reference, for the page for the @internalsref{Fingering_engraver} plug-in says diff --git a/Documentation/user/fundamental.itely b/Documentation/user/fundamental.itely index 4c0e01dad1..2259e34c6f 100644 --- a/Documentation/user/fundamental.itely +++ b/Documentation/user/fundamental.itely @@ -983,13 +983,13 @@ the entire score. Within LilyPond, these rules and bits of information are grouped in @emph{Contexts}. We have already met the -@context{Voice} context. -Others are the @context{Staff} and @context{Score} contexts. +@code{Voice} context. +Others are the @code{Staff} and @code{Score} contexts. Contexts are hierarchical to reflect the heirarchical nature of a musical score. -For example: a @context{Staff} context can contain many -@context{Voice} contexts, and a @context{Score} context can -contain many @context{Staff} contexts. +For example: a @code{Staff} context can contain many +@code{Voice} contexts, and a @code{Score} context can +contain many @code{Staff} contexts. @quotation @image{context-example,5cm,,} @@ -997,16 +997,16 @@ contain many @context{Staff} contexts. Each context has the responsibility for enforcing some notation rules, creating some notation objects and maintaining the associated -properties. For example, the @context{Voice} context may introduce an -accidental and then the @context{Staff} context maintains the rule to +properties. For example, the @code{Voice} context may introduce an +accidental and then the @code{Staff} context maintains the rule to show or suppress the accidental for the remainder of the measure. As another example, the synchronization of bar lines is, by default, -handled in the @context{Score} context. +handled in the @code{Score} context. However, in some music we may not want the bar lines to be synchronized -- consider a polymetric score in 4/4 and 3/4 time. In such cases, we must modify the default settings of the -@context{Score} and @context{Staff} contexts. +@code{Score} and @code{Staff} contexts. For very simple scores, contexts are created implicitly, and you need not be aware of them. For larger pieces, such as anything with more @@ -1016,10 +1016,10 @@ need, and that they are in the correct order. For typesetting pieces with specialized notation, it is usual to modify existing, or even to define totally new, contexts. -In addition to the @context{Score,} @context{Staff} and -@context{Voice} contexts there are contexts which fit between +In addition to the @code{Score,} @code{Staff} and +@code{Voice} contexts there are contexts which fit between the score and staff levels to control staff groups, such as the -@context{PianoStaff} and @context{ChoirStaff} contexts. There +@code{PianoStaff} and @code{ChoirStaff} contexts. There are also alternative staff and voice contexts, and contexts for lyrics, percussion, fret boards, figured bass, etc. A complete list is shown in the Notation Reference. @@ -1028,18 +1028,18 @@ TODO: Add link The names of all context types are formed from one or more words, each word being capitalised and joined immediately to the preceding word with no hyphen or underscore, e.g., -@context{GregorianTranscriptionStaff}. +@code{GregorianTranscriptionStaff}. @node Creating contexts @subsection Creating contexts There can be only one top level context: the -@context{Score} +@code{Score} context. This is created with the @code{\score} command, or, in simple scores, it is created automatically. For scores with only one voice and one staff, the -@context{Voice} and @context{Staff} contexts may be left to be +@code{Voice} and @code{Staff} contexts may be left to be created automatically, but for more complex scores it is necessary to create them by hand. The simplest command that does this is @code{\new}. @@ -1059,10 +1059,10 @@ where @var{type} is a context name (like @code{Staff} or interpreting the @var{music expression} within that context. Note that there is no @code{\new Score % Invalid!} command; -the single top-level @context{Score} context is introduced +the single top-level @code{Score} context is introduced with @code{\score}. This is because there can be only one -@context{Score} context, whereas there may be multiple -@context{Staff} and @context{Voice} contexts - each created +@code{Score} context, whereas there may be multiple +@code{Staff} and @code{Voice} contexts - each created by @code{\new}. The @code{\new} command may also give a identifying name to the @@ -1073,7 +1073,7 @@ context to distinguish it from other contexts of the same type, @end example Note the distinction between the name of the context type, -@context{Staff}, @context{Voice}, etc, and +@code{Staff}, @code{Voice}, etc, and the identifying name of a particular instance of that type, which can be any sequence of letters invented by the user. The identifying name is used to refer back to that particular @@ -1097,14 +1097,14 @@ about any. Engravers live and operate in Contexts. Engravers such as the @code{Metronome_mark_engraver}, whose action and output applies to the score as a whole, operate in -the highest level context - the @context{Score} context. +the highest level context - the @code{Score} context. The @code{Clef_engraver} and @code{Key_engraver} are to be found in every Staff Context, as different staves may require different clefs and keys. The @code{Note_heads_engraver} and @code{Stem_engraver} live -in each @context{Voice} context, the lowest level context of all. +in each @code{Voice} context, the lowest level context of all. Each engraver processes the particular objects associated with its function, and maintains the properties that relate @@ -1172,9 +1172,9 @@ appearance of the output. They are changed by the \set @emph{ContextName}.@emph{propertyName} = @emph{value} @end example -Where the @emph{ContextName} is usually @context{Score}, -@context{Staff} or @context{Voice}. It may be omitted, -in which case @context{Voice} is assumed. +Where the @emph{ContextName} is usually @code{Score}, +@code{Staff} or @code{Voice}. It may be omitted, +in which case @code{Voice} is assumed. The names of context properties consist of words joined together with no hyphens or underscores, all except the @@ -1235,7 +1235,7 @@ because we omitted the context name. Remember the default context name is Voice, so the second @code{\set} command set the property @code{instrumentName} in the Voice context to @qq{Alto}, but as LilyPond does not look -for any such property in the @context{Voice} context, no +for any such property in the @code{Voice} context, no further action took place. this is not an error, and no error message is logged in the log file. @@ -1247,13 +1247,13 @@ name you like in any context that exists by using the known to LilyPond it will not cause any action to be taken. The @code{instrumentName} property will take effect only -if it is set in the @context{Staff} context, but +if it is set in the @code{Staff} context, but some properties can be set in more than one context. For example, the property @code{extraNatural} is by default set to ##t (true) for all staves. -If it is set to ##f (false) in the @context{Staff} context +If it is set to ##f (false) in the @code{Staff} context it applies just to the accidentals on that staff. -If it is set to false in the @context{Score} context +If it is set to false in the @code{Score} context it applies to all staves. So this turns off extra naturals in one staff: @@ -1391,7 +1391,7 @@ have an @rglos{ambitus} placed at the beginning of a staff to indicate the range of notes in that staff. The ambitus is produced by the @code{Ambitus_engraver}, which is not normally included in any context. If -we add it to the @context{Voice} context it calculates +we add it to the @code{Voice} context it calculates the range from that voice only: @lilypond[quote,verbatim,ragged-right] @@ -1413,7 +1413,7 @@ the range from that voice only: @noindent but if we add the Ambitus engraver to the -@context{Staff} context it calculates the range from all +@code{Staff} context it calculates the range from all the notes in all the voices on that staff: @lilypond[quote,verbatim,ragged-right] diff --git a/Documentation/user/macros.itexi b/Documentation/user/macros.itexi index 24803a197f..72460ae46e 100644 --- a/Documentation/user/macros.itexi +++ b/Documentation/user/macros.itexi @@ -71,11 +71,6 @@ @end macro -@macro context{TEXT} -@vindex \TEXT\ -@code{\TEXT\}@c should use internalsref -@end macro - @macro funindex {TEXT} @findex \TEXT\ @kindex \TEXT\ diff --git a/Documentation/user/piano.itely b/Documentation/user/piano.itely index 9164a8e9e4..104bcf81d0 100644 --- a/Documentation/user/piano.itely +++ b/Documentation/user/piano.itely @@ -115,7 +115,7 @@ Voices can be switched between staves manually, using the command The string @var{staffname} is the name of the staff. It switches the current voice from its current staff to the Staff called @var{staffname}. Typically @var{staffname} is @code{"up"} or -@code{"down"}. The @context{Staff} referred to must already exist, so +@code{"down"}. The @code{Staff} referred to must already exist, so usually the setup for a score will start with a setup of the staves, @example @@ -130,7 +130,7 @@ usually the setup for a score will start with a setup of the staves, @end example -and the @context{Voice} is inserted afterwards +and the @code{Voice} is inserted afterwards @example \context Staff = down diff --git a/Documentation/user/spacing.itely b/Documentation/user/spacing.itely index 9337321839..9dd6fc1d8c 100644 --- a/Documentation/user/spacing.itely +++ b/Documentation/user/spacing.itely @@ -1783,7 +1783,7 @@ space. We could place a measured timeline or graphic above or below this example. The @code{proportionalNotationDuration} setting is a context setting that -lives in @context{Score}. Recall that context settings appear in one of +lives in @code{Score}. Recall that context settings appear in one of three locations in our input file -- in a @code{\with} block, in a @code{\context} block, or directly in music entry preceeded by the @code{\set} command. As with all -- 2.39.5