From 02d7b06f5d84aecdd8714d67c0f3a874bb080656 Mon Sep 17 00:00:00 2001
From: hanwen <hanwen>
Date: Sat, 2 Aug 2003 19:56:20 +0000
Subject: [PATCH] * scm/new-markup.scm (strut-markup): new markup function.

* scm/bass-figure.scm (make-bass-figure-markup): insert vertical
space also when no accidental is there.
---
 ChangeLog                        |  7 +++++++
 input/regression/figured-bass.ly |  1 +
 scm/bass-figure.scm              |  5 ++++-
 scm/new-markup.scm               | 35 ++++++++++++++++++++++++++------
 4 files changed, 41 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a6216da95c..a54a85fa1e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2003-08-02  Han-Wen Nienhuys  <hanwen@cs.uu.nl>
+
+	* scm/new-markup.scm (strut-markup): new markup function.
+
+	* scm/bass-figure.scm (make-bass-figure-markup): insert vertical
+	space also when no accidental is there.
+
 2003-08-02  Jan Nieuwenhuizen  <janneke@gnu.org>
 
 	* input/les-nereides.ly: Updates.
diff --git a/input/regression/figured-bass.ly b/input/regression/figured-bass.ly
index dc48c5a12a..2e67bf0535 100644
--- a/input/regression/figured-bass.ly
+++ b/input/regression/figured-bass.ly
@@ -18,6 +18,7 @@ You can also type letters by entering quoted strings, as demonstrated in the las
 	<3 [5] 7 [9 11]>
 	<3+ 5- 7!>
 	<3 _! 5 _- 7>
+	<3 _ 5 _ 7>
 \property FiguredBass.BassFigure \set #'font-family = #'roman
 	<"V7" ["bla" 6] 7>
    }
diff --git a/scm/bass-figure.scm b/scm/bass-figure.scm
index 136396187e..9c72b95ed0 100644
--- a/scm/bass-figure.scm
+++ b/scm/bass-figure.scm
@@ -33,7 +33,10 @@
 	 (fig-markup
 	  (if (string? fig)
 	      (make-simple-markup fig)
-	      (make-simple-markup (if align-accs " " ""))
+	      (if align-accs (make-simple-markup " ")
+		  (if (not (eq? acc '()))
+		      (make-simple-markup "")
+		      (make-strut-markup)))
 	      )))
 
       (if (number? acc)
diff --git a/scm/new-markup.scm b/scm/new-markup.scm
index f60c36caf7..d7e751ea69 100644
--- a/scm/new-markup.scm
+++ b/scm/new-markup.scm
@@ -45,6 +45,13 @@ for the reader.
 
 " ; " 
 
+
+;;;;;;;;;;;;;;;;;
+;; TODO:
+;; each markup function should have a doc string with
+;; syntax, description and example. 
+;;
+
 (define-public (simple-markup grob props . rest)
   (Text_item::text_to_molecule grob props (car rest))
   )
@@ -383,6 +390,23 @@ for the reader.
     (box-molecule m th pad)
   ))
 
+
+(define-public (strut-markup grob props . rest)
+  "Syntax: \strut
+
+ A box of the same height as the space.
+"
+
+  (let*
+      ((m (Text_item::text_to_molecule grob props " ")))
+
+    (ly:molecule-set-extent! m 0 '(1000 . -1000))
+    m))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
 (define (markup-signature-to-keyword sig)
   " (A B C) -> a0-b1-c2 "
   
@@ -545,8 +569,8 @@ for the reader.
    (cons fontsize-markup (list number? markup?))
 
    (cons box-markup  (list markup?))
-   )
-  )
+   (cons strut-markup '())
+   ))
 
 
 (define markup-module (current-module))
@@ -612,13 +636,12 @@ against SIGNATURE, reporting MAKE-NAME as the user-invoked function.
 "
 
   (let*
-      (
-       (arglen (length args))
+      ((arglen (length args))
        (siglen (length signature))
        (error-msg
 	(if (and (> siglen 0) (> arglen 0))
-	    (markup-argument-list-error signature args 1)))
-       )
+	    (markup-argument-list-error signature args 1)
+	    #f)))
 
 
     (if (or (not (= arglen siglen)) (< siglen 0) (< arglen 0))
-- 
2.39.5