Compare commits
	
		
			3 Commits
		
	
	
		
			tocSubtitl
			...
			33c3d47504
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 33c3d47504 | |||
| 15f37accaa | |||
| c26fddd963 | 
@@ -8,6 +8,16 @@ klamm = #(define-music-function (parser location chords) (ly:music?)
 | 
				
			|||||||
	\set chordNameFunction = #ignatzek-chord-names
 | 
						\set chordNameFunction = #ignatzek-chord-names
 | 
				
			||||||
#})
 | 
					#})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					repeats-around-chords =
 | 
				
			||||||
 | 
					#(define-music-function (parser location chords) (ly:music?)
 | 
				
			||||||
 | 
					#{
 | 
				
			||||||
 | 
					  \once \set noChordSymbol = \markup { \normal-text \repStart }
 | 
				
			||||||
 | 
					  r4
 | 
				
			||||||
 | 
						$chords
 | 
				
			||||||
 | 
					  \once \set noChordSymbol = \markup { \normal-text \repStop }
 | 
				
			||||||
 | 
					  r4
 | 
				
			||||||
 | 
					#})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bchord =
 | 
					bchord =
 | 
				
			||||||
#(define-music-function (parser location chords) (ly:music?)
 | 
					#(define-music-function (parser location chords) (ly:music?)
 | 
				
			||||||
#{
 | 
					#{
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -171,21 +171,6 @@
 | 
				
			|||||||
                           (cdr revlist)))))))))
 | 
					                           (cdr revlist)))))))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
