]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/paper-column.cc (before_line_breaking): bug fix.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 14 Jul 2002 15:11:37 +0000 (15:11 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 14 Jul 2002 15:11:37 +0000 (15:11 +0000)
* lily/volta-engraver.cc (process_music): do something sensible if
no staffs found.

* scripts/lilypond-book.py (make_pixmap): opps. Do png conversion
only once.

* Documentation/user/refman.itely (Global layout): made section on
global layout, added spacing documentation.

* lily/staff-symbol.cc (brew_molecule): change ragged right for
staff symbols. See comments.

ChangeLog
Documentation/user/internals.itely
Documentation/user/refman.itely
lily/staff-symbol.cc
scm/grob-description.scm
scm/grob-property-description.scm
scripts/lilypond-book.py

index ca6d9c69a6f8d667b8b0f28805f083504168d6f2..190c3f94eb5f218882cc3df6b558146f9e6ee822 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2002-07-14  Han-Wen  <hanwen@cs.uu.nl>
+
+       * lily/paper-column.cc (before_line_breaking): bug fix.
+
+       * lily/volta-engraver.cc (process_music): do something sensible if
+       no staffs found. 
+
+       * scripts/lilypond-book.py (make_pixmap): opps. Do png conversion
+       only once. 
+
+       * Documentation/user/refman.itely (Global layout): made section on
+       global layout, added spacing documentation.
+
+       * lily/staff-symbol.cc (brew_molecule): change ragged right for
+       staff symbols. See comments.
+
 2002-07-14  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * lily/voice-devnull-engraver.cc (acknowledge_grob): Use proper
index 63c5f06b13a07e1fe8673bd1fab63bdf9bfb41f4..4bb59b08dfa4c726010b86a3ce287d0bca79aa24 100644 (file)
@@ -129,6 +129,181 @@ section.
 * Lexical details::             
 @end menu
 
+@c . {Output formats}
+@node Output formats
+@section Output formats
+
+LilyPond can output processed music in different output formats.  
+
+@menu
+* @TeX{} output::               
+* PostScript output::           
+* Scheme output::               
+* ASCIIScript output::          
+* Sketch output::               
+@end menu
+
+@node @TeX{} output
+@subsection @TeX{} output
+@cindex @TeX{} output
+
+LilyPond will use @TeX{} by default.  Even if you want to produce
+PostScript output for viewing or printing, you should normally have
+LilyPond produce @TeX{} first.  The .tex output must be processed by
+@TeX{} (@strong{not} La@TeX{}) to generate a .dvi.  Then, @file{Dvips}
+is used to generate PostScript.  Alternatively, @file{ly2dvi} can be
+used to generate the .dvi for you.
+
+@refbugs
+
+Titling is not generated unless you use @file{ly2dvi}. 
+
+
+@node PostScript output
+@subsection PostScript output
+@cindex PostScript output
+@cindex direct PostScript output
+
+LilyPond can produce PostScript directly, without going through @TeX{}.
+Currently, this is mainly useful if you cannot use TeX, because direct
+PostScript output has some problems; see Bugs below.
+
+@example
+$ lilypond -fps foo.ly
+GNU LilyPond 1.3.144
+Now processing: `foo.ly'
+Parsing...
+Interpreting music...[3]
+Preprocessing elements... 
+Calculating column positions... 
+paper output to foo.ps...
+
+$ cat /usr/share/lilypond/pfa/feta20.pfa foo.ps | lpr
+@end example
+
+
+@refbugs
+
+Text font selection is broken.
+
+The .ps file does not contain the .pfa font files.  To print a .ps
+created through direct postscript output, you should prepend the
+necessary .pfa files to LilyPond's .ps output, or upload them to the
+printer before printing.
+
+The line height calculation is broken, you must set @var{lineheight} in
+the paperblock if you have more than one staff in your score, e.g.
+
+@example
+  ...
+  \paper @{
+    % Set line height to 40 staff spaces
+    lineheight = 40    
+  @}
+@end example
+
+@node Scheme output
+@subsection Scheme output
+@cindex Scheme output
+
+In the typesetting stage, LilyPond builds a page description, which is
+then written to disk in postscript, @TeX{} or ASCII art. Before it is
+written, the page description is represented as Scheme expressions.  You
+can also dump these  Scheme expressions to a file, which may be
+convenient for debugging output routines.  This is done with the Scheme
+output format
+
+@example
+$ lilypond -fscm foo.ly
+GNU LilyPond 1.3.144
+Now processing: `foo.ly'
+Parsing...
+Interpreting music...[3]
+Preprocessing elements... 
+Calculating column positions... 
+paper output to foo.scm...
+
+$ head -4 foo.scm 
+;;; Usage: guile -s x.scm > x.tex
+ (primitive-load-path 'standalone.scm)
+; (scm-tex-output)
+ (scm-ps-output)
+
+$ guile -s foo.scm > foo.tex
+@end example
+
+
+@node ASCIIScript output
+@subsection ASCIIScript output
+@cindex ASCIIScript output
+@cindex ascii script
+@cindex ascii art
+
+LilyPond can output ASCII Art.  This is a two step process, LilyPond
+produces an ASCII description file, dubbed ASCIIScript (extension
+@file{.as}).  ASCIIScript has a small and simple command set that
+includes font selection, character and string printing and line drawing
+commands.  The program @file{as2text} is used to translate an .as file
+to text.
+
+To produce ASCII Art, you must include an ASCII Art paper definition
+file in your .ly, one of:
+@example
+\include "paper-as5.ly"
+\include "paper-as9.ly"
+@end example
+
+Here's an example use for ASCII Art output (the example file
+@file{as-email.ly} is included in the LilyPond distribution), the staff
+symbol has been made invisible:
+
+@example
+$ lilypond -fas as-email.ly
+GNU LilyPond 1.3.144
+Now processing: `as-email.ly'
+Parsing...
+Interpreting music...[3]
+Preprocessing elements... 
+Calculating column positions... [2]
+paper output to as-email.as...
+
+$ as2text as-email.as 2>/dev/null
+          |\
+          |/     |##|##|      |  |  |  |  |
+         /|      |  |  | |    |\ |\ |\ |\ |\ |
+        / |_  3  |  |  | | 5  | )| )| )| )| )|
+       | /| \ 8 *  *  *  | 8 *  *  *  *  *   |
+        \_|_/            |                   |
+        *_|
+
+                                               lily
+@end example
+
+
+@refbugs
+
+The ASCII Art fonts are far from complete and not very well designed.
+It's easy to change the glyphs, though; if you think you can do better,
+have a look at @file{mf/*.af}.
+
+Lots of resizable symbols such as slurs, ties and tuplets are missing.
+
+The poor looks of most ASCII Art output and its limited general
+usefulness gives ASCII Art output a low priority; it may be
+dropped in future versions.
+
+
+@node Sketch output
+@subsection Sketch output
+
+@uref{http://sketch.sourceforge.net,Sketch} is a Free vector drawing
+program. LilyPond includes bare bones output for Sketch version 0.7.
+
+@cindex Sketch
+@cindex vector drawing
+@cindex drawing program
+
+
 @node Interpretation context
 @section Interpretation context
 
index b8bdf8e26ffe334c72e5d22a0394181d8256058a..cc66ed528d6f4335da143e74eeb711b312e97151 100644 (file)
@@ -45,7 +45,7 @@ encouraged to study the tutorial first.
 * Writing parts::               
 * Ancient notation ::           
 * Tuning output::               
-* Page layout::                 
+* Global layout::               
 * Output formats::              
 * Sound::                       
 @end menu
@@ -3596,7 +3596,6 @@ object, and set a grob property in that object.
 * Tuning per grob ::            
 * Font selection::              
 * Text markup::                 
-* Spacing::                     
 @end menu
 
 @node Tuning groups of grobs 
@@ -4005,15 +4004,117 @@ marking:
 The syntax and semantics of markup texts are not clean, and both
 syntax and semantics are slated for a rewrite.
 
+@node Global layout
+@section Global layout
+
+The global layout determined by three factors: the page layout, the
+line breaks and the spacing. These all influence each other: The
+choice of spacing determines how densely each system of music is set,
+whree line breaks breaks are chosen, and thus ultimately how many
+pages a piece of music takes. In this section we will explain how the
+lilypond spacing engine works, and how you can tune its results.
+
+Globally spoken, this procedure happens in three steps: first,
+flexible distances (``springs'') are chosen, based on durations. All
+possible line breaking combination are tried, and the one with the
+best results---a layout that has uniform density and requires as
+little stretching or cramping as possible---is chosen. When the score
+is processed by @TeX{}, page are filled with systems, and page breaks
+are chosen whenever the page gets full.
+
+@menu
+* Spacing::                     
+* Font Size::                   
+* Line breaking::               
+* Page layout::                 
+@end menu
+
 @node Spacing
 @subsection Spacing
 
-S
+The spacing engine translates differences in durations into
+stretchable distances (``springs'') of differing lengths. Longer
+durations get more space, shorter durations get less.  The basis for
+assigning spaces to durations, is that the shortest durations get a
+fixed amount of space, and the longer durations get more: doubling a
+duration adds a fixed amount of space to the note.
+
+For example, the following piece contains lots of half, quarter and
+8th notes, the eighth note is followed by 1 note head width. The The
+quarter note is followed by 2 NHW, the half by 3 NHW, etc.
+@lilypond[fragment, verbatim, relative=1]
+ c2 c4. c8 c4. c8 c4. c8 c8 c8 c4 c4 c4
+@end lilypond
+
+These two amounts of space are @code{shortest-duration-space}
+@code{spacing-increment}, grob properties of
+@internalsref{SpacingSpanner}. Normally @code{spacing-increment} is
+set to 1.2, which is the width of a note head, and
+@code{shortest-duration-space} is set to 2.0, meaning that the
+shortest note gets 2 noteheads of space. For normal notes, this space
+is always counted from the left edge of the symbol, so the short notes
+in a score is generally followed by one note head width of space.
+
+If one would follow the above procedure exactly, then adding a single
+32th note to a score that uses 8th and 16th notes, would widen up the
+entire score a lot. The shortest note is no longer a 16th, but a 64th,
+thus adding 2 noteheads of space to every note. To prevent this, the
+shortest duration for spacing is not the shortest note in the score,
+but the most commonly found shortest note.  Notes that are even
+shorter this are followed by a space that is proportonial to their
+duration relative to the common shortest note.  So if we were to add
+only a few 16th notes to the example above, they would be followed by
+half a NHW:
+
+@lilypond[fragment, verbatim, relative=1]
+ c2 c4. c8 c4. [c16 c] c4. c8 c8 c8 c4 c4 c4
+@end lilypond
+
+The most common shortest duration is determined as follows: in every
+measure, the shortest duration is determined. The most common short
+duration, is taken as the basis for the spacing, with the stipulation
+that this shortest duration should always be equal to or shorter than
+1/8th note. The shortest duration is printed when you run lilypond
+with @code{--verbose}.  These durations may also be customized. If you
+set the @code{common-shortest-duration} in
+@internalsref{SpacingSpanner}, then this sets the base duration for
+spacing. The maximum duration for this base (normally 1/8th), is set
+through @code{base-shortest-duration}.
+
+@cindex @code{common-shortest-duration}
+@cindex @code{base-shortest-duration}
+@cindex @code{stem-spacing-correction}
+@cindex @code{spacing}
+
+In the introduction it was explained that stem directions influence
+spacing. This is controlled with @code{stem-spacing-correction} in
+@internalsref{NoteSpacing}. The @code{StaffSpacing} grob contains the
+same property for controlling the stem/barline spacing. In the
+following example shows these corrections, once with default settings,
+and once with exaggerated corrections.  
+
+@lilypond
+    \score { \notes {
+      c'4 e''4 e'4 b'4 |
+      b'4 e''4 b'4 e''4|
+      \property Staff.NoteSpacing \override #'stem-spacing-correction
+      = #1.5
+      \property Staff.StaffSpacing \override #'stem-spacing-correction
+      = #1.5
+      c'4 e''4 e'4 b'4 |
+      b'4 e''4 b'4 e''4|      
+    }
+    \paper { linewidth = -1. } }
+@end lilypond
+
 
-TODO: Move this section.
 
 @refbugs
 
+Spacing is determined on a score wide basis. If you have a score that
+changes its character (measured in durations) half way during the
+score, the part containing the longer durations will be spaced too
+widely.
 
 Generating optically pleasing spacing is black magic. LilyPond tries
 to deal with a number of frequent cases. Here is an example that is
@@ -4031,111 +4132,6 @@ kneed stems.
 }
 @end lilypond
 
-The spacing algorithm is global: it searches the entire score for the
-shortest notes. Pieces that have major changes in duration density
-(eg. due to meter changes) will be printed in a uniform density, which
-is undesirable
-
-@c . {Page layout}
-@node Page layout
-@section Page layout
-@cindex Page layout
-
-The page layout is the combined product of LilyPond formatting notation,
-and (La)@TeX{} putting the notation on a page, including page breaks.
-The part of LilyPond is documented here.
-
-@menu
-* Paper block::                 
-* Paper variables::             
-* Font Size::                   
-* Paper size::                  
-* Line break::                  
-* Page break::                  
-@end menu
-
-@c .  {Paper block}
-@node Paper block
-@subsection Paper block
-@cindex Paper block
-
-The most important output definition is the @code{\paper} block, for
-music notation.  The syntax is
-
-@example
-  @code{\paper @{} [@var{paperidentifier}] @var{items} @code{@}}
-@end example
-
-where each of the items is one of
-
-@itemize @bullet
-  @item  An assignment.
-
-  @item  A context definition.  See @ref{Interpretation context} for
-       more information on context definitions.
-@end itemize
-
-@c .  {Paper variables}
-@node Paper variables
-@subsection Paper variables 
-@cindex Paper variables
-
-The paper block has some variables you may want to use or change:
-
-@table @code
-@cindex @code{indent}
-  @item @code{indent}  
-    The indentation of the first line of music.
-@cindex @code{staffspace}
-
-  @item @code{staffspace}
-    The distance between two staff lines, calculated from the center
-    of the lines.
-
-@cindex @code{linewidth}
-  @item @code{linewidth}  
-    Sets the width of the lines.
-
-If set to a negative value, a single unjustified line is produced.
-@c rename to singleLinePaper ?
-The shorthand @code{\singleLine} defines a default paper block that
-produces a single line.
-
-@cindex @code{textheight}
-
-  @item @code{textheight}  
-    Sets the total height of the music on each page. Only used by
-@code{ly2dvi}.
-
-@cindex @code{interscoreline}
-
-  @item @code{interscoreline}  
-    Sets the spacing between systems. The default is 16pt.
-    
-@cindex @code{interscorelinefill}
-
-  @item @code{interscorelinefill}  
-    If set to a positive number, the distance between the score 
-    lines will stretch in order to fill the full page. In that
-    case @code{interscoreline} specifies the minimum spacing.
-
-        Not set by default.
-
-
-@cindex @code{stafflinethickness}
-
-  @item @code{stafflinethickness}  
-    Determines the thickness of staff lines, and also acts as a scaling
-    parameter for other line thicknesses.
-@end table
-
-You may enter these dimension using units (@code{cm}, @code{in},
-@code{mm}, @code{pt})
-@example
-        linewidth = 20.0 * \staffspace
-        indent  = 0.5 \cm
-@end example
-
 
 @c .  {Font size}
 @node Font Size
@@ -4164,34 +4160,9 @@ The font definitions are generated using a Scheme function. For more
 details, see the file @file{scm/font.scm}.
 
 
-
-@c .  {Paper size}
-@node Paper size
-@subsection Paper size
-@cindex Paper size
-
-@cindex paper size
-@cindex page size
-@cindex @code{papersize}
-
-To change the paper size, you must first set the
-@code{papersize} paper variable variable.  Set it to
-the strings @code{a4}, @code{letter}, or @code{legal}.  After this
-specification, you must set the font as described above.  If you want
-the default font, then use the 20 point font.
-
-@example
-        \paper@{ papersize = "a4" @}
-        \include "paper16.ly"
-@end example
-
-The file @code{paper16.ly}  will now include a file named @file{a4.ly}, which
-will set the paper variables @code{hsize} and @code{vsize} (used by
-Lilypond and @code{ly2dvi})
-
 @c .  {Line break}
-@node Line break
-@subsection Line break
+@node Line breaking
+@subsection Line breaking
 
 @cindex line breaks
 @cindex breaking lines
@@ -4217,13 +4188,39 @@ If you want linebreaks at regular intervals, you can use the following:
 This makes the following 28 measures (assuming 4/4 time) be broken every
 4 measures.
 
-@c .  {Page break}
-@node Page break
-@subsection Page break
+@node Page layout
+@subsection Page layout
 
 @cindex page breaks
 @cindex breaking pages
 
+@cindex @code{indent}
+@cindex @code{linewidth}
+
+The most basic settings influencing the spacing are @code{linewidth}
+and @code{indent}, both set in the @code{\paper} block.  They control
+the indentation of the first line of music, and the lengths of the
+lines.  If @code{linewidth} set to a negative value, a single
+unjustified line is produced.  The shorthand @code{\singleLine}
+defines a default paper block that produces a single line.  A similar
+effect for scores that are longer than one line, can be produced by
+setting @code{raggedright} to true in the @code{\paper} block.
+
+@cindex page layout
+
+The page layout process happens outside lilypond. Ly2dvi sets page
+layout instructions. Ly2dvi responds to the following variables in the
+@code{\paper} block.  The variable @code{textheight} sets the total
+height of the music on each page.  The spacing between systems is
+controlled with @code{interscoreline}, its default is 16pt.
+The distance between the score lines will stretch in order to fill the
+full page @code{interscorelinefill} is set to a positive number.  In
+that case @code{interscoreline} specifies the minimum spacing.
+
+@cindex @code{textheight}
+@cindex @code{interscoreline}
+@cindex @code{interscorelinefill}
+
 Page breaks are normally computed by @TeX{}, so they are not under
 direct control of LilyPond.  However, you can insert a commands into
 the @file{.tex} output to instruct @TeX{} where to break pages. You
@@ -4231,188 +4228,27 @@ can insert a @code{\newpage} from within lilypond. This is done by
 setting the @code{between-systems-strings} on the
 @internalsref{NonMusicalPaperColumn} where the system is broken.
 
+@cindex paper size
+@cindex page size
+@cindex @code{papersize}
 
-
-@refbugs
-
-There is no mechanism to select magnification of particular fonts,
-meaning that you don't have access to continuously scaled fonts.
-
-
-
-@c . {Output formats}
-@node Output formats
-@section Output formats
-
-LilyPond can output processed music in different output formats.  
-
-@menu
-* @TeX{} output::               
-* PostScript output::           
-* Scheme output::               
-* ASCIIScript output::          
-* Sketch output::               
-@end menu
-
-@node @TeX{} output
-@subsection @TeX{} output
-@cindex @TeX{} output
-
-LilyPond will use @TeX{} by default.  Even if you want to produce
-PostScript output for viewing or printing, you should normally have
-LilyPond produce @TeX{} first.  The .tex output must be processed by
-@TeX{} (@strong{not} La@TeX{}) to generate a .dvi.  Then, @file{Dvips}
-is used to generate PostScript.  Alternatively, @file{ly2dvi} can be
-used to generate the .dvi for you.
-
-@refbugs
-
-Titling is not generated unless you use @file{ly2dvi}. 
-
-
-@node PostScript output
-@subsection PostScript output
-@cindex PostScript output
-@cindex direct PostScript output
-
-LilyPond can produce PostScript directly, without going through @TeX{}.
-Currently, this is mainly useful if you cannot use TeX, because direct
-PostScript output has some problems; see Bugs below.
-
-@example
-$ lilypond -fps foo.ly
-GNU LilyPond 1.3.144
-Now processing: `foo.ly'
-Parsing...
-Interpreting music...[3]
-Preprocessing elements... 
-Calculating column positions... 
-paper output to foo.ps...
-
-$ cat /usr/share/lilypond/pfa/feta20.pfa foo.ps | lpr
-@end example
-
-
-@refbugs
-
-Text font selection is broken.
-
-The .ps file does not contain the .pfa font files.  To print a .ps
-created through direct postscript output, you should prepend the
-necessary .pfa files to LilyPond's .ps output, or upload them to the
-printer before printing.
-
-The line height calculation is broken, you must set @var{lineheight} in
-the paperblock if you have more than one staff in your score, e.g.
-
-@example
-  ...
-  \paper @{
-    % Set line height to 40 staff spaces
-    lineheight = 40    
-  @}
-@end example
-
-@node Scheme output
-@subsection Scheme output
-@cindex Scheme output
-
-In the typesetting stage, LilyPond builds a page description, which is
-then written to disk in postscript, @TeX{} or ASCII art. Before it is
-written, the page description is represented as Scheme expressions.  You
-can also dump these  Scheme expressions to a file, which may be
-convenient for debugging output routines.  This is done with the Scheme
-output format
-
-@example
-$ lilypond -fscm foo.ly
-GNU LilyPond 1.3.144
-Now processing: `foo.ly'
-Parsing...
-Interpreting music...[3]
-Preprocessing elements... 
-Calculating column positions... 
-paper output to foo.scm...
-
-$ head -4 foo.scm 
-;;; Usage: guile -s x.scm > x.tex
- (primitive-load-path 'standalone.scm)
-; (scm-tex-output)
- (scm-ps-output)
-
-$ guile -s foo.scm > foo.tex
-@end example
-
-
-@node ASCIIScript output
-@subsection ASCIIScript output
-@cindex ASCIIScript output
-@cindex ascii script
-@cindex ascii art
-
-LilyPond can output ASCII Art.  This is a two step process, LilyPond
-produces an ASCII description file, dubbed ASCIIScript (extension
-@file{.as}).  ASCIIScript has a small and simple command set that
-includes font selection, character and string printing and line drawing
-commands.  The program @file{as2text} is used to translate an .as file
-to text.
-
-To produce ASCII Art, you must include an ASCII Art paper definition
-file in your .ly, one of:
-@example
-\include "paper-as5.ly"
-\include "paper-as9.ly"
-@end example
-
-Here's an example use for ASCII Art output (the example file
-@file{as-email.ly} is included in the LilyPond distribution), the staff
-symbol has been made invisible:
+To change the paper size, you must first set the
+@code{papersize} paper variable variable.  Set it to
+the strings @code{a4}, @code{letter}, or @code{legal}.  After this
+specification, you must set the font as described above.  If you want
+the default font, then use the 20 point font.
 
 @example
-$ lilypond -fas as-email.ly
-GNU LilyPond 1.3.144
-Now processing: `as-email.ly'
-Parsing...
-Interpreting music...[3]
-Preprocessing elements... 
-Calculating column positions... [2]
-paper output to as-email.as...
-
-$ as2text as-email.as 2>/dev/null
-          |\
-          |/     |##|##|      |  |  |  |  |
-         /|      |  |  | |    |\ |\ |\ |\ |\ |
-        / |_  3  |  |  | | 5  | )| )| )| )| )|
-       | /| \ 8 *  *  *  | 8 *  *  *  *  *   |
-        \_|_/            |                   |
-        *_|
-
-                                               lily
+        \paper@{ papersize = "a4" @}
+        \include "paper16.ly"
 @end example
 
