]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/staff-symbol.cc (print): subtract thickness from staff line
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 22 Aug 2004 08:31:26 +0000 (08:31 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 22 Aug 2004 08:31:26 +0000 (08:31 +0000)
length

* lily/parser.yy (book_body): disallow { ..music.. } inside \book

ChangeLog
Documentation/user/lilypond-book.itely
Documentation/user/tutorial.itely
input/regression/new-slur.ly
lily/parser.yy
lily/staff-symbol.cc
scm/define-grobs.scm

index 780ce39b11a85add61ef55ea12fe07e4d2c9e57d..af3e183366d2dbee78e705089d4c3cb4806515b2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-08-22  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+
+       * lily/staff-symbol.cc (print): subtract thickness from staff line
+       length
+
+       * lily/parser.yy (book_body): disallow { ..music.. } inside \book
+       
 2004-08-21  Carl Sorensen  <carldsorensen@comcast.net>
 
        * scm/stencil.scm: remove fontify-text and fontify-text-white
index 18ccc8a7d484b3ffdaf40a1a6d97b74a26a03873..578eaa64744f865b8e6f9caaddaa6d2a8e98d44f 100644 (file)
@@ -45,6 +45,111 @@ Short Introduction to LaTeX} provides a introduction to using La@TeX{}.
 
 
 