\paper {
 | 
					\paper {
 | 
				
			||||||
  indexTitleMarkup = \markup \column {
 | 
					 | 
				
			||||||
    \fontsize #5 \sans \bold \fill-line { \null \fromproperty #'index:text \null }
 | 
					 | 
				
			||||||
    \vspace #.5
 | 
					 | 
				
			||||||
    \justify {
 | 
					 | 
				
			||||||
      Da die allermeisten Lieder unter verschiedenen Namen bekannt sind,
 | 
					 | 
				
			||||||
      wollen wir euch ein Inhaltsverzeichnis an die Hand geben, mit dem ihr hoffentlich auf verschiedene Arten fündig werdet.
 | 
					 | 
				
			||||||
      Die Liedtitel, die auch die Überschriften sind, findet ihr normal gedruckt.
 | 
					 | 
				
			||||||
      Alle weiteren Alternativtitel oder Liedanfänge sind zur Unterscheidung kursiv gedruckt.
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    \vspace #1
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  categoryTitleMarkup = \markup \column {
 | 
					 | 
				
			||||||
    \fontsize #5 \sans \bold \fill-line { \null \fromproperty #'index:text \null }
 | 
					 | 
				
			||||||
    \vspace #1
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
  indexItemMarkup = \markup \with-link-symbol-ref #'index:label {
 | 
					  indexItemMarkup = \markup \with-link-symbol-ref #'index:label {
 | 
				
			||||||
    \index-item-with-pattern
 | 
					    \index-item-with-pattern
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@@ -199,29 +184,7 @@
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
%{
 | 
					
 | 
				
			||||||
#(define-markup-list-command (index layout props) ()
 | 
					 | 
				
			||||||
  ( _i "Outputs an alphabetical sorted index, using the paper
 | 
					 | 
				
			||||||
  variable @code{indexTitleMarkup} for its title, then the list of
 | 
					 | 
				
			||||||
  lines built using the @code{indexItem} music function
 | 
					 | 
				
			||||||
  Usage: @code{\\markuplines \\index}" )
 | 
					 | 
				
			||||||
  (cons (interpret-markup layout (cons (list (cons 'index:text "Inhaltsverzeichnis")) props)
 | 
					 | 
				
			||||||
        (ly:output-def-lookup layout 'indexTitleMarkup))
 | 
					 | 
				
			||||||
    (space-lines (chain-assoc-get 'baseline-skip props)
 | 
					 | 
				
			||||||
        (map (lambda (index-item)
 | 
					 | 
				
			||||||
         (let ((label (car index-item))
 | 
					 | 
				
			||||||
         (index-markup (cadr index-item))
 | 
					 | 
				
			||||||
         (text (caddr index-item)))
 | 
					 | 
				
			||||||
           (interpret-markup
 | 
					 | 
				
			||||||
             layout
 | 
					 | 
				
			||||||
             (cons (list (cons 'index:page
 | 
					 | 
				
			||||||
              (markup #:page-ref label "XXX" "?"))
 | 
					 | 
				
			||||||
             (cons 'index:text text)
 | 
					 | 
				
			||||||
             (cons 'index:label label))
 | 
					 | 
				
			||||||
             props)
 | 
					 | 
				
			||||||
             (ly:output-def-lookup layout index-markup))))
 | 
					 | 
				
			||||||
       (index-items)))))
 | 
					 | 
				
			||||||
%}
 | 
					 | 
				
			||||||
#(define (prepare-item-markup items layout)
 | 
					#(define (prepare-item-markup items layout)
 | 
				
			||||||
   (map (lambda (index-item)
 | 
					   (map (lambda (index-item)
 | 
				
			||||||
         (let ((label (car index-item))
 | 
					         (let ((label (car index-item))
 | 
				
			||||||
@@ -233,33 +196,18 @@
 | 
				
			|||||||
             (ly:output-def-lookup layout index-markup))))
 | 
					             (ly:output-def-lookup layout index-markup))))
 | 
				
			||||||
       (items)))
 | 
					       (items)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#(define-markup-list-command (index-in-columns-with-title layout props index-type title-markup) (symbol? markup?)
 | 
				
			||||||
#(define-markup-list-command (colindex layout props) ()
 | 
					  ( _i "Outputs index alphabetical sorted or in categories" )
 | 
				
			||||||
  ( _i "Outputs an alphabetical sorted index, using the paper
 | 
					    (let ((items (case index-type
 | 
				
			||||||
  variable @code{indexTitleMarkup} for its title, then the list of
 | 
					            ((alphabetical) index-items)
 | 
				
			||||||
  lines built using the @code{indexItem} music function
 | 
					            ((categories) category-index-items)))
 | 
				
			||||||
  Usage: @code{\\markuplines \\index}" )
 | 
					          (title (interpret-markup layout props title-markup)))
 | 
				
			||||||
      (let ((title (interpret-markup layout (cons (list (cons 'index:text "Inhaltsverzeichnis")) props)
 | 
					 | 
				
			||||||
        (ly:output-def-lookup layout 'indexTitleMarkup))))
 | 
					 | 
				
			||||||
      (cons title
 | 
					      (cons title
 | 
				
			||||||
      (interpret-markup-list layout props
 | 
					      (interpret-markup-list layout props
 | 
				
			||||||
        (make-columnlayout-markup-list songTocColumns 2
 | 
					        (make-columnlayout-markup-list songTocColumns 2
 | 
				
			||||||
          (let ((h (- (ly:output-def-lookup layout 'paper-height) 12)))
 | 
					          (let ((h (- (ly:output-def-lookup layout 'paper-height) 12)))
 | 
				
			||||||
            (cons (- h (interval-length (ly:stencil-extent title Y))) h))
 | 
					            (cons (- h (interval-length (ly:stencil-extent title Y))) h))
 | 
				
			||||||
      (prepare-item-markup index-items layout))))))
 | 
					          (prepare-item-markup items layout))))))
 | 
				
			||||||
 | 
					 | 
				
			||||||
#(define-markup-list-command (categoryindex layout props) ()
 | 
					 | 
				
			||||||
  ( _i "Outputs categorized song titles" )
 | 
					 | 
				
			||||||
    (if (null-list? (category-index-items))
 | 
					 | 
				
			||||||
        (list)
 | 
					 | 
				
			||||||
      (let ((title (interpret-markup layout (cons (list (cons 'index:text "Inhaltsverzeichnis nach Kategorien")) props)
 | 
					 | 
				
			||||||
        (ly:output-def-lookup layout 'categoryTitleMarkup))))
 | 
					 | 
				
			||||||
        (cons title
 | 
					 | 
				
			||||||
  (interpret-markup-list layout props
 | 
					 | 
				
			||||||
    (make-columnlayout-markup-list songTocColumns 2
 | 
					 | 
				
			||||||
      (let ((h (- (ly:output-def-lookup layout 'paper-height) 12)))
 | 
					 | 
				
			||||||
        (cons (- h (interval-length (ly:stencil-extent title Y))) h))
 | 
					 | 
				
			||||||
      (prepare-item-markup category-index-items layout)))))))
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
indexItem =
 | 
					indexItem =
 | 
				
			||||||
#(define-music-function (parser location sorttext text) (string? markup?)
 | 
					#(define-music-function (parser location sorttext text) (string? markup?)
 | 
				
			||||||
@@ -271,18 +219,6 @@ indexSection =
 | 
				
			|||||||
   "Add a section line to the alphabetical index, using @code{indexSectionMarkup} paper variable markup. This can be used to divide the alphabetical index into different sections, for example one section for each first letter."
 | 
					   "Add a section line to the alphabetical index, using @code{indexSectionMarkup} paper variable markup. This can be used to divide the alphabetical index into different sections, for example one section for each first letter."
 | 
				
			||||||
   (add-index-item! 'indexSectionMarkup text sorttext))
 | 
					   (add-index-item! 'indexSectionMarkup text sorttext))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
%{
 | 
					 | 
				
			||||||
addTitleToTOC = #(define-music-function (parser location title) (string?)
 | 
					 | 
				
			||||||
  #{
 | 
					 | 
				
			||||||
    \indexItem #title \markup { #title }
 | 
					 | 
				
			||||||
  #})
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
addAltTitleToTOC = #(define-music-function (parser location title) (string?)
 | 
					 | 
				
			||||||
  #{
 | 
					 | 
				
			||||||
    \indexItem #title \markup { \italic #title }
 | 
					 | 
				
			||||||
  #})
 | 
					 | 
				
			||||||
%}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#(define (extract-var-from-module module sym)
 | 
					#(define (extract-var-from-module module sym)
 | 
				
			||||||
  (let ((variableref (assoc-ref module sym)))
 | 
					  (let ((variableref (assoc-ref module sym)))
 | 
				
			||||||
    (if variableref (variable-ref variableref) #f))
 | 
					    (if variableref (variable-ref variableref) #f))
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -142,26 +142,25 @@
 | 
				
			|||||||
                 (verse-hspace 1)
 | 
					                 (verse-hspace 1)
 | 
				
			||||||
                 (verse-ordering-horizontal #f))
 | 
					                 (verse-ordering-horizontal #f))
 | 
				
			||||||
   "Gruppiere Strophen in einem Markup auf Wunsch spaltenweise"
 | 
					   "Gruppiere Strophen in einem Markup auf Wunsch spaltenweise"
 | 
				
			||||||
   (let ((h (make-hash-table verse-cols))
 | 
					   (define (add-markup-between-elements reverses markup-between elements)
 | 
				
			||||||
         (index 0)
 | 
					     ((if reverses fold fold-right) (lambda (element filled-list)
 | 
				
			||||||
         (column-item-count (ceiling (/ (length versegroup) verse-cols))))
 | 
					              (cons element (if (null? filled-list) '() (cons markup-between filled-list))))
 | 
				
			||||||
     (for-each (lambda (el)
 | 
					        '() elements))
 | 
				
			||||||
        (let ((i (if verse-ordering-horizontal
 | 
					   (let* ((column-item-count (ceiling (/ (length versegroup) verse-cols)))
 | 
				
			||||||
 | 
					          (column-data (make-list verse-cols)))
 | 
				
			||||||
 | 
					    (let columnize-list ((index 0) (items versegroup))
 | 
				
			||||||
 | 
					      (if (not (null? items))
 | 
				
			||||||
 | 
					        (let* ((column-index (if verse-ordering-horizontal
 | 
				
			||||||
                                 (modulo index verse-cols)
 | 
					                                 (modulo index verse-cols)
 | 
				
			||||||
                     (floor (/ index column-item-count)))))
 | 
					                                 (floor (/ index column-item-count))))
 | 
				
			||||||
         (hashv-set! h i (cons el (hashv-ref h i (list)))) (set! index (+ index 1))))
 | 
					               (column-markups (list-ref column-data column-index)))
 | 
				
			||||||
       versegroup)
 | 
					          (list-set! column-data column-index (cons (car items) column-markups))
 | 
				
			||||||
 | 
					          (columnize-list (+ index 1) (cdr items)))))
 | 
				
			||||||
    (interpret-markup layout props
 | 
					    (interpret-markup layout props
 | 
				
			||||||
       (make-fill-line-markup (cons (make-verseformat-markup (make-line-markup
 | 
					      (make-fill-line-markup (list (make-verseformat-markup (make-line-markup
 | 
				
			||||||
         (reverse (hash-fold (lambda (key value l)
 | 
					        (add-markup-between-elements #f
 | 
				
			||||||
             (cons (make-column-markup
 | 
					          (make-hspace-markup verse-hspace)
 | 
				
			||||||
                       (fold (lambda (v verses)
 | 
					          (map (lambda (column-markups)
 | 
				
			||||||
                          (cons v (if (null? verses)
 | 
					              (make-column-markup
 | 
				
			||||||
                                      verses
 | 
					                (add-markup-between-elements #t (make-vspace-markup verse-vspace) column-markups)))
 | 
				
			||||||
                                      (cons (make-vspace-markup verse-vspace) verses))))
 | 
					            column-data)))))))))
 | 
				
			||||||
                        (list) value))
 | 
					 | 
				
			||||||
                    (if (null-list? l)
 | 
					 | 
				
			||||||
                        l
 | 
					 | 
				
			||||||
                        (cons (make-hspace-markup verse-hspace) l))))
 | 
					 | 
				
			||||||
           (list) h))))
 | 
					 | 
				
			||||||
                                (list))))))
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user