+The file @code{paper16.ly}  will now include a file named @file{a4.ly}, which
+will set the paper variables @code{hsize} and @code{vsize} (used by
+Lilypond and @code{ly2dvi})
 
-@refbugs
-
-The ASCII Art fonts are far from complete and not very well designed.
-It's easy to change the glyphs, though; if you think you can do better,
-have a look at @file{mf/*.af}.
-
-Lots of resizable symbols such as slurs, ties and tuplets are missing.
-
-The poor looks of most ASCII Art output and its limited general
-usefulness gives ASCII Art output a low priority; it may be
-dropped in future versions.
-
-
-@node Sketch output
-@subsection Sketch output
 
-@uref{http://sketch.sourceforge.net,Sketch} is a Free vector drawing
-program. LilyPond includes bare bones output for Sketch version 0.7.
 
-@cindex Sketch
-@cindex vector drawing
-@cindex drawing program
 
 @c . {Sound}
 @node Sound
index 841f060ef10ffcf91bc6f782c5df7d7c46b6647e..b50a924260a76f4bb86e94e850d57021ef5bdc07 100644 (file)
@@ -28,28 +28,30 @@ Staff_symbol::brew_molecule (SCM smob)
   Grob * common
     = sp->get_bound (LEFT)->common_refpoint (sp->get_bound (RIGHT), X_AXIS);
   
-  bool paper_raggedright = to_boolean (me->paper_l ()->get_scmvar ("raggedright"));
-  bool grob_raggedright = to_boolean (me->get_grob_property ("ragged-right"));
-  Real width;
+  Real width  = 0.0;
 
+  /*
+    For raggedright without ragged staffs, simply set width to the linewidth.
+
+    (ok -- lousy UI, since width is in staff spaces)
+
+    --hwn.
+   */
+  
   SCM width_scm = me->get_grob_property ("width");
-  if (gh_number_p (width_scm)) // user-defined width
+  if (gh_number_p (width_scm))
     {
-      width = gh_scm2double (width_scm) *
-       Staff_symbol_referencer::staff_space (me);
+
+      /*
+       don't multiply by Staff_symbol_referencer::staff_space (me),
+       since that would make aligning staff symbols of different sizes to
+       one right margin hell.
+      */      
+      width = gh_scm2double (width_scm);
     }
-  else // determine width automatically
+  else
     {
-      if (paper_raggedright && !grob_raggedright)
-       {
-         // *prevent* staff symbol from being ragged right; instead, use
-         // paper variable "linewidth"
-         width = me->paper_l ()->get_var ("linewidth");
-       }
-      else // determine width from my own bounds
-       {
-         width = sp->get_bound (RIGHT)->relative_coordinate (common , X_AXIS);
-       }
+      width = sp->get_bound (RIGHT)->relative_coordinate (common , X_AXIS);
     }
 
   // respect indentation, if any
@@ -115,7 +117,9 @@ Staff_symbol::staff_space (Grob*me)
 
 ADD_INTERFACE (Staff_symbol,"staff-symbol-interface",
   "This spanner draws the lines of a staff.  The center (i.e. middle line
-or space) is position 0.",
+or space) is position 0. The length of the symbol may be set by hand
+through the @code{width} property.
+",
               