+
+@node An example of a musicological document
+@section  An example of a musicological document
+
+@cindex musicology
+@cindex La@TeX{}, music in
+@cindex HTML, music in
+@cindex Texinfo, music in
+Some texts contain music examples.  These texts are musicological
+treatises, songbooks or manuals like this.  Such texts can be made by
+hand, simply by importing a PostScript figure into the word processor.
+However, there is an automated procedure to reduce the amount of work
+involved HTML, La@TeX{}, and Texinfo documents.
+
+A script called @code{lilypond-book} will extract the music fragments,
+run format them, and put back the resulting notation.  This program is
+fully described in @ref{lilypond-book manual}.  Here we show a small
+example.  The example also contains explanatory text, so we will not
+comment on it further
+
+@example
+\documentclass[a4paper]@{article@}
+\begin@{document@}
+
+Documents for lilypond-book may freely mix music and text.  For
+example,
+
+\begin@{lilypond@}
+ @{ \relative c' @{
+     c2 g'2 \times 2/3 @{ f8 e d @} c'2 g4
+  @} 
+\end@{lilypond@}
+
+Options are put in brackets.
+
+\begin[fragment,quote,staffsize=26,verbatim]@{lilypond@}
+  c'4 f16
+\end@{lilypond@}
+
+Larger examples can be put in a separate file, and introduced with
+\verb+\lilypondfile+.
+
+\lilypondfile[quote,noindent]@{screech-boink.ly@}
+
+\end@{document@}
+@end example
+
+Under Unix, you can view the results as follows
+
+@example
+$ cd input/tutorial
+$ mkdir -p out/
+$ lilypond-book --output=out/ lilybook.tex
+lilypond-book (GNU LilyPond) 2.1.19
+Reading `input/tutorial/lilybook.tex'
+Reading `input/screech-boink.ly'
+@var{lots of stuff deleted}
+Writing `out/lilybook.tex'
+$ cd out
+$ latex lilybook
+@var{lots of stuff deleted}
+$ xdvi lilybook 
+@end example
+
+To convert the file into a nice PDF document, run the following
+commands
+
+@example
+$ dvips -Ppdf -u+lilypond -u+ec-mftrace lilybook
+$ ps2pdf lilybook.ps
+@end example
+
+Running lilypond-book and running latex creates a lot of temporary
+files, which would clutter up the working directory.  To remedy this,
+use the @code{--output=@var{dir}} option.  It will create the files in
+a separate subdirectory @file{dir}.
+
+Finally the result of the La@TeX{} example shown above.@footnote{ This
+tutorial is processed with Texinfo, so the example is as well.  This
+gives slightly different results in layout.}  This finishes the
+tutorial section.
+
+@page
+
+Documents for lilypond-book may freely mix music and text.  For
+example,
+
+@lilypond
+\relative c' {
+  c2 g'2 \times 2/3 { f8 e d } c'2 g4
+}
+@end lilypond
+
+Options are put in brackets.
+
+@lilypond[fragment,quote,staffsize=26,verbatim]
+c'4 f16
+@end lilypond
+
+Larger examples can be put in a separate file, and introduced with
+@code{\lilypondfile}.
+
+@lilypondfile[quote,noindent]{screech-boink.ly}
+
+
 @cindex texinfo
 @cindex latex
 @cindex texinfo
index b207c4c51b14edc4a51ae8bbb5c8cb29027003bf..8110d78a40becb85131d62f2e916630474912490 100644 (file)
@@ -1140,10 +1140,10 @@ voices with @code{\\}
    { r4 g4 f2 f4 } >>
 @end lilypond
 
-For polyphonic music typesetting, spacer rests can also be convenient; these
-are rests that do not print.  It is useful for filling up voices that
-temporarily do not play.  Here is the same example with a spacer rest
-instead of a normal rest---just use @samp{s} instead of @samp{r}
+For polyphonic music typesetting, spacer rests can also be convenient;
+these are rests that do not print.  They are useful for filling up
+voices that temporarily do not play.  Here is the same example with a
+spacer rest (@code{s}) instead of a normal rest (@code{r}),
 
 @lilypond[quote,verbatim,relative=2,fragment]
 << { a4 g2 f4~ f4 } \\
@@ -1193,7 +1193,7 @@ but now this entire expression must be interpreted as a
 \new PianoStaff << \new Staff @dots{} >>
 @end example
 
-Here is a full-fledged example
+Here is a small example
 
 @lilypond[quote,verbatim,relative=1,fragment]
 \new PianoStaff <<
@@ -1233,8 +1233,8 @@ seufzer = {
 { \seufzer \seufzer }
 @end lilypond
 
-The name of an identifier should have alphabetic characters only;
-no numbers, underscores or dashes.  The assignment should be outside of
+The name of an identifier should have alphabetic characters only; no
+numbers, underscores or dashes.  The assignment should be outside of
 running music.
 
 It is possible to use variables for many other types of objects in the
@@ -1258,14 +1258,15 @@ places.  The following example uses the above variables
 @end example
 
 More information on the possible uses of identifiers is in the
-technical manual, in TODO.
+technical manual, in @ref{Input variables and Scheme}.
+@c fixme: the ref is too technical.
 
 
 @node An orchestral part
 @section An orchestral part
 
-In orchestral music, all notes are printed twice; in a part for
-the musicians, and in a full score for the conductor.  Identifiers can
+In orchestral music, all notes are printed twice. Once in a part for
+the musicians, and once in a full score for the conductor.  Identifiers can
 be used to avoid double work. The music is entered once, and stored in
 a variable.  The contents of that variable is then used to generate
 both the part and the score.
@@ -1384,108 +1385,10 @@ leading to
 More in-depth information on preparing parts and scores can be found
 in the notation manual; see @ref{Orchestral music}.
 
-Setting run-time variables (`properties') is discussed in ref-TODO.
+Setting run-time variables (`properties') is discussed in
+@ref{Changing context properties on the fly}.
 
+@node Conclusion of the tutorial
+@section Conclusion of the tutorial
 
-@node Musicological essays
-@section Musicological essays
 
-@cindex musicology
-@cindex La@TeX{}, music in
-@cindex HTML, music in
-@cindex Texinfo, music in
-Some texts contain music examples.  These texts are musicological
-treatises, songbooks or manuals like this.  Such texts can be made by
-hand, simply by importing a PostScript figure into the word processor.
-However, there is an automated procedure to reduce the amount of work
-involved HTML, La@TeX{}, and Texinfo documents.
-
-A script called @code{lilypond-book} will extract the music fragments,
-run format them, and put back the resulting notation.  This program is
-fully described in @ref{lilypond-book manual}.  Here we show a small
-example.  The example also contains explanatory text, so we will not
-comment on it further
-
-@example
-\documentclass[a4paper]@{article@}
-\begin@{document@}
-
-Documents for lilypond-book may freely mix music and text.  For
-example,
-
-\begin@{lilypond@}
- @{ \relative c' @{
-     c2 g'2 \times 2/3 @{ f8 e d @} c'2 g4
-  @} 
-\end@{lilypond@}
-
-Options are put in brackets.
-
-\begin[fragment,quote,staffsize=26,verbatim]@{lilypond@}
-  c'4 f16
-\end@{lilypond@}
-
-Larger examples can be put in a separate file, and introduced with
-\verb+\lilypondfile+.
-
-\lilypondfile[quote,noindent]@{screech-boink.ly@}
-
-\end@{document@}
-@end example
-
-Under Unix, you can view the results as follows
-
-@example
-$ cd input/tutorial
-$ mkdir -p out/
-$ lilypond-book --output=out/ lilybook.tex
-lilypond-book (GNU LilyPond) 2.1.19
-Reading `input/tutorial/lilybook.tex'
-Reading `input/screech-boink.ly'
-@var{lots of stuff deleted}
-Writing `out/lilybook.tex'
-$ cd out
-$ latex lilybook
-@var{lots of stuff deleted}
-$ xdvi lilybook 
-@end example
-
-To convert the file into a nice PDF document, run the following
-commands
-
-@example
-$ dvips -Ppdf -u+lilypond -u+ec-mftrace lilybook
-$ ps2pdf lilybook.ps
-@end example
-
-Running lilypond-book and running latex creates a lot of temporary
-files, which would clutter up the working directory.  To remedy this,
-use the @code{--output=@var{dir}} option.  It will create the files in
-a separate subdirectory @file{dir}.
-
-Finally the result of the La@TeX{} example shown above.@footnote{ This
-tutorial is processed with Texinfo, so the example is as well.  This
-gives slightly different results in layout.}  This finishes the
-tutorial section.
-
-@page
-
-Documents for lilypond-book may freely mix music and text.  For
-example,
-
-@lilypond
-\relative c' {
-  c2 g'2 \times 2/3 { f8 e d } c'2 g4
-}
-@end lilypond
-
-Options are put in brackets.
-
-@lilypond[fragment,quote,staffsize=26,verbatim]
-c'4 f16
-@end lilypond
-
-Larger examples can be put in a separate file, and introduced with
-@code{\lilypondfile}.
-
-@lilypondfile[quote,noindent]{screech-boink.ly}
index 9f7fd0daa5892ffd9b7fdbb8e1a7b39d5bcbef48..fa26940ab74444d3c6ca7df23f8ccf5803a4aa79 100644 (file)
@@ -19,7 +19,7 @@
     << {c=''8.([ es16] bes4~bes )}
        \\
        {r8  <as es> r <f des> r }
