]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' into translation
authorJean-Charles Malahieude <lilyfan@orange.fr>
Sat, 14 Sep 2013 12:55:26 +0000 (14:55 +0200)
committerJean-Charles Malahieude <lilyfan@orange.fr>
Sat, 14 Sep 2013 12:55:26 +0000 (14:55 +0200)
137 files changed:
Documentation/GNUmakefile
Documentation/contributor/doc-work.itexi
Documentation/contributor/feta-font.itexi
Documentation/contributor/release-work.itexi
Documentation/de/notation/text.itely
Documentation/es/notation/text.itely
Documentation/fr/notation/text.itely
Documentation/ja/notation/text.itely
Documentation/learning/tweaks.itely
Documentation/ly-examples/bach-bwv610.ly
Documentation/ly-examples/cary-layout.ily
Documentation/notation/ancient.itely
Documentation/notation/changing-defaults.itely
Documentation/notation/pitches.itely
Documentation/notation/simultaneous.itely
Documentation/notation/spacing.itely
Documentation/notation/text.itely
Documentation/notation/vocal.itely
Documentation/snippets/aligning-marks-with-various-notation-objects.ly [deleted file]
Documentation/snippets/text.snippet-list
Documentation/usage/updating.itely
Documentation/web/news-front.itexi
Documentation/web/news.itexi
VERSION
configure.ac
flower/file-name.cc
flower/file-path.cc
flower/include/file-name.hh
flower/include/file-path.hh
flower/include/international.hh
flower/include/std-string.hh
flower/include/std-vector.hh
flower/include/string-convert.hh
flower/include/warn.hh
flower/international.cc
flower/std-string.cc
flower/string-convert.cc
flower/warn.cc
input/regression/ambitus-gap.ly
input/regression/parenthesize.ly
input/regression/part-combine-mmrest-apart.ly [new file with mode: 0644]
input/regression/text-script-vertical-skylines.ly
lily/accidental-placement.cc
lily/all-font-metrics.cc
lily/audio-item.cc
lily/auto-change-iterator.cc
lily/axis-group-interface.cc
lily/bar-engraver.cc
lily/change-iterator.cc
lily/context.cc
lily/control-track-performer.cc
lily/file-name-map.cc
lily/font-metric.cc
lily/freetype.cc
lily/function-documentation.cc
lily/global-context.cc
lily/gregorian-ligature.cc
lily/grob.cc
lily/includable-lexer.cc
lily/include/accidental-interface.hh
lily/include/all-font-metrics.hh
lily/include/audio-item.hh
lily/include/axis-group-interface.hh
lily/include/change-iterator.hh
lily/include/context.hh
lily/include/file-name-map.hh
lily/include/font-metric.hh
lily/include/global-context.hh
lily/include/grob.hh
lily/include/includable-lexer.hh
lily/include/input.hh
lily/include/lily-guile-macros.hh
lily/include/lily-guile.hh
lily/include/lily-lexer.hh
lily/include/lily-parser.hh
lily/include/lilypond-version.hh
lily/include/main.hh
lily/include/midi-chunk.hh
lily/include/midi-stream.hh
lily/include/misc.hh
lily/include/modified-font-metric.hh
lily/include/note-head.hh
lily/include/open-type-font.hh
lily/include/output-def.hh
lily/include/pango-font.hh
lily/include/paper-outputter.hh
lily/include/relocate.hh
lily/include/rest.hh
lily/include/slur-configuration.hh
lily/include/slur-proto-engraver.hh
lily/include/source-file.hh
lily/include/stream.hh [deleted file]
lily/include/tie-column-format.hh [deleted file]
lily/include/tie-configuration.hh
lily/input.cc
lily/lexer.ll
lily/lily-guile.cc
lily/lily-lexer.cc
lily/lily-parser.cc
lily/lilypond-version.cc
lily/main.cc
lily/midi-chunk.cc
lily/midi-stream.cc
lily/misc.cc
lily/modified-font-metric.cc
lily/note-head.cc
lily/open-type-font.cc
lily/output-def.cc
lily/pango-font.cc
lily/paper-outputter.cc
lily/parser.yy
lily/part-combine-iterator.cc
lily/relocate.cc
lily/rest.cc
lily/semi-tie-column.cc
lily/slur-configuration.cc
lily/slur-proto-engraver.cc
lily/source-file.cc
lily/staff-performer.cc
lily/stencil-integral.cc
lily/stencil-interpret.cc
lily/tie-column.cc
lily/tie-configuration.cc
lily/ttf.cc
ly/engraver-init.ly
po/lilypond.pot
scm/define-grob-interfaces.scm
scm/define-grob-properties.scm
scm/define-grobs.scm
scm/define-markup-commands.scm
scm/define-stencil-commands.scm
scm/harp-pedals.scm
scm/music-functions.scm
scm/output-lib.scm
scm/stencil.scm
stepmake/stepmake/c++-rules.make
stepmake/stepmake/c-rules.make

index 924b391cbbe27bac37597458fffad054c5f88e15..44d4d04b02fe8a374f3a140a9addfe41aa585ac7 100644 (file)
@@ -7,6 +7,8 @@ depth = ..
 #############
 ### Variables
 
+OUT_DIST_FILES = $(outdir)/ly-grammar.txt
+
 NAME = documentation
 LANGS = $(shell $(PYTHON) $(top-src-dir)/python/langdefs.py)
 SUBDIRS = logo pictures misc po css topdocs \
index bd7a4aa317e9b8082044abcbd00347b688bd498a..c1dd8adae8a5d63b40191d99c96f142dfdb7b087 100644 (file)
@@ -277,6 +277,15 @@ Level 3 subsections are created with
 @end example
 
 @itemize
+@item
+Level 4 headings and menus must be preceded by level 3 headings and
+menus, and so on for level 3 and level 2.  If this is not what is
+wanted, please use:
+
+@example
+@@subsubsubheading Foo
+@end example
+
 @item
 Please leave two blank lines above a @code{@@node}; this makes it
 easier to find sections in texinfo.
@@ -296,19 +305,23 @@ but instead:
 @end example
 
 @item
-With the exception of @code{@@} commands, the section name must
-match the node name exactly.
-
-@item
-No commas may be used in the node names.
-
-@item
-If a heading is desired without creating a @code{@@node}, please use:
+No punctuation may be used in the node names.  If the heading text
+uses punctuation (in particular, colons and commas) simply leave
+this out of the node name and menu.
 
 @example
-@@subsubsubheading Foo
+@@menu
+* Foo Bar::
+@@end menu
+
+@@node Foo Bar
+@@subsection Foo: Bar
 @end example
 
+@item
+With the exception of @code{@@} commands and punctuation, the
+section name should match the node name exactly.
+
 @item
 Sectioning commands (@code{@@node} and @code{@@section}) must not appear
 inside an @code{@@ignore}.  Separate those commands with a space, ie
@@ -326,8 +339,8 @@ Nodes must be included inside a
 @end example
 
 @noindent
-construct.  These are easily constructed with automatic tools; see
-@ref{Scripts to ease doc work}.
+construct.  These can be constructed with scripts:
+see @ref{Stripping whitespace and generating menus}.
 
 
 @node LilyPond formatting
@@ -1449,7 +1462,20 @@ the difficulty.
 @node Scripts to ease doc work
 @section Scripts to ease doc work
 
-@subheading Building only one section of the documentation
+@menu
+* Scripts to test the documentation::
+* Scripts to create documentation::
+@end menu
+
+@node Scripts to test the documentation
+@subsection Scripts to test the documentation
+
+@menu
+* Building only one section of the documentation::
+@end menu
+
+@node Building only one section of the documentation
+@unnumberedsubsubsec Building only one section of the documentation
 
 In order to save build time, a script is available to build only
 one section of the documentation in English with a default html
@@ -1510,10 +1536,21 @@ scripts/auxiliar/cg-section.sh doc-work
 @code{cg-section.sh} uses the same environment variables and
 corresponding default values as @code{doc-section.sh}.
 
-@subheading Stripping whitespace and generating menus
+@node Scripts to create documentation
+@subsection Scripts to create documentation
+
+@menu
+* Stripping whitespace and generating menus::
+* Stripping whitespace only::
+* Updating doc with convert-ly::
+@end menu
+
+@node Stripping whitespace and generating menus
+@unnumberedsubsubsec Stripping whitespace and generating menus
 
 @warning{This script assumes that the file conforms to our doc
-policy; a few files still need work in this regard.}
+policy, in particular with regard to @ref{Sectioning commands};
+a few files still need work in this regard.}
 
 To automatically regenerate @code{@@menu} portions and strip
 whitespace, use:
@@ -1522,19 +1559,28 @@ whitespace, use:
 scripts/auxiliar/node-menuify.py @var{FILENAME}
 @end example
 
+If you are adding documentation that requires new menus,
+you will need to add a blank @code{@@menu} section:
+
+@example
+@@menu
+@@end menu
+@end example
 
-@subheading Stripping whitespace only
+@node Stripping whitespace only
+@unnumberedsubsubsec Stripping whitespace only
 
 @c TODO: should this be documented elsewhere?  It's useful for
 @c more than just docs.
 To remove extra whitespace from the ends of lines, run
 
 @example
-scripts/auxiliar/strip-whitespace.py Documentation/FILENAME
+scripts/auxiliar/strip-whitespace.py @var{FILENAME}
 @end example
 
 
-@subheading Updating doc with @command{convert-ly}
+@node Updating doc with convert-ly
+@unnumberedsubsubsec Updating doc with @command{convert-ly}
 
 Don't.  This should be done by programmers when they add new
 features.  If you notice that it hasn't been done, complain to
index 78021ae8d73c858a3be151dc9e3888c90aa7b983..002aa895a43167a4fc9eac319d2925e6de207b9e 100644 (file)
@@ -118,15 +118,23 @@ make
 
 There are special formatting rules for METAFONT files.
 
-Tabs are used for indentation.
+Tabs are used for the indentation of commands.
 
 When a path contains more than two points, put each point on a
-separate line, with the operator at the beginning  of the line:
+separate line, with the operator at the beginning of the line.
+The operators are indented to the same depth as the initial point
+on the path using spaces.  The indentation mechanism is illustrated
+below, with @samp{------->} indicating a tab character and any other
+indentation created using spaces.
 
 @example
-fill z1
-     -- z2
-     -- z3
-     .. cycle;
+def draw_something (test) =
+------->if test:
+------->------->fill z1
+------->------->     -- z2
+------->------->     -- z3
+------->------->     .. cycle;
+------->fi;
+enddef;
 @end example
 
index 5dbc3082540a000a12acbdffc72198b85b31c420..2bd0b68f8d52ae2fafb2bee3a8a5657b3a6364a8 100644 (file)
@@ -261,7 +261,7 @@ A @qq{major release} means an update of @code{x} in @code{2.x.0}.
 
 @subheading Main requirements
 
-This is the current official guidelines.
+These are the current official guidelines.
 
 @itemize
 @item
@@ -291,11 +291,11 @@ grep FIXME --exclude "misc/*" --exclude "*GNUmakefile" \
 @end example
 
 @item
-Check for altered regtests, and document as necessary.  (update
-numbers in the following command as appropriate)
+Check for altered regtests, and document as necessary:
 
 @example
-git diff -u -r release/2.12.0-1 -r release/2.13.13-1 input/regression/
+git diff -u -r release/2.@var{FIRST-CURRENT-STABLE} \
+  -r release/2.@var{LAST-CURRENT-DEVELOPMENT} input/regression/
 @end example
 
 @end itemize
@@ -325,55 +325,53 @@ mv $LILYPOND_BUILD_DIR/po/lilypond.pot po/
 Make directories on lilypond.org:
 
 @example
-~/web/download/sources/v2.14
-~/web/download/sources/v2.15
+~/download/sources/v2.@var{NEW-STABLE}
+~/download/sources/v2.@var{NEW-DEVELOPMENT}
 @end example
 
 @item
 Shortly after the release, move all current contributors to
-previous contributors in:
+previous contributors in
+@file{Documentation/included/authors.itexi}.
 
-@example
-Documentation/included/authors.itexi
-@end example
-
-Also, delete old material in:
+@item
+Delete old material in @file{Documentation/changes.tely}, but
+don't forget to check it still compiles!  Also update the version
+numbers:
 
 @example
-Documentation/changes.tely
+@@node Top
+@@top New features in 2.@var{NEW-STABLE} since 2.@var{OLD-STABLE}
 @end example
 
-but don't forget to check it still compiles!  also update the
-version numbers.
-
 @item
 Website:
 
 @itemize
 @item
 make a link from the old unstable to the next stable in
-lilypond.org's /doc/ dir.  Keep all previous unstable->stable doc
-symlinks.
+lilypond.org's @file{/doc/} dir.  Keep all previous unstable->stable
+doc symlinks.
 
 Also, make the old docs self-contained -- if there's a redirect in
-/doc/v2.12/Documentation/index.html , replace it with the
-index.html.old-2.12 files.
+@file{/doc/v2.@var{OLD-STABLE}/Documentation/index.html} , replace it with the
+@file{index.html.old-2.@var{OLD-STABLE}} files.
 
 The post-2.13 docs will need another way of handling the
 self-containment.  It won't be hard to whip up a python script
-that changes the link to ../../../../manuals.html to
-../website/manuals.html , but it's still a 30-minute task that
+that changes the link to @file{../../../../manuals.html} to
+@file{../website/manuals.html}, but it's still a 30-minute task that
 needs to be done before 2.16.
 
 @item
-doc auto redirects  to v2.LATEST-STABLE
+doc auto redirects to @code{v2.@var{NEW-STABLE}}
 
 @item
-add these two lines to http://www.lilypond.org/robots.txt:
+add these two lines to @file{Documentation/web/server/robots.txt}:
 
 @example
-Disallow: /doc/v2.PREVIOUS-STABLE/
-Disallow: /doc/v2.CURRENT-DEVELOPMENT/
+Disallow: /doc/v2.@var{OLD-STABLE}/
+Disallow: /doc/v2.@var{NEW-DEVELOPMENT}/
 @end example
 
 @end itemize
@@ -385,14 +383,15 @@ Disallow: /doc/v2.CURRENT-DEVELOPMENT/
 @itemize
 @item
 submit po template for translation: send url of tarball to
-coordinator@@translationproject.org, mentioning lilypond-VERSION.pot
+@email{coordinator@@translationproject.org}, mentioning
+lilypond-VERSION.pot
 
 @item
 update links to distros providing lilypond packages?  link in:
 @file{Documentation/web/download.itexi}
 
-This has nothing to do with the release, but it's a "periodic
-maintenance" task that might make sense to include with releases.
+This has nothing to do with the release, but it's a @qq{periodic
+maintenance} task that might make sense to include with releases.
 
 @item
 Send announcements to...
index f751070399610dff0d1b9dbdd7d833311e5cfb06..fb2a9fce5c22718b6b16e9bae2ac6dae9fda79da 100644 (file)
@@ -304,9 +304,6 @@ c  c
 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
 {printing-marks-at-the-end-of-a-line.ly}
 
-@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
-{aligning-marks-with-various-notation-objects.ly}
-
 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
 {printing-marks-on-every-staff.ly}
 
index 450a4cacb6c45e426ae6f58d554364afa23547e4..cdf99dfbb40c4882b0fb3b05acddf8f885c7bea0 100644 (file)
@@ -301,9 +301,6 @@ c  c
 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
 {printing-marks-at-the-end-of-a-line.ly}
 
-@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
-{aligning-marks-with-various-notation-objects.ly}
-
 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
 {printing-marks-on-every-staff.ly}
 
index f2513575b46a60c53c6f0ea22cad3f05708a965a..88aaa3fe55025e2c271faacb8c4a2fdc6d4b3d97 100644 (file)
@@ -303,9 +303,6 @@ c  c
 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
 {printing-marks-at-the-end-of-a-line.ly}
 
-@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
-{aligning-marks-with-various-notation-objects.ly}
-
 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
 {printing-marks-on-every-staff.ly}
 
index d27a06a2d7108ab5034dd1cdc18fab7d5cd426b7..dfcfd646c63cd9682ed1941428a5930bac17d170 100644 (file)
@@ -292,9 +292,6 @@ c  c
 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
 {printing-marks-at-the-end-of-a-line.ly}
 
-@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
-{aligning-marks-with-various-notation-objects.ly}
-
 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
 {printing-marks-on-every-staff.ly}
 
