]> git.donarmstrong.com Git - lilypond.git/commitdiff
Docs: Add fret and harp pedal diagrams to markup category instrument-specific-markup
authorReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 19 Aug 2008 16:47:15 +0000 (18:47 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Tue, 19 Aug 2008 17:08:12 +0000 (19:08 +0200)
-) Harp pedal diagrams and Fret boards will now appear in the same appendix section of
   the NR, titled "Instrument Specific Markup".
-) The function to create those titles from the markup category didn't globally
   replace "-" by " ". This commit fixes that problem, too.

scm/document-markup.scm
scm/fret-diagrams.scm
scm/harp-pedals.scm

index 77ee9b97dce4fee30b81c818af65d53c310b1f56..fa181959a78a186af196cdcffbb307b1285e879e 100644 (file)
  
 (define (markup-category-doc-node category)
   (let* ((category-string (symbol->string category))
-         (match (string-match "-" category-string))
-         (category-name (string-capitalize
-                         (if match
-                             (regexp-substitute #f match 'pre " " 'post)
-                             category-string)))
+         (category-name (string-capitalize (regexp-substitute/global #f
+                                        "-" category-string 'pre " " 'post)))
         (markup-functions (hashq-ref markup-functions-by-category
                                           category)))
     (make <texi-node>
@@ -97,7 +94,7 @@
     #:desc ""
     #:text "The following commands can all be used inside @code{\\markup @{ @}}."
     #:children (let* (;; when a new category is defined, update `ordered-categories'
-                      (ordered-categories '(font align graphic music fret-diagram other))
+                      (ordered-categories '(font align graphic music instrument-specific-markup other))
                       (raw-categories (hash-fold (lambda (category functions categories)
                                                    (cons category categories))
                                                  (list)
index 1ffa530d65df4186a14c19af513174f0907f246c..d0c48821044d5e12791b3a451fc265f2c2cd676a 100644 (file)
@@ -427,7 +427,7 @@ Line thickness is given by @var{th}, fret & string spacing by
 
 (define-builtin-markup-command (fret-diagram-verbose layout props marking-list)
   (list?) ; argument type
-  fret-diagram ; markup type
+  instrument-specific-markup ; markup type
   ((align-dir -0.4) ; properties and defaults
    (size 1.0)
    (fret-diagram-details)
@@ -585,7 +585,7 @@ indications per string.
 
 (define-builtin-markup-command (fret-diagram layout props definition-string)
   (string?) ; argument type
-  fret-diagram ; markup category
+  instrument-specific-markup ; markup category
   (fret-diagram-verbose-markup) ; properties and defaults
   "Make a (guitar) fret diagram.  For example, say
 
@@ -751,7 +751,7 @@ Note: There is no limit to the number of fret indications per string.
 (define-builtin-markup-command
   (fret-diagram-terse layout props definition-string)
   (string?) ; argument type
-  fret-diagram ; markup category
+  instrument-specific-markup ; markup category
   (fret-diagram-verbose-markup) ; properties
   "Make a fret diagram markup using terse string-based syntax.
 
index adb00b00ece6ba6da2b27b65eb76620d93191e65..b9bed54749014c39f6d37e9fe25eaf3a469a876a 100644 (file)
@@ -26,7 +26,7 @@
 
 
 (define-builtin-markup-command (harp-pedal layout props definition-string) (string?)
-  music ; markup type for the documentation!
+  instrument-specific-markup ; markup type for the documentation!
   ((size 1.0)
    (harp-pedal-details)
    (thickness 0.5))