-   >>
+    >>
     s4
 
     g='8[( a b b! ]  c4  bes) 
@@ -48,7 +48,8 @@
     | << { b='8[( c]) } \\
         { b='8[( c]) }>>
     
-
-    
+    s2.|
+    e4( dis4)
+    e4( dis4)
 }
 
index 0d8f000b125f7f83cdcbfa415f0a055ce0877f9d..ea56d48e60d1edcd40777562ecb1d61e3aa1c060 100644 (file)
@@ -649,13 +649,6 @@ book_body:
                $$->scores_.push (score);
                scm_gc_unprotect_object (score->self_scm ());
        }
-       | book_body Composite_music {
-               Music *music = $2;
-               Score *score
-                       = unsmob_score (ly_music_scorify (music->self_scm ()));
-               $$->scores_.push (score);
-               scm_gc_unprotect_object (music->self_scm ());
-       }
        | book_body lilypond_header {
                $$->header_ = $2;
        }
index 691f86a577c96bd06363122f7fc826fd24e120f1..34941c84b6a65787a3d5e4c3cef76b415f9a2598 100644 (file)
@@ -38,6 +38,9 @@ Staff_symbol::print (SCM smob)
 
     --hwn.
    */
+  Real t = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
+  t *= robust_scm2double (me->get_property ("thickness"), 1.0);
+  
   Direction d = LEFT;
   do
     {
@@ -60,13 +63,12 @@ Staff_symbol::print (SCM smob)
              && !x->extent (x, X_AXIS).is_empty ())
            span_points[d] += x->extent (x, X_AXIS)[d];
        }