index 3efb7fb07bbc79b53cb77d7cf43ae4828ca8a1eb..6d9f157895f93e43b9984169a359aba458fd15a0 100644 (file)
@@ -4041,13 +4041,10 @@ the parts with all the @code{#()}.  This is explained in
 @ref{Advanced tweaks with Scheme}.
 
 @lilypond[quote,verbatim,ragged-right]
-mpdolce =
-#(make-dynamic-script
-  #{ \markup { \hspace #0
-               \translate #'(5 . 0)
-               \line { \dynamic "mp"
-                       \text \italic "dolce" } }
-  #})
+mpdolce = -\tweak #'self-alignment-X #-0.6 #
+  (make-dynamic-script
+   (markup #:dynamic "mp"
+           #:normal-text #:italic "dolce" ))
 
 inst =
 #(define-music-function
@@ -4074,13 +4071,10 @@ Let's hide them in another file:
 
 @example
 %%% save this to a file called "definitions.ily"
-mpdolce =
-#(make-dynamic-script
-  #@{ \markup @{ \hspace #0
-               \translate #'(5 . 0)
-               \line @{ \dynamic "mp"
-                       \text \italic "dolce" @} @}
-  #@})
+mpdolce = -\tweak #'self-alignment-X #-0.6 #
+  (make-dynamic-script
+   (markup #:dynamic "mp"
+           #:normal-text #:italic "dolce" ))
 
 inst =
 #(define-music-function
@@ -4112,13 +4106,10 @@ Now let's modify our music (let's save this file as @file{music.ly}).
 @end example
 
 @lilypond[quote,ragged-right]
-mpdolce =
-#(make-dynamic-script
-  #{ \markup { \hspace #0
-               \translate #'(5 . 0)
-               \line { \dynamic "mp"
-                       \text \italic "dolce" } }
-  #})
+mpdolce = -\tweak #'self-alignment-X #-0.6 #
+  (make-dynamic-script
+   (markup #:dynamic "mp"
+           #:normal-text #:italic "dolce" ))
 
 inst =
 #(define-music-function
@@ -4147,13 +4138,10 @@ with this:
 
 @example
 %%%  definitions.ily
-mpdolce =
-#(make-dynamic-script
-  #@{ \markup @{ \hspace #0
-               \translate #'(5 . 0)
-               \line @{ \dynamic "mp"
-                       \text \italic "dolce" @} @}
-  #@})
+mpdolce = -\tweak #'self-alignment-X #-0.6 #
+  (make-dynamic-script
+   (markup #:dynamic "mp"
+           #:normal-text #:italic "dolce" ))
 
 inst =
 #(define-music-function
@@ -4180,13 +4168,10 @@ inst =
 @end example
 
 @lilypond[quote,ragged-right]
-mpdolce =
-#(make-dynamic-script
-  #{ \markup { \hspace #0
-               \translate #'(5 . 0)
-               \line { \dynamic "mp"
-                       \text \italic "dolce" } }
-  #})
+mpdolce = -\tweak #'self-alignment-X #-0.6 #
+  (make-dynamic-script
+   (markup #:dynamic "mp"
+           #:normal-text #:italic "dolce" ))
 
 inst =
 #(define-music-function
@@ -4231,13 +4216,10 @@ overall size of the output.
 
 @example
 %%%  web-publish.ily
-mpdolce =
-#(make-dynamic-script
-  #@{ \markup @{ \hspace #0
-               \translate #'(5 . 0)
-               \line @{ \dynamic "mp"
-                       \text \italic "dolce" @} @}
-  #@})
+mpdolce = -\tweak #'self-alignment-X #-0.6 #
+  (make-dynamic-script
+   (markup #:dynamic "mp"
+           #:normal-text #:italic "dolce" ))
 
 inst =
 #(define-music-function
@@ -4265,13 +4247,10 @@ inst =
 @end example
 
 @lilypond[quote,ragged-right]
-mpdolce =
-#(make-dynamic-script
-  #{ \markup { \hspace #0
-               \translate #'(5 . 0)
-               \line { \dynamic "mp"
-                       \text \italic "dolce" } }
-  #})
+mpdolce = -\tweak #'self-alignment-X #-0.6 #
+  (make-dynamic-script
+   (markup #:dynamic "mp"
+           #:normal-text #:italic "dolce" ))
 
 inst =
 #(define-music-function
index 8d2134a5fb94779164e0bb6faa7ed5288252a843..863c8594e644f9b2087b596d7a393fe50bdaa024 100644 (file)
  %opus="BWV 610"
 
  footer = "Mutopia-2006/03/27-706"
- tagline = \markup { \override #'(box-padding . 1.0) \override #'(baseline-skip . 2.7) \box \center-column { \small \line { Sheet music from \with-url #"http://www.MutopiaProject.org" \line { \teeny www. \hspace #-1.0 MutopiaProject \hspace #-1.0 \teeny .org \hspace #0.5 } â€¢ \hspace #0.5 \italic Free to download, with the \italic freedom to distribute, modify and perform. } \line { \small \line { Typeset using \with-url #"http://www.LilyPond.org" \line { \teeny www. \hspace #-1.0 LilyPond \hspace #-1.0 \teeny .org } by \maintainer \hspace #-1.0 . \hspace #0.5 Reference: \footer } } \line { \teeny \line { This sheet music has been placed in the public domain by the typesetter, for details see: \hspace #-0.5 \with-url #"http://creativecommons.org/licenses/publicdomain" http://creativecommons.org/licenses/publicdomain } } } }
-
+ tagline = \markup {
+  \override #'(baseline-skip . 2.2)
+  \center-column {
+   \abs-fontsize #8 \sans \bold
+   \with-url #"http://www.MutopiaProject.org" {
+    "Mutopia"
+    "Project"
+   }
+  }
+  \override #'(baseline-skip . 0)
+  \column {
+   \with-color #grey
+   \filled-box #'( 0 . 1) #'(-2.5 . 1.4) #0
+  }
+  \override #'(baseline-skip . 2.2)
+  \column {
+   \abs-fontsize #8 \sans
+   \concat{"Typeset using " \with-url #"http://www.lilypond.org" "LilyPond" " Â©2006 by " \maintainer "." }
+   \abs-fontsize #8 \sans
+   \concat {"This work is licensed under a " \with-url #"http://creativecommons.org/about/pdm" \copyright " license."}
+  }
+ }
 }
 
 \include "deutsch.ly"
index 3075225e23f8dc836754c9122a445d95f3d396d7..709c9949fd057e3011b2b52ce410cbaa56cf0a89 100644 (file)
   }
 }
 
+\midi {
+  \context {
+    \Score
+    autoBeaming = ##f % synchronize lyrics the same way as \layout does
+  }
+}
+
 \paper {
   oddHeaderMarkup = \markup \fill-line { " " }
   evenHeaderMarkup = \markup \fill-line { " " }
index 431966679a8b5342947c57c75f0c783b25aed6f0..2ffb0042fc3b4306a16873ceff081da18b218b70 100644 (file)
@@ -728,22 +728,19 @@ Use the @code{flag-style} property of grob @code{Stem} to
 select ancient flags.  Besides the @code{default} flag style,
 only the @code{mensural} style is supported.
 
-@lilypond[quote,fragment,ragged-right,verbatim]
+@lilypond[quote,fragment,ragged-right,verbatim,relative=1]
 \override Flag.style = #'mensural
 \override Stem.thickness = #1.0
 \override NoteHead.style = #'mensural
 \autoBeamOff
-c'8 d'8 e'8 f'8 c'16 d'16 e'16 f'16 c'32 d'32 e'32 f'32 s8
-c''8 d''8 e''8 f''8 c''16 d''16 e''16 f''16 c''32 d''32 e''32 f''32
+c8 d e f c16 d e f c32 d e f s8
+c'8 d e f c16 d e f c32 d e f
 @end lilypond
 
-Note that the innermost flare of each mensural flag always is
+Note that the innermost flare of each mensural flag is
 vertically aligned with a staff line.
 
 There is no particular flag style for neo-mensural or Petrucci notation.
-@c Hence,
-@c when typesetting the incipit of a transcribed piece of mensural
-@c music, the default flag style should be used.
 There are no flags in Gregorian chant notation.
 
 @seealso
@@ -752,11 +749,8 @@ Music Glossary:
 @rglos{flag}.
 
 @knownissues
-The attachment of ancient flags to stems is slightly off.
-@c due to a change in early 2.3.x.
-
 Vertically aligning each flag with a staff line assumes that stems
-always end either exactly on or exactly in the middle between two
+always end either exactly on or exactly in the middle of two
 staff lines.  This may not always be true when using advanced layout
 features of classical notation (which however are typically out of
 scope for mensural notation).
index 7b54ca26e1bea5f1e7fb057530d96b1abcdae746..d690681465dd4b06c6ca5e72e0308940c727810a 100644 (file)
@@ -114,12 +114,57 @@ further explanation and with links to the IR.
 Contexts are arranged hierarchically:
 
 @menu
+* Output definitions - blueprints for contexts::
 * Score - the master of all contexts::
 * Top-level contexts - staff containers::
 * Intermediate-level contexts - staves::
 * Bottom-level contexts - voices::
 @end menu
 
+@node Output definitions - blueprints for contexts
+@unnumberedsubsubsec Output definitions - blueprints for contexts
+
+This section explains the relevance of output definitions when
+working with contexts.  Examples for actual output definitions are
+given later (see @ref{Changing all contexts of the same type}).
+
+@cindex output definitions
+@funindex \layout
+While music written in a file may refer to context types and
+names, contexts are created only when the music is actually being
+interpreted.  LilyPond interprets music under control of an
+@q{output definition} and may do so for several different output
+definitions, resulting in different output.  The output definition
+relevant for printing music is specified using @code{\layout}.
+
+@funindex \midi
+A much simpler output definition used for producing Midi output is
+specified using @code{\midi}.  Several other output definitions
+are used by LilyPond internally, like when using the part combiner
+(@ref{Automatic part combining}) or creating music quotes
+(@ref{Quoting other voices}).
+
+Output definitions define the relation between contexts as well as
+their respective default settings.  While most changes will
+usually be made inside of a @code{\layout} block, Midi-related
+settings will only have an effect when made within a @code{\midi}
+block.
+
+@funindex autoBeaming
+Some settings affect several outputs: for example, if
+@code{autoBeaming} is turned off in some context, beams count as
+melismata for the purpose of matching music to lyrics as described
+in @ref{Automatic syllable durations}.  This matching is done both
+for printed output as well as for Midi.  If changes made to
+@code{autoBeaming} within a context definition of a @code{\layout}
+block are not repeated in the corresponding @code{\midi} block,
+lyrics and music will get out of sync in Midi.
+
+@seealso
+Installed Files:
+@file{ly/engraver-init.ly}.
+@file{ly/performer-init.ly}.
+
 @node Score - the master of all contexts
 @unnumberedsubsubsec Score - the master of all contexts
 
@@ -130,8 +175,7 @@ such as clefs, time signatures, and key-signatures are aligned
 across staves.
 
 A Score context is instantiated implicitly when a
-@code{\score @{@dots{}@}} or @code{\layout @{@dots{}@}} block is
-processed.
+@code{\score @{@dots{}@}} block is processed.
 
 @node Top-level contexts - staff containers
 @unnumberedsubsubsec Top-level contexts - staff containers
@@ -804,9 +848,15 @@ default values in just one particular instance of a context.
 @funindex \context
 @funindex \layout
 
-The context settings which are to be used by default in
+The default context settings which are to be used for typesetting in
 @code{Score}, @code{Staff}, @code{Voice} and other contexts may be
-specified in a @code{\context} block within any @code{\layout} block.
+specified in a @code{\context} block within any @code{\layout}
+block.
+
+Settings for Midi output as opposed to typesetting will have to be
+separately specified in @code{\midi} blocks (see @ref{Output
+definitions - blueprints for contexts}).
+
 The @code{\layout} block should be placed within the @code{\score}
 block to which it is to apply, after the music.
 
@@ -959,6 +1009,10 @@ command:
 @}
 @end example
 
+Since such a @q{context modification} is specified inside of
+music, it will affect @emph{all} outputs (typesetting @emph{and}
+Midi) as opposed to changes within an output definition.
+
 The following types of settings may be specified:
 
 @itemize
@@ -1049,7 +1103,8 @@ on the context initiation statement is used,
 
 @item
 otherwise the default value taken from the most recent appropriate
-@code{\context} block in the @code{\layout} blocks is used,
+@code{\context} block in the @code{\layout} or @code{\midi} blocks
+is used,
 
 @item
 otherwise the LilyPond built-in default is used.
@@ -1178,9 +1233,15 @@ The notes look like a slash, and have no stem,
 \override Stem.transparent = ##t
 @end example
 
-All these plug-ins have to cooperate, and this is achieved with a
-special plug-in, which must be marked with the keyword @code{\type}.
-This should always be @code{Engraver_group}.
+All these plug-ins have to communicate under the control of the
+context.  The mechanisms with which contexts communicate are
+established by declaring the context @code{\type}.  Within a
+@code{\layout} block, most contexts will be of type
+@code{Engraver_group}.  Some special contexts and contexts in
+@code{\midi} blocks use other context types.  Copying and
+modifying an existing context definition will also fill in the
+type.  Since this example creates a definition from scratch, it
+needs to be specified explicitly.
 
 @example
 \type "Engraver_group"
@@ -1249,6 +1310,10 @@ Then the output at the start of this subsection can be entered as
 @}
 @end example
 
+To complete this example, changes affecting the context hierarchy
+should be repeated in a @code{\midi} block so that Midi output
+depends on the same context relations.
+
 @seealso
 
 Internals Reference:
index 66be5908a99c326129cd73416e96141e3398c5aa..4c41302c4f273657cdba7d58c4e7d03494c6ee6d 100644 (file)
@@ -2836,11 +2836,10 @@ As synonyms for @code{\xNote}, @code{\xNotesOn} and @code{\xNotesOff},
 @code{\deadNote}, @code{\deadNotesOn} and @code{\deadNotesOff} can
 be used.  The term @notation{dead note} is commonly used by guitarists.
 
-There is also a shorthand for diamond shapes which can be used
-only inside chords:
+There is also a similar shorthand for diamond shapes:
 
 @lilypond[verbatim,quote,relative=2]
-<c f\harmonic>2 <d a'\harmonic>4 <c g'\harmonic>
+<c f\harmonic>2 <d a'\harmonic>4 <c g'\harmonic> f\harmonic
 @end lilypond
 
 @predefined
index ba0ea2ffb21269f5957481e7a7a80a6553196b26..70a6b50c6a27fd6ffc866e37aaa0d6ecd0f22b0f 100644 (file)
@@ -1022,6 +1022,17 @@ instrumentTwo = \relative c' {
 @end lilypond
 
 
+@subsubsubheading Using \partcombine with lyrics
+
+@cindex \partcombine and lyrics
+
+The @code{\partcombine} command is not designed to work with
+lyrics; if one of the voices is explicitly named in order to
+attach lyrics to it, the partcombiner will stop working.  However,
+this effect can be achieved using a @code{NullVoice} context.  See
+@ref{Polyphony with shared lyrics}.
+
+
 @snippets
 
 @lilypondfile[verbatim,quote,texidoc,doctitle]
@@ -1046,10 +1057,7 @@ Internals Reference:
 @rinternals{Voice}.
 
 @knownissues
-All @code{\partcombine@dots{}} functions can only accept two voices and are
-not designed to work with lyrics; such that when one of the voices is
-explicitly named in order to attach lyrics to it, the partcombiner will
-stop working.
+All @code{\partcombine@dots{}} functions can only accept two voices.
 
 @code{\partcombine@dots{}} functions cannot be placed inside a @code{\tuplet}
 or @code{\relative} block.
index 91eeefa4e82687acb6fb7b6f40a57b5c6c6e61e6..c85be8386969835c5bf0b318926fb03b07ca12db 100644 (file)
@@ -2722,16 +2722,17 @@ r2.
 c4_"Text"\pp % now they will collide
 @end lilypond
 
-The vertical padding between an outside-staff object and the
-previously-positioned grobs can be controlled with
-@code{outside-staff-padding}.
+The vertical padding around outside-staff objects
+can be controlled with @code{outside-staff-padding}.
 
 @lilypond[quote,ragged-right,relative=2,verbatim,staffsize=18]
 \once \override TextScript.outside-staff-padding = #0
-a'^"This text is placed very close to the note"
+a4-"outside-staff-padding = #0"
 \once \override TextScript.outside-staff-padding = #3
-c^"This text is padded away from the previous text"
-c^"This text is placed close to the previous text"
+d-"outside-staff-padding = #3"
+c-"default outside-staff-padding"
+b-"default outside-staff-padding"
+R1
 @end lilypond
 
 
index 98fb8b0191aef28a0c26aecd9fddc037d2c8e6bf..62aac77931fc2a33268c62ae90dfb67f065952d1 100644 (file)
@@ -283,9 +283,6 @@ c  c
 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
 {printing-marks-at-the-end-of-a-line.ly}
 
-@lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
-{aligning-marks-with-various-notation-objects.ly}
-
 @lilypondfile[verbatim,quote,ragged-right,texidoc,doctitle]
 {printing-marks-on-every-staff.ly}
 
index c91fe3253fc1948ea5e9614f09daf67ab62510e7..046c96e820c53da506aae13883734b2b32a5e234 100644 (file)
@@ -873,6 +873,7 @@ Internals Reference:
 * Placing syllables horizontally::
 * Lyrics and repeats::
 * Divisi lyrics::
+* Polyphony with shared lyrics::
 @end menu
 
 
@@ -1647,6 +1648,108 @@ passage is the proper construct to use, see section
 @emph{Temporary polyphonic passages} in @ref{Single-staff polyphony}.
 
 
+@node Polyphony with shared lyrics
+@unnumberedsubsubsec Polyphony with shared lyrics
+
+@cindex NullVoice
+@cindex polyphony, shared lyrics
+@cindex lyrics, shared among voices
+@cindex \partcombine and lyrics
+@funindex \partcombine
+
+When two voices with different rhythms share the same lyrics,
+aligning the lyrics to one of the voices may lead to problems in
+the other voice.  For example, the second lyric extender below is
+too short, since the lyrics are aligned only to the top voice:
+
+@lilypond[quote,verbatim]
+soprano = \relative { b'8( c d c) d2 }
+alto = \relative { g'2 b8( a g a) }
+words = \lyricmode { la __ la __ }
+
+\new Staff <<
+  \new Voice = "sopranoVoice" { \voiceOne \soprano }
+  \new Voice { \voiceTwo \alto }
+  \new Lyrics \lyricsto "sopranoVoice" \words
+>>
+@end lilypond
+
+To get the desired result, align the lyrics to a new
+@code{NullVoice} context containing a suitable combination of the
+two voices.  The notes of the @code{NullVoice} context do not
+appear on the printed page, but can be used to align the lyrics
+appropriately:
+
+@lilypond[quote,verbatim]
+soprano = \relative { b'8( c d c) d2 }
+alto = \relative { g'2 b8( a g a) }
+aligner = \relative { b'8( c d c) b( a g a) }
+words = \lyricmode { la __ la __ }
+
+\new Staff <<
+  \new Voice { \voiceOne \soprano }
+  \new Voice { \voiceTwo \alto }
+  \new NullVoice = "aligner" \aligner
+  \new Lyrics \lyricsto "aligner" \words
+>>
+@end lilypond
+
+The @code{NullVoice} context must be inside a @code{Staff}
+context, and should only contain notes that are already being
+displayed in that staff, and in the same octave.  Otherwise the
+@code{NullVoice} may interact with the printed voices in
+unexpected ways.  For example, arbitrary notes in the
+@code{NullVoice} may cause accidentals to appear (or disappear) on
+the staff.
+
+This method also can be used with the @code{\partcombine}
+function, which does not allow lyrics on its own:
+
+@lilypond[quote,verbatim]
+soprano = \relative { b'8( c d c) d2 }
+alto = \relative { g'2 b8( a g a) }
+aligner = \relative { b'8( c d c) b( a g a) }
+words = \lyricmode { la __ la __ }
+
+\new Staff <<
+  \new Voice \partcombine \soprano \alto
+  \new NullVoice = "aligner" \aligner
+  \new Lyrics \lyricsto "aligner" \words
+>>
+@end lilypond
+
+@noindent
+The @code{\partcombine} function is described in
+@ref{Automatic part combining}.
+
+Lastly, this method can be used even when the voices are in
+different staves, and is not limited to only two voices:
+
+@lilypond[quote,verbatim]
+soprano = \relative { b'8( c d c) d2 }
+altoOne = \relative { g'2 b8( a b4) }
+altoTwo = \relative { d'2 g4( fis8 g) }
+aligner = \relative { b'8( c d c) d( d d d) }
+words = \lyricmode { la __ la __ }
+
+\new ChoirStaff <<
+  \new Staff <<
+    \soprano
+    \new NullVoice = "aligner" \aligner
+  >>
+  \new Lyrics \lyricsto "aligner" \words
+  \new Staff \partcombine \altoOne \altoTwo
+>>
+@end lilypond
+
+However, note that in the second half of the measure above, the
+notes in the @code{NullVoice} context reflect the rhythm of the
+lower staff, but they do not deviate from the single pitch being
+displayed in the staff to which the @code{NullVoice} belongs.
+While not actually required in this particular example, it is a
+good idea in general to enter the notes in this way.
+
+
 @node Stanzas
 @subsection Stanzas
 
diff --git a/Documentation/snippets/aligning-marks-with-various-notation-objects.ly b/Documentation/snippets/aligning-marks-with-various-notation-objects.ly
deleted file mode 100644 (file)
index 223cc1d..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-%% DO NOT EDIT this file manually; it is automatically
-%% generated from LSR http://lsr.dsi.unimi.it
-%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
-%% and then run scripts/auxiliar/makelsr.py
-%%
-%% This file is in the public domain.
-\version "2.17.25"
-
-\header {
-  lsrtags = "text"
-
-  texidoc = "
-If specified, text marks may be aligned with notation objects other
-than bar lines.  These objects include @code{ambitus},
-@code{breathing-sign}, @code{clef}, @code{custos}, @code{staff-bar},
-@code{left-edge}, @code{key-cancellation}, @code{key-signature}, and
-@code{time-signature}.
-
-
-
-In such cases, text marks will be horizontally centered above the
-object. However this can be changed, as demonstrated on the second line
-of this example (in a score with multiple staves, this setting should
-be done for all the staves).
-
-
-
-"
-  doctitle = "Aligning marks with various notation objects"
-} % begin verbatim
-
-\relative c' {
-  e1
-
-  % the RehearsalMark will be centered above the Clef
-  \override Score.RehearsalMark.break-align-symbols = #'(clef)
-  \key a \major
-  \clef treble
-  \mark \markup { \char ##x2193 }
-  e1
-
-  % the RehearsalMark will be centered above the TimeSignature
-  \override Score.RehearsalMark.break-align-symbols = #'(time-signature)
-  \key a \major
-  \clef treble
-  \time 3/4
-  \mark \markup { \char ##x2193 }
-  e2.
-
-  % the RehearsalMark will be centered above the KeySignature
-  \override Score.RehearsalMark.break-align-symbols = #'(key-signature)
-  \key a \major
-  \clef treble
-  \time 4/4
-  \mark \markup { \char ##x2193 }
-  e1
-
-  \break
-  e1
-
-  % the RehearsalMark will be aligned with the left edge of the KeySignature
-  \once \override Score.KeySignature.break-align-anchor-alignment = #LEFT
-  \mark \markup { \char ##x2193 }
-  \key a \major
-  e1
-
-  % the RehearsalMark will be aligned with the right edge of the KeySignature
-  \once \override Score.KeySignature.break-align-anchor-alignment = #RIGHT
-  \key a \major
-  \mark \markup { \char ##x2193 }
-  e1
-
-  % the RehearsalMark will be aligned with the left edge of the KeySignature
-  % and then shifted right by one unit.
-  \once \override Score.KeySignature.break-align-anchor = #1
-  \key a \major
-  \mark \markup { \char ##x2193 }
-  e1
-}
index 9076d5318b76a21d8f81eee5cf7734d216017d80..e89b570d89d516fea4e4fbf2cfef7d89bfee7771 100644 (file)
@@ -1,7 +1,6 @@
 adding-the-current-date-to-a-score.ly
 adjusting-lyrics-vertical-spacing.ly
 aligning-and-centering-instrument-names.ly
-aligning-marks-with-various-notation-objects.ly
 aligning-objects-created-with-the--mark-command.ly
 aligning-syllables-with-melisma.ly
 blanking-staff-lines-using-the--whiteout-command.ly
index e7a1e80d6ebaf337259028aba699e75bbca3563f..6d8e73216b7c0e4b7bd9a8403f888622a5d9352b 100644 (file)
@@ -20,8 +20,8 @@
 The LilyPond input syntax is routinely changed to simplify it or improve
 it in different ways.  As a side effect of this, the LilyPond interpreter
 often is no longer compatible with older input files.  To remedy this,
-the program @command{convert-ly} can be used to deal with most of the
-syntax changes between LilyPond versions.
+the program @command{convert-ly} can be used for upgrading files
+to newer versions of LilyPond.
 
 @menu
 * Why does the syntax change?::
@@ -54,16 +54,40 @@ with existing scores)?  In this case, we decided to change the
 name to @code{print-all-headers}.  Fortunately, this change can be
 automated with our @command{convert-ly} tool.
 
-Unfortunately, @code{convert-ly} cannot handle all input changes.
+Unfortunately, @command{convert-ly} cannot handle all input changes.
 For example, in LilyPond 2.4 and earlier, accents and non-English
 letters were entered using LaTeX -- displaying the French word for
 Christmas was entered as @code{No\"el}.  But in LilyPond
 @c keep "-matching straight in fancy editors
 2.6 and above, the special @code{ë} must be entered directly into
-the LilyPond file as an UTF-8 character.  @code{convert-ly} cannot
+the LilyPond file as an UTF-8 character.  @command{convert-ly} cannot
 change all the LaTeX special characters into UTF-8 characters; you
 must manually update your old LilyPond input files.
 
+The conversion rules of @command{convert-ly} work using text pattern
+matching and replacement rather than a thorough understanding of
+LilyPond.  This has several consequences:
+@itemize @bullet
+@item
+The reliability of the conversion depends on the quality of each
+applied rule set and on the complexity of the respective change.
+Sometimes conversions may require manual fixes, so the old version
+should be kept available for comparison.
+@item
+Only conversions to newer formats are possible: there are no rule
+sets for downgrading.  So the main working copy of a LilyPond file
+should only be upgraded when older versions of LilyPond no longer
+need to be supported.  Version control systems such as Git might
+help with maintaining multiple versions.
+@item
+LilyPond and Scheme themselves are quite robust against creatively
+placed and omitted spaces, but the rules used by
+@command{convert-ly} tend to make some stylistic assumptions.
+Following the style used in the manuals is the safest bet for
+painless upgrades, particularly as the manuals themselves are
+upgraded using @command{convert-ly}.
+@end itemize
+
 
 @node Invoking convert-ly
 @section Invoking @command{convert-ly}
@@ -125,8 +149,10 @@ The following options can be given:
 
 @table @code
 @item -d,--diff-version-update
-update the @code{\version} to the latest or, if this is greater, do
-nothing.
+increase the @code{\version} string only if the file has actually
+been changed.  Without this option (or when any conversion has
+changed the file), the version header reflects the last considered
+conversion rule.
 
 @item -e,--edit
 Apply the conversions direct to the input file, modifying it
@@ -154,7 +180,8 @@ Show all known conversions and exit.
 
 @item -t, --to=@var{to-patchlevel}
 Explicitly set which @code{\version} to convert to, otherwise the
-default is the most current value.
+default is the most current value.  It must be higher than the
+starting version.
 
 @example
 convert-ly --to=2.14.1 myfile.ly
index 7f5f43c296ac948d14f98f3956270be48b9b370c..298cbb6cb524faa248e93e351a3602b8e5d9c63e 100644 (file)
@@ -9,9 +9,9 @@
 @c used for news about the upcoming release; see CG 10.2
 
 @newsItem
-@subsubheading LilyPond 2.17.25 released!  @emph{August 25, 2013}
+@subsubheading LilyPond 2.17.26 released!  @emph{September 8, 2013}
 
-We are happy to announce the release of LilyPond 2.17.25.  This
+We are happy to announce the release of LilyPond 2.17.26.  This
 release contains the usual number of bugfixes and enhancements, and contains
 some work in progress.  You will have access to the very latest features, but
 some may be incomplete, and you may encounter bugs and crashes.  If you require
index a156d904249e5e67f8bd6c9722658eb7f2cd7a82..d29081cf01593a851dce42a448e1a325814fbf9c 100644 (file)
@@ -26,6 +26,17 @@ NOTE:
   * don't duplicate entries from news-front.itexi
 @end ignore
 
+@newsItem
+@subsubheading LilyPond 2.17.25 released!  @emph{August 25, 2013}
+
+We are happy to announce the release of LilyPond 2.17.25.  This
+release contains the usual number of bugfixes and enhancements, and contains
+some work in progress.  You will have access to the very latest features, but
+some may be incomplete, and you may encounter bugs and crashes.  If you require
+a stable version of Lilypond, we recommend using the 2.16 version.
+
+@newsEnd
+
 @newsItem
 @subsubheading LilyPond 2.17.24 released!  @emph{August 11, 2013}
 
diff --git a/VERSION b/VERSION
index 6d441f9290f39493f1ca1798980643f17b62c0af..3aa1a38adfdcc7e974b990e26c4fe5e6f15cbbfd 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=17
-PATCH_LEVEL=26
+PATCH_LEVEL=27
 MY_PATCH_LEVEL=
 VERSION_STABLE=2.16.2
-VERSION_DEVEL=2.17.25
+VERSION_DEVEL=2.17.26
index 03920c34c059c7ba0a805060d860f6017640c128..984ecbce1d0f6389601d34913b5c02412a3002e3 100644 (file)
@@ -55,45 +55,52 @@ AC_SUBST(LINK_GXX_STATICALLY)
 STEPMAKE_COMPILE
 
 AC_CHECK_PROG(FCLIST, fc-list, fc-list)
-AC_MSG_CHECKING([New Century Schoolbook PFB files])
+AC_MSG_CHECKING([for New Century Schoolbook PFB files])
 AC_SUBST(NCSB_SOURCE_FILES)
 AC_SUBST(NCSB_DIR)
-UNCHECKED_NCSB_SOURCE_FILES=""
-if test "$NCSB_DIR" != "" ;  then
-  for f in c059013l c059016l c059033l c059036l; do
-    if test ! -f "$NCSB_DIR/$f.pfb"; then
-      STEPMAKE_WARN($NCSB_DIR does not contain $f.pfb.)
-    else
-      UNCHECKED_NCSB_SOURCE_FILES="$NCSB_DIR/$f.pfb $UNCHECKED_NCSB_SOURCE_FILES"
-    fi
-  done
-else
+if test "$NCSB_DIR" = ""; then
   if test "$FCLIST" != ""; then
-    for style in Roman Italic "Bold Italic" Bold; do
-      NCSB_FILE=`$FCLIST "Century Schoolbook L:style=$style:foundry=urw:fontformat=Type 1" file \
-                | head -n 1`
+    NCSB_FILE=`$FCLIST "Century Schoolbook L:foundry=urw:fontformat=Type 1:lang=ru" file \
+              | head -n 1`
+    if test "$NCSB_FILE" != ""; then
       NCSB_FILE=`echo $NCSB_FILE | sed 's/\(:.*\)$//g'`
       NCSB_FILE=`$PYTHON "$srcdir/scripts/auxiliar/readlink.py" $NCSB_FILE`
-      UNCHECKED_NCSB_SOURCE_FILES="$NCSB_FILE $UNCHECKED_NCSB_SOURCE_FILES"
-    done
-    NCSB_DIR=`AS_DIRNAME($NCSB_FILE)`
-  else
-    AC_MSG_RESULT(not found)
-    echo "Can't find Century Schoolbook files. Install FontConfig's fc-list,"
-    echo "or use --with-ncsb-dir"
-    STEPMAKE_ADD_ENTRY(REQUIRED,International New Century Schoolbook fonts)
+      NCSB_DIR=`AS_DIRNAME($NCSB_FILE)`
+    fi
   fi
 fi
-NCSB_SOURCE_FILES=""
-for f in $UNCHECKED_NCSB_SOURCE_FILES; do
-  if test "`grep Cyrillic "$f"`" = ""; then
-    STEPMAKE_WARN($f does not have Cyrillic characters.)
-    STEPMAKE_ADD_ENTRY(REQUIRED,International New Century Schoolbook fonts)
-  else
-    NCSB_SOURCE_FILES="$f $NCSB_SOURCE_FILES"
+if test "$NCSB_DIR" != "" ;  then
+  for f in c059013l.pfb c059016l.pfb c059033l.pfb c059036l.pfb; do
+    if test ! -f "$NCSB_DIR/$f"; then
+      MISSING_NCSB_SOURCE_FILES="$f $MISSING_NCSB_SOURCE_FILES"
+    else
+      if test "`grep Cyrillic "$NCSB_DIR/$f"`" = ""; then
+        INCOMPLETE_NCSB_SOURCE_FILES="$f $INCOMPLETE_NCSB_SOURCE_FILES"
+      else
+        NCSB_SOURCE_FILES="$NCSB_DIR/$f $NCSB_SOURCE_FILES"
+      fi
+    fi
+  done
+fi
+if test "$NCSB_DIR" = "" -o "$MISSING_NCSB_SOURCE_FILES" != "$INCOMPLETE_NCSB_SOURCE_FILES"; then
+  AC_MSG_RESULT(no)
+  STEPMAKE_ADD_ENTRY(REQUIRED,International New Century Schoolbook fonts)
+  if test "$NCSB_DIR" = ""; then
+    if test "$FCLIST" = ""; then
+      STEPMAKE_ADD_ENTRY(REQUIRED,'(install the fc-list utility from FontConfig, or use --with-ncsb-dir)')
+    else
+      STEPMAKE_ADD_ENTRY(REQUIRED,'(make sure the fc-list utility can see them, or use --with-ncsb-dir)')
+    fi
   fi
-done
-AC_MSG_RESULT($NCSB_SOURCE_FILES)
+  if test "$MISSING_NCSB_SOURCE_FILES" != ""; then
+    STEPMAKE_ADD_ENTRY(REQUIRED,'(these files are missing: $MISSING_NCSB_SOURCE_FILES)')
+  fi
+  if test "$INCOMPLETE_NCSB_SOURCE_FILES" != ""; then
+    STEPMAKE_ADD_ENTRY(REQUIRED,'(these files do not contain Cyrillic characters: $INCOMPLETE_NCSB_SOURCE_FILES)')
+  fi
+else
+  AC_MSG_RESULT(yes)
+fi
 
 AC_LANG([C++])
 
index c24c0731e4f237bccba2ac3dd1d0b8b450210a19..1746c2c28d84adc5cbe8cd19f5e8d431dec10383 100644 (file)
@@ -51,7 +51,7 @@ using namespace std;
 
 #ifdef __CYGWIN__
 static string
-dos_to_posix (string file_name)
+dos_to_posix (const string &file_name)
 {
   char buf[PATH_MAX] = "";
   char s[PATH_MAX] = {0};
@@ -78,7 +78,7 @@ slashify (string file_name)
 }
 
 string
-dir_name (string const file_name)
+dir_name (const string &file_name)
 {
   string s = file_name;
   s = slashify (s);
index d0dd3a1f990afd846dc1dc73ed0a06485aa80024..b19732d15ee43050025792b2098a0b229baee662 100644 (file)
@@ -47,13 +47,13 @@ File_path::directories () const
 
 #include <algorithm>
 void
-File_path::parse_path (string p)
+File_path::parse_path (const string &p)
 {
   concat (dirs_, string_split (p, PATHSEP));
 }
 
 bool
-is_file (string file_name)
+is_file (const string &file_name)
 {
 #if !STAT_MACROS_BROKEN
   struct stat sbuf;
@@ -106,7 +106,7 @@ directory, in this order.
 The file name if found, or empty string if not found. */
 
 string
-File_path::find (string name) const
+File_path::find (const string &name) const
 {
   if (!name.length () || (name == "-"))
     return name;
@@ -146,7 +146,7 @@ File_path::find (string name) const
   where EXT is from EXTENSIONS.
 */
 string
-File_path::find (string name, char const *extensions[])
+File_path::find (const string &name, char const *extensions[])
 {
   if (name.empty () || name == "-")
     return name;
@@ -195,13 +195,13 @@ File_path::to_string () const
 }
 
 void
-File_path::append (string str)
+File_path::append (const string &str)
 {
   dirs_.push_back (str);
 }
 
 void
-File_path::prepend (string str)
+File_path::prepend (const string &str)
 {
   dirs_.insert (dirs_.begin (), str);
 }
index b30dd9cd5b6d8f89ccb1e586a5ca3f3a8e595d1c..4822783fc6b956241c363cbbb0521008234221a6 100644 (file)
@@ -23,7 +23,7 @@
 #include "std-vector.hh"
 #include "std-string.hh"
 
-std::string dir_name (std::string file_name);
+std::string dir_name (const std::string &file_name);
 std::string get_working_directory ();
 
 class File_name
index 29ca17f24638a81dd3f4cf988ac5c7c21d5748af..8c8049391d9b5e1c1834643752b5818cf776c329 100644 (file)
@@ -38,16 +38,16 @@ class File_path
 
 public:
   vector<string> directories () const;
-  string find (string name) const;
-  string find (string name, char const *extensions[]);
+  string find (const string &name) const;
+  string find (const string &name, char const *extensions[]);
   string to_string () const;
   bool try_append (string str);
-  void append (string str);
-  void parse_path (string);
-  void prepend (string str);
+  void append (const string&);
+  void parse_path (const string&);
+  void prepend (const string&);
 };
 
-bool is_file (string file_name);
+bool is_file (const string &file_name);
 bool is_dir (string file_name);
 
 #endif /* FILE_PATH */
index 6dd46c28e96b429be9ddf40d8fd4b1d3c8525ed7..5797a293f73d29bee72be298877acb5c9064008d 100644 (file)
@@ -43,7 +43,7 @@ string _ (char const *ch);
 */
 string _f (char const *format, ...)
 __attribute__ ((format (printf, 1, 2)));
-string _f (char const *format, string s, string s2 = "", string s3 = "");
+string _f (char const *format, const string &s, const string &s2 = "", const string &s3 = "");
 /**
    va_list version of _f
  */
index 5b7d2af11dac0363dfaa985cf6c1819920106c68..6b6e8ef9728ea7ab815b4b3ac1c03804d5eb0819 100644 (file)
@@ -39,7 +39,7 @@ using namespace std;
 typedef size_t ssize;
 #define NPOS string::npos
 
-string to_string (string s);
+string to_string (const string&);
 string to_string (char c, int n = 1);
 string to_string (int i, char const *format = 0);
 string to_string (double f, char const *format = 0);
@@ -53,7 +53,7 @@ __attribute__ ((format (printf, 1, 2)));
 
 string &replace_all (string *str, string const &find, string const &replace);
 string &replace_all (string *str, char find, char replace);
-char *string_copy (string s);
+char *string_copy (const string &s);
 
 int string_compare (string const &, string const &);
 
index dd276df1861c3696c8a54825dca76250afbb65ba..e7f29a8fcbb05065e0157f7c60c586b4e2309823 100644 (file)
@@ -258,7 +258,7 @@ junk_pointers (vector<T> &v)
 }
 
 vector<string> string_split (string str, char c);
-string string_join (vector<string> const &strs, string infix);
+string string_join (vector<string> const &strs, const string &infix);
 
 #define iterof(i,s) typeof((s).begin()) i((s).begin())
 
index 148005672ec78698c41ba2bf856b41947e69e254..6b4fba023f4f1ebb23efec44ecf006d471b2c9db 100644 (file)
@@ -19,23 +19,19 @@ class String_convert
   static int hex2nibble (Byte byte);
   static Byte nibble2hex_byte (Byte byte);
 public:
-  static string pad_to (string s, size_t length);
+  static string pad_to (const string &s, size_t length);
   static string bool_string (bool b);
-  static string bin2dec (string bin_string);
   static string bin2hex (Byte bin_char);
-  static string bin2hex (string bin_string);
-  static string dec2bin (string str);
-  static int bin2int (string bin_string);
-  static unsigned bin2unsigned (string bin_string);
+  static string bin2hex (const string &bin_string);
+  static int bin2int (const string &bin_string);
+  static unsigned bin2unsigned (const string &bin_string);
   static string char_string (char c, int n);
-  static int dec2int (string dec_string);
-  static double dec2double (string dec_string);
+  static int dec2int (const string &dec_string);
+  static double dec2double (const string &dec_string);
   static string double_string (double f, char const *fmt = 0);
   static string form_string (char const *format, ...) __attribute__ ((format (printf, 1, 2)));
   static string vform_string (char const *format, va_list args);
-  static int hex2int (string str);
-  static unsigned hex2unsigned (string str);
-  static string hex2bin (string str);
+  static string hex2bin (const string &str);
   static string int_string (int i, char const *fmt = 0);
   static string unsigned_string (unsigned);
   static string unsigned_long_string (unsigned long);
@@ -46,7 +42,6 @@ public:
   static string rational_string (Rational);
   static string pointer_string (void const *);
   static string precision_string (double x, int n);
-  //  static vector<string> split (string str, char c);
   static string i64_string (I64, char const *fmt = 0);
   static string to_lower (string s);
   static string to_upper (string s);
index 25240113ca2243e459839d7689db25b60c742206..333e95a94e5feece710e71a0a1470603bec63992 100644 (file)
@@ -44,25 +44,25 @@ extern int loglevel;
 extern bool warning_as_error;
 
 /* output messages, in decreasing order of importance */
-void error (string s, string location = ""); // Fatal error, exits lilypond!
-void programming_error (string s, string location = "");
-void non_fatal_error (string, string location = "");
-void warning (string s, string location = "");
-void basic_progress (string s, string location = "");
+void error (string s, const string &location = ""); // Fatal error, exits lilypond!
+void programming_error (const string &s, const string &location = "");
+void non_fatal_error (const string&, const string &location = "");
+void warning (const string &s, const string &location = "");
+void basic_progress (const string &s, const string &location = "");
 /* progress_indication does by default *NOT* start on a new line */
-void progress_indication (string s, bool newline = false, string location = "");
-void message (string s, bool newline = true, string location = "");
-void debug_output (string s, bool newline = true, string location = "");
+void progress_indication (const string &s, bool newline = false, const string &location = "");
+void message (const string &s, bool newline = true, const string &location = "");
+void debug_output (const string &s, bool newline = true, const string &location = "");
 
 /* Helper functions that always print out the message. Callers should ensure
    that the loglevel is obeyed */
-void print_message (int level, string location, string s, bool newline = true);
+void print_message (int level, const string &location, string s, bool newline = true);
 
 bool is_loglevel (int level);
 void set_loglevel (int level);
 void set_loglevel (string level);
 
-void expect_warning (string msg);
+void expect_warning (const string &msg);
 void check_expected_warnings ();
 
 #endif /* WARN_HH */
index cbdcf58d6e9bf80abcb2c3951eabfe9c74be2ea7..2e6a09df9fcaf1456097c0d601a3f06cae34018c 100644 (file)
@@ -55,7 +55,7 @@ v_f (char const *format, va_list args)
 }
 
 string
-_f (char const *format, string s, string s2, string s3)
+_f (char const *format, const string &s, const string &s2, const string &s3)
 {
   return String_convert::form_string (gettext (format), s.c_str (), s2.c_str (),
                                       s3.c_str ());
index d2c2d624d2981893ce9ac21879d450015f2364d9..7dc9d47311446f649db2f8d550b7d0ed40801419 100644 (file)
@@ -21,7 +21,7 @@
 #include "string-convert.hh"
 
 string
-to_string (string s)
+to_string (const string &s)
 {
   return s;
 }
@@ -106,7 +106,7 @@ replace_all (string *str, char find, char replace)
 }
 
 char *
-string_copy (string s)
+string_copy (const string &s)
 {
   ssize len = s.length ();
   char *dest = new char[len + 1];
@@ -144,7 +144,7 @@ string_split (string str, char c)
 }
 
 string
-string_join (vector<string> const &strs, string infix)
+string_join (vector<string> const &strs, const string &infix)
 {
   string result;
   for (vsize i = 0; i < strs.size (); i++)
index 68e6a0c0b82b199c9a499cf0e00c4d75a65dc12a..eebcd92708076919e17f874ddab85e8b28474270 100644 (file)
@@ -43,7 +43,7 @@ String_convert::bin2hex (Byte bin_char)
 }
 
 string
-String_convert::bin2hex (string bin_string)
+String_convert::bin2hex (const string &bin_string)
 {
   string str;
   Byte const *byte = (Byte const *)bin_string.data ();
@@ -56,13 +56,13 @@ String_convert::bin2hex (string bin_string)
 }
 
 int
-String_convert::bin2int (string bin_string)
+String_convert::bin2int (const string &bin_string)
 {
   return bin2unsigned (bin_string);
 }
 
 unsigned
-String_convert::bin2unsigned (string bin_string)
+String_convert::bin2unsigned (const string &bin_string)
 {
   assert (bin_string.length () <= (int)sizeof (unsigned));
 
@@ -76,7 +76,7 @@ String_convert::bin2unsigned (string bin_string)
 }
 
 int
-String_convert::dec2int (string dec_string)
+String_convert::dec2int (const string &dec_string)
 {
   if (!dec_string.length ())
     return 0;
@@ -100,7 +100,7 @@ String_convert::i64_string (I64 i64, char const *fmt)
 }
 // breendet imp from string
 double
-String_convert::dec2double (string dec_string)
+String_convert::dec2double (const string &dec_string)
 {
   if (!dec_string.length ())
     return 0;
@@ -134,7 +134,7 @@ String_convert::hex2bin (string hex_string, string &bin_string_r)
 }
 
 string
-String_convert::hex2bin (string hex_string)
+String_convert::hex2bin (const string &hex_string)
 {
   string str;
 
@@ -352,7 +352,7 @@ String_convert::unsigned_long_string (unsigned long ul)
 }
 
 string
-String_convert::pad_to (string s, size_t n)
+String_convert::pad_to (const string &s, size_t n)
 {
   return s + string (max (int (n - s.length ()), 0), ' ');
 }
@@ -360,13 +360,13 @@ String_convert::pad_to (string s, size_t n)
 string
 String_convert::to_upper (string s)
 {
-  return strnupr ((char *)s.c_str (), s.length ());
+  return strnupr (const_cast<char*>(s.c_str ()), s.length ());
 }
 
 string
 String_convert::to_lower (string s)
 {
-  return strnlwr ((char *)s.c_str (), s.length ());
+  return strnlwr (const_cast<char*>(s.c_str ()), s.length ());
 }
 
 string
index f3f6e1c74369e8f92d0b4a9a849ac9889548ed5a..52e2a425086ed1b42a3eeecd40d0d306f37ee779 100644 (file)
@@ -99,7 +99,7 @@ set_loglevel (string level)
  * expected warnings again.
  */
 vector<string> expected_warnings;
-void expect_warning (string msg)
+void expect_warning (const string &msg)
 {
   expected_warnings.push_back (msg);
 }
@@ -119,7 +119,7 @@ void check_expected_warnings ()
   expected_warnings.clear ();
 }
 
-bool is_expected (string s)
+bool is_expected (const string &s)
 {
   bool expected = false;
   for (vsize i = 0; i < expected_warnings.size (); i++)
@@ -151,7 +151,7 @@ static bool message_newline = true;
    if newline is true, start the message on a new line.
 */
 void
-print_message (int level, string location, string s, bool newline)
+print_message (int level, const string &location, string s, bool newline)
 {
   /* Only print the message if the current loglevel allows it: */
   if (!is_loglevel (level))
@@ -178,7 +178,7 @@ print_message (int level, string location, string s, bool newline)
 
 /* Display a fatal error message.  Also exits lilypond.  */
 void
-error (string s, string location)
+error (string s, const string &location)
 {
   print_message (LOG_ERROR, location, _f ("fatal error: %s", s) + "\n");
   exit (1);
@@ -186,7 +186,7 @@ error (string s, string location)
 
 /* Display a severe programming error message, but don't exit.  */
 void
-programming_error (string s, string location)
+programming_error (const string &s, const string &location)
 {
   if (is_expected (s))
     print_message (LOG_DEBUG, location, _f ("suppressed programming error: %s", s) + "\n");
@@ -201,7 +201,7 @@ programming_error (string s, string location)
 
 /* Display a non-fatal error message, don't exit.  */
 void
-non_fatal_error (string s, string location)
+non_fatal_error (const string &s, const string &location)
 {
   if (is_expected (s))
     print_message (LOG_DEBUG, location, _f ("suppressed error: %s", s) + "\n");
@@ -213,7 +213,7 @@ non_fatal_error (string s, string location)
 
 /* Display a warning message. */
 void
-warning (string s, string location)
+warning (const string &s, const string &location)
 {
   if (is_expected (s))
     print_message (LOG_DEBUG, location, _f ("suppressed warning: %s", s) + "\n");
@@ -225,21 +225,21 @@ warning (string s, string location)
 
 /* Display a success message.  */
 void
-basic_progress (string s, string location)
+basic_progress (const string &s, const string &location)
 {
   print_message (LOG_BASIC, location, s + "\n", true);
 }
 
 /* Display information about the progress.  */
 void
-progress_indication (string s, bool newline, string location)
+progress_indication (const string &s, bool newline, const string &location)
 {
   print_message (LOG_PROGRESS, location, s, newline);
 }
 
 /* Display a single info message.  */
 void
-message (string s, bool newline, string location)
+message (const string &s, bool newline, const string &location)
 {
   // Use the progress loglevel for all normal messages (including progress msg)
   print_message (LOG_INFO, location, s, newline);
@@ -247,7 +247,7 @@ message (string s, bool newline, string location)
 
 /* Display a debug information, not necessarily on a new line.  */
 void
-debug_output (string s, bool newline, string location)
+debug_output (const string &s, bool newline, const string &location)
 {
   print_message (LOG_DEBUG, location, s, newline);
 }
index 106b956eb93059e4c623b65f554bc3b5d2a6fe50..65848e4507f2af14fb47415dcab64dcd6c2c1182 100644 (file)
@@ -2,7 +2,9 @@
 
 \header {
   texidoc = "The gaps between an @code{AmbitusLine} and its
-note heads are set by the @code{gap} property."
+note heads are set by the @code{gap} property. By default,
+@code{gap} is a function that reduces the gap for small intervals
+(e.g. a fourth), so that the line remains visible."
 }
 
 \layout {
@@ -18,3 +20,9 @@ note heads are set by the @code{gap} property."
   c'4 g''
 }
 
+\new Staff <<
+  \time 2/4
+  { d'' g'' }
+  \\
+  { c' g' }
+>>
index 932e64acd7f26eb5b84a68d662feb8913b8f8605..a39a61ca797f0c6c6567ce9903dc4525dff00862 100644 (file)
@@ -15,7 +15,9 @@
 \version "2.17.6"
 
 \relative c' {
-  c4 -\parenthesize -.
+  c2 -\parenthesize -.
+
+  \parenthesize \breathe
 
   \override ParenthesesItem.padding = #0.1
   <d \parenthesize fis a> 
diff --git a/input/regression/part-combine-mmrest-apart.ly b/input/regression/part-combine-mmrest-apart.ly
new file mode 100644 (file)
index 0000000..9fae671
--- /dev/null
@@ -0,0 +1,35 @@
+\version "2.17.6"
+
+\header {
+  texidoc = "
+The positioning of multimeasure rests in @code{\\partcombineApart}
+passages corresponds with @code{\\voiceOne} and @code{\\voiceTwo} even
+when using non-standard staves.
+"
+}
+
+\layout {
+  indent = 4\cm
+  raggedright = ##t
+}
+
+\new StaffGroup
+<<
+  \new Staff \with
+    { \override StaffSymbol.line-count = #4
+      instrumentName = \markup \typewriter "\\partcombine"
+    }
+  {
+    \partcombine  { R1^"R1" r1^"r1"  \time 2/4 R2^"R2" r2^"r2" }
+    { \partcombineApart R1 r1 \time 2/4 R2 r2 }
+    
+  }
+  \new Staff \with
+    { \override StaffSymbol.line-count = #4
+      instrumentName = \markup \typewriter "<< ... \\\\ ... >>"
+    }
+  <<
+    { R1 r1 \time 2/4 R2 r2 } \\
+    { R1 r1 \time 2/4 R2 r2 }
+  >>
+>>
index a32818cb6eb30aa5baa9624f0eed0ff636a2e408..3657bc274d2be64891ca3219f8d091ee9b7f3964 100644 (file)
@@ -1,13 +1,23 @@
-\version "2.16.0"
+\version "2.17.21"
 
 \header {
-  texidoc = "By default, @code{TextScript} vertical skylines allow
-for stack @code{TextScript} grobs to fit snugly over each other instead
-of moving the entire distance of the bounding box.
-"
+  texidoc = "@code{TextScript}s are spaced closely, following outlines of
+the stencil.  When markup commands like @code{pad-around} and
+@code{with-dimensions} change the extent of a stencil, these changed
+extents have effect in the stencil outline used to place the resulting
+@code{TextScript}."
 }
 
-\relative c' {
-  a^\markup { \filled-box #'(0 . 2) #'(0 . 20) #0 hello}
-  a^\markup { world }
-}
\ No newline at end of file
+{
+  g'2^\markup { g \line {. . . .} }
+  e'^\markup { e }
+
+  g'2^\markup { g \transparent \line {. . . .} }
+  e'^\markup { e }
+
+  g'2^\markup { g \pad-around #0.5 \line{. . . .} }
+  e'^\markup { e }
+
+  g'2^\markup { g \with-dimensions #'(-0 . 0) #'(-0 . 0) \line {. . . .} }
+  e'^\markup { e }
+}
index b7a41c0266fdb07a7b1933d76d736ce7aa1665a1..da23e5719498bfbc97222d4bc90890a2207ccaae 100644 (file)
@@ -398,7 +398,8 @@ position_apes (Grob *me,
     {
       Accidental_placement_entry *ape = apes[i];
 
-      Real offset = -ape->horizontal_skylines_[RIGHT].distance (left_skyline);
+      Real offset = -ape->horizontal_skylines_[RIGHT]
+                    .distance (left_skyline, 0.1);
       if (isinf (offset))
         offset = last_offset;
       else
index 36ede54bb45236d4307738ac355aecf4a1b7e81f..cf0d4e90860d79d8268fdd463ed4bf717a3953d9 100644 (file)
@@ -28,7 +28,7 @@
 #include "warn.hh"
 
 Index_to_charcode_map const *
-All_font_metrics::get_index_to_charcode_map (string filename,
+All_font_metrics::get_index_to_charcode_map (const string &filename,
                                              int face_index,
                                              FT_Face face)
 {
@@ -40,7 +40,7 @@ All_font_metrics::get_index_to_charcode_map (string filename,
   return &filename_charcode_maps_map_[key];
 }
 
-All_font_metrics::All_font_metrics (string path)
+All_font_metrics::All_font_metrics (const string &path)
 {
   otf_dict_ = new Scheme_hash_table;
 
@@ -109,7 +109,7 @@ All_font_metrics::find_pango_font (PangoFontDescription const *description,
 #endif
 
 Open_type_font *
-All_font_metrics::find_otf (string name)
+All_font_metrics::find_otf (const string &name)
 {
   SCM sname = ly_symbol2scm (name.c_str ());
   SCM val;
@@ -140,7 +140,7 @@ All_font_metrics::find_otf (string name)
 }
 
 Font_metric *
-All_font_metrics::find_font (string name)
+All_font_metrics::find_font (const string &name)
 {
   Font_metric *f = find_otf (name);
 
index 895439e78401bbbb118a0c227eaaa592e457855a..b7a5ef21112c5decf3189fb48238dd85399a3ad7 100644 (file)
@@ -198,7 +198,7 @@ Audio_time_signature::Audio_time_signature (int beats, int one_beat)
   one_beat_ = one_beat;
 }
 
-Audio_text::Audio_text (Audio_text::Type type, string text_string)
+Audio_text::Audio_text (Audio_text::Type type, const string &text_string)
 {
   text_string_ = text_string;
   type_ = type;
index b52fb16bb4b8dc80fcc4526cec1c7c2785a5459a..1efa379e9d2cc2194e57c97756a7e932ad0466c3 100644 (file)
@@ -38,7 +38,7 @@ protected:
 private:
   SCM split_list_;
   Direction where_dir_;
-  void change_to (Music_iterator *, SCM, string);
+  void change_to (Music_iterator *, SCM, const string&);
   Moment start_moment_;
 
   Context_handle up_;
@@ -47,7 +47,7 @@ private:
 
 void
 Auto_change_iterator::change_to (Music_iterator *it, SCM to_type_sym,
-                                 string to_id)
+                                 const string &to_id)
 {
   Context *current = it->get_outlet ();
   Context *last = 0;
index 7579ed8c1a3a93cebf9977df14b0d0dc237638a2..d4d3d4102210a5896ddcd09886186beda7465294 100644 (file)
@@ -485,7 +485,7 @@ Axis_group_interface::calc_pure_relevant_grobs (SCM smob)
 }
 
 SCM
-Axis_group_interface::internal_calc_pure_relevant_grobs (Grob *me, string grob_set_name)
+Axis_group_interface::internal_calc_pure_relevant_grobs (Grob *me, const string &grob_set_name)
 {
   extract_grob_set (me, grob_set_name.c_str (), elts);
 
@@ -672,8 +672,8 @@ avoid_outside_staff_collisions (Grob *elt,
   for (vsize j = 0; j < other_v_skylines.size (); j++)
     {
       Skyline_pair const &v_other = other_v_skylines[j];
-      Real pad = (padding + other_padding[j]);
-      Real horizon_pad = (horizon_padding + other_horizon_padding[j]);
+      Real pad = max (padding, other_padding[j]);
+      Real horizon_pad = max (horizon_padding, other_horizon_padding[j]);
 
       // We need to push elt up by at least this much to be above v_other.
       Real up = (*v_skyline)[DOWN].distance (v_other[UP], horizon_pad) + pad;
@@ -762,7 +762,9 @@ add_grobs_of_one_priority (Grob *me,
         {
           Grob *elt = elements[i];
           Real padding
-            = robust_scm2double (elt->get_property ("outside-staff-padding"), 0.25);
+            = robust_scm2double (elt->get_property ("outside-staff-padding"),
+                                 Axis_group_interface
+                                 ::get_default_outside_staff_padding ());
           Real horizon_padding
             = robust_scm2double (elt->get_property ("outside-staff-horizontal-padding"), 0.0);
           Interval x_extent = elt->extent (x_common, X_AXIS);
index c2abb8cd85b05a7df84a85ad66bb1f595303a992..cf217be3b08efbb2baa9e5b949d361f9c38f00a6 100644 (file)
@@ -33,7 +33,6 @@ class Bar_engraver : public Engraver
 {
 public:
   TRANSLATOR_DECLARATIONS (Bar_engraver);
-  void request_bar (string type_string);
 
 protected:
   void stop_translation_timestep ();
index 0adac3b8b3808d424847b345cba9a706a1174ca1..aa505f9fe104f83eee797770447e15fa10fc08c9 100644 (file)
@@ -26,7 +26,7 @@
 #include "warn.hh"
 
 void
-Change_iterator::error (string reason)
+Change_iterator::error (const string &reason)
 {
   string to_type = ly_symbol2string (get_music ()->get_property ("change-to-type"));
   string to_id = ly_scm2string (get_music ()->get_property ("change-to-id"));
index 583b2eac89b7705762fb32968e310c6fb7e202ac..8d44ca8f85c67d43c4ee5ab596839e2cd40e37cf 100644 (file)
@@ -105,7 +105,7 @@ Context::Context ()
 
 /* TODO:  this shares code with find_create_context ().  */
 Context *
-Context::create_unique_context (SCM name, string id, SCM operations)
+Context::create_unique_context (SCM name, const string &id, SCM operations)
 {
   /*
     Don't create multiple score contexts.
@@ -154,7 +154,7 @@ Context::create_unique_context (SCM name, string id, SCM operations)
 }
 
 Context *
-Context::find_create_context (SCM n, string id, SCM operations)
+Context::find_create_context (SCM n, const string &id, SCM operations)
 {
   /*
     Don't create multiple score contexts.
@@ -361,7 +361,7 @@ Context::path_to_acceptable_context (SCM name) const
 
 Context *
 Context::create_context (Context_def *cdef,
-                         string id,
+                         const string &id,
                          SCM ops)
 {
   infant_event_ = 0;
@@ -411,7 +411,7 @@ Context::is_bottom_context () const
 }
 
 Context *
-Context::get_default_interpreter (string context_id)
+Context::get_default_interpreter (const string &context_id)
 {
   if (!is_bottom_context ())
     {
@@ -572,7 +572,7 @@ Context::disconnect_from_parent ()
 */
 Context *
 find_context_below (Context *where,
-                    SCM type, string id)
+                    SCM type, const string &id)
 {
   if (where->is_alias (type))
     {
index 84f8044b4728a45b5248c43b7663cb3f9d2e3f78..9b0d676870d5d08d6074e2a3d2c6090657b5a7b0 100644 (file)
@@ -13,7 +13,7 @@ class Control_track_performer : public Performer
 {
   Audio_staff *control_track_;
 
-  void add_text (Audio_text::Type, string);
+  void add_text (Audio_text::Type, const string&);
   TRANSLATOR_DECLARATIONS (Control_track_performer);
 protected:
 
@@ -40,7 +40,7 @@ Control_track_performer::acknowledge_audio_element (Audio_element_info info)
 }
 
 void
-Control_track_performer::add_text (Audio_text::Type text_type, string str)
+Control_track_performer::add_text (Audio_text::Type text_type, const string &str)
 {
   Audio_item *text = new Audio_text (text_type, str);
   control_track_->add_audio_item (text);
index 96be62c9a2985bc8822420f9338cb7b2af1cf914..b124fda9b154d3f00195867223faf9e2c5d8e0b0 100644 (file)
@@ -26,10 +26,10 @@ using namespace std;
 map<string, string> file_name_map_global;
 
 string
-map_file_name (string s)
+map_file_name (const string &s)
 {
   if (file_name_map_global.find (s) != file_name_map_global.end ())
-    s = file_name_map_global[s];
+    return file_name_map_global[s];
   return s;
 }
 
index 6990afe5476f31fd9f04c845165f2c2719fdc624..892319f3b837668bf404d350605e285aa67e13f5 100644 (file)
@@ -84,12 +84,6 @@ Font_metric::get_indexed_char_dimensions (size_t) const
   return Box (Interval (0, 0), Interval (0, 0));
 }
 
-size_t
-Font_metric::name_to_index (string) const
-{
-  return (size_t) - 1;
-}
-
 Offset
 Font_metric::get_indexed_wxwy (size_t) const
 {
@@ -145,7 +139,7 @@ Font_metric::index_to_charcode (size_t i) const
 }
 
 Offset
-Font_metric::attachment_point (string) const
+Font_metric::attachment_point (const string&) const
 {
   return Offset (0, 0);
 }
@@ -158,7 +152,7 @@ Font_metric::sub_fonts () const
 
 Stencil
 Font_metric::text_stencil (Output_def *state,
-                           string, bool) const
+                           const string&, bool) const
 {
   (void) state;
 
index d7a5c28687fe684c4e73e3f5ff38b1c9d3cd8833..d7d4843ce8be17504b0e132b1fbfde45d71b04d1 100644 (file)
@@ -112,7 +112,7 @@ ly_FT_get_glyph_outline (FT_Face const &face, size_t signed_idx)
   SCM out = SCM_EOL;
   Offset lastpos;
   Offset firstpos;
-  ssize j = 0;
+  int j = 0;
   while (j < outline->n_points)
     {
       if (j == 0)
index b1384076b1ed2dc8f7a726beaeaa46753ac71dcc..ec2355733387d435b561392f50cf9e0637d515a8 100644 (file)
@@ -27,7 +27,7 @@ using namespace std;
 static SCM doc_hash_table;
 
 void
-ly_check_name (string cxx, string scm_name)
+ly_check_name (const string &cxx, const string &scm_name)
 {
   string mangle = mangle_cxx_identifier (cxx);
   if (mangle != scm_name)
@@ -38,9 +38,9 @@ ly_check_name (string cxx, string scm_name)
 
 void
 ly_add_function_documentation (SCM func,
-                               string fname,
-                               string varlist,
-                               string doc)
+                               const string &fname,
+                               const string &varlist,
+                               const string &doc)
 {
   if (doc == "")
     return;
@@ -70,7 +70,7 @@ map<void *, string> type_names;
 
 void
 ly_add_type_predicate (void *ptr,
-                       string name)
+                       const string &name)
 {
   type_names[ptr] = name;
 }
index 49bfff6e19248326c4347662fd6249559dea617d..3fa5089e8076ec559395aa159fafb917df32f07b 100644 (file)
@@ -202,7 +202,7 @@ Global_context::previous_moment () const
 }
 
 Context *
-Global_context::get_default_interpreter (string /* context_id */)
+Global_context::get_default_interpreter (const string &/* context_id */)
 {
   if (get_score_context ())
     return get_score_context ()->get_default_interpreter ();
index e6e16e43931d0d6eb6f6280631fc3db8a00a73f9..a0f54ed162f3ec2c75a73195bc4d1b37f1557e1d 100644 (file)
@@ -21,7 +21,7 @@
 
 #include "grob.hh"
 
-void check_prefix (string name, int mask, int prefix_set, string *str)
+void check_prefix (const string &name, int mask, int prefix_set, string *str)
 {
   if (prefix_set & mask)
     {
index 43828310a799d833820018766c776d8cbd138288..dee7bdaa3cfd5d4506f51b8c11250bbcc1fe95a9 100644 (file)
@@ -724,7 +724,7 @@ Grob::internal_vertical_less (Grob *g1, Grob *g2, bool pure)
   MESSAGES
 ****************************************************************/
 void
-Grob::programming_error (string s) const
+Grob::programming_error (const string &s) const
 {
   SCM cause = self_scm ();
   while (Grob *g = unsmob_grob (cause))
@@ -740,7 +740,7 @@ Grob::programming_error (string s) const
 }
 
 void
-Grob::warning (string s) const
+Grob::warning (const string &s) const
 {
   SCM cause = self_scm ();
   while (Grob *g = unsmob_grob (cause))
index 806eb1512f198254a50fe9e1c83d11c54b3b88ce..8c00965744f3c327a5576241fe32a274cb2a08d5 100644 (file)
@@ -59,7 +59,7 @@ Includable_lexer::Includable_lexer ()
 
 /** Set the new input file to NAME, remember old file.  */
 void
-Includable_lexer::new_input (string name, Sources *sources)
+Includable_lexer::new_input (const string &name, Sources *sources)
 {
   string current_dir = dir_name (main_input_name_);
   if (relative_includes)
@@ -94,7 +94,7 @@ Includable_lexer::new_input (string name, Sources *sources)
 }
 
 void
-Includable_lexer::new_input (string name, string data, Sources *sources)
+Includable_lexer::new_input (const string &name, string data, Sources *sources)
 {
   Source_file *file = new Source_file (name, data);
   sources->add (file);
index 9c9b97b580e432086e7d1eb79b6f9b7afbcdd482..f58563cbbbd1b4b80986abd678f96933979b1e0f 100644 (file)
@@ -36,7 +36,6 @@ public:
   DECLARE_SCHEME_CALLBACK (pure_height, (SCM, SCM, SCM));
 
   DECLARE_GROB_INTERFACE ();
-  static string get_fontcharname (string style, int alteration);
   static SCM get_stencil (Grob *me);
 };
 
index 3bb5b583778f02b0cf8bfc6a123d8ea013116fb6..7f2ca8326ab669b6a4afe7c71a83ddf68202ea62 100644 (file)
@@ -49,18 +49,18 @@ class All_font_metrics
   All_font_metrics (All_font_metrics const &);
 public:
 
-  Index_to_charcode_map const *get_index_to_charcode_map (string filename,
+  Index_to_charcode_map const *get_index_to_charcode_map (const string &filename,
                                                           int face_index,
                                                           FT_Face face);
 
-  All_font_metrics (string search_path);
+  All_font_metrics (const string &search_path);
   ~All_font_metrics ();
 
   Pango_font *find_pango_font (PangoFontDescription const *description,
                                Real scale);
 
-  Font_metric *find_font (string name);
-  Open_type_font *find_otf (string name);
+  Font_metric *find_font (const string &name);
+  Open_type_font *find_otf (const string &name);
   SCM font_descriptions () const;
 };
 
index 5e5d499fbd433d6d1876a1ef98468e2d91b6574e..544dd8378d74c743d6db59797e42a09ac9b7834a 100644 (file)
@@ -114,7 +114,7 @@ public:
     MARKER, CUE_POINT
   };
 
-  Audio_text (Audio_text::Type type, string text_string);
+  Audio_text (Audio_text::Type type, const string &text_string);
 
   Type type_;
   string text_string_;
index b33a555c7cd81b65bded19d111b770fc6ea8323c..5995c70e658f0b5ee29e312828c1f23a3f1eec7f 100644 (file)
@@ -49,7 +49,7 @@ class Axis_group_interface
   DECLARE_SCHEME_CALLBACK (calc_pure_relevant_items, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_pure_relevant_spanners, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_pure_y_common, (SCM));
-  static SCM internal_calc_pure_relevant_grobs (Grob *, string);
+  static SCM internal_calc_pure_relevant_grobs (Grob *, const string&);
   static Interval relative_group_extent (vector<Grob *> const &list,
                                          Grob *common, Axis);
   static Interval relative_maybe_bound_group_extent (vector<Grob *> const &list,
index 482f53d970d34164f493a55cf102c45005f211e5..2c9cb33125a7de97454a9b9500c5c4aebb6daa46 100644 (file)
@@ -31,7 +31,7 @@ public:
   DECLARE_CLASSNAME (Change_iterator);
 
 private:
-  void error (string);
+  void error (const string&);
 };
 
 #endif
index 14c348f6e4a91c658f30ec36d1570a5b93609ed2..c779074007cbfe3061051419be0471f2e01b25a2 100644 (file)
@@ -102,7 +102,7 @@ public:
   void instrumented_set_property (SCM, SCM, const char *, int, const char *);
   void internal_set_property (SCM var_sym, SCM value);
 
-  Context *create_context (Context_def *, string, SCM);
+  Context *create_context (Context_def *, const string&, SCM);
   DECLARE_LISTENER (create_context_from_event);
   DECLARE_LISTENER (acknowledge_infant);
   DECLARE_LISTENER (remove_context);
@@ -116,7 +116,7 @@ public:
   virtual Context *get_score_context () const;
   virtual Output_def *get_output_def () const;
   virtual Moment now_mom () const;
-  virtual Context *get_default_interpreter (string context_id = "");
+  virtual Context *get_default_interpreter (const string &context_id = "");
 
   bool is_alias (SCM) const;
   void add_alias (SCM);
@@ -125,8 +125,8 @@ public:
   bool is_removable () const;
 
   Context *find_create_context (SCM context_name,
-                                string id, SCM ops);
-  Context *create_unique_context (SCM context_name, string context_id,
+                                const string &id, SCM ops);
+  Context *create_unique_context (SCM context_name, const string &context_id,
                                   SCM ops);
   vector<Context_def *> path_to_acceptable_context (SCM alias) const;
 };
@@ -144,7 +144,7 @@ void sloppy_general_pushpop_property (Context *context,
                                       SCM context_property, SCM grob_property_path, SCM val);
 SCM updated_grob_properties (Context *tg, SCM sym);
 Context *find_context_below (Context *where,
-                             SCM type_sym, string id);
+                             SCM type_sym, const string &id);
 bool melisma_busy (Context *);
 
 Context *get_voice_to_lyrics (Context *lyrics);
index 3e25d7e5cfc95ab5d0dc1d8c5eb813dff47b6283..5999f7558223b4006724be9328cbb575569f5cd2 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "std-string.hh"
 
-string map_file_name (string s);
+string map_file_name (const string &s);
 
 #endif /* FILE_NAME_MAP_HH */
 
index 4743e42b609ed794c255697c29a303d2f75599af..4c11989729ffc50a78323ef77ed209d8b5e6d703 100644 (file)
@@ -41,14 +41,14 @@ public:
   // Return stencil for given string. output_state may be modified to
   // record the font.
   virtual Stencil text_stencil (Output_def *output_state,
-                                string text, bool music) const;
+                                const string &text, bool music) const;
 
   virtual string font_name () const;
   virtual size_t count () const;
-  virtual Offset attachment_point (string) const;
+  virtual Offset attachment_point (const string&) const;
   virtual Offset get_indexed_wxwy (size_t) const;
   virtual Box get_indexed_char_dimensions (size_t index) const;
-  virtual size_t name_to_index (string) const;
+  virtual size_t name_to_index (string) const=0;
   virtual size_t index_to_charcode (size_t) const;
   virtual Real design_size () const;
   virtual Stencil find_by_name (string) const;
@@ -66,8 +66,6 @@ protected:
   Font_metric ();
 };
 
-int get_encoded_index (Font_metric *m, string input_coding, int code);
-
 DECLARE_UNSMOB (Font_metric, metrics);
 
 char *pfb2pfa (Byte const *pfb, int length);
index 079162d27223bfac8295a577118135360d25b6e4..1ea2b38dc70d750b83268941ef42604b7874dd4c 100644 (file)
@@ -46,7 +46,7 @@ public:
   virtual SCM get_output ();
   virtual Output_def *get_output_def () const;
   virtual Moment now_mom () const;
-  virtual Context *get_default_interpreter (string context_id = "");
+  virtual Context *get_default_interpreter (const string &context_id = "");
 
   Moment previous_moment () const;
 protected:
index bc4071eb042410c2a83c4ee22869307ed5d9a6d5..a0902d6d8907a74542ee3260efea9b1003fd2246 100644 (file)
@@ -114,8 +114,8 @@ public:
   void internal_set_property (SCM sym, SCM val);
 
   /* messages */
-  void warning (string) const;
-  void programming_error (string) const;
+  void warning (const string&) const;
+  void programming_error (const string&) const;
 
   /* class hierarchy */
   virtual System *get_system () const;
index c9595f923b84e44d7ef2ee48293b45f6dba93354..8378404513cabf9b3169b26b5bf71584f12d12d7 100644 (file)
@@ -53,9 +53,9 @@ public:
   vector<string> file_name_strings_;
 
   Source_file *get_source_file () const;
-  virtual void new_input (string s, Sources *);
+  virtual void new_input (const string &s, Sources *);
 
-  void new_input (string name, string data, Sources *);
+  void new_input (const string &name, string data, Sources *);
 
   char const *here_str0 () const;
 };
index 2ae9f093eed3fa7d9cf580f25ac6e1c7825e346b..a11f8f8c1b25f787bd632aaa41bc7388eea3340f 100644 (file)
@@ -36,12 +36,12 @@ public:
   char const *end () const;
 
   void set (Source_file *, char const *, char const *);
-  void error (string) const;
-  void programming_error (string) const;
-  void non_fatal_error (string) const;
-  void warning (string) const;
-  void message (string) const;
-  void debug_output (string) const;
+  void error (const string&) const;
+  void programming_error (const string&) const;
+  void non_fatal_error (const string&) const;
+  void warning (const string&) const;
+  void message (const string&) const;
+  void debug_output (const string&) const;
   void set_spot (Input const &);
   void step_forward ();
   void set_location (Input const &, Input const &);
@@ -63,7 +63,7 @@ public:
   Input ();
 protected:
   string message_location () const;
-  string message_string (string msg) const;
+  string message_string (const string &msg) const;
 };
 
 #include "smobs.hh"
index c0df65849824051b13d50f5dcd3d9dc748abcfef..a273f5ac5d3da229e0cd49122edba438cddfabc5 100644 (file)
@@ -129,7 +129,7 @@ inline SCM ly_symbol2scm (char const *x) { return scm_from_locale_symbol ((x));
 
 string mangle_cxx_identifier (string);
 
-void ly_add_type_predicate (void *ptr, string name);
+void ly_add_type_predicate (void *ptr, const string &name);
 string predicate_to_typename (void *ptr);
 
 /*
@@ -159,8 +159,8 @@ string predicate_to_typename (void *ptr);
 #define MAKE_SCHEME_CALLBACK(TYPE, FUNC, ARGCOUNT)                      \
   MAKE_SCHEME_CALLBACK_WITH_OPTARGS(TYPE,FUNC,ARGCOUNT, 0, "");
 
-void ly_add_function_documentation (SCM proc, string fname, string varlist, string doc);
-void ly_check_name (string cxx, string fname);
+void ly_add_function_documentation (SCM proc, const string &fname, const string &varlist, const string &doc);
+void ly_check_name (const string &cxx, const string &fname);
 
 #define ADD_SCM_INIT_FUNC(name, func)           \
   class name ## _scm_initter                    \
index f2b8f08ba17bfa00fcae3aacf13035d68a30aa17..4592b2497db9321b5bac7a96829e49a272328031 100644 (file)
@@ -50,12 +50,12 @@ SCM ly_truncate_list (int k, SCM lst);
 
 extern SCM global_lily_module;
 
-string gulp_file_to_string (string fn, bool must_exist, int size);
+string gulp_file_to_string (const string &fn, bool must_exist, int size);
 
 SCM ly_string2scm (string const &s);
 string ly_scm2string (SCM s);
 string ly_symbol2string (SCM);
-string robust_symbol2string (SCM, string);
+string robust_symbol2string (SCM, const string&);
 Rational ly_scm2rational (SCM);
 SCM ly_rational2scm (Rational);
 SCM ly_offset2scm (Offset);
@@ -78,7 +78,7 @@ Drul_array<Real> robust_scm2drul (SCM, Drul_array<Real>);
 Drul_array<bool> robust_scm2booldrul (SCM, Drul_array<bool>);
 Interval robust_scm2interval (SCM, Drul_array<Real>);
 Offset robust_scm2offset (SCM, Offset);
-string robust_scm2string (SCM, string);
+string robust_scm2string (SCM, const string&);
 Rational robust_scm2rational (SCM, Rational);
 vector<Real> ly_scm2floatvector (SCM);
 SCM ly_floatvector2scm (vector<Real> v);
index 19b01ca6ff3b67dc3cb7ac0308a3d2b4152818a9..4bc4cbe887403eb685cecf84442c2f741ad0f7f7 100644 (file)
@@ -36,11 +36,10 @@ class Lily_lexer : public Includable_lexer
   DECLARE_SMOBS (Lily_lexer);
 
 private:
-  int lookup_keyword (string);
-  int scan_bare_word (string);
-  SCM scan_markup_word (string);
-  int scan_escaped_word (string);
-  int scan_shorthand (string);
+  int lookup_keyword (const string&);
+  int scan_bare_word (const string&);
+  int scan_escaped_word (const string&);
+  int scan_shorthand (const string&);
   int scan_scm_id (SCM);
   int identifier_type (SCM);
   char escaped_char (char) const;
@@ -88,12 +87,12 @@ public:
 
   void start_main_input ();
 
-  virtual void new_input (string s, Sources *);
-  virtual void new_input (string s, string d, Sources *);
+  virtual void new_input (const string &s, Sources *);
+  virtual void new_input (const string &s, string d, Sources *);
 
   bool top_input () { return include_stack_.size () < 2; }
   SCM keyword_list () const;
-  SCM lookup_identifier (string s);
+  SCM lookup_identifier (const string &s);
   SCM lookup_identifier_symbol (SCM s);
   void push_extra_token (int token_type, SCM scm = SCM_UNSPECIFIED);
   void push_chord_state (SCM alist);
index 5009e693e34af90dd52b49b92b00d5d5af32e546..3b4c757d657192a315e97bfa893b7591b583c2e9 100644 (file)
@@ -62,14 +62,14 @@ public:
   void clear ();
   void do_init_file ();
   SCM do_yyparse ();
-  void include_string (string ly_code);
-  void parse_file (string init, string name, string out_name);
-  void parse_string (string ly_code);
-  SCM parse_string_expression (string ly_code, string filename, int line);
-  void parser_error (string);
-  void parser_error (Input const &, string);
+  void include_string (const string &ly_code);
+  void parse_file (const string &init, const string &name, const string &out_name);
+  void parse_string (const string &ly_code);
+  SCM parse_string_expression (const string &ly_code, const string &filename, int line);
+  void parser_error (const string&);
+  void parser_error (Input const &, const string&);
   // The following is called as yyerror
-  static void parser_error (Input const *i, Lily_parser *parser, SCM *, string s);
+  static void parser_error (Input const *i, Lily_parser *parser, SCM *, const string &s);
   void set_yydebug (bool);
 
   SCM make_scope () const;
index 952b19b8e1f1c632d3f24576fca573f395f0826b..e79f01137af90f731856e813da91e4082c6a91a2 100644 (file)
@@ -25,7 +25,7 @@
 struct Lilypond_version
 {
   Lilypond_version (int major, int minor, int patch);
-  Lilypond_version (string str);
+  Lilypond_version (const string &str);
 
   string to_string () const;
   operator int () const;
index e9113b4e087630a241c3337640f78541b8e954b2..06a1a0999116464203448bc5987c14bcf8890217 100644 (file)
@@ -28,8 +28,6 @@ void set_debug (bool);
 void do_scores ();
 void clear_scores ();
 void add_score (Score *s);
-void set_default_output (string s);
-string find_file (string);
 void call_constructors ();
 vector<string> get_inclusion_names ();
 void set_inclusion_names (vector<string>);
index d73b6af790fd17b0e21f767c45e0581980de7c1c..c87adf6491a91c8a8ccbc4a0b041a2f06ca6f808 100644 (file)
@@ -43,7 +43,7 @@ public:
 class Midi_chunk
 {
 public:
-  void set (string header_string, string data_string, string footer_string);
+  void set (const string &header_string, const string &data_string, const string &footer_string);
   virtual string to_string () const;
   virtual string data_string () const;
   DECLARE_CLASSNAME (Midi_chunk);
index ee1534da07d73a43ebf79361f38dcab4637974e0..7ea838fdd0f845ebb50eb676c27b9c42031605e7 100644 (file)
@@ -29,10 +29,10 @@ using namespace std;
 
 struct Midi_stream
 {
-  Midi_stream (string file_name_string);
+  Midi_stream (const string &file_name_string);
   ~Midi_stream ();
 
-  void write (string);
+  void write (const string&);
   void write (Midi_chunk const &);
   void open ();
 
index 511fc0545f8fd51ca377551b8fe47bb7aa0801e1..9bba2d09e936bb2ef8499f48661b883a6c4fe03a 100644 (file)
@@ -64,7 +64,7 @@ Real directed_round (Real f, Direction d);
 Offset get_point_in_y_direction (Offset orig, Real slope, Real dist, Direction dir);
 Real peak_around (Real epsilon, Real threshold, Real x);
 Real convex_amplifier (Real standard_x, Real increase_factor, Real x);
-string camel_case_to_lisp_identifier (string in);
+string camel_case_to_lisp_identifier (const string &in);
 
 #endif
 
index 6bf2d8d6d0e9f9e3c4c61236c128f4918726fec4..40533cb3c3e36aeb608b6299fcb49e7969ba2f5f 100644 (file)
 struct Modified_font_metric : public Font_metric
 {
 public:
-  Stencil text_stencil (Output_def *output_state, string, bool) const;
+  Stencil text_stencil (Output_def *output_state, const string&, bool) const;
   Real get_magnification () const;
 
   static SCM make_scaled_font_metric (Font_metric *fm, Real magnification);
   size_t count () const;
   Offset get_indexed_wxwy (size_t) const;
-  Offset attachment_point (string) const;
+  Offset attachment_point (const string&) const;
   size_t name_to_index (string) const;
   size_t index_to_charcode (size_t) const;
   Font_metric *original_font () const;
index 532933b84b59b34cde0022e33c322fccbdcefcdc..6155dd7dc6513a4bf4cda1c759282dc38e24d2c1 100644 (file)
@@ -36,7 +36,7 @@ public:
   static Real stem_attachment_coordinate (Grob *, Axis a);
   static int get_balltype (Grob *);
 
-  static Offset get_stem_attachment (Font_metric *, string);
+  static Offset get_stem_attachment (Font_metric *, const string&);
 };
 #endif // NOTEHEAD_HH
 
index e3789d0685944c4cace45635f1d571e9e5315dbe..cb55e9744bc890842a0445bb221a66886e834f7c 100644 (file)
@@ -48,23 +48,22 @@ public:
   SCM glyph_list () const;
   SCM get_glyph_outline (size_t signed_idx) const;
   Box get_glyph_outline_bbox (size_t signed_idx) const;
-  string get_otf_table (string tag) const;
-  static SCM make_otf (string);
+  string get_otf_table (const string &tag) const;
+  static SCM make_otf (const string&);
   string font_name () const;
   ~Open_type_font ();
-  Offset attachment_point (string) const;
+  Offset attachment_point (const string&) const;
   size_t count () const;
   Box get_indexed_char_dimensions (size_t) const;
   Box get_unscaled_indexed_char_dimensions (size_t) const;
   size_t name_to_index (string) const;
-  //size_t glyph_name_to_charcode (string) const;
   size_t index_to_charcode (size_t) const;
   void derived_mark () const;
   SCM sub_fonts () const;
   Real design_size () const;
 };
 
-string get_otf_table (FT_Face face, string tag);
-FT_Face open_ft_face (string str, FT_Long idx);
+string get_otf_table (FT_Face face, const string &tag);
+FT_Face open_ft_face (const string&, FT_Long idx);
 
 #endif /* OPEN_TYPE_FONT_HH */
index 3f44061513064044bf173a496e43c332ac8f8bcc..eff52c2c3845a7b3f47f85a42b2defcaf7595ed7 100644 (file)
@@ -65,7 +65,7 @@ public:
   /*
     variables.
    */
-  SCM c_variable (string id) const;
+  SCM c_variable (const string &id) const;
   SCM lookup_variable (SCM sym) const;
   void set_variable (SCM sym, SCM val);
   void normalize ();
index f57b5d5b762eb83a945c4599ec5a4338d5d7c5f5..ad559551d1fe9d6a7919c3da9d6841e70e07fde1 100644 (file)
@@ -48,7 +48,7 @@ public:
 
   string description_string () const;
   SCM font_file_name () const;
-  void register_font_file (string, string, int);
+  void register_font_file (const string &filename, const string &ps_name, int face_index);
 
   size_t name_to_index (string) const;
   SCM get_glyph_outline (size_t signed_idx) const;
@@ -59,7 +59,7 @@ public:
   Stencil pango_item_string_stencil (PangoGlyphItem const *) const;
 
   virtual Stencil text_stencil (Output_def *output_state,
-                                string text, bool music) const;
+                                const string &text, bool music) const;
   virtual void derived_mark () const;
 };
 
index ef1b1b7a224d99b2f35232ae19bc08012051f6d0..02bc2746a2f841103bfae79194c81253f6ebc158 100644 (file)
@@ -40,7 +40,7 @@ public:
   DECLARE_SMOBS (Paper_outputter);
 
 public:
-  Paper_outputter (SCM port, string format);
+  Paper_outputter (SCM port, const string &format);
 
   void close ();
   SCM dump_string (SCM);
@@ -51,7 +51,6 @@ public:
   SCM scheme_to_string (SCM);
 };
 
-Paper_outputter *get_paper_outputter (string, string);
 DECLARE_UNSMOB (Paper_outputter, outputter);
 
 #endif /* PAPER_OUTPUTTER_HH */
index 1a3e8a38d9928ea161112debe86754d3a69c6a8a..5fda3c73a7647d1a51e339932c35c1e28fbbfc41 100644 (file)
 
 #include "std-string.hh"
 
-void read_relocation_dir (string dirname);
-void read_relocation_file (string filename);
-string expand_environment_variables (string orig);
+void read_relocation_dir (const string &dirname);
+void read_relocation_file (const string &filename);
+string expand_environment_variables (const string &orig);
 
-int sane_putenv (char const *key, string value, bool overwrite);
+int sane_putenv (char const *key, const string &value, bool overwrite);
 void setup_paths (char const *argv0);
 extern bool relocate_binary;
 
index 9a0b811ed7c30e4dc73aaf5ba2eee579e6493874..d5dbae9e25791f385858ded77d6a146558ae98cc 100644 (file)
@@ -30,7 +30,7 @@ public:
   DECLARE_SCHEME_CALLBACK (y_offset_callback, (SCM));
   DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM));
   DECLARE_GROB_INTERFACE ();
-  static string glyph_name (Grob *, int, string, bool, Real);
+  static string glyph_name (Grob *, int durlog, const string &style, bool, Real);
   static Real staff_position_internal (Grob *, int /* duration_log */,
                                        int /* dir */);
   static SCM brew_internal_stencil (Grob *, bool);
index 48ec73644840e93d9f720439f4242482973caaa6..5114815619659f834461230d21512715fda383f1 100644 (file)
@@ -51,7 +51,7 @@ public:
 
   Real score () const { return score_; }
   string card () const { return score_card_; }
-  void add_score (Real, string);
+  void add_score (Real, const string&);
 
   void generate_curve (Slur_score_state const &state, Real r0, Real h_inf,
                        vector<Offset> const &);
index 0b0861775c767f2558e9ad53520d0fdda44da4a9..e27c96a759db69d3eca94da7761f347fd1ee7581 100644 (file)
@@ -57,8 +57,8 @@ protected:
   void stop_translation_timestep ();
   void process_music ();
 
-  bool can_create_slur (string, vsize, vsize *, Stream_event *);
-  void create_slur (string spanner_id, Stream_event *ev_cause, Grob *g_cause, Direction dir, bool left_broken);
+  bool can_create_slur (const string&, vsize, vsize *, Stream_event *);
+  void create_slur (const string &spanner_id, Stream_event *ev_cause, Grob *g_cause, Direction dir, bool left_broken);
   bool try_to_end (Stream_event *ev);
 
   virtual void set_melisma (bool);
index e4bdc3f63843ac97019412e11d9f328957de7a29..5f3553aea08c46e94a746ad410bfa3ec18d8d2e5 100644 (file)
@@ -48,8 +48,8 @@ class Source_file
 
   DECLARE_SMOBS (Source_file);
 public:
-  Source_file (string fn);
-  Source_file (string, string);
+  Source_file (const string &fn);
+  Source_file (const string&, const string&);
 
   char const *c_str () const;
   virtual string quote_input (char const *pos_str0) const;
@@ -73,7 +73,7 @@ protected:
   int line_offset_;
 };
 
-vector<char> gulp_file (string fn, int desired);
+vector<char> gulp_file (const string &fn, int desired);
 
 #endif /* SOURCE_FILE_HH */
 
diff --git a/lily/include/stream.hh b/lily/include/stream.hh
deleted file mode 100644 (file)
index 000ec16..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-  This file is part of LilyPond, the GNU music typesetter.
-
-  Copyright (C) 2001--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
-  LilyPond is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  LilyPond is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef STREAM_HH
-#define STREAM_HH
-
-#include "std-string.hh"
-
-#include <iostream>
-#include <sstream>
-using namespace std;
-
-#if __GNUC__ > 2
-ostream *open_file_stream (string file_name,
-                           ios_base::openmode mode = ios::out);
-#else
-ostream *open_file_stream (string file_name, int mode = ios::out);
-#endif
-void close_file_stream (ostream *os);
-
-#endif /* STREAM_HH */
-
diff --git a/lily/include/tie-column-format.hh b/lily/include/tie-column-format.hh
deleted file mode 100644 (file)
index 8a2a16a..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
-  This file is part of LilyPond, the GNU music typesetter.
-
-  Copyright (C) 2005--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
-  LilyPond is free software: you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, either version 3 of the License, or
-  (at your option) any later version.
-
-  LilyPond is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef TIE_COLUMN_FORMAT_HH
-#define TIE_COLUMN_FORMAT_HH
-
-#include "lily-proto.hh"
-#include "tie-configuration.hh"
-
-void set_chord_outline (Skyline *skyline,
-                        vector<Item *> bounds,
-                        Grob *common,
-                        Direction d);
-void set_tie_config_directions (Ties_configuration *tie_configs_ptr);
-void shift_small_ties (Ties_configuration *tie_configs,
-                       Grob *staff_referencer,
-                       Tie_details const &details);
-void final_shape_adjustment (Tie_configuration &conf,
-                             Tie_formatting_problem const &,
-                             Grob *staff_referencer);
-void
-set_chord_outlines (Drul_array<Skyline> *skyline_drul,
-                    vector<Grob *> ties,
-                    Grob *common);
-
-void
-set_manual_tie_configuration (Ties_configuration *tie_configs,
-                              bool *manual_override,
-                              SCM manual_configs
-                             );
-
-#endif /* TIE_COLUMN_FORMAT_HH */
index 32ffb45a955f1ec72a5cdf3d8dcd5680f7be191c..9da9e45a40a478aea507ac4eb7adaa6f1a7befc0 100644 (file)
@@ -46,7 +46,7 @@ public:
   /* computed. */
   Interval attachment_x_;
 
-  void add_score (Real, string);
+  void add_score (Real, const string&);
   Tie_configuration ();
   void center_tie_vertically (Tie_details const &);
   Bezier get_transformed_bezier (Tie_details const &) const;
@@ -72,8 +72,8 @@ class Ties_configuration : public vector<Tie_configuration>
   friend class Tie_formatting_problem;
 public:
   Ties_configuration ();
-  void add_score (Real amount, string description);
-  void add_tie_score (Real amount, int i, string description);
+  void add_score (Real amount, const string &description);
+  void add_tie_score (Real amount, int i, const string &description);
   Real score () const;
   void reset_score ();
   string card () const;
index bc1e79b373554cc5dd2b720ddf444ddd4610a701..a091ef9855c72111c069d77d4931599bc3df9e83 100644 (file)
@@ -79,7 +79,7 @@ Input::set_location (Input const &i_start, Input const &i_end)
   [file:line:column:][warning:]message
 */
 string
-Input::message_string (string msg) const
+Input::message_string (const string &msg) const
 {
   if (source_file_)
     return msg + "\n" + source_file_->quote_input (start_);
@@ -93,7 +93,7 @@ Input::message_location () const
   return (source_file_) ? location_string () : "";
 }
 void
-Input::error (string s) const
+Input::error (const string &s) const
 {
   ::non_fatal_error (message_string (s), message_location ());
   // UGH, fix naming or usage (use non_fatal_error in most places, instead)
@@ -101,31 +101,31 @@ Input::error (string s) const
 }
 
 void
-Input::programming_error (string s) const
+Input::programming_error (const string &s) const
 {
   ::programming_error (message_string (s), message_location ());
 }
 
 void
-Input::non_fatal_error (string s) const
+Input::non_fatal_error (const string &s) const
 {
   ::non_fatal_error (message_string (s), message_location ());
 }
 
 void
-Input::warning (string s) const
+Input::warning (const string &s) const
 {
   ::warning (message_string (s), message_location ());
 }
 
 void
-Input::message (string s) const
+Input::message (const string &s) const
 {
   ::message (message_string (s), true, message_location ());
 }
 
 void
-Input::debug_output (string s) const
+Input::debug_output (const string &s) const
 {
   ::debug_output (message_string (s), true, message_location ());
 }
index 50b79a848810b57e7500764ae22029b11799ddce..18b999da82f20f2a3045f796b37322ff5fd3d65d 100644 (file)
@@ -907,7 +907,7 @@ Lily_lexer::identifier_type (SCM sid)
 
 
 int
-Lily_lexer::scan_escaped_word (string str)
+Lily_lexer::scan_escaped_word (const string &str)
 {
        // use more SCM for this.
 
@@ -937,7 +937,7 @@ Lily_lexer::scan_escaped_word (string str)
 }
 
 int
-Lily_lexer::scan_shorthand (string str)
+Lily_lexer::scan_shorthand (const string &str)
 {
        SCM sid = lookup_identifier (str);
        if (Music *m = unsmob_music (sid))
@@ -1014,7 +1014,7 @@ Lily_lexer::scan_scm_id (SCM sid)
 }
 
 int
-Lily_lexer::scan_bare_word (string str)
+Lily_lexer::scan_bare_word (const string &str)
 {
        SCM sym = ly_symbol2scm (str.c_str ());
        if ((YYSTATE == notes) || (YYSTATE == chords)) {
index 5e3b1c0f697ed6bcdda79e01ee761849163028b2..06018c4c9c48502dde6b90eedd16fd05c17c6acf 100644 (file)
@@ -75,13 +75,13 @@ ly_symbol2string (SCM s)
 }
 
 string
-robust_symbol2string (SCM sym, string str)
+robust_symbol2string (SCM sym, const string &str)
 {
   return scm_is_symbol (sym) ? ly_symbol2string (sym) : str;
 }
 
 string
-gulp_file_to_string (string fn, bool must_exist, int size)
+gulp_file_to_string (const string &fn, bool must_exist, int size)
 {
   string s = global_path.find (fn);
   if (s == "")
@@ -554,10 +554,10 @@ ly_floatvector2scm (vector<Real> v)
 }
 
 string
-robust_scm2string (SCM k, string s)
+robust_scm2string (SCM k, const string &s)
 {
   if (scm_is_string (k))
-    s = ly_scm2string (k);
+    return ly_scm2string (k);
   return s;
 }
 
index c196808a2fef49b9a3c62ec0cafd964477021bfe..c72ff8fc129eca056015f930b7a94c02d528902a 100644 (file)
@@ -178,7 +178,7 @@ Lily_lexer::set_current_scope ()
 }
 
 int
-Lily_lexer::lookup_keyword (string s)
+Lily_lexer::lookup_keyword (const string &s)
 {
   return keytable_->lookup (s.c_str ());
 }
@@ -217,7 +217,7 @@ Lily_lexer::lookup_identifier_symbol (SCM sym)
 }
 
 SCM
-Lily_lexer::lookup_identifier (string name)
+Lily_lexer::lookup_identifier (const string &name)
 {
   return lookup_identifier_symbol (ly_symbol2scm (name.c_str ()));
 }
@@ -236,13 +236,13 @@ Lily_lexer::start_main_input ()
 }
 
 void
-Lily_lexer::new_input (string str, string d, Sources *ss)
+Lily_lexer::new_input (const string &str, string d, Sources *ss)
 {
   Includable_lexer::new_input (str, d, ss);
 }
 
 void
-Lily_lexer::new_input (string str, Sources *ss)
+Lily_lexer::new_input (const string &str, Sources *ss)
 {
   if (is_main_input_ && be_safe_global)
     {
index 1b78abaed0588debaf4adb9769ed328ce70e88d5..cd7819e9c8d5f6823592e310783025ed15933280 100644 (file)
@@ -97,7 +97,7 @@ Lily_parser::print_smob (SCM s, SCM port, scm_print_state *)
 
 /* Process one .ly file, or book.  */
 void
-Lily_parser::parse_file (string init, string name, string out_name)
+Lily_parser::parse_file (const string &init, const string &name, const string &out_name)
 {
   lexer_->set_identifier (ly_symbol2scm ("parser"), self_scm ());
   output_basename_ = out_name;
@@ -139,7 +139,7 @@ Lily_parser::parse_file (string init, string name, string out_name)
 }
 
 void
-Lily_parser::parse_string (string ly_code)
+Lily_parser::parse_string (const string &ly_code)
 {
   lexer_->main_input_name_ = "<string>";
   lexer_->new_input (lexer_->main_input_name_, ly_code, sources_);
@@ -155,7 +155,7 @@ Lily_parser::parse_string (string ly_code)
 }
 
 SCM
-Lily_parser::parse_string_expression (string ly_code, string filename,
+Lily_parser::parse_string_expression (const string &ly_code, const string &filename,
                                       int line)
 {
   lexer_->main_input_name_ = filename;
@@ -178,7 +178,7 @@ Lily_parser::parse_string_expression (string ly_code, string filename,
 }
 
 void
-Lily_parser::include_string (string ly_code)
+Lily_parser::include_string (const string &ly_code)
 {
   lexer_->new_input ("<included string>", ly_code, sources_);
 }
@@ -202,14 +202,14 @@ Lily_parser::here_str0 () const
 }
 
 void
-Lily_parser::parser_error (string s)
+Lily_parser::parser_error (const string &s)
 {
   lexer_->here_input ().error (_ (s.c_str ()));
   error_level_ = 1;
 }
 
 void
-Lily_parser::parser_error (Input const &i, string s)
+Lily_parser::parser_error (Input const &i, const string &s)
 {
   i.error (s);
   error_level_ = 1;
index 28bb08d76152cca62c7d50a10c0cd1b8ad19f111..9c6d2130a331dd5f2599bbcae66090f501cf7ac7 100644 (file)
@@ -30,7 +30,7 @@ Lilypond_version::Lilypond_version (int major, int minor, int patch)
   patch_ = patch;
 }
 
-Lilypond_version::Lilypond_version (string str)
+Lilypond_version::Lilypond_version (const string &str)
 {
   major_ = 0;
   minor_ = 0;
index 18adbb2cb731ee16922ab0731aeae2282dd5a1b1..5ac75067a070ad4db7a2fd71863e5426ccd291e5 100644 (file)
@@ -334,7 +334,7 @@ warranty ()
 }
 
 static void
-prepend_scheme_list (string dir, string scmlist)
+prepend_scheme_list (const string &dir, const string &scmlist)
 /*
  *  Inserts an item at the front of a Scheme list, e.g. %load-path
  *  Parameters:
@@ -563,7 +563,7 @@ setup_localisation ()
 }
 
 static void
-add_output_format (string format)
+add_output_format (const string &format)
 /*
  * Capture information internally from command-line options
  * re output format.
index 699ec7e89876049d379858b5dd287118f4266271..f98c76373e9728e68c66863a7008c20e7c548d74 100644 (file)
@@ -181,7 +181,7 @@ Midi_chunk::~Midi_chunk ()
 }
 
 void
-Midi_chunk::set (string header_string, string data_string, string footer_string)
+Midi_chunk::set (const string &header_string, const string &data_string, const string &footer_string)
 {
   data_string_ = data_string;
   footer_string_ = footer_string;
index 9409762d66f0bbf2eb9b1514336569c677e5ce05..289bb1494a3b52091a7871d71eebcb4600d2b336 100644 (file)
@@ -27,11 +27,10 @@ using namespace std;
 #include "midi-chunk.hh"
 #include "misc.hh"
 #include "program-option.hh"
-#include "stream.hh"
 #include "string-convert.hh"
 #include "warn.hh"
 
-Midi_stream::Midi_stream (string file_name)
+Midi_stream::Midi_stream (const string &file_name)
 {
   file_name_string_ = file_name;
   out_file_ = fopen (file_name.c_str (), "wb");
@@ -45,7 +44,7 @@ Midi_stream::~Midi_stream ()
 }
 
 void
-Midi_stream::write (string str)
+Midi_stream::write (const string &str)
 {
   size_t sz = sizeof (Byte);
   size_t n = str.length ();
index f90d641a6040fc3c047d67c9609dfb65860a19b3..58d0a6e9d301af63baead8b7e8f96d2f7cb0d0ff 100644 (file)
@@ -78,7 +78,7 @@ convex_amplifier (Real standard_x, Real increase_factor, Real x)
 }
 
 string
-camel_case_to_lisp_identifier (string in)
+camel_case_to_lisp_identifier (const string &in)
 {
   vector<char> out;
 
@@ -113,4 +113,4 @@ get_point_in_y_direction (Offset orig, Real slope, Real dist, Direction dir)
   complex<Real> res = orig_c + to_move;
 
   return Offset (real (res), imag (res));
-}
\ No newline at end of file
+}
index 7a54948fed13a96882fc40d0567cd34de9708d09..1657cf5a9e68722954d8d67f6c4c4661b0206a35 100644 (file)
@@ -74,7 +74,7 @@ Modified_font_metric::count () const
 }
 
 Offset
-Modified_font_metric::attachment_point (string s) const
+Modified_font_metric::attachment_point (const string &s) const
 {
   Offset o = orig_->attachment_point (s);
   return o * magnification_;
@@ -87,7 +87,7 @@ Modified_font_metric::get_indexed_wxwy (vsize k) const
   return o * magnification_;
 }
 
-vsize
+size_t
 Modified_font_metric::name_to_index (string s) const
 {
   return orig_->name_to_index (s);
@@ -106,7 +106,7 @@ Modified_font_metric::derived_mark () const
 
 Stencil
 Modified_font_metric::text_stencil (Output_def *state,
-                                    string text, bool feta) const
+                                    const string &text, bool feta) const
 {
   Box b;
   if (Pango_font *pf = dynamic_cast<Pango_font *> (orig_))
index 287b10dc043a42ce8ebe613422a8c51fe916874b..4bf8168eb1092c4fe34b147bbfc5d17e318774fa 100644 (file)
@@ -162,7 +162,7 @@ Note_head::stem_attachment_coordinate (Grob *me, Axis a)
 }
 
 Offset
-Note_head::get_stem_attachment (Font_metric *fm, string key)
+Note_head::get_stem_attachment (Font_metric *fm, const string &key)
 {
   Offset att;
 
index 680dfe92348f364f5cc154772220556dc17003a7..df6a744d0e42165e6d31837d1b474c16b78c8fc9 100644 (file)
@@ -59,7 +59,7 @@ load_table (char const *tag_str, FT_Face face, FT_ULong *length)
 }
 
 string
-Open_type_font::get_otf_table (string tag) const
+Open_type_font::get_otf_table (const string &tag) const
 {
   return ::get_otf_table (face_, tag);
 }
@@ -91,7 +91,7 @@ Open_type_font::~Open_type_font ()
   UGH fix naming
 */
 string
-get_otf_table (FT_Face face, string tag)
+get_otf_table (FT_Face face, const string &tag)
 {
   FT_ULong len;
   FT_Byte *tab = load_table (tag.c_str (), face, &len);
@@ -102,7 +102,7 @@ get_otf_table (FT_Face face, string tag)
 }
 
 FT_Face
-open_ft_face (string str, FT_Long idx)
+open_ft_face (const string &str, FT_Long idx)
 {
   FT_Face face;
   FT_Error error_code = FT_New_Face (freetype2_library, str.c_str (), idx, &face);
@@ -117,7 +117,7 @@ open_ft_face (string str, FT_Long idx)
 }
 
 SCM
-Open_type_font::make_otf (string str)
+Open_type_font::make_otf (const string &str)
 {
   FT_Face face = open_ft_face (str, 0 /* index */);
   Open_type_font *otf = new Open_type_font (face);
@@ -151,7 +151,7 @@ Open_type_font::derived_mark () const
 }
 
 Offset
-Open_type_font::attachment_point (string glyph_name) const
+Open_type_font::attachment_point (const string &glyph_name) const
 {
   SCM sym = ly_symbol2scm (glyph_name.c_str ());
   SCM entry = scm_hashq_ref (lily_character_table_, sym, SCM_BOOL_F);
index e425dbf4f93cd2dba5fc03172017a02f04ff63b4..addb0ef1ef57f5ee858b3e0a8804da09ace1fbc0 100644 (file)
@@ -129,7 +129,7 @@ Output_def::lookup_variable (SCM sym) const
 }
 
 SCM
-Output_def::c_variable (string s) const
+Output_def::c_variable (const string &s) const
 {
   return lookup_variable (ly_symbol2scm (s.c_str ()));
 }
index e4a07a9fd5ca8bd719c83f4bd084dc442998650e..ee986fc94d76a653256212c0a7e9ab7d80517bbc 100644 (file)
@@ -81,8 +81,8 @@ Pango_font::~Pango_font ()
 }
 
 void
-Pango_font::register_font_file (string filename,
-                                string ps_name,
+Pango_font::register_font_file (const string &filename,
+                                const string &ps_name,
                                 int face_index)
 {
   scm_hash_set_x (physical_font_tab_,
@@ -383,7 +383,7 @@ extern bool music_strings_to_paths;
 
 Stencil
 Pango_font::text_stencil (Output_def * /* state */,
-                          string str, bool music_string) const
+                          const string &str, bool music_string) const
 {
   /*
     The text assigned to a PangoLayout is automatically divided
index 06b490472c7b5a2ef9e378dbcfa87e07afc75da3..34110554dc3b6b2514d5bbcb1ddaa195e07bab92 100644 (file)
@@ -40,7 +40,7 @@ using namespace std;
 
 #include "ly-smobs.icc"
 
-Paper_outputter::Paper_outputter (SCM port, string format)
+Paper_outputter::Paper_outputter (SCM port, const string &format)
 {
   file_ = port;
   output_module_ = SCM_EOL;
index 48dc5680b3bc5cae6b1d16fa962a50b68e2e8d96..11d8d17125991e7a2eb3510ec3592b49f2335cc3 100644 (file)
@@ -157,7 +157,7 @@ using namespace std;
 #include "warn.hh"
 
 void
-Lily_parser::parser_error (Input const *i, Lily_parser *parser, SCM *, string s)
+Lily_parser::parser_error (Input const *i, Lily_parser *parser, SCM *, const string &s)
 {
        parser->parser_error (*i, s);
 }
@@ -650,6 +650,7 @@ context_mod_embedded:
                        $$ = $1;
                else {
                        parser->parser_error (@1, _ ("not a context mod"));
+                       $$ = Context_mod ().smobbed_copy ();
                }
        }
        ;
@@ -2327,16 +2328,37 @@ scalar:
        embedded_scm_arg
        | SCM_IDENTIFIER
        | bare_number
+       // The following is a rather defensive variant of admitting
+       // negative numbers: the grammar would permit number_factor or
+       // even number_expression.  However, function arguments allow
+       // only this simple kind of negative number, so to have things
+       // like \tweak and \override behave reasonably similar, it
+       // makes sense to rule out things like -- which are rather an
+       // accent in function argument contexts.
+       | '-' bare_number
+       {
+               $$ = scm_difference ($2, SCM_UNDEFINED);
+       }
        | FRACTION
-       | lyric_element
+       | STRING
+       | full_markup
        ;
 
 scalar_closed:
        embedded_scm_arg_closed
        | SCM_IDENTIFIER
+       // for scalar_closed to be an actually closed (no lookahead)
+       // expression, we'd need to use bare_number_closed here.  It
+       // turns out that the only use of scalar_closed in TEMPO is
+       // not of the kind requiring the full closedness criterion.
        | bare_number
+       | '-' bare_number
+       {
+               $$ = scm_difference ($2, SCM_UNDEFINED);
+       }
        | FRACTION
-       | lyric_element
+       | STRING
+       | full_markup
        ;
 
 
@@ -3016,9 +3038,13 @@ simple_chord_elements:
 
 lyric_element:
        full_markup {
+               if (!parser->lexer_->is_lyric_state ())
+                       parser->parser_error (@1, _ ("markup outside of text script or \\lyricmode"));
                $$ = $1;
        }
        | STRING {
+               if (!parser->lexer_->is_lyric_state ())
+                       parser->parser_error (@1, _ ("unrecognized string, not in text script or \\lyricmode"));
                $$ = $1;
        }
        | LYRIC_ELEMENT
@@ -3026,8 +3052,6 @@ lyric_element:
 
 lyric_element_music:
        lyric_element optional_notemode_duration post_events {
-               if (!parser->lexer_->is_lyric_state ())
-                       parser->parser_error (@1, _ ("have to be in Lyric mode for lyrics"));
                $$ = MAKE_SYNTAX ("lyric-event", @$, $1, $2);
                if (scm_is_pair ($3))
                        unsmob_music ($$)->set_property
index 69c7857b7eeec1ff7098baff288f5ccf080c0fbb..654edc35be3ce9751e29c4ac1362742ac6f5f5a9 100644 (file)
@@ -407,6 +407,7 @@ Part_combine_iterator::construct_children ()
     "DynamicLineSpanner",
     "Tie",
     "Dots",
+    "MultiMeasureRest",
     "Rest",
     "Slur",
     "TextScript",
@@ -432,11 +433,6 @@ Part_combine_iterator::construct_children ()
                             ly_symbol2scm ("horizontal-shift"), horizontalShiftOne_);
   execute_pushpop_property (two, ly_symbol2scm ("NoteColumn"),
                             ly_symbol2scm ("horizontal-shift"), horizontalShiftTwo_);
-  /* Also handle MultiMeasureRest positions for voice 1/2 */
-  execute_pushpop_property (one, ly_symbol2scm ("MultiMeasureRest"),
-                            ly_symbol2scm ("staff-position"), scm_from_int (4));
-  execute_pushpop_property (two, ly_symbol2scm ("MultiMeasureRest"),
-                            ly_symbol2scm ("staff-position"), scm_from_int (-4));
 
 }
 
index 7408106d8bb8fce3c9c00e086ef768010d754985..3a13f03701f421397feec39a723942cea8c1d0c4 100644 (file)
@@ -42,7 +42,7 @@
 #define FRAMEWORKDIR ".."
 
 int
-sane_putenv (char const *key, string value, bool overwrite)
+sane_putenv (char const *key, const string &value, bool overwrite)
 {
   if (overwrite || !getenv (key))
     {
@@ -64,7 +64,7 @@ sane_putenv (char const *key, string value, bool overwrite)
 }
 
 static int
-set_env_file (char const *key, string value, bool overwrite = false)
+set_env_file (char const *key, const string &value, bool overwrite = false)
 {
   if (is_file (value))
     return sane_putenv (key, value, overwrite);
@@ -75,7 +75,7 @@ set_env_file (char const *key, string value, bool overwrite = false)
 }
 
 static int
-set_env_dir (char const *key, string value)
+set_env_dir (char const *key, const string &value)
 {
   if (is_dir (value))
     return sane_putenv (key, value, false);
@@ -108,7 +108,7 @@ prepend_env_path (char const *key, string value)
 #endif
 
 static void
-prefix_relocation (string prefix)
+prefix_relocation (const string &prefix)
 {
   string bindir = prefix + "/bin";
   string datadir = prefix + "/share";
@@ -141,7 +141,7 @@ prefix_relocation (string prefix)
 */
 
 static void
-framework_relocation (string prefix)
+framework_relocation (const string &prefix)
 {
   debug_output (_f ("Relocation: framework_prefix=%s", prefix));
 
@@ -257,7 +257,7 @@ setup_paths (char const *argv0_ptr)
 }
 
 string
-expand_environment_variables (string orig)
+expand_environment_variables (const string &orig)
 {
   char const *start_ptr = orig.c_str ();
   char const *ptr = orig.c_str ();
@@ -340,7 +340,7 @@ read_line (FILE *f)
 }
 
 void
-read_relocation_file (string filename)
+read_relocation_file (const string &filename)
 {
   debug_output (_f ("Relocation file: %s", filename.c_str ()) + "\n");
   char const *cname = filename.c_str ();
@@ -383,7 +383,7 @@ read_relocation_file (string filename)
 }
 
 void
-read_relocation_dir (string dirname)
+read_relocation_dir (const string &dirname)
 {
   if (DIR *dir = opendir (dirname.c_str ()))
     while (struct dirent *ent = readdir (dir))
index bf6f43758b0e764d1e0766e6f6548c97e92d454a..c4c5de1e73a19f5e1cadc839f2d7f70d0a63efc4 100644 (file)
@@ -159,7 +159,7 @@ Rest::calc_cross_staff (SCM smob)
   make this function easily usable in C++
 */
 string
-Rest::glyph_name (Grob *me, int durlog, string style, bool try_ledgers,
+Rest::glyph_name (Grob *me, int durlog, const string &style, bool try_ledgers,
                   Real offset)
 {
   bool is_ledgered = false;
index 3dc8a2b0e6f97b3c2844155f9020c5ede6d64b8b..07ef344440aef7efe046d9d04a514a701bd7d6ad 100644 (file)
@@ -28,7 +28,6 @@
 #include "staff-symbol-referencer.hh"
 #include "item.hh"
 #include "tie-formatting-problem.hh"
-#include "tie-column-format.hh"
 
 ADD_INTERFACE (Semi_tie_column,
                "The interface for a column of l.v. (laissez vibrer) ties.",
index b144b2656ff927aeb5a51f506e631b98cf441499..332995ac99ef051d760cf1a786080a16f8bf6314 100644 (file)
@@ -187,7 +187,7 @@ Slur_configuration::Slur_configuration ()
 };
 
 void
-Slur_configuration::add_score (Real s, string desc)
+Slur_configuration::add_score (Real s, const string &desc)
 {
   if (s < 0)
     {
index fbc5f00b844ae5488b6bfb889548e42c01d143fc..f2e345691354d291a77c0f9562f0bfaf04b889e0 100644 (file)
@@ -123,7 +123,7 @@ Slur_proto_engraver::finalize ()
 }
 
 void
-Slur_proto_engraver::create_slur (string spanner_id, Stream_event *ev_cause, Grob *g_cause, Direction dir, bool left_broken)
+Slur_proto_engraver::create_slur (const string &spanner_id, Stream_event *ev_cause, Grob *g_cause, Direction dir, bool left_broken)
 {
   Grob *ccc = unsmob_grob (get_property ("currentCommandColumn"));
   SCM cause = ev_cause ? ev_cause->self_scm () : g_cause->self_scm ();
@@ -149,7 +149,7 @@ Slur_proto_engraver::create_slur (string spanner_id, Stream_event *ev_cause, Gro
 }
 
 bool
-Slur_proto_engraver::can_create_slur (string id, vsize old_slurs, vsize *event_idx, Stream_event *ev)
+Slur_proto_engraver::can_create_slur (const string &id, vsize old_slurs, vsize *event_idx, Stream_event *ev)
 {
   for (vsize j = slurs_.size (); j--;)
     {
index 6ecedc9854f1880df2106802053df8dfa0aadb92..26426ae8af1e80824e2626f41c1ff1449e134d99 100644 (file)
@@ -55,7 +55,7 @@ Source_file::load_stdin ()
   return contents of FILENAME. *Not 0-terminated!*
  */
 vector<char>
-gulp_file (string filename, int desired_size)
+gulp_file (const string &filename, int desired_size)
 {
   /* "b" must ensure to open literally, avoiding text (CR/LF)
      conversions.  */
@@ -106,7 +106,7 @@ Source_file::init ()
   smobify_self ();
 }
 
-Source_file::Source_file (string filename, string data)
+Source_file::Source_file (const string &filename, const string &data)
 {
   init ();
 
@@ -124,7 +124,7 @@ Source_file::Source_file (string filename, string data)
       newline_locations_.push_back (&characters_[0] + i);
 }
 
-Source_file::Source_file (string filename_string)
+Source_file::Source_file (const string &filename_string)
 {
   init ();
 
index 31f3af6176ef91189a924c449e0fb3d7e57b4eb1..c06ad9b72189a6416b93848c7f70f9b353071de1 100644 (file)
@@ -46,12 +46,12 @@ protected:
 
 private:
   string new_instrument_string ();
-  void set_instrument_name (string voice);
-  void set_instrument (int channel, string voice);
-  int get_channel (string instrument);
-  Audio_staff *get_audio_staff (string voice);
-  Audio_staff *new_audio_staff (string voice);
-  Audio_dynamic *get_dynamic (string voice);
+  void set_instrument_name (const string &voice);
+  void set_instrument (int channel, const string &voice);
+  int get_channel (const string &instrument);
+  Audio_staff *get_audio_staff (const string &voice);
+  Audio_staff *new_audio_staff (const string &voice);
+  Audio_dynamic *get_dynamic (const string &voice);
 
   string instrument_string_;
   int channel_;
@@ -111,7 +111,7 @@ Staff_performer::initialize ()
 }
 
 Audio_staff *
-Staff_performer::new_audio_staff (string voice)
+Staff_performer::new_audio_staff (const string &voice)
 {
   Audio_staff *audio_staff = new Audio_staff;
   audio_staff->merge_unisons_
@@ -132,7 +132,7 @@ Staff_performer::new_audio_staff (string voice)
 }
 
 Audio_staff *
-Staff_performer::get_audio_staff (string voice)
+Staff_performer::get_audio_staff (const string &voice)
 {
   SCM channel_mapping = get_property ("midiChannelMapping");
   if (channel_mapping != ly_symbol2scm ("instrument")
@@ -152,7 +152,7 @@ Staff_performer::get_audio_staff (string voice)
 }
 
 Audio_dynamic *
-Staff_performer::get_dynamic (string voice)
+Staff_performer::get_dynamic (const string &voice)
 {
   map<string, Audio_dynamic *>::const_iterator i = dynamic_map_.find (voice);
   if (i != dynamic_map_.end ())
@@ -166,7 +166,7 @@ Staff_performer::process_music ()
 }
 
 void
-Staff_performer::set_instrument (int channel, string voice)
+Staff_performer::set_instrument (int channel, const string &voice)
 {
   instrument_ = new Audio_instrument (instrument_string_);
   instrument_->channel_ = channel;
@@ -179,7 +179,7 @@ Staff_performer::set_instrument (int channel, string voice)
 }
 
 void
-Staff_performer::set_instrument_name (string voice)
+Staff_performer::set_instrument_name (const string &voice)
 {
   instrument_name_ = new Audio_text (Audio_text::INSTRUMENT_NAME,
                                      instrument_string_);
@@ -242,7 +242,7 @@ Staff_performer::new_instrument_string ()
 }
 
 int
-Staff_performer::get_channel (string instrument)
+Staff_performer::get_channel (const string &instrument)
 {
   SCM channel_mapping = get_property ("midiChannelMapping");
   map<string, int> &channel_map
index dbd11f890eb0419e7e269d27edb6401c78da121d..4ae14e4609a361b95170859d997a20200187ed01 100644 (file)
@@ -953,6 +953,8 @@ stencil_traverser (PangoMatrix trans, SCM expr)
     return stencil_traverser (trans, scm_caddr (expr));
   else if (scm_car (expr) == ly_symbol2scm ("color"))
     return stencil_traverser (trans, scm_caddr (expr));
+  else if (scm_car (expr) == ly_symbol2scm ("transparent-stencil"))
+    return stencil_traverser (trans, scm_cadr (expr));
   else if (scm_car (expr) == ly_symbol2scm ("id"))
     return stencil_traverser (trans, scm_caddr (expr));
   else
index ee5dce0b005e3e17c08149a42f19a29be3b62c0e..734eb6080648ea4c7f496818c9a64994afb2bb08 100644 (file)
@@ -37,6 +37,8 @@ interpret_stencil_expression (SCM expr,
           interpret_stencil_expression (scm_force (scm_cadr (expr)), func, func_arg, o);
           return;
         }
+      if (head == ly_symbol2scm ("transparent-stencil"))
+        return;
       if (head == ly_symbol2scm ("footnote"))
         return;
       if (head == ly_symbol2scm ("translate-stencil"))
index bc14eb9bdf7ea04ffd8b38832bf5e02076bedb7c..7bc35584c571c43772ae62089cd2304cc23c0f32 100644 (file)
@@ -29,7 +29,6 @@
 #include "pointer-group-interface.hh"
 #include "tie.hh"
 #include "directional-element-interface.hh"
-#include "tie-column-format.hh"
 #include "tie-formatting-problem.hh"
 #include "tie-configuration.hh"
 
index 79992fb80885cdb87347faf4991a5e43c44aa1b4..19bcbd822c250df3a3a9862d30a5010c58dad213 100644 (file)
@@ -102,7 +102,7 @@ Tie_configuration::distance (Tie_configuration const &a,
 }
 
 void
-Tie_configuration::add_score (Real s, string desc)
+Tie_configuration::add_score (Real s, const string &desc)
 {
   assert (!scored_);
   score_ += s;
@@ -136,7 +136,7 @@ Ties_configuration::reset_score ()
 }
 
 void
-Ties_configuration::add_tie_score (Real s, int i, string desc)
+Ties_configuration::add_tie_score (Real s, int i, const string &desc)
 {
   assert (!scored_);
   score_ += s;
@@ -150,7 +150,7 @@ Ties_configuration::add_tie_score (Real s, int i, string desc)
 }
 
 void
-Ties_configuration::add_score (Real s, string desc)
+Ties_configuration::add_score (Real s, const string &desc)
 {
   assert (!scored_);
   score_ += s;
index be7cfe543cc170ec6674ba7f27a901b12dff0d20..eaeb67adfb25a46b9dfbd16858a4abd0d1e755b4 100644 (file)
@@ -467,7 +467,7 @@ print_trailer (void *out,
 }
 
 static void
-create_type42_font (void *out, string name, int idx)
+create_type42_font (void *out, const string &name, int idx)
 {
   FT_Face face;
 
index 0d1fe3d08056428cac0fb53b37fb442f6b743072..d5c8ffc3af5c067be40695bc61bb44274596507e 100644 (file)
@@ -99,6 +99,7 @@
   \defaultchild "Voice"
   \accepts "Voice"
   \accepts "CueVoice"
+  \accepts "NullVoice"
 
   \description "Handles clefs, bar lines, keys, accidentals.  It can contain
 @code{Voice} contexts."
@@ -767,6 +768,59 @@ automatically when an output definition (a @code{\\score} or
 context."
 }
 
+\context {
+  \name "NullVoice"
+  \type "Engraver_group"
+
+  \description "Non-printing context, typically used for aligning
+lyrics in polyphonic situations, or with @code{\partcombine}."
+
+  %% don't route anything out of here
+  \alias "Staff"
+  \alias "Voice"
+
+  %% all three are needed for ties to work with lyrics
+  \consists "Note_heads_engraver"
+  \consists "Rhythmic_column_engraver"
+  \consists "Tie_engraver"
+
+  %% both are needed for melismas to work with \autoBeamOff
+  \consists "Beam_engraver"
+  \consists "Stem_engraver"
+
+  %% needed for slurs to work with lyrics
+  \consists "Slur_engraver"
+
+  %% keep noteheads inside the staff
+  \consists "Pitch_squash_engraver"
+  squashedPosition = 0
+
+  %% `\omit NoteHead' would give slur attachment errors
+  \omit Accidental
+  \omit Beam
+  \omit Dots
+  \omit Flag
+  \omit Rest
+  \omit Slur
+  \omit Stem
+  \omit Tie
+
+  %% let these take up space (for lyric extenders, etc.)
+  \override NoteHead.transparent = ##t
+  \override TabNoteHead.transparent = ##t
+
+  %% don't let notes shift
+  \override NoteHead.X-offset = 0
+  \override NoteColumn.ignore-collision = ##t
+
+  %% keep beams and stems inside the staff
+  \override Beam.positions = #'(1 . 1)
+  \override Stem.length = 0
+
+  %% prevent "weird stem size" warnings
+  \override Stem.direction = #UP
+}
+
 \context {
   \Voice
   \name "TabVoice"
index e6cdebaef46d53634720a757a57492e3e1f6d472..5ac534a79387aeff51de06c939de7e8361a0b810 100644 (file)
@@ -6,10 +6,10 @@
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: lilypond 2.17.25\n"
+"Project-Id-Version: lilypond 2.17.26\n"
 "Report-Msgid-Bugs-To: http://post.gmane.org/post.php?group=gmane.comp.gnu."
 "lilypond.bugs\n"
-"POT-Creation-Date: 2013-08-25 15:40+0100\n"
+"POT-Creation-Date: 2013-09-08 15:34+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -1681,7 +1681,7 @@ msgstr ""
 msgid "\\applycontext argument is not a procedure"
 msgstr ""
 
-#: arpeggio.cc:115
+#: arpeggio.cc:138
 msgid "no heads for arpeggio found?"
 msgstr ""
 
@@ -1707,7 +1707,7 @@ msgstr ""
 msgid "\"%s\" is not a valid outside-staff-placement-directive"
 msgstr ""
 
-#: axis-group-interface.cc:774
+#: axis-group-interface.cc:776
 msgid "an outside-staff object should have a direction, defaulting to up"
 msgstr ""
 
@@ -1825,20 +1825,20 @@ msgstr ""
 msgid "custos `%s' not found"
 msgstr ""
 
-#: dispatcher.cc:83
+#: dispatcher.cc:89
 msgid "Event class should be a list"
 msgstr ""
 
-#: dispatcher.cc:166
+#: dispatcher.cc:172
 #, c-format
 msgid "Junking event: %s"
 msgstr ""
 
-#: dispatcher.cc:262
+#: dispatcher.cc:277
 msgid "Attempting to remove nonexisting listener."
 msgstr ""
 
-#: dispatcher.cc:284
+#: dispatcher.cc:303
 msgid "Already listening to dispatcher, ignoring request"
 msgstr ""
 
@@ -2426,12 +2426,12 @@ msgstr ""
 msgid "Time signature with more than 255 beats.  Truncating"
 msgstr ""
 
-#: midi-stream.cc:39
+#: midi-stream.cc:38
 #, c-format
 msgid "cannot open for write: %s: %s"
 msgstr ""
 
-#: midi-stream.cc:55
+#: midi-stream.cc:54
 #, c-format
 msgid "cannot write to file: `%s'"
 msgstr ""
@@ -3118,96 +3118,108 @@ msgstr ""
 msgid "Too much lookahead"
 msgstr ""
 
-#: parser.yy:458 parser.yy:747 parser.yy:814
+#: parser.yy:458 parser.yy:756 parser.yy:823
 msgid "bad expression type"
 msgstr ""
 
-#: parser.yy:643 parser.yy:1142
+#: parser.yy:652 parser.yy:1151
 msgid "not a context mod"
 msgstr ""
 
-#: parser.yy:849
+#: parser.yy:858
 msgid "score expected"
 msgstr ""
 
-#: parser.yy:865
+#: parser.yy:874
 msgid "\\paper cannot be used in \\score, use \\layout instead"
 msgstr ""
 
-#: parser.yy:889
+#: parser.yy:898
 msgid "need \\paper for paper block"
 msgstr ""
 
-#: parser.yy:1037 parser.yy:1059
+#: parser.yy:1046 parser.yy:1068
 msgid "unexpected post-event"
 msgstr ""
 
-#: parser.yy:1067
+#: parser.yy:1076
 msgid "Ignoring non-music expression"
 msgstr ""
 
-#: parser.yy:1078 parser.yy:2325
+#: parser.yy:1087 parser.yy:2373
 msgid "music expected"
 msgstr ""
 
-#: parser.yy:1346
+#: parser.yy:1355
 msgid "not a symbol"
 msgstr ""
 
-#: parser.yy:2037 parser.yy:2151 parser.yy:2164 parser.yy:2173
+#: parser.yy:2044 parser.yy:2158 parser.yy:2171 parser.yy:2180
 msgid "bad grob property path"
 msgstr ""
 
-#: parser.yy:2131
+#: parser.yy:2138
 msgid "only \\consists and \\remove take non-string argument."
 msgstr ""
 
-#: parser.yy:2192
+#: parser.yy:2199
 msgid "bad context property path"
 msgstr ""
 
-#: parser.yy:2293
+#: parser.yy:2300
 msgid "simple string expected"
 msgstr ""
 
-#: parser.yy:2434
+#: parser.yy:2318
+msgid "symbol expected"
+msgstr ""
+
+#: parser.yy:2482
 msgid "not a rhythmic event"
 msgstr ""
 
-#: parser.yy:2508
+#: parser.yy:2556
 msgid "post-event expected"
 msgstr ""
 
-#: parser.yy:2517 parser.yy:2522 parser.yy:3003
+#: parser.yy:2565 parser.yy:2570
 msgid "have to be in Lyric mode for lyrics"
 msgstr ""
 
-#: parser.yy:2590
+#: parser.yy:2638
 msgid "expecting string as script definition"
 msgstr ""
 
-#: parser.yy:2685
+#: parser.yy:2733
 msgid "not an articulation"
 msgstr ""
 
-#: parser.yy:2757 parser.yy:2803
+#: parser.yy:2805 parser.yy:2851
 #, c-format
 msgid "not a duration: %d"
 msgstr ""
 
-#: parser.yy:2820
+#: parser.yy:2868
 msgid "bass number expected"
 msgstr ""
 
-#: parser.yy:2919
+#: parser.yy:2967
 msgid "have to be in Note mode for notes"
 msgstr ""
 
-#: parser.yy:2978
+#: parser.yy:3026
 msgid "have to be in Chord mode for chords"
 msgstr ""
 
-#: parser.yy:3204
+#: parser.yy:3041
+msgid "markup outside of text script or \\lyricmode"
+msgstr ""
+
+#: parser.yy:3046
+msgid "unrecognized string, not in text script or \\lyricmode"
+msgstr ""
+
+#: parser.yy:3254
 msgid "not a markup"
 msgstr ""
 
@@ -3386,31 +3398,31 @@ msgstr ""
 msgid "Undefined parent event class `~S'"
 msgstr ""
 
-#: define-markup-commands.scm:1041
+#: define-markup-commands.scm:1037
 msgid "no systems found in \\score markup, does it have a \\layout block?"
 msgstr ""
 
-#: define-markup-commands.scm:2837
+#: define-markup-commands.scm:2832
 #, scheme-format
 msgid "Cannot find glyph ~a"
 msgstr ""
 
-#: define-markup-commands.scm:3263
+#: define-markup-commands.scm:3258
 #, scheme-format
 msgid "no brace found for point size ~S "
 msgstr ""
 
-#: define-markup-commands.scm:3264
+#: define-markup-commands.scm:3259
 #, scheme-format
 msgid "defaulting to ~S pt"
 msgstr ""
 
-#: define-markup-commands.scm:3508
+#: define-markup-commands.scm:3503
 #, scheme-format
 msgid "not a valid duration string: ~a"
 msgstr ""
 
-#: define-markup-commands.scm:3719
+#: define-markup-commands.scm:3714
 #, scheme-format
 msgid "not a valid duration string: ~a - ignoring"
 msgstr ""
@@ -3645,7 +3657,7 @@ msgstr ""
 msgid "wrong type for argument ~a.  Expecting ~a, found ~s"
 msgstr ""
 
-#: ly-syntax-constructors.scm:201
+#: ly-syntax-constructors.scm:200
 #, scheme-format
 msgid "Invalid property operation ~a"
 msgstr ""
@@ -3703,34 +3715,34 @@ msgstr ""
 msgid "bad grob property path ~a"
 msgstr ""
 
-#: music-functions.scm:766
+#: music-functions.scm:755
 msgid "Bad chord repetition"
 msgstr ""
 
-#: music-functions.scm:801
+#: music-functions.scm:790
 #, scheme-format
 msgid "music expected: ~S"
 msgstr ""
 
-#: music-functions.scm:1145
+#: music-functions.scm:1133
 #, scheme-format
 msgid "cannot find quoted music: `~S'"
 msgstr ""
 
-#: music-functions.scm:1283
+#: music-functions.scm:1271
 msgid "Add @var{octave-shift} to the octave of @var{pitch}."
 msgstr ""
 
-#: music-functions.scm:1343
+#: music-functions.scm:1331
 #, scheme-format
 msgid "Unknown octaveness type: ~S "
 msgstr ""
 
-#: music-functions.scm:1344
+#: music-functions.scm:1332
 msgid "Defaulting to 'any-octave."
 msgstr ""
 
-#: music-functions.scm:1689
+#: music-functions.scm:1677
 #, scheme-format
 msgid "unknown accidental style: ~S"
 msgstr ""
index 54d360903ae5924731dc9988fbf086ffb57f30df..59a97b69670867c6c85ed0dd4d8aae976374c9b7 100644 (file)
@@ -35,6 +35,8 @@ note)."
  'ambitus-interface
  "The line between note heads for a pitch range."
  '(gap
+   length-fraction
+   maximum-gap
    note-heads
    thickness))
 
index b779edbb4f13b61a3670654a3ab127ffb018ce76..e4e0f9dd999d9ad867850f474a9a6b22158e388e 100644 (file)
@@ -578,6 +578,8 @@ to beams from this stem.  Further beams are typeset as beamlets.")
      (max-stretch ,number? "The maximum amount that this
 @code{VerticalAxisGroup} can be vertically stretched (for example, in
 order to better fill a page).")
+     (maximum-gap ,number? "Maximum value allowed for @code{gap}
+property.")
      (measure-count ,integer? "The number of measures for a
 multi-measure rest.")
      (measure-length ,ly:moment? "Length of a measure.  Used in some
@@ -674,8 +676,9 @@ outside-staff-object can be placed so that is it very close to another
 grob horizontally.  If this property is set, the outside-staff-object
 is raised so that it is not so close to its neighbor.")
      (outside-staff-padding ,number? "The padding to place between
-this grob and the staff when spacing according to
-@code{outside-staff-priority}.")
+grobs when spacing according to @code{outside-staff-priority}.
+Two grobs with different @code{outside-staff-padding} values have
+the larger value of padding between them.")
      (outside-staff-placement-directive ,symbol? "One of four directives
 telling how outside staff objects should be placed.
 @itemize @bullet
index af5f4fe36b49147d29b590291009b82f10f8e0df..040f3fc2dd54d6adbe899c9f643a1df50c07c9ed 100644 (file)
 
     (AmbitusLine
      . (
-        (gap . 0.35)
+        (gap . ,ambitus-line::calc-gap)
+        (length-fraction . 0.7)
+        (maximum-gap . 0.45)
         (stencil . ,ambitus::print)
         (thickness . 2)
         (X-offset . ,ly:self-alignment-interface::centered-on-x-parent)
         (direction . ,DOWN)
         (minimum-space . 1.2)
         (outside-staff-priority . 250)
-        (outside-staff-padding . 0.6)
         (padding . 0.6)
         (side-axis . ,Y)
         (slur-padding . 0.3)
         (font-encoding . fetaText)
         (font-size . -2)
         (outside-staff-horizontal-padding . 0.5)
-        (outside-staff-padding . 0.5)
         (outside-staff-priority . 750)
         (self-alignment-X . ,CENTER)
         (side-axis . ,Y)
         (padding . 0.2)
         (stencil . ,parentheses-item::print)
         (stencils . ,parentheses-item::calc-parenthesis-stencils)
+        ;; X-extent needs to be non-empty in order to allow proper
+        ;; horizontal attachment.  ParenthesesItem does not reserve
+        ;; space of its own, however.
+        (X-extent . (0 . 0))
         (meta . ((class . Item)
                  (interfaces . (font-interface
                                 parentheses-interface))))))
         (extra-spacing-width . (+inf.0 . -inf.0))
         (font-size . 2)
         (non-musical . #t)
-        (outside-staff-horizontal-padding . 0.12)
+        (outside-staff-horizontal-padding . 0.2)
         (outside-staff-priority . 1500)
         (padding . 0.8)
         (self-alignment-X . ,CENTER)
         (cross-staff . ,script-or-side-position-cross-staff)
         (direction . ,DOWN)
         (extra-spacing-width . (+inf.0 . -inf.0))
-        (outside-staff-horizontal-padding . 0.12)
+        (outside-staff-horizontal-padding . 0.2)
         (outside-staff-priority . 450)
 
         ;; sync with Fingering ?
index d5aef111407ef761df49a63e72154294b9cfa883..88d33ecda9ea4e886630e41100b9daab75985b0e 100644 (file)
@@ -503,19 +503,18 @@ only works in the PDF backend.
   (let* ((arg-stencil (interpret-markup layout props arg))
          (x-ext (ly:stencil-extent arg-stencil X))
          (y-ext (ly:stencil-extent arg-stencil Y)))
-    (ly:make-stencil
-     `(delay-stencil-evaluation
-       ,(delay (ly:stencil-expr
-                (let* ((table (ly:output-def-lookup layout 'label-page-table))
+    (ly:stencil-add
+     (ly:make-stencil
+      `(delay-stencil-evaluation
+        ,(delay (let* ((table (ly:output-def-lookup layout 'label-page-table))
                        (page-number (if (list? table)
                                         (assoc-get label table)
-                                        #f))
-                       (link-expr (list 'page-link page-number
-                                        `(quote ,x-ext) `(quote ,y-ext))))
-                  (ly:stencil-add (ly:make-stencil link-expr x-ext y-ext)
-                                  arg-stencil)))))
-     x-ext
-     y-ext)))
+                                        #f)))
+                  (list 'page-link page-number
+                        `(quote ,x-ext) `(quote ,y-ext)))))
+      x-ext
+      y-ext)
+     arg-stencil)))
 
 
 (define-markup-command (beam layout props width slope thickness)
@@ -705,6 +704,7 @@ Provide a white background for @var{arg}.
 @cindex putting space around text
 
 Add space around a markup object.
+Identical to @code{pad-around}.
 
 @lilypond[verbatim,quote]
 \\markup {
@@ -719,15 +719,11 @@ Add space around a markup object.
   }
 }
 @end lilypond"
-  (let*
-      ((stil (interpret-markup layout props arg))
-       (xext (ly:stencil-extent stil X))
-       (yext (ly:stencil-extent stil Y)))
-
-    (ly:make-stencil
-     (ly:stencil-expr stil)
-     (interval-widen xext amount)
-     (interval-widen yext amount))))
+  (let* ((m (interpret-markup layout props arg))
+         (x (interval-widen (ly:stencil-extent m X) amount))
+         (y (interval-widen (ly:stencil-extent m Y) amount)))
+    (ly:stencil-add (make-transparent-box-stencil x y)
+                    m)))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; space
@@ -1965,8 +1961,12 @@ alignment accordingly.
 @cindex setting extent of text objects
 
 Set the dimensions of @var{arg} to @var{x} and@tie{}@var{y}."
-  (let* ((m (interpret-markup layout props arg)))
-    (ly:make-stencil (ly:stencil-expr m) x y)))
+  (let* ((expr (ly:stencil-expr (interpret-markup layout props arg))))
+    (ly:stencil-add
+     (make-transparent-box-stencil x y)
+     (ly:make-stencil
+      `(delay-stencil-evaluation ,(delay expr))
+      x y))))
 
 (define-markup-command (pad-around layout props amount arg)
   (number? markup?)
@@ -1987,11 +1987,10 @@ Set the dimensions of @var{arg} to @var{x} and@tie{}@var{y}."
 }
 @end lilypond"
   (let* ((m (interpret-markup layout props arg))
-         (x (ly:stencil-extent m X))
-         (y (ly:stencil-extent m Y)))
-    (ly:make-stencil (ly:stencil-expr m)
-                     (interval-widen x amount)
-                     (interval-widen y amount))))
+         (x (interval-widen (ly:stencil-extent m X) amount))
+         (y (interval-widen (ly:stencil-extent m Y) amount)))
+    (ly:stencil-add (make-transparent-box-stencil x y)
+                    m)))
 
 (define-markup-command (pad-x layout props amount arg)
   (number? markup?)
@@ -2044,7 +2043,7 @@ Add padding @var{amount} around @var{arg} in the X@tie{}direction.
   (let* ((m (interpret-markup layout props arg))
          (x (ly:stencil-extent m X))
          (y (ly:stencil-extent m Y)))
-    (ly:make-stencil "" x y)))
+    (ly:make-stencil (list 'transparent-stencil (ly:stencil-expr m)) x y)))
 
 (define-markup-command (pad-to-box layout props x-ext y-ext arg)
   (number-pair? number-pair? markup?)
@@ -2064,12 +2063,8 @@ Add padding @var{amount} around @var{arg} in the X@tie{}direction.
   }
 }
 @end lilypond"
-  (let* ((m (interpret-markup layout props arg))
-         (x (ly:stencil-extent m X))
-         (y (ly:stencil-extent m Y)))
-    (ly:make-stencil (ly:stencil-expr m)
-                     (interval-union x-ext x)
-                     (interval-union y-ext y))))
+  (ly:stencil-add (make-transparent-box-stencil x-ext y-ext)
+                  (interpret-markup layout props arg)))
 
 (define-markup-command (hcenter-in layout props length arg)
   (number? markup?)
@@ -3811,7 +3806,7 @@ an inverted glyph.  Note that within music, one would usually use the
                     (if (eqv? direction DOWN)
                         (markup #:musicglyph "scripts.dfermata")
                         (markup #:musicglyph "scripts.ufermata"))))
-  
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; translating.
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -4155,6 +4150,8 @@ when @var{label} is not found."
   (let* ((gauge-stencil (interpret-markup layout props gauge))
          (x-ext (ly:stencil-extent gauge-stencil X))
          (y-ext (ly:stencil-extent gauge-stencil Y)))
+   (ly:stencil-add
+    (make-transparent-box-stencil x-ext y-ext))
     (ly:make-stencil
      `(delay-stencil-evaluation
        ,(delay (ly:stencil-expr
index dffb578c6e800f7eeae60ef6333e338e671fcf15..a0a18603c2d3244356aec8b0464bd797180c7742 100644 (file)
@@ -67,6 +67,7 @@ are used internally in @file{lily/@/stencil-interpret.cc}."
     rotate-stencil
     scale-stencil
     translate-stencil
+    transparent-stencil
     ))
 
 (map ly:register-stencil-expression
index c245c82477f92fa001c04c46f43c2582ec268b2a..ea5db93f181befecdcbe970f3c9432f15b7cd19d 100644 (file)
@@ -124,13 +124,12 @@ spacing after the divider).
          (final-x (car result))
          (stencils (cdr result)))
     ;; Add the horizontal line and combine all stencils:
-    (box-stencil
-     (apply ly:stencil-add
-            (cons
-             (make-line-stencil line-width 0 0 final-x 0)
-             stencils))
-     0.0
-     0.0)))
+    (apply ly:stencil-add
+           (make-line-stencil line-width 0 0 final-x 0) ; the horizontal line
+           (make-transparent-box-stencil ; space for absent boxes
+             (cons 0 final-x)
+             (interval-widen '(0 . 0) (+ box-hheight dy)))
+           stencils)))
 
 ;; Parse the harp pedal definition string into list of directions (-1/0/1), #\o and #\|
 (define (harp-pedals-parse-string definition-string)
index d714deec8c886123abff1072a46916580d0ffd4c..092cf84e4b46a5e2c2f19d7fdc6617dd4da2f543 100644 (file)
@@ -543,8 +543,7 @@ in @var{grob}."
          direction-polyphonic-grobs)
     (list
      (make-property-set 'graceSettings general-grace-settings)
-     (make-grob-property-override 'NoteColumn 'horizontal-shift (quotient n 2))
-     (make-grob-property-override 'MultiMeasureRest 'staff-position (if (odd? n) -4 4))))))
+     (make-grob-property-override 'NoteColumn 'horizontal-shift (quotient n 2))))))
 
 (define-safe-public (make-voice-props-revert)
   (make-sequential-music
@@ -552,8 +551,7 @@ in @var{grob}."
     (map (lambda (x) (make-grob-property-revert x 'direction))
          direction-polyphonic-grobs)
     (list (make-property-unset 'graceSettings)
-          (make-grob-property-revert 'NoteColumn 'horizontal-shift)
-          (make-grob-property-revert 'MultiMeasureRest 'staff-position)))))
+          (make-grob-property-revert 'NoteColumn 'horizontal-shift)))))
 
 
 (define-safe-public (context-spec-music m context #:optional id)
index 23ff2640bb4f3efce22411efd1b6fbb907999a15..e04b298975cde419bfc931c2fbdd34e4d84d574e 100644 (file)
@@ -1241,6 +1241,31 @@ parent or the parent has no setting."
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; ambitus
 
+;; Calculate the gaps between ambitus heads and ends of ambitus line.
+;; Start by determining desired length of the ambitus line (based on
+;; length-fraction property), calc gap from that and make sure that
+;; it doesn't exceed maximum allowed value.
+
+(define-public (ambitus-line::calc-gap grob)
+  (let ((heads (ly:grob-object grob 'note-heads)))
+
+  (if (and (ly:grob-array? heads)
+             (= (ly:grob-array-length heads) 2))
+      (let* ((common (ly:grob-common-refpoint-of-array grob heads Y))
+              (head-down (ly:grob-array-ref heads 0))
+              (head-up (ly:grob-array-ref heads 1))
+              (fraction (ly:grob-property grob 'length-fraction 0.7))
+              (max-gap (ly:grob-property grob 'maximum-gap 0.45))
+              ;; distance between noteheads:
+              (distance (- (interval-start (ly:grob-extent head-up common Y))
+                          (interval-end (ly:grob-extent head-down common Y))))
+              (gap (* 0.5 distance (- 1 fraction))))
+
+         (min gap max-gap))
+      0)))
+
+;; Print a line connecting ambitus heads:
+
 (define-public (ambitus::print grob)
   (let ((heads (ly:grob-object grob 'note-heads)))
 
@@ -1249,13 +1274,15 @@ parent or the parent has no setting."
         (let* ((common (ly:grob-common-refpoint-of-array grob heads Y))
                (head-down (ly:grob-array-ref heads 0))
                (head-up (ly:grob-array-ref heads 1))
-               (gap (ly:grob-property grob 'gap 0.35))
+               ;; The value used when 'gap' property cannot be read is small
+               ;; to make sure that ambitus of a fifth will have a visible line.
+               (gap (ly:grob-property grob 'gap 0.25))
                (point-min (+ (interval-end (ly:grob-extent head-down common Y))
                              gap))
                (point-max (- (interval-start (ly:grob-extent head-up common Y))
                              gap)))
 
-          (if (< point-min point-max)
+          (if (< (+ point-min 0.1) point-max) ; don't print lines shorter than 0.1ss
               (let* ((layout (ly:grob-layout grob))
                      (line-thick (ly:output-def-lookup layout 'line-thickness))
                      (blot (ly:output-def-lookup layout 'blot-diameter))
index 77a40026c0261c32fa6ca05215b84b9186700ed4..65852fc305a0ba9469784a69372886d6e0a14251 100644 (file)
@@ -181,6 +181,12 @@ the more angular the shape of the parenthesis."
      (interval-widen xext (/ width 2))
      (interval-widen yext (/ width 2)))))
 
+(define-public (make-transparent-box-stencil xext yext)
+  "Make a transparent box."
+  (ly:make-stencil
+   (list 'transparent-stencil
+         (ly:stencil-expr (make-filled-box-stencil xext yext)))
+   xext yext))
 
 (define-public (make-filled-box-stencil xext yext)
   "Make a filled box."
index a368f4f6669b6e2d223604bce7507c824c4e8f79..8de00bce07a8c80c06d4362b47a101f60d7db6e8 100644 (file)
@@ -12,13 +12,8 @@ $(outdir)/%.lo: %.cc
 $(outdir)/%.lo: $(outdir)/%.cc
        $(DO_LO_DEP) $(CXX) -c $(ALL_CXXFLAGS) $(PIC_FLAGS) -o $@ $<
 
-$(outdir)/%.cc: %.yy
-       $(BISON) -o $@  $<
-
-$(outdir)/%.hh: %.yy
-       $(BISON) -o $(subst .hh,-tmp.cc,$@) -d  $<
-       rm $(subst .hh,-tmp.cc,$@)
-       mv $(subst .hh,-tmp.hh,$@) $@
+$(outdir)/%.cc $(outdir)/%.hh: %.yy
+       $(BISON) -d -o $(outdir)/$*.cc $<
 
 $(outdir)/%.cc: %.ll
        $(FLEX) -Cfe -p -p -o$@ $<
index 620275baa177e67313535571393c21d85e90e205..954e7a33a0c306bea99fc77c041e2bd994895bb2 100644 (file)
@@ -12,14 +12,8 @@ $(outdir)/%.lo: %.c
 $(outdir)/%.lo: %.c
        $(DO_LO_DEP) $(CC) -c $(ALL_CFLAGS) $(PIC_FLAGS) -o $@ $<
 
-$(outdir)/%.c: %.y
-       $(BISON) $<
-       mv $(*F).tab.c $@
-
-$(outdir)/%.h: %.y
-       $(BISON) -d $<
-       mv $(*F).tab.h $@
-       rm -f $(*F).tab.c # if this happens in the wrong order it triggers recompile of the .cc file
+$(outdir)/%.c $(outdir)/%.h: %.y
+       $(BISON) -d -o $(outdir)/$*.c $<
 
 $(outdir)/%.c: %.l
        $(FLEX) -Cfe -p -p -o$@ $<