From 800f39d7cbef036d72a6683f810beaa55ee10990 Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Tue, 19 Aug 2008 18:47:15 +0200 Subject: [PATCH] Docs: Add fret and harp pedal diagrams to markup category instrument-specific-markup -) 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 | 9 +++------ scm/fret-diagrams.scm | 6 +++--- scm/harp-pedals.scm | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/scm/document-markup.scm b/scm/document-markup.scm index 77ee9b97dc..fa181959a7 100644 --- a/scm/document-markup.scm +++ b/scm/document-markup.scm @@ -66,11 +66,8 @@ (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 @@ -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) diff --git a/scm/fret-diagrams.scm b/scm/fret-diagrams.scm index 1ffa530d65..d0c4882104 100644 --- a/scm/fret-diagrams.scm +++ b/scm/fret-diagrams.scm @@ -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. diff --git a/scm/harp-pedals.scm b/scm/harp-pedals.scm index adb00b00ec..b9bed54749 100644 --- a/scm/harp-pedals.scm +++ b/scm/harp-pedals.scm @@ -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)) -- 2.39.2