+
+      span_points[d] -= d* t/2;
     }
   while (flip (&d) !=LEFT);
 
 
-  Real t = me->get_paper ()->get_dimension (ly_symbol2scm ("linethickness"));
-  t *= robust_scm2double (me->get_property ("thickness"), 1.0);
-  
   int l = Staff_symbol::line_count (me);
   
   Real height = (l-1) * staff_space (me) /2;
index fddebf771c4f4ec4de9ac8b03c118687ecd43db0..25a8aa15cf720a4cbeeafce43df430fc093795d7 100644 (file)
        (padding . 0.6)
        (minimum-space . 1.2)
        (direction . -1)
-       (meta . ((interfaces . (dynamic-interface axis-group-interface side-position-interface spanner-interface))))
-       ))
+       
+       (meta . ((interfaces . (dynamic-interface axis-group-interface
+                                                 side-position-interface spanner-interface)))) ))
 
     (LeftEdge
      . (
        (break-align-symbol . key-signature)
        (break-visibility . ,begin-of-line-visible)
        (breakable . #t)
-       (meta . ((interfaces . (key-signature-interface  font-interface  break-aligned-interface item-interface ))))
+       
+       (meta . ((interfaces . (key-signature-interface font-interface
+                                                       break-aligned-interface item-interface ))))
        ))
     (LedgerLineSpanner
      . (
        (baseline-skip . 2)
        (break-visibility . ,end-of-line-invisible)
        (padding . 0.8)
-       (meta . ((interfaces . (text-interface side-position-interface font-interface mark-interface self-alignment-interface item-interface ))))
+       (meta . ((interfaces . (text-interface
+                               side-position-interface font-interface mark-interface
+                               self-alignment-interface item-interface ))))
        ))
      (MetronomeMark
      . (
        (Y-offset-callbacks . (,Side_position_interface::aligned_side)) 
        (direction . 1)
        (padding . 0.8)
-       (meta . ((interfaces . (text-interface side-position-interface font-interface metronome-mark-interface item-interface))))
+       (meta . ((interfaces . (text-interface
+                               side-position-interface font-interface
+                               metronome-mark-interface item-interface))))
        ))
     (MeasureGrouping
      . (
        (Y-extent-callback . ,Note_head::extent)
        (Y-offset-callbacks  . (,Staff_symbol_referencer::callback))
        (stem-attachment-function . ,note-head-style->attachment-coordinates)
-       (meta . ((interfaces . (rhythmic-grob-interface rhythmic-head-interface font-interface note-head-interface staff-symbol-referencer-interface item-interface ))))
+       (meta . ((interfaces . (rhythmic-grob-interface
+                               rhythmic-head-interface font-interface note-head-interface
+                               staff-symbol-referencer-interface item-interface ))))
        ))
 
     (NoteSpacing
        (grace-space-factor . 0.6)
        (shortest-duration-space . 2.0)
        (spacing-increment . 1.2)
-;      (base-shortest-duration . ,(ly:make-moment 1 8 3 2))
        (base-shortest-duration . ,(ly:make-moment 1 8))
        (meta . ((interfaces . (spacing-interface spacing-spanner-interface spanner-interface))))
        ))