On Sat, Jan 10, 2009 at 11:40 AM, Reinhold Kainhofer
<reinh...@kainhofer.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Am Samstag, 10. Januar 2009 20:27:34 schrieb Carl D. Sorensen:
>> On 1/10/09 12:16 PM, "Reinhold Kainhofer" <reinh...@kainhofer.com> wrote:
>> > Can you maybe attach the file (rather than pasting its contents into the
>> > mail), so that end-of-line characters are preserved...
>>
>> Here it is.
>
> Ah, okay, I could reproduce your problem with the file. The problem was not
> the end-of-line, but rather an extra space after /dev/null. If you open the
> file in an editor and remove the extra space in that line, it will apply.

That is very strange.  I don't know what happened there.

I just re-created the patch, and this one applies fine (attached) with `git am'.

Thanks,
Patrick
From 865a09c76b8246361255dcd5cf93a8d61ec024a5 Mon Sep 17 00:00:00 2001
From: Patrick McCarty <pnor...@gmail.com>
Date: Tue, 6 Jan 2009 16:26:22 -0800
Subject: [PATCH] Docs: Add new procedure for barNumberVisibility

* The default value of barNumberVisibility, the
  procedure first-bar-number-invisible, hides the
  first bar number when currentBarNumber is less
  than or equal to `1'.

  This new procedure, all-bar-numbers-visible,
  allows the printing of all bar numbers, given
  that the value of 'break-visibility permits it.

Signed-off-by: Patrick McCarty <pnor...@gmail.com>
---
 Documentation/user/rhythms.itely                   |   17 +++-----------
 ...rinting-the-bar-number-for-the-first-measure.ly |   23 ++++++++++++++++++++
 scm/output-lib.scm                                 |    2 +
 3 files changed, 29 insertions(+), 13 deletions(-)
 create mode 100644 input/new/printing-the-bar-number-for-the-first-measure.ly

diff --git a/Documentation/user/rhythms.itely b/Documentation/user/rhythms.itely
index 3b13b80..210a3b7 100644
--- a/Documentation/user/rhythms.itely
+++ b/Documentation/user/rhythms.itely
@@ -2156,6 +2156,10 @@ c1 c c c
 
 @funindex barNumberVisibility
 
+...@c Uncomment this after next LSR update.
+...@c @lilypondfile[verbatim,lilyquote,ragged-right,texidoc,doctitle]
+...@c {printing-the-bar-number-for-the-first-measure.ly}
+
 Bar numbers can be typeset at regular intervals instead of just at
 the beginning of every line.  To do this the default behavior
 must be overridden to permit bar numbers to be printed at places
@@ -2280,19 +2284,6 @@ Bar numbers may collide with the top of the
 this, the @code{padding} property of @rinternals{BarNumber} can
 be used to position the number correctly.
 
-Bar numbers may only be printed at bar lines; to print a bar
-number at the beginning of a piece, an empty bar line must be
-inserted there, and a value other than @code{1} must be placed
-in @code{currentBarNumber}:
-
-...@lilypond[verbatim,quote,relative=1]
-\set Score.currentBarNumber = #50
-\bar ""
-c1 c c c
-c1 c c c
-\break
-...@end lilypond
-
 
 
 @node Bar and bar number checks
diff --git a/input/new/printing-the-bar-number-for-the-first-measure.ly b/input/new/printing-the-bar-number-for-the-first-measure.ly
new file mode 100644
index 0000000..86cc793
--- /dev/null
+++ b/input/new/printing-the-bar-number-for-the-first-measure.ly
@@ -0,0 +1,23 @@
+\version "2.12.1"
+
+\header {
+  lsrtags = "rhythms"
+
+  texidoc = "
+By default, the first bar number in a score is suppressed if it is
+less than or equal to `1'.  By setting @code{barNumberVisibility}
+to @code{all-bar-numbers-visible}, any bar number can be printed
+for the first measure and all subsequent measures.  Note that an
+empty bar line must be inserted before the first note for this to
+work.
+
+"
+  doctitle = "Printing the bar number for the first measure"
+}
+
+\relative c' {
+  \set Score.barNumberVisibility = #all-bar-numbers-visible
+  \bar ""
+  c1 d e f \break
+  g1 e d c
+}
diff --git a/scm/output-lib.scm b/scm/output-lib.scm
index c33aff0..53a5773 100644
--- a/scm/output-lib.scm
+++ b/scm/output-lib.scm
@@ -202,6 +202,8 @@ centered, X==1 is at the right, X == -1 is at the left."
 
 (define-public (first-bar-number-invisible barnum) (> barnum 1))
 
+(define-public (all-bar-numbers-visible barnum) #t)
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; percent repeat counters
 
-- 
1.6.1

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to