-  "ragged-right staff-space thickness line-count");
+  "width staff-space thickness line-count");
 
index da6116ca6ac9e0a21dc244fcf4ae039ea32b585f..a7ed6b330924b71d4b24279a251393903324277c 100644 (file)
      . (
        (molecule-callback . ,Staff_symbol::brew_molecule)
        (line-count . 5)
-       (ragged-right . #f)
        (layer . 0)
        (meta . ((interfaces . (staff-symbol-interface spanner-interface))))
        ))
index 0213d85852f7a861975edac7f537b86ccba0f885..34ff2ff0dbb0c6de3371812e7c9019ca787cded1 100644 (file)
@@ -326,7 +326,6 @@ as a real penalty.")
 
 (grob-property-description 'pitches list? "list of musical-pitch.")
 (grob-property-description 'positions pair? "cons of staff positions (LEFT . RIGHT")
-(grob-property-description 'ragged-right boolean? "In ragged alignment mode (i.e. if paper variable @code{raggedright} is set), rag staff symbols only if this staff symbol grob property is also set.")
 (grob-property-description 'raise number? "height for text to be raised (a negative value lowers the text.")
 (grob-property-description 'right-padding number? "space right of accs.")
 (grob-property-description 'right-trim-amount number? "shortening of the lyric extender on the right.")
index c62d74f46b5e852ddc7a5b09547d6139248316f2..b40542f215116b2a8e3319e457ada2a5d452e869 100644 (file)
@@ -1210,11 +1210,13 @@ def make_pixmap (name):
        cmd = r'''gs -g%dx%d -sDEVICE=pnggray  -dTextAlphaBits=4 -dGraphicsAlphaBits=4  -q -sOutputFile=- -r%d -dNOPAUSE %s %s -c quit  > %s'''
        
        cmd = cmd % (x, y, res, name + '.trans.eps', name + '.eps',name + '.png')
-       quiet_system (cmd, 'gs')
-
+       status = 0
        try:
-               status = system (cmd)
+               status = quiet_system (cmd, 'gs')
        except:
+               status = -1
+
+       if status:
                os.unlink (name + '.png')
                error ("Removing output file")