]> git.donarmstrong.com Git - lilypond.git/commitdiff
New bar line interface
authorMarc Hohl <marc@hohlart.de>
Wed, 1 Aug 2012 19:15:46 +0000 (21:15 +0200)
committerMarc Hohl <marc@hohlart.de>
Mon, 15 Oct 2012 09:14:48 +0000 (11:14 +0200)
* the input string of a bar line called by \bar "<bar string>" resembles the output one-by-one; a repeat sign is called by ":|."

* (define-bar-line ...) or \defineBarLine allows for new definitions. These functions have four arguments, namely
  the bar line itself, the bar line used at the end of line, the bar line used at the begin of a new line and the span bar line.

* Annotations for barlines can be added to distinguish between two identical barlines with different break
  apperance or span bar lines.

* To align span bars properly, the space character " " has a
  special meaning. When it occurs, the width of the resembling glyph in the bar line definition is used.

* New glyphs can be added easily.

* Volta brackets take the bar line dimensions into account.

55 files changed:
Documentation/changes.tely
Documentation/de/notation/ancient.itely
Documentation/de/notation/rhythms.itely
Documentation/de/notation/vocal.itely
Documentation/es/notation/ancient.itely
Documentation/es/notation/rhythms.itely
Documentation/es/notation/vocal.itely
Documentation/fr/notation/ancient.itely
Documentation/fr/notation/rhythms.itely
Documentation/fr/notation/vocal.itely
Documentation/ja/notation/rhythms.itely
Documentation/ja/notation/vocal.itely
Documentation/notation/ancient.itely
Documentation/notation/rhythms.itely
Documentation/notation/vocal.itely
Documentation/snippets/heavily-customized-polymetric-time-signatures.ly
Documentation/snippets/new/printing-a-repeat-sign-at-the-beginning-of-a-piece.ly [new file with mode: 0644]
Documentation/snippets/printing-a-repeat-sign-at-the-beginning-of-a-piece.ly
Documentation/snippets/repeats-headword.ly
Documentation/snippets/setting-the-double-repeat-default-for-volte.ly
Documentation/snippets/unfretted-headword.ly
input/regression/auto-beam-bar.ly
input/regression/bar-line-define-bar-glyph.ly [new file with mode: 0644]
input/regression/bar-line-define-bar-line.ly [new file with mode: 0644]
input/regression/bar-line-segno.ly
input/regression/bar-lines.ly
input/regression/double-repeat.ly
input/regression/grace-volta-repeat-2.ly
input/regression/lyrics-bar.ly
input/regression/music-function.ly
input/regression/non-centered-bar-lines.ly
input/regression/number-staff-lines.ly
input/regression/prefatory-spacing-matter.ly
input/regression/repeat-sign-global-size-10.ly
input/regression/repeat-sign-global-size-30.ly
input/regression/repeat-sign-global-size-5.ly
input/regression/repeat-sign-layout-size.ly
input/regression/repeat-sign.ly
input/regression/span-bar-break.ly
input/regression/tuplet-broken.ly
input/regression/tuplet-full-length.ly
input/regression/zero-staff-space.ly
lily/grob-scheme.cc
lily/repeat-acknowledge-engraver.cc
lily/volta-bracket.cc
ly/engraver-init.ly
ly/property-init.ly
python/convertrules.py
scm/bar-line.scm
scm/define-context-properties.scm
scm/define-grob-interfaces.scm
scm/define-grob-properties.scm
scm/define-grobs.scm
scripts/abc2ly.py
scripts/etf2ly.py

index 06a1378b690e902b22337360b8385e73baf60ed1..6079329d65245e81d5e7b2f7f94baed7230cd96b 100644 (file)
@@ -61,6 +61,12 @@ which scares away people.
 
 @end ignore
 
+@item
+The bar line user interface has changed. Bar glyphs now resemble the
+appearance of the bar line, so a left repeat sign has to be coded
+as @code{.|:}. The command @code{\defineBarLine} provides an easy way
+to define additional bar line styles.
+
 @item
 Accidentals in the key signature may be printed in octaves other
 than their traditional positions, or in multiple octaves.
index 1181fb586f8010d1091278df75c63502c7c13718..9e3ca5a0b3f6363a0a1ae008767ec88448e20f7b 100644 (file)
@@ -8,7 +8,7 @@
     Guide, node Updating translation committishes..
 @end ignore
 
-@c \version "2.16.0"
+@c \version "2.17.5"
 
 @c Translators: Till Paala
 
@@ -988,7 +988,7 @@ Eine Datei kann zum Beispiel so aussehen:
 
 @c @example
 @c \set Score.timing = ##f
-@c \set Score.defaultBarType = "empty"
+@c \set Score.defaultBarType = "-"
 @c \override NoteHead #'style = #'neomensural
 @c \override Staff.TimeSignature #'style = #'neomensural
 @c \clef "petrucci-g"
@@ -1001,7 +1001,7 @@ Eine Datei kann zum Beispiel so aussehen:
 \score {
   \transpose c c' {
     \set Score.timing = ##f
-    \set Score.defaultBarType = "empty"
+    \set Score.defaultBarType = "-"
     \override NoteHead #'style = #'petrucci
     \override Staff.TimeSignature #'style = #'mensural
     \clef "petrucci-g"
@@ -1030,7 +1030,7 @@ wie folgt ausgegeben:
 @lilypond[quote,ragged-right]
 \transpose c c' {
   \set Score.timing = ##f
-  \set Score.defaultBarType = "empty"
+  \set Score.defaultBarType = "-"
   \override NoteHead #'style = #'neomensural
   \override Staff.TimeSignature #'style = #'neomensural
   \clef "petrucci-g"
index 7caa63827ea197c05226023a481ec0fd4c82fb8f..ec49e8cf922eab679c3f64f92be73c0f0f9eda7c 100644 (file)
@@ -7,7 +7,7 @@
     Guide, node Updating translation committishes.
 @end ignore
 
-@c \version "2.16.0"
+@c \version "2.17.5"
 
 @c Translators: Till Paala
 
@@ -2691,7 +2691,7 @@ f1 \bar "|"
 f1 \bar "."
 g1 \bar "||"
 a1 \bar ".|"
-b1 \bar ".|."
+b1 \bar ".."
 c1 \bar "|.|"
 d1 \bar "|."
 e1
@@ -2700,8 +2700,8 @@ e1
 Zusätzlich gibt es noch punktierte und gestrichelte Taktstriche:
 
 @lilypond[quote,relative=1,verbatim]
-f1 \bar ":"
-g1 \bar "dashed"
+f1 \bar ";"
+g1 \bar "!"
 a1
 @end lilypond
 
@@ -2709,17 +2709,17 @@ a1
 und fünf unterschiedliche Wiederholungstaktstriche:
 
 @lilypond[quote,relative=1,verbatim]
-f1 \bar "|:" g \bar ":|:" a \bar ":|.|:" b \bar ":|.:" c \bar ":|" d
+f1 \bar ".|:" g \bar ":..:" a \bar ":|.|:" b \bar ":|.:" c \bar ":|." d
 @end lilypond
 
 Zusätzlich kann eine Taktlinie mit einem einfachen Apostroph gesetzt werden:
 
 @lilypond[quote,relative=1,verbatim]
-f1 \bar "|:"
-g1 \bar ":|:"
+f1 \bar ".|:"
+g1 \bar ":..:"
 a1 \bar ":|.|:"
 b1 \bar ":|.:"
-c1 \bar ":|"
+c1 \bar ":|."
 e1
 @end lilypond
 
@@ -2747,13 +2747,13 @@ c4 c c c
 c4 c c c \break
 \bar "S"
 c4 c c c
-\bar "|S"
+\bar "S-|"
 c4 c c c \break
-\bar "|S"
+\bar "S-|"
 c4 c c c
-\bar "S|"
+\bar "S-S"
 c4 c c c \break
-\bar "S|"
+\bar "S-S"
 c1
 @end lilypond
 
@@ -2772,9 +2772,9 @@ doppelter Taktstrich am Ende der Zeile ausgegeben wird und ein
 
 @lilypond[quote,relative=2,verbatim]
 c4 c c c
-\bar "||:"
+\bar ".|:-||"
 c4 c c c \break
-\bar "||:"
+\bar ".|:-||"
 c4 c c c
 @end lilypond
 
@@ -2783,29 +2783,29 @@ es sechs verschiedene Variationen:
 
 @lilypond[quote,relative=2,verbatim]
 c4 c c c
-\bar ":|S"
+\bar ":|.S"
 c4 c c c \break
-\bar ":|S"
+\bar ":|.S"
 c4 c c c
-\bar ":|S."
+\bar ":|.S-S"
 c4 c c c \break
-\bar ":|S."
+\bar ":|.S-S"
 c4 c c c
-\bar "S|:"
+\bar "S.|:-S"
 c4 c c c \break
-\bar "S|:"
+\bar "S.|:-S"
 c4 c c c
-\bar ".S|:"
+\bar "S.|:"
 c4 c c c \break
-\bar ".S|:"
+\bar "S.|:"
 c4 c c c
-\bar ":|S|:"
+\bar ":|.S.|:"
 c4 c c c \break
-\bar ":|S|:"
+\bar ":|.S.|:"
 c4 c c c
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
 c4 c c c \break
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
 c1
 @end lilypond
 
@@ -3415,8 +3415,8 @@ Verzierungen vorkommen:
 
 @lilypond[quote,relative=2,verbatim]
 <<
-  \new Staff { e4 \bar "|:" \grace c16 d2. }
-  \new Staff { c4 \bar "|:" d2. }
+  \new Staff { e4 \bar ".|:" \grace c16 d2. }
+  \new Staff { c4 \bar ".|:" d2. }
 >>
 @end lilypond
 
@@ -3427,8 +3427,8 @@ also
 
 @lilypond[quote,ragged-right,relative=2,verbatim,fragment]
 <<
-  \new Staff { e4 \bar "|:" \grace c16 d2. }
-  \new Staff { c4 \bar "|:" \grace s16 d2. }
+  \new Staff { e4 \bar ".|:" \grace c16 d2. }
+  \new Staff { c4 \bar ".|:" \grace s16 d2. }
 >>
 @end lilypond
 
index a767c7cff89710b275aa5c38ef703bbf1771f3d1..4bc8271777e07217a8ddda6122f17fc8e596fc82 100644 (file)
@@ -7,7 +7,7 @@
     Guide, node Updating translation committishes.
 @end ignore
 
-@c \version "2.16.0"
+@c \version "2.17.5"
 
 @c Translators: Till Paala
 
@@ -2930,9 +2930,9 @@ a4 b c2
 \bar "'"
 a4 b c2
 a4 b c2
-\bar ":"
+\bar ";"
 a4 b c2
-\bar "dashed"
+\bar "!"
 a4 b c2
 \bar "||"
 @end lilypond
index e0bd1a2c9f3eb375a28ffbbae538f46fc4e3be93..7ba68652507a8b9c23303bafe16e6c4633e328f4 100644 (file)
@@ -8,7 +8,7 @@
     Guide, node Updating translation committishes..
 @end ignore
 
-@c \version "2.16.0"
+@c \version "2.17.5"
 
 @node Notación antigua
 @section Notación antigua
@@ -984,7 +984,7 @@ Por ejemplo:
 
 @c @example
 @c \set Score.timing = ##f
-@c \set Score.defaultBarType = "empty"
+@c \set Score.defaultBarType = "-"
 @c \override NoteHead #'style = #'neomensural
 @c \override Staff.TimeSignature #'style = #'neomensural
 @c \clef "petrucci-g"
@@ -997,7 +997,7 @@ Por ejemplo:
 \score {
   \transpose c c' {
     \set Score.timing = ##f
-    \set Score.defaultBarType = "empty"
+    \set Score.defaultBarType = "-"
     \override NoteHead #'style = #'petrucci
     \override Staff.TimeSignature #'style = #'mensural
     \clef "petrucci-g"
@@ -1026,7 +1026,7 @@ transcribe de la siguiente manera:
 @lilypond[quote,ragged-right]
 \transpose c c' {
   \set Score.timing = ##f
-  \set Score.defaultBarType = "empty"
+  \set Score.defaultBarType = "-"
   \override NoteHead #'style = #'petrucci
   \override Staff.TimeSignature #'style = #'mensural
   \clef "petrucci-g"
@@ -2486,7 +2486,7 @@ inmediatamente con la introducción del propio canto:
     \new KievanVoice = "melody" \transpose c c' {
       \cadenzaOn
        c4 c c c c2 b,\longa
-       \bar "kievan"
+       \bar "k"
     }
     \new Lyrics \lyricsto "melody" {
       Го -- спо -- ди по -- ми -- луй.
@@ -2609,12 +2609,12 @@ Referencia de la notación:
 
 Normalmente se coloca una figura decorativa al final de una pieza de
 notación kievana, que puede denominarse como «doble barra final del
-canto kievano».  Se puede invocar como @code{\bar "kievan"}.
+canto kievano».  Se puede invocar como @code{\bar "k"}.
 
 @lilypond[quote,relative=1,notime,verbatim]
   \clef "kievan-do"
   \override NoteHead #'style = #'kievan
-  c \bar "kievan"
+  c \bar "k"
 @end lilypond
 
 @seealso
index 024db45c372ad815983243082205ddd6ba6a8f3f..407db3cc81867cf6989090448d9d6dc1ae91217c 100644 (file)
@@ -7,7 +7,7 @@
     Guide, node Updating translation committishes..
 @end ignore
 
-@c \version "2.16.0"
+@c \version "2.17.5"
 
 @node Duraciones
 @section Duraciones
@@ -2684,7 +2684,7 @@ f1 \bar "|"
 f1 \bar "."
 g1 \bar "||"
 a1 \bar ".|"
-b1 \bar ".|."
+b1 \bar ".."
 c1 \bar "|.|"
 d1 \bar "|."
 e1
@@ -2694,8 +2694,8 @@ e1
 así como la barra de puntos y la discontinua:
 
 @lilypond[quote,relative=1,verbatim]
-f1 \bar ":"
-g1 \bar "dashed"
+f1 \bar ";"
+g1 \bar "!"
 a1
 @end lilypond
 
@@ -2703,11 +2703,11 @@ a1
 y cinco tipos de barra de repetición:
 
 @lilypond[quote,relative=1,verbatim]
-f1 \bar "|:"
-g1 \bar ":|:"
+f1 \bar ".|:"
+g1 \bar ":..:"
 a1 \bar ":|.|:"
 b1 \bar ":|.:"
-c1 \bar ":|"
+c1 \bar ":|."
 e1
 @end lilypond
 
@@ -2732,13 +2732,13 @@ c4 c c c
 c4 c c c \break
 \bar "S"
 c4 c c c
-\bar "|S"
+\bar "S-|"
 c4 c c c \break
-\bar "|S"
+\bar "S-|"
 c4 c c c
-\bar "S|"
+\bar "S-S"
 c4 c c c \break
-\bar "S|"
+\bar "S-S"
 c1
 @end lilypond
 
@@ -2757,9 +2757,9 @@ principio de la línea siguiente.
 
 @lilypond[quote,relative=2,verbatim]
 c4 c c c
-\bar "||:"
+\bar ".|:-||"
 c4 c c c \break
-\bar "||:"
+\bar ".|:-||"
 c4 c c c
 @end lilypond
 
@@ -2768,29 +2768,29 @@ existen seis variantes diferentes:
 
 @lilypond[quote,relative=2,verbatim]
 c4 c c c
-\bar ":|S"
+\bar ":|.S"
 c4 c c c \break
-\bar ":|S"
+\bar ":|.S"
 c4 c c c
-\bar ":|S."
+\bar ":|.S-S"
 c4 c c c \break
-\bar ":|S."
+\bar ":|.S-S"
 c4 c c c
-\bar "S|:"
+\bar "S.|:-S"
 c4 c c c \break
-\bar "S|:"
+\bar "S.|:-S"
 c4 c c c
-\bar ".S|:"
+\bar "S.|:"
 c4 c c c \break
-\bar ".S|:"
+\bar "S.|:"
 c4 c c c
-\bar ":|S|:"
+\bar ":|.S.|:"
 c4 c c c \break
-\bar ":|S|:"
+\bar ":|.S.|:"
 c4 c c c
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
 c4 c c c \break
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
 c1
 @end lilypond
 
@@ -3394,8 +3394,8 @@ pentagramas con adornos y sin adornos, por ejemplo
 
 @lilypond[quote,relative=2,verbatim]
 <<
-  \new Staff { e4 \bar "|:" \grace c16 d2. }
-  \new Staff { c4 \bar "|:" d2. }
+  \new Staff { e4 \bar ".|:" \grace c16 d2. }
+  \new Staff { c4 \bar ".|:" d2. }
 >>
 @end lilypond
 
@@ -3406,8 +3406,8 @@ anterior
 
 @lilypond[quote,relative=2,verbatim]
 <<
-  \new Staff { e4 \bar "|:" \grace c16 d2. }
-  \new Staff { c4 \bar "|:" \grace s16 d2. }
+  \new Staff { e4 \bar ".|:" \grace c16 d2. }
+  \new Staff { c4 \bar ".|:" \grace s16 d2. }
 >>
 @end lilypond
 
index 6e9afa58d36c674a2d79a4742688be1735894d46..68c141f0c5653c3b0f6c9ec966e1b9a3f218f305 100644 (file)
@@ -8,7 +8,7 @@
     Guide, node Updating translation committishes..
 @end ignore
 
-@c \version "2.16.0"
+@c \version "2.17.5"
 
 @node Música vocal
 @section Música vocal
@@ -3009,9 +3009,9 @@ a4 b c2
 \bar "'"
 a4 b c2
 a4 b c2
-\bar ":"
+\bar ";"
 a4 b c2
-\bar "dashed"
+\bar "!"
 a4 b c2
 \bar "||"
 @end lilypond
index 3e174bdb7bdf6abd8daa4eea6adc7a47278f7215..7609193ed874643de5c0d4f099f45396adc0d5d5 100644 (file)
@@ -8,7 +8,7 @@
 @end ignore
 
 
-@c \version "2.16.0"
+@c \version "2.17.5"
 
 @c Translators: Jean-Charles Malahieude
 
@@ -993,7 +993,7 @@ Par exemple,
 
 @c @example
 @c \set Score.timing = ##f
-@c \set Score.defaultBarType = "empty"
+@c \set Score.defaultBarType = "-"
 @c \override NoteHead #'style = #'neomensural
 @c \override Staff.TimeSignature #'style = #'neomensural
 @c \clef "petrucci-g"
@@ -1006,7 +1006,7 @@ Par exemple,
 \score {
   \transpose c c' {
     \set Score.timing = ##f
-    \set Score.defaultBarType = "empty"
+    \set Score.defaultBarType = "-"
     \override NoteHead #'style = #'petrucci
     \override Staff.TimeSignature #'style = #'mensural
     \clef "petrucci-g"
@@ -1034,7 +1034,7 @@ par le @code{Mensural_ligature_engraver}, on obtient
 @lilypond[quote,ragged-right]
 \transpose c c' {
   \set Score.timing = ##f
-  \set Score.defaultBarType = "empty"
+  \set Score.defaultBarType = "-"
   \override NoteHead #'style = #'petrucci
   \override Staff.TimeSignature #'style = #'mensural
   \clef "petrucci-g"
@@ -2489,7 +2489,7 @@ lancer dans la saisie de votre chant, comme ci-dessous :
     \new KievanVoice = "melody" \transpose c c' {
       \cadenzaOn
        c4 c c c c2 b,\longa
-       \bar "kievan"
+       \bar "k"
     }
     \new Lyrics \lyricsto "melody" {
       Го -- спо -- ди по -- ми -- луй.
@@ -2612,12 +2612,12 @@ Manuel de notation :
 
 Les pièces en notation kiévienne sont habituellement terminées par une
 décoration qui fait office de barre finale.  Elle s'obtient à l'aide
-d'un @code{\bar "kievan"}.
+d'un @code{\bar "k"}.
 
 @lilypond[quote,relative=1,notime,verbatim]
   \clef "kievan-do"
   \override NoteHead #'style = #'kievan
-  c \bar "kievan"
+  c \bar "k"
 @end lilypond
 
 @seealso
index ff9014d5f56c0eba4f825cd64c02a687da19c81a..771792a183e0e564e4cf146180a8e9b5032f2507 100644 (file)
@@ -7,7 +7,7 @@
     Guide, node Updating translation committishes..
 @end ignore
 
-@c \version "2.16.0"
+@c \version "2.17.5"
 
 @c Translators: Frédéric Chiasson, Jean-Charles Malahieude
 @c Translation checkers: Valentin Villenave, François Martin, Xavier Scheuer
@@ -2632,7 +2632,7 @@ f1 \bar "|"
 f1 \bar "."
 g1 \bar "||"
 a1 \bar ".|"
-b1 \bar ".|."
+b1 \bar ".."
 c1 \bar "|.|"
 d1 \bar "|."
 e1
@@ -2642,8 +2642,8 @@ e1
 ainsi que d'une barre en pointillé et d'une discontinue :
 
 @lilypond[quote,relative=1,verbatim]
-f1 \bar ":"
-g1 \bar "dashed"
+f1 \bar ";"
+g1 \bar "!"
 a1
 @end lilypond
 
@@ -2651,11 +2651,11 @@ a1
 et de cinq types de barre de reprise :
 
 @lilypond[quote,relative=1,verbatim]
-f1 \bar "|:"
-g1 \bar ":|:"
+f1 \bar ".|:"
+g1 \bar ":..:"
 a1 \bar ":|.|:"
 b1 \bar ":|.:"
-c1 \bar ":|"
+c1 \bar ":|."
 e1
 @end lilypond
 
@@ -2681,13 +2681,13 @@ c4 c c c
 c4 c c c \break
 \bar "S"
 c4 c c c
-\bar "|S"
+\bar "S-|"
 c4 c c c \break
-\bar "|S"
+\bar "S-|"
 c4 c c c
-\bar "S|"
+\bar "S-S"
 c4 c c c \break
-\bar "S|"
+\bar "S-S"
 c1
 @end lilypond
 
@@ -2707,9 +2707,9 @@ nouvelle.
 
 @lilypond[quote,relative=2,verbatim]
 c4 c c c
-\bar "||:"
+\bar ".|:-||"
 c4 c c c \break
-\bar "||:"
+\bar ".|:-||"
 c4 c c c
 @end lilypond
 
@@ -2718,29 +2718,29 @@ reprise avec un signe @emph{segno} :
 
 @lilypond[quote,relative=2,verbatim]
 c4 c c c
-\bar ":|S"
+\bar ":|.S"
 c4 c c c \break
-\bar ":|S"
+\bar ":|.S"
 c4 c c c
-\bar ":|S."
+\bar ":|.S-S"
 c4 c c c \break
-\bar ":|S."
+\bar ":|.S-S"
 c4 c c c
-\bar "S|:"
+\bar "S.|:-S"
 c4 c c c \break
-\bar "S|:"
+\bar "S.|:-S"
 c4 c c c
-\bar ".S|:"
+\bar "S.|:"
 c4 c c c \break
-\bar ".S|:"
+\bar "S.|:"
 c4 c c c
-\bar ":|S|:"
+\bar ":|.S.|:"
 c4 c c c \break
-\bar ":|S|:"
+\bar ":|.S.|:"
 c4 c c c
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
 c4 c c c \break
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
 c1
 @end lilypond
 
@@ -3318,8 +3318,8 @@ mêlez des portées comprenant des petites notes et d'autres sans :
 
 @lilypond[quote,relative=2,verbatim]
 <<
-  \new Staff { e4 \bar "|:" \grace c16 d2. }
-  \new Staff { c4 \bar "|:" d2. }
+  \new Staff { e4 \bar ".|:" \grace c16 d2. }
+  \new Staff { c4 \bar ".|:" d2. }
 >>
 @end lilypond
 
@@ -3330,8 +3330,8 @@ correspondant à la durée des petites notes :
 
 @lilypond[quote,relative=2,verbatim]
 <<
-  \new Staff { e4 \bar "|:" \grace c16 d2. }
-  \new Staff { c4 \bar "|:" \grace s16 d2. }
+  \new Staff { e4 \bar ".|:" \grace c16 d2. }
+  \new Staff { c4 \bar ".|:" \grace s16 d2. }
 >>
 @end lilypond
 
index 06a0dd270160b2e7d8b961caf100c92f22a1b7e4..f525842211de0259e7a91c29094012f8cc050226 100644 (file)
@@ -7,7 +7,7 @@
     Guide, node Updating translation committishes..
 @end ignore
 
-@c \version "2.16.0"
+@c \version "2.17.5"
 
 @c Translators: Valentin Villenave, Jean-Charles Malahieude
 @c Translation checkers: Jean-Jacques Gerbaud
@@ -3020,9 +3020,9 @@ a4 b c2
 \bar "'"
 a4 b c2
 a4 b c2
-\bar ":"
+\bar ";"
 a4 b c2
-\bar "dashed"
+\bar "!"
 a4 b c2
 \bar "||"
 @end lilypond
index 38843909c285a3c150e1e88e0273d6ab5bf6dd32..6313d520eac14667664eb4aff995ff2088fca4c3 100644 (file)
@@ -6,7 +6,7 @@
     version that you are working on.  See TRANSLATION for details.
 @end ignore
 
-@c \version "2.16.0"
+@c \version "2.17.5"
 
 @c Translators: Yoshiki Sawada
 @c Translation status: post-GDP
@@ -2634,7 +2634,7 @@ f1 \bar "|"
 f1 \bar "."
 g1 \bar "||"
 a1 \bar ".|"
-b1 \bar ".|."
+b1 \bar ".."
 c1 \bar "|.|"
 d1 \bar "|."
 e1
@@ -2644,8 +2644,8 @@ e1
 さらに、点線と破線の小節線があります:
 
 @lilypond[quote,relative=1,verbatim]
-f1 \bar ":"
-g1 \bar "dashed"
+f1 \bar ";"
+g1 \bar "!"
 a1
 @end lilypond
 
@@ -2653,11 +2653,11 @@ a1
 さらに、繰り返しの小節線が 5 種類あります:
 
 @lilypond[quote,relative=1,verbatim]
-f1 \bar "|:"
-g1 \bar ":|:"
+f1 \bar ".|:"
+g1 \bar ":..:"
 a1 \bar ":|.|:"
 b1 \bar ":|.:"
-c1 \bar ":|"
+c1 \bar ":|."
 e1
 @end lilypond
 
@@ -2681,13 +2681,13 @@ c4 c c c
 c4 c c c \break
 \bar "S"
 c4 c c c
-\bar "|S"
+\bar "S-|"
 c4 c c c \break
-\bar "|S"
+\bar "S-|"
 c4 c c c
-\bar "S|"
+\bar "S-S"
 c4 c c c \break
-\bar "S|"
+\bar "S-S"
 c1
 @end lilypond
 
@@ -2708,9 +2708,9 @@ c1
 
 @lilypond[quote,relative=2,verbatim]
 c4 c c c
-\bar "||:"
+\bar ".|:-||"
 c4 c c c \break
-\bar "||:"
+\bar ".|:-||"
 c4 c c c
 @end lilypond
 
@@ -2718,29 +2718,29 @@ c4 c c c
 
 @lilypond[quote,relative=2,verbatim]
 c4 c c c
-\bar ":|S"
+\bar ":|.S"
 c4 c c c \break
-\bar ":|S"
+\bar ":|.S"
 c4 c c c
-\bar ":|S."
+\bar ":|.S-S"
 c4 c c c \break
-\bar ":|S."
+\bar ":|.S-S"
 c4 c c c
-\bar "S|:"
+\bar "S.|:-S"
 c4 c c c \break
-\bar "S|:"
+\bar "S.|:-S"
 c4 c c c
-\bar ".S|:"
+\bar "S.|:"
 c4 c c c \break
-\bar ".S|:"
+\bar "S.|:"
 c4 c c c
-\bar ":|S|:"
+\bar ":|.S.|:"
 c4 c c c \break
-\bar ":|S|:"
+\bar ":|.S.|:"
 c4 c c c
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
 c4 c c c \break
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
 c1
 @end lilypond
 
@@ -3347,8 +3347,8 @@ c1 \afterGrace d1 { c16[ d] } c1
 
 @lilypond[quote,relative=2,verbatim]
 <<
-  \new Staff { e4 \bar "|:" \grace c16 d2. }
-  \new Staff { c4 \bar "|:" d2. }
+  \new Staff { e4 \bar ".|:" \grace c16 d2. }
+  \new Staff { c4 \bar ".|:" d2. }
 >>
 @end lilypond
 
@@ -3359,8 +3359,8 @@ c1 \afterGrace d1 { c16[ d] } c1
 
 @lilypond[quote,relative=2,verbatim]
 <<
-  \new Staff { e4 \bar "|:" \grace c16 d2. }
-  \new Staff { c4 \bar "|:" \grace s16 d2. }
+  \new Staff { e4 \bar ".|:" \grace c16 d2. }
+  \new Staff { c4 \bar ".|:" \grace s16 d2. }
 >>
 @end lilypond
 
index 6926442e3cfb4284dc78d8d7d9afeba3a11e5d81..9eb64a05a22524f8fab7d61e5037c6f0ac661b8e 100644 (file)
@@ -8,7 +8,7 @@
     Guide, node Updating translation committishes..
 @end ignore
 
-@c \version "2.16.0"
+@c \version "2.17.5"
 
 @c Translators: Yoshiki Sawada
 @c Translation status: post-GDP
@@ -2953,9 +2953,9 @@ a4 b c2
 \bar "'"
 a4 b c2
 a4 b c2
-\bar ":"
+\bar ";"
 a4 b c2
-\bar "dashed"
+\bar "!"
 a4 b c2
 \bar "||"
 @end lilypond
index 7ef446ee621f16e8c83c4c94aaa2a1f5f77b9fa6..af466ce635bf4438b805af8971846457a4d8a76e 100644 (file)
@@ -8,7 +8,7 @@
     Guide, node Updating translation committishes..
 @end ignore
 
-@c \version "2.16.0"
+@c \version "2.17.5"
 
 
 @node Ancient notation
@@ -943,7 +943,7 @@ For example,
 
 @c @example
 @c \set Score.timing = ##f
-@c \set Score.defaultBarType = "empty"
+@c \set Score.defaultBarType = "-"
 @c \override NoteHead #'style = #'neomensural
 @c \override Staff.TimeSignature #'style = #'neomensural
 @c \clef "petrucci-g"
@@ -956,7 +956,7 @@ For example,
 \score {
   \transpose c c' {
     \set Score.timing = ##f
-    \set Score.defaultBarType = "empty"
+    \set Score.defaultBarType = "-"
     \override NoteHead #'style = #'petrucci
     \override Staff.TimeSignature #'style = #'mensural
     \clef "petrucci-g"
@@ -985,7 +985,7 @@ to the following
 @lilypond[quote,ragged-right]
 \transpose c c' {
   \set Score.timing = ##f
-  \set Score.defaultBarType = "empty"
+  \set Score.defaultBarType = "-"
   \override NoteHead #'style = #'petrucci
   \override Staff.TimeSignature #'style = #'mensural
   \clef "petrucci-g"
@@ -2438,7 +2438,7 @@ values, so you can immediately go ahead entering the chant:
     \new KievanVoice = "melody" \transpose c c' {
       \cadenzaOn
        c4 c c c c2 b,\longa
-       \bar "kievan"
+       \bar "k"
     }
     \new Lyrics \lyricsto "melody" {
       Го -- спо -- ди по -- ми -- луй.
@@ -2554,12 +2554,12 @@ Notation Reference:
 
 A decorative figure is commonly placed at the end of a piece of
 Kievan notation, which may be called the Kievan final bar line.
-It can be invoked as @code{\bar "kievan"}.
+It can be invoked as @code{\bar "k"}.
 
 @lilypond[quote,relative=1,notime,verbatim]
   \clef "kievan-do"
   \override NoteHead #'style = #'kievan
-  c \bar "kievan"
+  c \bar "k"
 @end lilypond
 
 @seealso
index c2a06b42029b9649b5a2348e4cc5bb9809d5ace3..975017057ca64fcaf384ccfc228ddca0e9d8b9a5 100644 (file)
@@ -7,7 +7,7 @@
     Guide, node Updating translation committishes..
 @end ignore
 
-@c \version "2.16.0"
+@c \version "2.17.5"
 
 @node Rhythms
 @section Rhythms
@@ -2646,7 +2646,7 @@ f1 \bar "|"
 f1 \bar "."
 g1 \bar "||"
 a1 \bar ".|"
-b1 \bar ".|."
+b1 \bar ".."
 c1 \bar "|.|"
 d1 \bar "|."
 e1
@@ -2656,8 +2656,8 @@ e1
 together with dotted and dashed bar lines:
 
 @lilypond[quote,relative=1,verbatim]
-f1 \bar ":"
-g1 \bar "dashed"
+f1 \bar ";"
+g1 \bar "!"
 a1
 @end lilypond
 
@@ -2665,11 +2665,11 @@ a1
 and five types of repeat bar line:
 
 @lilypond[quote,relative=1,verbatim]
-f1 \bar "|:"
-g1 \bar ":|:"
+f1 \bar ".|:"
+g1 \bar ":..:"
 a1 \bar ":|.|:"
 b1 \bar ":|.:"
-c1 \bar ":|"
+c1 \bar ":|."
 e1
 @end lilypond
 
@@ -2692,13 +2692,13 @@ c4 c c c
 c4 c c c \break
 \bar "S"
 c4 c c c
-\bar "|S"
+\bar "S-|"
 c4 c c c \break
-\bar "|S"
+\bar "S-|"
 c4 c c c
-\bar "S|"
+\bar "S-S"
 c4 c c c \break
-\bar "S|"
+\bar "S-S"
 c1
 @end lilypond
 
@@ -2717,9 +2717,9 @@ the next line.
 
 @lilypond[quote,relative=2,verbatim]
 c4 c c c
-\bar "||:"
+\bar ".|:-||"
 c4 c c c \break
-\bar "||:"
+\bar ".|:-||"
 c4 c c c
 @end lilypond
 
@@ -2728,29 +2728,29 @@ variations:
 
 @lilypond[quote,relative=2,verbatim]
 c4 c c c
-\bar ":|S"
+\bar ":|.S"
 c4 c c c \break
-\bar ":|S"
+\bar ":|.S"
 c4 c c c
-\bar ":|S."
+\bar ":|.S-S"
 c4 c c c \break
-\bar ":|S."
+\bar ":|.S-S"
 c4 c c c
-\bar "S|:"
+\bar "S.|:-S"
 c4 c c c \break
-\bar "S|:"
+\bar "S.|:-S"
 c4 c c c
-\bar ".S|:"
+\bar "S.|:"
 c4 c c c \break
-\bar ".S|:"
+\bar "S.|:"
 c4 c c c
-\bar ":|S|:"
+\bar ":|.S.|:"
 c4 c c c \break
-\bar ":|S|:"
+\bar ":|.S.|:"
 c4 c c c
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
 c4 c c c \break
-\bar ":|S.|:"
+\bar ":|.S.|:-S"
 c1
 @end lilypond
 
@@ -3341,8 +3341,8 @@ staves without, for example,
 
 @lilypond[quote,relative=2,verbatim]
 <<
-  \new Staff { e4 \bar "|:" \grace c16 d2. }
-  \new Staff { c4 \bar "|:" d2. }
+  \new Staff { e4 \bar ".|:" \grace c16 d2. }
+  \new Staff { c4 \bar ".|:" d2. }
 >>
 @end lilypond
 
@@ -3352,8 +3352,8 @@ durations in the other staves.  For the above example
 
 @lilypond[quote,relative=2,verbatim]
 <<
-  \new Staff { e4 \bar "|:" \grace c16 d2. }
-  \new Staff { c4 \bar "|:" \grace s16 d2. }
+  \new Staff { e4 \bar ".|:" \grace c16 d2. }
+  \new Staff { c4 \bar ".|:" \grace s16 d2. }
 >>
 @end lilypond
 
index 0dc82ee2f555ef6e559ebca32364a4e3dd0574d5..0fe84ae2032b29b62f99ed85ce829c1b39abf058 100644 (file)
@@ -7,7 +7,7 @@
     Guide, node Updating translation committishes..
 @end ignore
 
-@c \version "2.16.0"
+@c \version "2.17.5"
 
 @node Vocal music
 @section Vocal music
@@ -2903,9 +2903,9 @@ a4 b c2
 \bar "'"
 a4 b c2
 a4 b c2
-\bar ":"
+\bar ";"
 a4 b c2
-\bar "dashed"
+\bar "!"
 a4 b c2
 \bar "||"
 @end lilypond
index 795a27de58f43f48116a3e68bf9d999c18354955..fafe1cb9999e25db17a39534841c7e5fd8d6ce67 100644 (file)
@@ -4,7 +4,7 @@
 %% and then run scripts/auxiliar/makelsr.py
 %%
 %% This file is in the public domain.
-\version "2.17.0"
+\version "2.17.5"
 
 \header {
   lsrtags = "contemporary-notation, percussion, real-music, rhythms"
@@ -50,8 +50,8 @@ melody = \relative c'' {
 }
 
 drum = \new DrumStaff \drummode {
-  \bar "|:" bd4.^\markup { Drums } sn4 bd \bar ":" sn4.
-  bd4 sn \bar ":" bd sn bd4. sn4 bd \bar ":|"
+  \bar ".|:" bd4.^\markup { Drums } sn4 bd \bar ";" sn4.
+  bd4 sn \bar ";" bd sn bd4. sn4 bd \bar ":|."
 }
 
 {
diff --git a/Documentation/snippets/new/printing-a-repeat-sign-at-the-beginning-of-a-piece.ly b/Documentation/snippets/new/printing-a-repeat-sign-at-the-beginning-of-a-piece.ly
new file mode 100644 (file)
index 0000000..7e5f130
--- /dev/null
@@ -0,0 +1,36 @@
+\version "2.17.5"
+
+\header {
+  lsrtags = "repeats, tweaks-and-overrides"
+
+  texidoc = "
+A @code{.|:} bar line can be printed at the beginning of a piece, by
+overriding the relevant property:
+
+"
+  doctitle = "Printing a repeat sign at the beginning of a piece"
+}
+
+
+\relative c'' {
+  \once \override Score.BreakAlignment #'break-align-orders =
+    #(make-vector 3 '(instrument-name
+                      left-edge
+                      ambitus
+                      breathing-sign
+                      clef
+                      key-signature
+                      time-signature
+                      staff-bar
+                      custos))
+  \once \override Staff.TimeSignature #'space-alist =
+    #'((first-note . (fixed-space . 2.0))
+       (right-edge . (extra-space . 0.5))
+       ;; free up some space between time signature
+       ;; and repeat bar line
+       (staff-bar . (extra-space . 1)))
+  \bar ".|:"
+  c1
+  d1
+  d4 e f g
+}
index f2d620be9e9b5ce4aa56d5f4df2a3ca38715245d..c7ad9c355021c6d2d1cc06af375c7f3b26476c3e 100644 (file)
@@ -1,16 +1,17 @@
-%% DO NOT EDIT this file manually; it is automatically
-%% generated from LSR http://lsr.dsi.unimi.it
-%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
-%% and then run scripts/auxiliar/makelsr.py
-%%
-%% This file is in the public domain.
-\version "2.16.0"
+% DO NOT EDIT this file manually; it is automatically
+% generated from Documentation/snippets/new
+% Make any changes in Documentation/snippets/new/
+% and then run scripts/auxiliar/makelsr.py
+%
+% This file is in the public domain.
+%% Note: this file works from version 2.17.5
+\version "2.17.5"
 
 \header {
   lsrtags = "repeats, tweaks-and-overrides"
 
   texidoc = "
-A @code{|:} bar line can be printed at the beginning of a piece, by
+A @code{.|:} bar line can be printed at the beginning of a piece, by
 overriding the relevant property:
 
 "
@@ -35,7 +36,7 @@ overriding the relevant property:
        ;; free up some space between time signature
        ;; and repeat bar line
        (staff-bar . (extra-space . 1)))
-  \bar "|:"
+  \bar ".|:"
   c1
   d1
   d4 e f g
index 0f284e5bc413c030b2b382ed799cd8f47457f471..fa562f980a808c3124ebf197383683cbe5251a48 100644 (file)
@@ -4,7 +4,7 @@
 %% and then run scripts/auxiliar/makelsr.py
 %%
 %% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.5"
 
 \header {
   lsrtags = "headword"
@@ -30,7 +30,7 @@ Repeats headword
       \key df \major
       \time 2/4
       \set Score.currentBarNumber = #9
-      \bar "|:"
+      \bar ".|:"
       <af ef c>4 (
       <af gf c>8..
       <af ef c>32
@@ -84,7 +84,7 @@ Repeats headword
       \oneVoice
       r8
       \clef bass
-      \bar ":|"
+      \bar ":|."
    }
 
    \new Staff = LH {
index 7051646a03f6f8284cba70723a9920ca61d742af..c469c52e646b35898387fe5941ebf5d6772f6144 100644 (file)
@@ -4,7 +4,7 @@
 %% and then run scripts/auxiliar/makelsr.py
 %%
 %% This file is in the public domain.
-\version "2.16.0"
+\version "2.17.5"
 
 \header {
   lsrtags = "repeats"
@@ -19,7 +19,7 @@ be set using @code{doubleRepeatType}.
 
 \relative c'' {
   \repeat volta 1 { c1 }
-  \set Score.doubleRepeatType = #":|:"
+  \set Score.doubleRepeatType = #":..:"
   \repeat volta 1 { c1 }
   \set Score.doubleRepeatType = #":|.|:"
   \repeat volta 1 { c1 }
index eb7d328427306738c3878826a8fba98aa7f288bc..a7d4258638a2b12251cefc00b1534f649a6afd7c 100644 (file)
@@ -4,7 +4,7 @@
 %% and then run scripts/auxiliar/makelsr.py
 %%
 %% This file is in the public domain.
-\version "2.17.0"
+\version "2.17.5"
 
 \header {
   lsrtags = "headword"
@@ -221,7 +221,7 @@ ViolinSolo = \relative c' {
     >>
 
     \override Score.Rest #'transparent = ##t
-    \set Score.defaultBarType          = "empty"
+    \set Score.defaultBarType          = "-"
   >>
 
   \layout  {
index 8daa66e33035ea8cd6663a0ffeeeb459a598f95e..34fa328dda650a2c45d891bee0426ed5312a9c37 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.16.0"
+\version "2.17.5"
 
 \header{
 texidoc="No auto beams will be put over (manual) repeat bars."
@@ -8,5 +8,5 @@ texidoc="No auto beams will be put over (manual) repeat bars."
 
 {
   \time 3/4
-  a'4 b' c''8 \bar ":|:" d''8
+  a'4 b' c''8 \bar ":..:" d''8
 }
diff --git a/input/regression/bar-line-define-bar-glyph.ly b/input/regression/bar-line-define-bar-glyph.ly
new file mode 100644 (file)
index 0000000..7b5ce64
--- /dev/null
@@ -0,0 +1,28 @@
+\version "2.17.5"
+
+\header { texidoc = "New bar line glyphs can be defined in Scheme."
+        }
+
+\paper { ragged-right = ##t }
+
+
+#(define (make-coda-sign-bar-line grob extent)
+   (let ((stencil (ly:font-get-glyph (ly:grob-default-font grob)
+                                     "scripts.coda")))
+        stencil))
+
+#(add-bar-glyph-print-procedure "0" make-coda-sign-bar-line)
+
+\defineBarLine "0" #'("0" "" "")
+
+
+\relative \new StaffGroup <<
+  \new Staff {
+    c4 c \bar "0" c c \bar "0" \break
+    c1
+  }
+  \new Staff {
+    c4 c c c
+    c1
+  }
+>>
diff --git a/input/regression/bar-line-define-bar-line.ly b/input/regression/bar-line-define-bar-line.ly
new file mode 100644 (file)
index 0000000..66a5777
--- /dev/null
@@ -0,0 +1,21 @@
+\version "2.17.5"
+
+\header { texidoc = "New bar line styles can be defined by @code{\defineBarLine}."
+        }
+
+\paper { ragged-right = ##t }
+
+\defineBarLine "[|;" #'("|" "[|;" " |")
+\defineBarLine ";|]" #'(";|]" "" " |")
+
+\relative \new StaffGroup <<
+  \new Staff {
+    c4 c \bar "[|;" c c \bar ";|]" \break
+    c4 c \bar ";|]" c c \bar "[|;" \break
+    c1 }
+  \new Staff {
+    c4 c c c
+    c4 c c c
+    c1
+  }
+>>
index 17d5a7dc0e47119565a52fe2efe27102d876fcd5..7b17c0f58b7c418e645c93eb007f0f5160e714c1 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.17.5"
 
 \header { texidoc = "Segno bar lines can be used to mark
                      the begin and the end of a segno part."
@@ -8,10 +8,10 @@
 
 \relative \new StaffGroup <<
   \new Staff {
-    c4 \bar "S" c \bar "|S" c \bar "S|" c \bar ":|S" \break
-    c4 c \bar ":|S|:" c c \bar ":|S.|:" \break
-    c4 c c2 \bar ".S|:" \break
-    c1 \bar ":|S." \break
+    c4 \bar "S" c \bar "S-|" c \bar "S-S" c \bar ":|.S" \break
+    c4 c \bar ":|.S.|:" c c \bar ":|.S.|:-S" \break
+    c4 c c2 \bar "S.|:" \break
+    c1 \bar ":|.S-S" \break
     c1 \bar "S" \break
     c1 }
   \new Staff {
index 359ccb4dd25076030bcce0824608c5048af781df..1ae85f4e262528cbc344392a965f73e0e8369631 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.17.5"
 
 \header { texidoc = "Various types of bar lines can be drawn.
 
@@ -17,9 +17,9 @@ space, centered on the top-most barline.
 
 \relative \new StaffGroup <<
   \new Staff = "1" {
-    c2 \bar "dashed" c
+    c2 \bar "!" c
     s1
-    c2 \bar ":" c
+    c2 \bar ";" c
     s1
     c2 \bar "." c
     s1
index 08cc5f835de71f83dab6ae26d0147c7ab267c0a1..9ce981dc5912a4fca128df4c9052de31a4cebdc8 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.17.5"
 
 \header {
   texidoc = "Three types of double repeat bar line are supported."
@@ -7,7 +7,7 @@
   \new Staff \relative c' {
     c1
     \mark "\":|:\""
-    \bar ":|:"
+    \bar ":..:"
     c1
     \mark "\":|.|:\""
     \bar ":|.|:"
index 113de90be86f8836f5a291fce462bf7b7f8a07da..1a150fcc8aba9ebb6264c12f086fd5cf7efe7b70 100644 (file)
@@ -1,9 +1,9 @@
-\version "2.16.0"
+\version "2.17.5"
 
 \header {
 
   texidoc = "A volta repeat may begin with a grace. Consecutive
-    ending and starting repeat bars are merged into one @code{:||:}."
+    ending and starting repeat bars are merged into one @code{:..:}."
 
 }
 
@@ -11,7 +11,7 @@
 
 \relative c' {
   \repeat volta 2 {
-    c1 
+    c1
   }
   \repeat volta 2 {
     \grace {c8 } c4
index c559bedebea0c8ad18ddd607af5c9ba9a11da9c3..1f41177f9b1e8368b01d2044572c083aec0dfd3e 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.17.5"
 
 \header{
 texidoc="
@@ -13,7 +13,7 @@ lyrics do not collide with barlines.
 
 \relative c'' <<
     \new Voice = "a"{
-       b1 \bar "|:" b1 \bar ":|" b1 \bar "|."
+       b1 \bar ".|:" b1 \bar ":|." b1 \bar "|."
     }
     \new Lyrics \with {
        \consists "Bar_engraver"
index 0a1d36825a42503245aec2779dbb3c6679bd0c16..8f4da124fa0d81f6864b40a96f1b5adb7d9e897d 100644 (file)
@@ -1,13 +1,13 @@
 \header
 {
-    
+
 texidoc = "Music functions are generic music transformation functions,
 which can be used to extend music syntax seamlessly.  Here we
 demonstrate a @code{\\myBar} function, which works similar to
 @code{\\bar}, but is implemented completely in Scheme."
 
 }
-\version "2.16.0"
+\version "2.17.5"
 
 myBar = #(define-music-function (parser location bar-type) (string?)
           (context-spec-music
@@ -17,6 +17,6 @@ myBar = #(define-music-function (parser location bar-type) (string?)
 \layout { ragged-right = ##t }
 
 {
-    d4 \myBar "|:" d4
+    d4 \myBar ".|:" d4
 }
 
index 79e8ec88dc0a93024f2190cb9f23f824190fc27e..308a6e3abbbd0bfc2834c7c417d947f6c5156160 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.17.5"
 \header {
   texidoc = "Bar lines are positioned correctly when using custom
 staves which are not centered around position@tie{}0.
@@ -7,6 +7,6 @@ staves which are not centered around position@tie{}0.
 \new Staff {
   \override Staff.StaffSymbol #'line-positions = #'(1 3 5 7 9)
   c''1 \bar "||"
-  c''1 \bar ":"
+  c''1 \bar ";"
   c''1 \bar "|."
 }
index 489e62be63655a1a0e3cceff90c84c55d2b1d167..99e3251d01f35ebd179103a053f4c581987aa55f 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.16.0"
+\version "2.17.5"
 
 \header{
   texidoc=" The number of stafflines of a staff can be set.  Ledger
@@ -12,6 +12,6 @@ adjusted accordingly.  "
   \override StaffSymbol #'line-count = #3
 }
 \relative c {
-  c' c c c | g' g g g  \bar ":|"
+  c' c c c | g' g g g  \bar ":|."
 }
 
index 7ab076858f91c6c8f8ce4f1096319cdbb1e0cf55..8eb6b0b20a84194a95517459d2ed87e0f3a655f7 100644 (file)
@@ -1,5 +1,5 @@
 
-\version "2.16.0"
+\version "2.17.5"
 \header {
 
   texidoc = "Distances between prefatory items (e.g. clef, bar,
@@ -16,11 +16,11 @@ bar-line is different from the start of line.
 
 \relative c'' {
   \set Staff.instrumentName = "fobar"
-  \bar "||:"
+  \bar ".|:-||"
   \key cis \major
   cis4 cis4 cis4 cis4 \clef bass  cis,1
   \clef treble
-  \bar ":|"
+  \bar ":|."
   \key g \minor
   c1
 }
index 3fea78a4a8b080a3034e5ca2f78522a19ce730cb..093fd54a611474ce8846cf3ea87fab5c178b75db 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.17.5"
 \header {
   texidoc = "The two dots of a repeat sign should be symmetric
 to the staff centre and avoid staff lines even for exotic staves.
@@ -12,18 +12,18 @@ Test set-global-staff size 10 (with layout-set-staff-size)."
     \context Staff = "s1" \with {
       \override StaffSymbol #'staff-space = #0.6
     } {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
 
     \context Staff = "s2" \with {
       \override StaffSymbol #'line-positions = #'(-4 -2 0 2)
       \override StaffSymbol #'staff-space = #0.7
     } {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
 
     \context Staff = "s3" {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
   >>
 }
@@ -31,20 +31,20 @@ Test set-global-staff size 10 (with layout-set-staff-size)."
 \score {
   <<
     \context Staff = "s1" {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
 
     \context Staff = "s2" \with {
       \override StaffSymbol #'staff-space = #1.7
       \override StaffSymbol #'line-positions = #'(-4 -2 0 2)
     } {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
 
     \context Staff = "s3" \with {
       \override StaffSymbol #'staff-space = #3
     } {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
   >>
 
index f3ac22d60a432a5e149b3b422e9c847239548d28..69b136a53367ace6108de6f30b0ab9f5f4b481cb 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.17.5"
 \header {
   texidoc = "The two dots of a repeat sign should be symmetric
 to the staff centre and avoid staff lines even for exotic staves.
@@ -12,18 +12,18 @@ Test set-global-staff size 30 (with layout-set-staff-size)."
     \context Staff = "s1" \with {
       \override StaffSymbol #'staff-space = #0.5
     } {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
 
     \context Staff = "s2" \with {
       \override StaffSymbol #'staff-space = #0.6
       \override StaffSymbol #'line-positions = #'(-4 -2 0 2)
     } {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
 
     \context Staff = "s3" {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
   >>
 }
@@ -31,20 +31,20 @@ Test set-global-staff size 30 (with layout-set-staff-size)."
 \score {
   <<
     \context Staff = "s1" {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
 
     \context Staff = "s2" \with {
       \override StaffSymbol #'staff-space = #0.33
     } {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
 
     \context Staff = "s3" \with {
       \override StaffSymbol #'staff-space = #0.33
       \override StaffSymbol #'line-positions = #'(-4 -2 0 2)
     } {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
   >>
 
index cccfd56892dc84a69beabd8b21319bf047fb7c20..dc1a88e0ccdfa480da7b62e5f73f8e7324259e89 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.17.2"
+\version "2.17.5"
 \header {
   texidoc = "The two dots of a repeat sign should be symmetric
 to the staff centre and avoid staff lines even for exotic staves.
@@ -12,17 +12,17 @@ Test set-global-staff size 10 (with layout-set-staff-size)."
     \context Staff = "s1" \with {
       \override StaffSymbol #'staff-space = #0.7
     } {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
 
     \context Staff = "s2" \with {
       \override StaffSymbol #'line-positions = #'(-4 -2 0 2)
     } {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
 
     \context Staff = "s3" {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
   >>
 }
@@ -30,20 +30,20 @@ Test set-global-staff size 10 (with layout-set-staff-size)."
 \score {
   <<
     \context Staff = "s1" {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
 
     \context Staff = "s2" \with {
       \override StaffSymbol #'staff-space = #3
       \override StaffSymbol #'line-positions = #'(-4 -2 0 2)
     } {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
 
     \context Staff = "s3" \with {
       \override StaffSymbol #'staff-space = #6
     } {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
   >>
 
index 0856984dd7a262304978909f9853f4058338c63b..c47cac23599e326b6c737223219db7ca552ecb26 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.17.5"
 \header {
   texidoc = "The two dots of a repeat sign should be symmetric
 to the staff centre and avoid staff lines even for exotic staves.
@@ -10,17 +10,17 @@ Test layout-set-staff-size."
     \context Staff = "s1" \with {
       \override StaffSymbol #'staff-space = #0.3
     } {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
 
     \context Staff = "s2" \with {
       \override StaffSymbol #'staff-space = #0.5
     } {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
 
     \context Staff = "s3" {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
   >>
 
@@ -35,17 +35,17 @@ Test layout-set-staff-size."
     \context Staff = "s1" \with {
       \override StaffSymbol #'staff-space = #0.5
     } {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
 
     \context Staff = "s2" \with {
       \override StaffSymbol #'staff-space = #0.6
     } {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
 
     \context Staff = "s3" {
-      s1 \bar ":|"
+      s1 \bar ":|."
     }
   >>
 }
index b40c08d5908e6e1d7f5cd0f7301171fad2f46266..841e19d2ca0f82e8afae213809b916105edc421d 100644 (file)
@@ -1,11 +1,11 @@
-\version "2.16.0"
+\version "2.17.5"
 \header {
   texidoc = "The two dots of a repeat sign should be symmetric
 to the staff centre and avoid staff lines even for exotic staves."
 }
 
 
-mus = \context Voice { \relative f' { d e f g \bar ":|" } }
+mus = \context Voice { \relative f' { d e f g \bar ":|." } }
 
 \new Staff {
   <<
index 5bd5b074df5ea1d572b08e1e28476e1ff9ac854d..aac291494d72863f1b77e873339c37ea276e9968 100644 (file)
@@ -1,9 +1,9 @@
-\version "2.16.0"
+\version "2.17.5"
 
 \header {
 
-  texidoc = "At the beginning of a system, the @code{|:} repeat
-barline is drawn between the staves, but the @code{:|} is not."
+  texidoc = "At the beginning of a system, the @code{.|:} repeat
+barline is drawn between the staves, but the @code{:|.} is not."
 
 }
 
@@ -12,8 +12,8 @@ barline is drawn between the staves, but the @code{:|} is not."
 
 \new PianoStaff <<
   \new Staff = "up" {
-    \bar "|:" r1
-    \bar ":|" \break r1
+    \bar ".|:" r1
+    \bar ":|." \break r1
   }
   \new Staff = "down" { r r }
 >>
index 172d28cabc0206ef457930b76480d61049ce253f..5d124e009474a9bac1422732e60d2e8730b83731 100644 (file)
@@ -8,7 +8,7 @@
 
 }
 
-\version "2.16.0"
+\version "2.17.5"
 
 \paper {
   ragged-right = ##t  
                                          (markup #:arrow-head X RIGHT #f))
   \times 11/19 {
     c4 c4 c4 c4
-    \bar "empty" \break
+    \bar "-" \break
     c4 c4 c4 c4
     c4 c4 c4 c4
-    \bar "empty" \break
+    \bar "-" \break
     c4 c4 c4 c4
     c4 c4 c4 
   }
index 5e4b46bab5af4e2ef47fb48db0e65df4baa14ad8..96016b471a0ea33826f6bebc21d66d190348736f 100644 (file)
@@ -5,7 +5,7 @@
 start of the next non-tuplet note.  "
 
 }
-\version "2.16.0"
+\version "2.17.5"
 
 \paper { ragged-right = ##t
 indent = 0.0 }
@@ -18,9 +18,9 @@ indent = 0.0 }
   \set tupletFullLength = ##t
   c4
   \times 2/3 { c8[ c c] }
-  \times 2/3 { c8[ c \bar "empty" \break c] }
+  \times 2/3 { c8[ c \bar "-" \break c] }
   << \times 2/3 { c8[ c c]  }
-     { s4*5/6 \bar "empty" \break } >>
+     { s4*5/6 \bar "-" \break } >>
   c4
   \times 2/3 { c8[ c c] }
   
index 65d2eb95debbde3a35d6f3ecf156c86ee6c5b1bf..b3047a9ebdee1a03edd40a377138e205f5ee3a3e 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.16.0"
+\version "2.17.5"
 
 \header {
   texidoc="
@@ -10,6 +10,6 @@ Setting staff-space to 0 does not cause a segmentation fault.
   \override StaffSymbol #'staff-space = #0
   } {
   \relative c' {
-    c1 \bar ":|"
+    c1 \bar ":|."
   }
 }
index 81ff7864ff36b4b4ff972bb0fc3051d8700f60e5..1fe50f00f18b49afb443c5a91ff6014f0c9c3321 100644 (file)
@@ -466,3 +466,15 @@ LY_DEFINE (ly_grob_vertical_less_p, "ly:grob-vertical<?",
 
   return ly_bool2scm (Grob::vertical_less (ga, gb));
 }
+
+LY_DEFINE (ly_grob_get_vertical_axis_group_index, "ly:grob-get-vertical-axis-group-index",
+           1, 0, 0, (SCM grob),
+           "Get the index of the vertical axis group the grob @var{grob} belongs to;"
+           " return @code{-1} if none is found.")
+{
+  Grob *gr = unsmob_grob (grob);
+
+  LY_ASSERT_SMOB (Grob, grob, 1);
+
+  return scm_from_int (Grob::get_vertical_axis_group_index (gr));
+}
\ No newline at end of file
index 6d3234c6c6ce8b6145cfdf685729f1d35ddefdbd..779323e07d39a2fc8ce1bc244ffe9c80f3e07d0d 100644 (file)
@@ -102,20 +102,20 @@ Repeat_acknowledge_engraver::process_music ()
   if (segno)
     if (start)
       if (end) // { segno, start, end }
-        s = robust_scm2string (get_property ("doubleRepeatSegnoType"), ":|S|:");
+        s = robust_scm2string (get_property ("doubleRepeatSegnoType"), ":|.S.|:");
       else // { segno, start }
-        s = robust_scm2string (get_property ("startRepeatSegnoType"), ".S|:");
+        s = robust_scm2string (get_property ("startRepeatSegnoType"), "S.|:");
     else if (end) // { segno, end }
-      s = robust_scm2string (get_property ("endRepeatSegnoType"), ":|S");
+      s = robust_scm2string (get_property ("endRepeatSegnoType"), ":|.S");
     else // { segno }
       s = robust_scm2string (get_property ("segnoType"), "S");
   else if (start)
     if (end) // { start, end }
-      s = robust_scm2string (get_property ("doubleRepeatType"), ":|:");
+      s = robust_scm2string (get_property ("doubleRepeatType"), ":|.|:");
     else // { start }
-      s = robust_scm2string (get_property ("startRepeatType"), "|:");
+      s = robust_scm2string (get_property ("startRepeatType"), ".|:");
   else if (end) // { end }
-    s = robust_scm2string (get_property ("endRepeatType"), ":|");
+    s = robust_scm2string (get_property ("endRepeatType"), ":|.");
 
   /*
     TODO: line breaks might be allowed if we set whichBar to "".
index 317b47ee8d54e9e91f1cd31135c96aa1d0ca9816..7b0fd1341179b4cddc88e5293933debdcb4eb6b6 100644 (file)
@@ -52,7 +52,6 @@ Volta_bracket_interface::print (SCM smob)
                                             == (Spanner *)me);
 
   Output_def *layout = me->layout ();
-  Real half_space = 0.5;
 
   Item *bound = dynamic_cast<Spanner *> (me)->get_bound (LEFT);
 
@@ -92,7 +91,7 @@ Volta_bracket_interface::print (SCM smob)
 
   Interval empty;
   Offset start;
-  start[X_AXIS] = me->spanner_length () - left - half_space;
+  start[X_AXIS] = me->spanner_length () - left;
 
   /*
     ugh, Tuplet_bracket should use Horizontal_bracket, not the other way around.
@@ -138,14 +137,8 @@ Volta_bracket_interface::modify_edge_height (Spanner *me)
   else
     str = "|";
 
-  no_vertical_end
-  |= (str != ":|"
-      && str != "|:"
-      && str != "|."
-      && str != ":|:"
-      && str != ":|.|:"
-      && str != ":|.:"
-      && str != ".|");
+  no_vertical_end |= ly_scm2bool (scm_call_1 (ly_lily_module_constant ("volta-bracket::calc-hook-visibility"),
+                                             ly_string2scm (str)));
 
   if (no_vertical_end || no_vertical_start)
     {
@@ -179,5 +172,6 @@ ADD_INTERFACE (Volta_bracket_interface,
                "bars "
                "thickness "
                "height "
+               "shorten-pair "
               );
 
index 1da890c4db2245d2bd201ba3bafc1cb90f49e3e9..06060c02e1d8dd82c02e6de1b4a89cf42d06d283 100644 (file)
@@ -606,9 +606,9 @@ automatically when an output definition (a @code{\score} or
   decrescendoSpanner = #'hairpin
 
   defaultBarType = #"|"
-  doubleRepeatType = #":|:"
-  startRepeatType = #"|:"
-  endRepeatType = #":|"
+  doubleRepeatType = #":..:"
+  startRepeatType = #".|:"
+  endRepeatType = #":|."
   barNumberVisibility = #first-bar-number-invisible-and-no-parenthesized-bar-numbers
   barNumberFormatter = #robust-bar-number-function
   automaticBars = ##t
index e36c3c04650fb83ac0a00bd150bc0d19bde1c694..269648639b7d81b54b53b37aeb72cddf470b3a46 100644 (file)
@@ -84,6 +84,23 @@ balloonLengthOff = {
 }
 
 
+%% bar lines
+
+defineBarLine =
+#(define-void-function
+   (parser location bar glyph-list) (string? list?)
+   (_i "Define bar line settings for bar line @var{bar}.
+     The list @var{glyph-list} must have three entries which define
+     the appearance at the end of line, at the beginning of the next line,
+     and the span bar, respectively." )
+  (if (not (= (length glyph-list) 3))
+      (ly:error (_ "Argument list for bar '~a' must have three components.") bar)
+      (define-bar-line bar
+                       (car glyph-list)
+                       (cadr glyph-list)
+                       (caddr glyph-list))))
+
+
 %% bass figures
 
 bassFigureExtendersOn = {
@@ -604,6 +621,12 @@ voiceNeutralStyle = {
 }
 
 
+%% volta brackets
+
+allowVoltaHook =
+#(define-void-function (parser location bar) (string?)
+                       (allow-volta-hook bar))
+
 %% x notes
 
 xNotesOn =
index b8921a02be3709ed546cac50dab9d137af8475b2..6eeb392ee4feda35bcb118feb8fb0b960aaefdf8 100644 (file)
@@ -3392,12 +3392,37 @@ def conv (str):
     str = re.sub ('blank-after-score-page-force', 'blank-after-score-page-penalty', str)
     return str
 
+
 @rule ((2, 17, 4), r"\shape Grob #offsets -> \shape #offsets Grob")
 def conv (str):
     str = re.sub (r"\\shape(\s+(?:[a-zA-Z]+|" + matchstring + "))(" +
                   matcharg + ")", r"\\shape\2\1", str)
     return str
 
+barstring=r"(\\bar|defaultBarType|segnoType|doubleRepeatType|startRepeatType|endRepeatType|doubleRepeatSegnoType|startRepeatSegnoType|endRepeatSegnoType)(\s*[=]?\s*[#]?)"
+
+@rule ((2, 17, 5), r"New bar line interface")
+def conv(str):
+    str = re.sub (barstring + r'"\|:"', '\\1\\2".|:"', str)
+    str = re.sub (barstring + r'":\|"', '\\1\\2":|."', str)
+    str = re.sub (barstring + r'"\|\|:"', '\\1\\2".|:-||"', str)
+    str = re.sub (barstring + r'":\|:"', '\\1\\2":..:"', str)
+    str = re.sub (barstring + r'"\.\|\."', '\\1\\2".."', str)
+    str = re.sub (barstring + r'"\|S"', '\\1\\2"S-|"', str)
+    str = re.sub (barstring + r'"S\|"', '\\1\\2"S-S"', str)
+    str = re.sub (barstring + r'":\|S"', '\\1\\2":|.S"', str)
+    str = re.sub (barstring + r'":\|S\."', '\\1\\2":|.S-S"', str)
+    str = re.sub (barstring + r'"S\|:"', '\\1\\2"S.|:-S"', str)
+    str = re.sub (barstring + r'"\.S\|:"', '\\1\\2"S.|:"', str)
+    str = re.sub (barstring + r'":\|S\|:"', '\\1\\2":|.S.|:"', str)
+    str = re.sub (barstring + r'":\|S\.\|:"', '\\1\\2":|.S.|:-S"', str)
+    str = re.sub (barstring + r'":"', '\\1\\2";"', str)
+    str = re.sub (barstring + r'"\|s"', '\\1\\2"|-s"', str)
+    str = re.sub (barstring + r'"dashed"', '\\1\\2"!"', str)
+    str = re.sub (barstring + r'"kievan"', '\\1\\2"k"', str)
+    str = re.sub (barstring + r'"empty"', '\\1\\2"-"', str)
+    return str
+
 # Guidelines to write rules (please keep this at the end of this file)
 #
 # - keep at most one rule per version; if several conversions should be done,
index 25cf20ea27f13cf8bb9934a3f0417678dc8f9bc7..6986f5a52a608721e358495414fae5c807d2d2f6 100644 (file)
 ;;;; You should have received a copy of the GNU General Public License
 ;;;; along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 
-;; helper functions
+
+
+;; TODO:
+;; (1) Dashed bar lines may stick out above and below the staff lines
+;;
+;; (2) Dashed and dotted lines look ugly in combination with span bars
+;;
+;; (This was the case in the c++-version of (span) bar stuff)
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; helper functions for staff and layout properties
+
+(define (calc-blot thickness extent grob)
+  "Calculate the blot diameter by taking @code{'rounded}
+and the dimensions of the extent into account."
+  (let* ((rounded (ly:grob-property grob 'rounded #f))
+         (blot (if rounded
+                   (let ((blot-diameter (layout-blot-diameter grob))
+                         (height (interval-length extent)))
+
+                        (cond ((< thickness blot-diameter) thickness)
+                              ((< height blot-diameter) height)
+                              (else blot-diameter)))
+                   0)))
+
+        blot))
+
+(define (get-span-glyph bar-glyph)
+  "Get the corresponding span glyph from the @code{span-glyph-bar-alist}.
+Pad the string with @code{annotation-char}s to the length of the
+@var{bar-glyph} string."
+  (let ((span-glyph (assoc-get bar-glyph span-bar-glyph-alist bar-glyph)))
+
+       (if (string? span-glyph)
+           (set! span-glyph (string-pad-right
+                          span-glyph
+                          (string-length bar-glyph)
+                          replacement-char)))
+       span-glyph))
 
 (define (get-staff-symbol grob)
+  "Return the staff symbol corresponding to Grob @var{grob}."
   (if (grob::has-interface grob 'staff-symbol-interface)
       grob
       (ly:grob-object grob 'staff-symbol)))
 
 (define (layout-blot-diameter grob)
+  "Get the blot diameter of the @var{grob}'s corresponding layout."
   (let* ((layout (ly:grob-layout grob))
-         (blot (ly:output-def-lookup layout 'blot-diameter)))
+         (blot-diameter (ly:output-def-lookup layout 'blot-diameter)))
 
-        blot))
+        blot-diameter))
 
 (define (layout-line-thickness grob)
+  "Get the line thickness of the @var{grob}'s corresponding layout."
   (let* ((layout (ly:grob-layout grob))
          (line-thickness (ly:output-def-lookup layout 'line-thickness)))
 
         line-thickness))
 
-(define (staff-symbol-line-count grob)
+(define (staff-symbol-line-count staff)
+  "Get or compute the number of lines of staff @var{staff}."
   (let ((line-count 0))
 
-       (if (ly:grob? grob)
-           (let ((line-pos (ly:grob-property grob 'line-positions '())))
+       (if (ly:grob? staff)
+           (let ((line-pos (ly:grob-property staff 'line-positions '())))
 
                 (set! line-count (if (pair? line-pos)
                                      (length line-pos)
-                                     (ly:grob-property grob 'line-count 0)))))
+                                     (ly:grob-property staff 'line-count 0)))))
 
          line-count))
 
        iv))
 
 (define (staff-symbol-line-positions grob)
+  "Get or compute the @code{'line-positions} list from @var{grob}."
   (let ((line-pos (ly:grob-property grob 'line-positions '())))
 
        (if (not (pair? line-pos))
                                      (iota line-count)))))
        line-pos))
 
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; internal helper functions
+
+(define annotation-char #\-)
+(define replacement-char #\ )
+
+(define dummy-extent (cons -1 1))
+
+
+(define (glyph->stencil glyph grob extent)
+  "Return a stencil computed by the procedure associated with
+glyph @var{glyph}. The arguments @var{grob} and @var{extent} are
+mandatory to the procedures stored in @code{bar-glyph-print-procedures}."
+  (let ((proc (assoc-get glyph bar-glyph-print-procedures))
+        (stencil empty-stencil))
+
+       (if (procedure? proc)
+           (set! stencil (proc grob extent))
+           (ly:warning (_ "Bar glyph ~a not known. Ignoring.") glyph))
+       stencil))
+
+(define (string->string-list str)
+  "Convert a string into a list of strings with length 1.
+@code{"aBc"} will be converted to @code{("a" "B" "c")}.
+An empty string will be converted to a list containing @code{""}."
+  (if (and (string? str)
+           (not (zero? (string-length str))))
+      (map (lambda (s)
+                   (string s))
+           (string->list str))
+      (list "")))
+
+(define (strip-string-annotation str)
+  "Strip annotations starting with and including the
+annotation char from string @var{str}."
+  (let ((pos (string-index str annotation-char)))
+
+       (if pos
+           (substring str 0 pos)
+           str)))
+
+(define (check-for-annotation str)
+  "Check whether the annotation char is present in string @var{str}."
+  (if (string? str)
+      (if (string-index str annotation-char)
+          (ly:warning
+            (_ "Annotation '~a' is allowed in the first argument of a bar line definition only.")
+            str))))
+
+(define (check-for-replacement str)
+  "Check whether the replacement char is present in string @var{str}."
+  (if (string? str)
+      (if (string-index str replacement-char)
+          (ly:warning
+            (_ "Replacement '~a' is allowed in the last argument of a bar line definition only.")
+            str))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; functions used by external routines
 
 (define-public (span-bar::notify-grobs-of-my-existence grob)
+  "Set the @code{'has-span-bar} property for all elements of Grob @var{grob}."
   (let* ((elts (ly:grob-array->list (ly:grob-object grob 'elements)))
          (sorted-elts (sort elts ly:grob-vertical<?))
          (last-pos (1- (length sorted-elts)))
                       (set! idx (1+ idx)))
              sorted-elts)))
 
-;; How should a bar line behave at a break?
-;; the following alist has the form
-;; ( unbroken-bar-glyph . ( bar-glyph-at-end-of-line . bar-glyph-at-begin-of-line ))
-
-(define bar-glyph-alist
-  '((":|:" . (":|" . "|:"))
-    (":|.|:" . (":|" . "|:"))
-    (":|.:" . (":|" . "|:"))
-    ("||:" . ("||" . "|:"))
-    ("dashed" . ("dashed" . '()))
-    ("|" . ("|" . ()))
-    ("|s" . (() . "|"))
-    ("|:" . ("|" . "|:"))
-    ("|." . ("|." . ()))
-
-    ;; hmm... should we end with a bar line here?
-    (".|" . ("|" . ".|"))
-    (":|" . (":|" . ()))
-    ("||" . ("||" . ()))
-    (".|." . (".|." . ()))
-    ("|.|" . ("|.|" . ()))
-    ("" . ("" . ""))
-    (":" . (":" . ""))
-    ("." . ("." . ()))
-    ("'" . ("'" . ()))
-    ("empty" . (() . ()))
-    ("brace" . (() . "brace"))
-    ("bracket" . (() . "bracket"))
-
-    ;; segno bar lines
-    ("S" . ("||" . "S"))
-    ("|S" . ("|" . "S"))
-    ("S|" . ("S" . ()))
-    (":|S" . (":|" . "S"))
-    (":|S." . (":|S" . ()))
-    ("S|:" . ("S" . "|:"))
-    (".S|:" . ("|" . "S|:"))
-    (":|S|:" . (":|" . "S|:"))
-    (":|S.|:" . (":|S" . "|:"))
-
-    ;; ancient bar lines
-    ("kievan" . ("kievan" . ""))))
-
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Line break decisions.
+
+(define-public (define-bar-line bar-glyph eol-glyph bol-glyph span-glyph)
+  "Define a bar glyph @var{bar-glyph} and its substitute at the end of a line
+(@var{eol-glyph}), at the beginning of a new line (@var{bol-glyph})
+and as a span bar (@var{span-glyph}) respectively."
+  ;; the last argument may not include annotations
+  (check-for-annotation span-glyph)
+  ;; only the last argument may call for replacements
+  (for-each (lambda (s)
+                    (check-for-replacement s))
+            (list bar-glyph eol-glyph bol-glyph))
+  ;; the bar-glyph-alist has entries like
+  ;; (bar-glyph . ( eol-glyph . bol-glyph))
+  (set! bar-glyph-alist
+    (acons bar-glyph (cons eol-glyph bol-glyph) bar-glyph-alist))
+
+  ;; the span-bar-glyph-alist has entries like
+  ;; (bar-glyph . span-glyph)
+  (set! span-bar-glyph-alist
+    (acons bar-glyph span-glyph span-bar-glyph-alist)))
+
+(define-session-public bar-glyph-alist '())
+
+(define-session-public span-bar-glyph-alist '())
+
+(define-public (add-bar-glyph-print-procedure glyph proc)
+  "Specify the single glyph @var{glyph} that calls print procedure @var{proc}.
+The procedure @var{proc} has to be defined in the form
+@code{(make-...-bar-line grob extent)} even if the @var{extent}
+is not used within the routine."
+  (if (or (not (string? glyph))
+          (> (string-length glyph) 1))
+      (ly:warning
+        (_ "add-bar-glyph-print-procedure: glyph '~a' has to be a single ASCII character.")
+        glyph)
+      (set! bar-glyph-print-procedures
+        (acons glyph proc bar-glyph-print-procedures))))
+
+(define-session-public bar-glyph-print-procedures `())
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; drawing functions for various bar line types
+;; to include them and other user-defined functions,
+;; all of them have the form
+;; (make-...-bar-line grob extent)
+;; even if the extent is not used.
 
 (define (make-empty-bar-line grob extent)
+  "Draw an empty bar line."
   (ly:make-stencil "" (cons 0 0) extent))
 
-(define (make-simple-bar-line grob width extent rounded)
-  (let ((blot (if rounded
-                  (layout-blot-diameter grob)
-                  0)))
+(define (make-simple-bar-line grob extent)
+  "Draw a simple bar line."
+  (let* ((line-thickness (layout-line-thickness grob))
+         (thickness (* (ly:grob-property grob 'hair-thickness 1)
+                       line-thickness))
+         (blot (calc-blot thickness extent grob))
+         (extent (bar-line::widen-bar-extent-on-span grob extent)))
+
+        (ly:round-filled-box (cons 0 thickness)
+                             extent
+                             blot)))
 
-        (ly:round-filled-box (cons 0 width)
+(define (make-thick-bar-line grob extent)
+  "Draw a thick bar line."
+  (let* ((line-thickness (layout-line-thickness grob))
+         (thickness (* (ly:grob-property grob 'thick-thickness 1)
+                       line-thickness))
+         (blot (calc-blot thickness extent grob))
+         (extent (bar-line::widen-bar-extent-on-span grob extent)))
+
+        (ly:round-filled-box (cons 0 thickness)
                              extent
                              blot)))
 
-(define (make-tick-bar-line grob height rounded)
-  (let ((half-staff (* 1/2 (ly:staff-symbol-staff-space grob)))
-        (staff-line-thickness (ly:staff-symbol-line-thickness grob))
-        (blot (if rounded
-                  (layout-blot-diameter grob)
-                  0)))
+(define (make-tick-bar-line grob extent)
+  "Draw a tick bar line."
+  (let* ((half-staff (* 1/2 (ly:staff-symbol-staff-space grob)))
+         (staff-line-thickness (ly:staff-symbol-line-thickness grob))
+         (height (interval-end extent))
+         (blot (calc-blot staff-line-thickness extent grob)))
 
-       (ly:round-filled-box (cons 0 staff-line-thickness)
-                            (cons (- height half-staff) (+ height half-staff))
-                            blot)))
+        (ly:round-filled-box (cons 0 staff-line-thickness)
+                             (cons (- height half-staff) (+ height half-staff))
+                             blot)))
 
-(define (make-colon-bar-line grob)
+(define (make-colon-bar-line grob extent)
+  "Draw repeat dots."
   (let* ((staff-space (ly:staff-symbol-staff-space grob))
          (line-thickness (ly:staff-symbol-line-thickness grob))
          (dot (ly:font-get-glyph (ly:grob-default-font grob) "dots.dot"))
                                 (/ staff-space 2)) Y)))
       stencil)))
 
+
 (define (make-dotted-bar-line grob extent)
+  "Draw a dotted bar line."
   (let* ((position (round (* (interval-end extent) 2)))
          (correction (if (even? position) 0.5 0.0))
          (dot (ly:font-get-glyph (ly:grob-default-font grob) "dots.dot"))
 
         (add-stencils! empty-stencil stil-list)))
 
-(define (make-dashed-bar-line grob extent thickness)
+(define (make-dashed-bar-line grob extent)
+  "Draw a dashed bar line."
   (let* ((height (interval-length extent))
          (staff-symbol (get-staff-symbol grob))
          (staff-space (ly:staff-symbol-staff-space grob))
          (line-thickness (layout-line-thickness grob))
+         (thickness (* (ly:grob-property grob 'hair-thickness 1)
+                       line-thickness))
          (dash-size (- 1.0 (ly:grob-property grob 'gap 0.3)))
          (line-count (staff-symbol-line-count staff-symbol)))
 
             stencil)
             (let* ((dashes (/ height staff-space))
                    (total-dash-size (/ height dashes))
-                   (factor (/ (- dash-size thickness) staff-space)))
-
-                  (ly:stencil-translate-axis
-                    (ly:make-stencil (list 'dashed-line
-                                           thickness
-                                           (* factor total-dash-size)
-                                           (* (- 1 factor) total-dash-size)
-                                           0
-                                           height
-                                           (* factor total-dash-size 0.5))
-                                           (cons 0 thickness)
-                                           (cons 0 height))
-                                           (interval-start extent)
-                                           Y)))))
-
-(define (make-segno-bar-line grob glyph extent rounded)
+                   (factor (/ (- dash-size thickness) staff-space))
+                   (stencil (ly:stencil-translate-axis
+                              (ly:make-stencil (list 'dashed-line
+                                                     thickness
+                                                     (* factor total-dash-size)
+                                                     (* (- 1 factor) total-dash-size)
+                                                     0
+                                                     height
+                                                     (* factor total-dash-size 0.5))
+                                               (cons (/ thickness -2) (/ thickness 2))
+                                               (cons 0 height))
+                            (interval-start extent)
+                            Y)))
+
+                 (ly:stencil-translate-axis stencil (/ thickness 2) X)))))
+
+
+(define ((make-segno-bar-line show-segno) grob extent)
+  "Draw a segno bar line. If @var{show-segno} is set to @code{#t},
+the segno sign is drawn over the double bar line; otherwise, it
+draws the span bar variant, i.e. without the segno sign."
   (let* ((line-thickness (layout-line-thickness grob))
-         (kern (* (ly:grob-property grob 'kern 1) line-thickness))
          (thinkern (* (ly:grob-property grob 'thin-kern 1) line-thickness))
-         (hair (* (ly:grob-property grob 'hair-thickness 1) line-thickness))
-         (fatline (* (ly:grob-property grob 'thick-thickness 1) line-thickness))
-         (thin-stil (make-simple-bar-line grob hair extent rounded))
-         (thick-stil (make-simple-bar-line grob fatline extent rounded))
-         (colon-stil (make-colon-bar-line grob))
-         (segno-stil (ly:stencil-add
-                       (ly:stencil-combine-at-edge
-                         (ly:stencil-combine-at-edge
-                           '() X LEFT thin-stil thinkern)
-                         X RIGHT thin-stil thinkern)
-                       (ly:font-get-glyph (ly:grob-default-font grob) "scripts.varsegno")))
-         (glyph (cond
-                  ((string=? glyph "|S") "S")
-                  ((string=? glyph "S|") "S")
-                  (else glyph)))
-         (stencil (cond
-                    ((or (string=? glyph "S|:")
-                         (string=? glyph ".S|:"))
-                     (ly:stencil-combine-at-edge
-                       (ly:stencil-combine-at-edge
-                         (ly:stencil-combine-at-edge
-                           thick-stil X RIGHT thin-stil kern)
-                         X RIGHT colon-stil kern)
-                       X LEFT segno-stil thinkern))
-                    ((or (string=? glyph ":|S")
-                         (string=? glyph ":|S."))
-                     (ly:stencil-combine-at-edge
-                       (ly:stencil-combine-at-edge
-                         (ly:stencil-combine-at-edge
-                           thick-stil X LEFT thin-stil kern)
-                         X LEFT colon-stil kern)
-                       X RIGHT segno-stil thinkern))
-                    ((or (string=? glyph ":|S|:")
-                         (string=? glyph ":|S.|:"))
-                     (ly:stencil-combine-at-edge
-                       (ly:stencil-combine-at-edge
-                         (ly:stencil-combine-at-edge
-                           (ly:stencil-combine-at-edge
-                             (ly:stencil-combine-at-edge
-                               (ly:stencil-combine-at-edge
-                                 thick-stil X LEFT thin-stil kern)
-                               X LEFT colon-stil kern)
-                             X RIGHT segno-stil thinkern)
-                           X RIGHT thick-stil thinkern)
-                         X RIGHT thin-stil kern)
-                       X RIGHT colon-stil kern))
-                    ((string=? glyph "|._.|")
-                     (ly:stencil-combine-at-edge
-                       (ly:stencil-combine-at-edge
-                         (ly:stencil-combine-at-edge
-                           thick-stil X LEFT thin-stil kern)
-                         X RIGHT thick-stil (+ (interval-length
-                                                 (ly:stencil-extent segno-stil X))
-                                               (* 2 thinkern)))
-                       X RIGHT thin-stil kern))
-                    (else segno-stil))))
+         (thin-stil (make-simple-bar-line grob extent))
+         (double-line-stil (ly:stencil-combine-at-edge
+                             thin-stil
+                             X
+                             LEFT
+                             thin-stil
+                             thinkern))
+         (segno (ly:font-get-glyph (ly:grob-default-font grob)
+                                   "scripts.varsegno"))
+         (stencil (ly:stencil-add
+                    (if show-segno
+                        segno
+                        (ly:make-stencil
+                          ""
+                          (ly:stencil-extent segno X)
+                          (cons 0 0)))
+                    (ly:stencil-translate-axis
+                      double-line-stil
+                      (* 1/2 thinkern)
+                      X))))
 
        stencil))
 
-(define (make-kievan-bar-line grob)
+(define (make-kievan-bar-line grob extent)
+  "Draw a kievan bar line."
   (let* ((font (ly:grob-default-font grob))
          (stencil (stencil-whiteout
                     (ly:font-get-glyph font "scripts.barline.kievan"))))
 
-        ;; the kievan bar line has mo staff lines underneath,
-        ;; so we whiteout them and move ithe grob to a higher layer
+        ;; the kievan bar line has no staff lines underneath,
+        ;; so we whiteout them and move the grob to a higher layer
         (ly:grob-set-property! grob 'layer 1)
         stencil))
 
+(define ((make-bracket-bar-line dir) grob extent)
+  "Draw a bracket-style bar line. If @var{dir} is set to @code{LEFT}, the
+opening bracket will be drawn, for @code{RIGHT} we get the closing bracket."
+  (let* ((thick-stil (make-thick-bar-line grob extent))
+         (brackettips-up (ly:font-get-glyph (ly:grob-default-font grob)
+                                            "brackettips.up"))
+         (brackettips-down (ly:font-get-glyph (ly:grob-default-font grob)
+                                              "brackettips.down"))
+         ;; the x-extent of the brackettips must not be taken into account
+         ;; for bar line constructs like "[|:", so we set new bounds:
+         (tip-up-stil (ly:make-stencil (ly:stencil-expr brackettips-up)
+                                       (cons 0 0)
+                                       (ly:stencil-extent brackettips-up Y)))
+         (tip-down-stil (ly:make-stencil (ly:stencil-expr brackettips-down)
+                                       (cons 0 0)
+                                       (ly:stencil-extent brackettips-down Y)))
+         (stencil (ly:stencil-add
+                    thick-stil
+                    (ly:stencil-translate-axis tip-up-stil
+                                               (interval-end extent)
+                                               Y)
+                    (ly:stencil-translate-axis tip-down-stil
+                                               (interval-start extent)
+                                               Y))))
+
+        (if (eq? dir LEFT)
+            stencil
+            (ly:stencil-scale stencil -1 1))))
+
+(define ((make-spacer-bar-line glyph) grob extent)
+  "Draw an invisible bar line which has the same dimensions as the one
+drawn by the procedure associated with glyph @var{glyph}."
+  (let* ((stil (glyph->stencil glyph grob extent))
+         (stil-x-extent (ly:stencil-extent stil X)))
+
+        (ly:make-stencil "" stil-x-extent extent)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; bar line callbacks
 
 (define-public (ly:bar-line::calc-bar-extent grob)
         (staff-extent (cons 0 0)))
 
        (if (ly:grob? staff-symbol)
-           (let* ((bar-line-color (ly:grob-property grob 'color))
-                  (staff-color (ly:grob-property staff-symbol 'color))
-                  (staff-line-thickness (ly:staff-symbol-line-thickness grob))
-                  (staff-space (ly:staff-symbol-staff-space grob)))
-
-                 (set! staff-extent (ly:staff-symbol::height staff-symbol))
-
-                 (if (zero? staff-space)
-                     (set! staff-space 1.0))
-
-                 (if (< (interval-length staff-extent) staff-space)
-                     ;; staff is too small (perhaps consists of a single line);
-                     ;; extend the bar line to make it visible
-                     (set! staff-extent
-                           (interval-widen staff-extent staff-space))
-                     ;; Due to rounding problems, bar lines extending to the outermost edges
-                     ;; of the staff lines appear wrongly in on-screen display
-                     ;; (and, to a lesser extent, in print) - they stick out a pixel.
-                     ;; The solution is to extend bar lines only to the middle
-                     ;; of the staff line - unless they have different colors,
-                     ;; when it would be undesirable.
-                     ;;
-                     ;; This reduction should not influence whether bar is to be
-                     ;; expanded later, so length is not updated on purpose.
-                     (if (eq? bar-line-color staff-color)
-                         (set! staff-extent
-                               (interval-widen staff-extent
-                                               (* -1/2 staff-line-thickness)))))))
+           (let ((bar-line-color (ly:grob-property grob 'color))
+                 (staff-color (ly:grob-property staff-symbol 'color))
+                 (half-staff-line-thickness (/ (ly:staff-symbol-line-thickness grob) 2))
+                 (staff-space (ly:staff-symbol-staff-space grob)))
+
+                (set! staff-extent (ly:staff-symbol::height staff-symbol))
+
+                (if (zero? staff-space)
+                    (set! staff-space 1.0))
+
+                (if (< (interval-length staff-extent) staff-space)
+                    ;; staff is too small (perhaps consists of a single line);
+                    ;; extend the bar line to make it visible
+                    (set! staff-extent
+                          (interval-widen staff-extent staff-space))
+                    ;; Due to rounding problems, bar lines extending to the outermost edges
+                    ;; of the staff lines appear wrongly in on-screen display
+                    ;; (and, to a lesser extent, in print) - they stick out a pixel.
+                    ;; The solution is to extend bar lines only to the middle
+                    ;; of the staff line - unless they have different colors,
+                    ;; when it would be undesirable.
+                    ;;
+                    ;; This reduction should not influence whether the bar is to be
+                    ;; expanded later, so length is not updated on purpose.
+                    (if (eq? bar-line-color staff-color)
+                        (set! staff-extent
+                              (interval-widen staff-extent
+                                              (- half-staff-line-thickness)))))))
        staff-extent))
 
+;; this function may come in handy when defining new bar line glyphs, so
+;; we make it public.
+;; This code should not be included in ly:bar-line::calc-bar-extent, because
+;; this may confuse the drawing functions for dashed and dotted bar lines.
+(define-public (bar-line::widen-bar-extent-on-span grob extent)
+  "Widens the bar line @var{extent} towards span bars adjacent to grob @var{grob}."
+  (let ((staff-symbol (get-staff-symbol grob))
+        (has-span-bar (ly:grob-property grob 'has-span-bar #f)))
+
+       (if (and (ly:grob? staff-symbol)
+                (pair? has-span-bar))
+           (let ((bar-line-color (ly:grob-property grob 'color))
+                 (staff-color (ly:grob-property staff-symbol 'color))
+                 (half-staff-line-thickness (/ (ly:staff-symbol-line-thickness grob) 2)))
+                (if (eq? bar-line-color staff-color)
+                    ;; if the colors are equal, ly:bar-line::calc-bar-extent has
+                    ;; shortened the bar line extent by a half-staff-line-thickness
+                    ;; this is reverted on the interval bounds where span bars appear:
+                    (begin
+                      (and (ly:grob? (car has-span-bar))
+                           (set! extent (cons (- (car extent) half-staff-line-thickness)
+                                              (cdr extent))))
+                      (and (ly:grob? (cdr has-span-bar))
+                           (set! extent (cons (car extent)
+                                              (+ (cdr extent) half-staff-line-thickness))))))))
+   extent))
+
 (define (bar-line::bar-y-extent grob refpoint)
+  "Compute the y-extent of the bar line relative to @var{refpoint}."
   (let* ((extent (ly:grob-property grob 'bar-extent '(0 . 0)))
          (rel-y (ly:grob-relative-coordinate grob refpoint Y))
          (y-extent (coord-translate extent rel-y)))
         y-extent))
 
 (define-public (ly:bar-line::print grob)
-  (let ((glyph (ly:grob-property grob 'glyph-name))
+  "The print routine for bar lines."
+  (let ((glyph-name (ly:grob-property grob 'glyph-name))
         (extent (ly:grob-property grob 'bar-extent '(0 . 0))))
 
-       (if (and (not (eq? glyph '()))
+       (if (and glyph-name
                 (> (interval-length extent) 0))
-           (bar-line::compound-bar-line grob glyph extent #f)
+           (bar-line::compound-bar-line grob glyph-name extent)
            #f)))
 
-(define-public (bar-line::compound-bar-line grob glyph extent rounded)
+(define-public (bar-line::compound-bar-line grob bar-glyph extent)
+  "Build the bar line stencil."
   (let* ((line-thickness (layout-line-thickness grob))
-         (height (interval-length extent))
          (kern (* (ly:grob-property grob 'kern 1) line-thickness))
-         (thinkern (* (ly:grob-property grob 'thin-kern 1) line-thickness))
-         (hair (* (ly:grob-property grob 'hair-thickness 1) line-thickness))
-         (fatline (* (ly:grob-property grob 'thick-thickness 1) line-thickness))
-         (thin-stil (make-simple-bar-line grob hair extent rounded))
-         (thick-stil (make-simple-bar-line grob fatline extent rounded))
-         (colon-stil (make-colon-bar-line grob))
-         (glyph (cond
-                  ((not glyph) "")
-                  ((string=? glyph "||:") "|:")
-                  ;; bar-line::compound-bar-line is called only if
-                  ;; height > 0, but just in case ...
-                  ((and (string=? glyph ":|")
-                        (zero? height)) "|.")
-                  ((and (string=? glyph "|:")
-                        (zero? height)) ".|")
-                  (else glyph)))
-         (stencil (cond
-                    ((string=? glyph "|") thin-stil)
-                    ((string=? glyph ".") thick-stil)
-                    ((string=? glyph "||")
-                     (ly:stencil-combine-at-edge
-                       (ly:stencil-combine-at-edge
-                         '() X LEFT thin-stil thinkern)
-                       X RIGHT thin-stil thinkern))
-                    ((string=? glyph "|.")
-                     (ly:stencil-combine-at-edge
-                       thick-stil X LEFT thin-stil kern))
-                    ((string=? glyph ".|")
-                     (ly:stencil-combine-at-edge
-                       thick-stil X RIGHT thin-stil kern))
-                    ((string=? glyph "|:")
-                     (ly:stencil-combine-at-edge
-                       (ly:stencil-combine-at-edge
-                         thick-stil X RIGHT thin-stil kern)
-                       X RIGHT colon-stil kern))
-                    ((string=? glyph ":|")
-                     (ly:stencil-combine-at-edge
-                       (ly:stencil-combine-at-edge
-                         thick-stil X LEFT thin-stil kern)
-                       X LEFT colon-stil kern))
-                    ((string=? glyph ":|:")
-                     (ly:stencil-combine-at-edge
-                       (ly:stencil-combine-at-edge
-                         (ly:stencil-combine-at-edge
-                           (ly:stencil-combine-at-edge
-                             '() X LEFT thick-stil thinkern)
-                           X LEFT colon-stil kern)
-                         X RIGHT thick-stil kern)
-                       X RIGHT colon-stil kern))
-                    ((string=? glyph ":|.|:")
-                     (ly:stencil-combine-at-edge
-                       (ly:stencil-combine-at-edge
-                         (ly:stencil-combine-at-edge
-                           (ly:stencil-combine-at-edge
-                             thick-stil X LEFT thin-stil kern)
-                           X LEFT colon-stil kern)
-                         X RIGHT thin-stil kern)
-                       X RIGHT colon-stil kern))
-                    ((string=? glyph ":|.:")
-                     (ly:stencil-combine-at-edge
-                       (ly:stencil-combine-at-edge
-                         (ly:stencil-combine-at-edge
-                           thick-stil X LEFT thin-stil kern)
-                         X LEFT colon-stil kern)
-                       X RIGHT colon-stil kern))
-                    ((string=? glyph ".|.")
-                     (ly:stencil-combine-at-edge
-                       (ly:stencil-combine-at-edge
-                         '() X LEFT thick-stil thinkern)
-                       X RIGHT thick-stil kern))
-                    ((string=? glyph "|.|")
-                     (ly:stencil-combine-at-edge
-                       (ly:stencil-combine-at-edge
-                         thick-stil X LEFT thin-stil kern)
-                       X RIGHT thin-stil kern))
-                    ((string=? glyph ":")
-                     (make-dotted-bar-line grob extent))
-                    ((or (string=? glyph "|._.|")
-                         (string-contains glyph "S"))
-                     (make-segno-bar-line grob glyph extent rounded))
-                    ((string=? glyph "'")
-                     (make-tick-bar-line grob (interval-end extent) rounded))
-                    ((string=? glyph "dashed")
-                     (make-dashed-bar-line grob extent hair))
-                    ((string=? glyph "kievan")
-                     (make-kievan-bar-line grob))
-                    (else (make-empty-bar-line grob extent)))))
-         stencil))
+         (bar-glyph-list (string->string-list
+                           (strip-string-annotation bar-glyph)))
+         (span-glyph (get-span-glyph bar-glyph))
+         (span-glyph-list (string->string-list span-glyph))
+         (neg-stencil empty-stencil)
+         (stencil empty-stencil)
+         (is-first-neg-stencil #t)
+         (is-first-stencil #t))
+
+        ;; We build up two separate stencils first:
+        ;; (1) the neg-stencil is built from all glyphs that have
+        ;;     a replacement-char in the span bar
+        ;; (2) the main stencil is built from all remaining glyphs
+        ;;
+        ;; Afterwards the neg-stencil is attached left to the
+        ;; stencil; this ensures that the main stencil starts
+        ;; at x = 0.
+        ;;
+        ;; For both routines holds:
+        ;; we stack the stencils obtained by the corresponding
+        ;; single glyphs with spacing 'kern' except for the
+        ;; first stencil
+        ;; (Thanks to Harm who came up with this idea!)
+        (for-each (lambda (bar span)
+                          (if (and (string=? span (string replacement-char))
+                                   is-first-stencil)
+                              (begin
+                                (set! neg-stencil
+                                      (ly:stencil-combine-at-edge
+                                        neg-stencil
+                                        X
+                                        RIGHT
+                                        (glyph->stencil bar grob extent)
+                                        (if is-first-neg-stencil 0 kern)))
+                                (set! is-first-neg-stencil #f))
+                              (begin
+                                (set! stencil
+                                      (ly:stencil-combine-at-edge
+                                        stencil
+                                        X
+                                        RIGHT
+                                        (glyph->stencil bar grob extent)
+                                        (if is-first-stencil 0 kern)))
+                                (set! is-first-stencil #f))))
+                  bar-glyph-list span-glyph-list)
+        ;; if we have a non-empty neg-stencil,
+        ;; we attach it to the left side of the stencil
+        (and (not is-first-neg-stencil)
+             (set! stencil
+                   (ly:stencil-combine-at-edge
+                     stencil
+                     X
+                     LEFT
+                     neg-stencil
+                     kern)))
+        stencil))
 
 (define-public (ly:bar-line::calc-anchor grob)
-  (let* ((line-thickness (layout-line-thickness grob))
-         (kern (* (ly:grob-property grob 'kern 1) line-thickness))
-         (glyph (ly:grob-property grob 'glyph-name ""))
+  "Calculate the anchor position of a bar line. The anchor is used for
+the correct placement of bar numbers etc."
+  (let* ((bar-glyph (ly:grob-property grob 'glyph-name ""))
+         (bar-glyph-list (string->string-list (strip-string-annotation bar-glyph)))
+         (span-glyph (assoc-get bar-glyph span-bar-glyph-alist bar-glyph))
          (x-extent (ly:grob-extent grob grob X))
-         (dot-width (+ (interval-length
-                         (ly:stencil-extent
-                           (ly:font-get-glyph
-                             (ly:grob-default-font grob)
-                             "dots.dot")
-                           X))
-                       kern))
          (anchor 0.0))
 
-        (if (> (interval-length x-extent) 0)
-            (begin
-              (set! anchor (interval-center x-extent))
-              (cond ((string=? glyph "|:")
-                     (set! anchor (+ anchor (/ dot-width -2.0))))
-                    ((string=? glyph ":|")
-                     (set! anchor (+ anchor (/ dot-width 2.0)))))))
-        anchor))
+        (and (> (interval-length x-extent) 0)
+             (if (or (= (length bar-glyph-list) 1)
+                     (string=? bar-glyph span-glyph)
+                     (string=? span-glyph ""))
+                 ;; We use the x-extent of the stencil if either
+                 ;; - we have a single bar-glyph
+                 ;; - bar-glyph and span-glyph are identical
+                 ;; - we have no span-glyph
+                 (set! anchor (interval-center x-extent))
+                 ;; If the conditions above do not hold,the anchor is the
+                 ;; center of the corresponding span bar stencil extent
+                 (set! anchor (interval-center
+                                (ly:stencil-extent
+                                  (span-bar::compound-bar-line grob bar-glyph dummy-extent)
+                                  X)))))
+         anchor))
 
 (define-public (bar-line::calc-glyph-name grob)
+  "Determine the @code{glyph-name} of the bar line depending on the
+line break status."
   (let* ((glyph (ly:grob-property grob 'glyph))
          (dir (ly:item-break-dir grob))
          (result (assoc-get glyph bar-glyph-alist))
         glyph-name))
 
 (define-public (bar-line::calc-break-visibility grob)
+  "Calculate the visibility of a bar line at line breaks."
   (let* ((glyph (ly:grob-property grob 'glyph))
          (result (assoc-get glyph bar-glyph-alist)))
 
         (vector (string? (car result)) #t (string? (cdr result)))
         all-invisible)))
 
-;; which span bar belongs to a bar line?
-
-(define-public span-bar-glyph-alist
-  '(("|:" . ".|")
-    ("||:" . ".|")
-    (":|" . "|.")
-    (":|.:" . "|.")
-    (":|:" . ".|.")
-    (":|.|:" . "|.|")
-    (":|.|" . "|.")
-    ("S" . "||" )
-    ("S|" . "||")
-    ("|S" . "||")
-    ("S|:" . ".|")
-    (".S|:" . ".|")
-    (":|S" . "|.")
-    (":|S." . "|.")
-    (":|S|:" . "|._.|")
-    (":|S.|:" . "|._.|")
-    ("kievan" . "")
-    ("'" . "")))
-
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; span bar callbacks
 
 (define-public (ly:span-bar::calc-glyph-name grob)
+  "Return the @code{'glyph-name} of the corresponding BarLine grob.
+The corresponding SpanBar glyph is computed within
+@code{span-bar::compound-bar-line}."
   (let* ((elts (ly:grob-object grob 'elements))
          (pos (1- (ly:grob-array-length elts)))
-         (glyph '()))
+         (glyph-name '()))
 
-        (while (and (eq? glyph '())
+        (while (and (eq? glyph-name '())
                     (> pos -1))
-               (begin (set! glyph (ly:grob-property (ly:grob-array-ref elts pos)
-                                                    'glyph-name))
+               (begin (set! glyph-name
+                            (ly:grob-property (ly:grob-array-ref elts pos)
+                                              'glyph-name))
                       (set! pos (1- pos))))
-         (if (eq? glyph '())
+         (if (eq? glyph-name '())
              (begin (ly:grob-suicide! grob)
-                    (set! glyph "")))
-        (assoc-get glyph span-bar-glyph-alist glyph)))
+                    (set! glyph-name "")))
+        glyph-name))
 
 (define-public (ly:span-bar::width grob)
+  "Compute the width of the SpanBar stencil."
   (let ((width (cons 0 0)))
 
        (if (grob::is-live? grob)
-           (let* ((glyph (ly:grob-property grob 'glyph-name))
-                  (stencil (bar-line::compound-bar-line grob glyph (cons -1 1) #f)))
+           (let* ((glyph-name (ly:grob-property grob 'glyph-name))
+                  (stencil (span-bar::compound-bar-line grob
+                                                        glyph-name
+                                                        dummy-extent)))
 
                  (set! width (ly:stencil-extent stencil X))))
        width))
 
 (define-public (ly:span-bar::before-line-breaking grob)
+  "A dummy callback that kills the Grob @var{grob} if it contains
+no elements."
   (let ((elts (ly:grob-object grob 'elements)))
 
        (if (zero? (ly:grob-array-length elts))
            (ly:grob-suicide! grob))))
 
+(define-public (span-bar::compound-bar-line grob bar-glyph extent)
+  "Build the stencil of the span bar."
+  (let* ((line-thickness (layout-line-thickness grob))
+         (kern (* (ly:grob-property grob 'kern 1) line-thickness))
+         (bar-glyph-list (string->string-list
+                           (strip-string-annotation bar-glyph)))
+         (span-glyph (assoc-get bar-glyph span-bar-glyph-alist 'undefined))
+         (stencil empty-stencil))
+
+        (if (string? span-glyph)
+            (let ((span-glyph-list (string->string-list span-glyph))
+                  (is-first-stencil #t))
+
+                 (for-each (lambda (bar span)
+                           ;; the stencil stack routine is similar to the one
+                           ;; used in bar-line::compound-bar-line, but here,
+                           ;; leading replacement-chars are discarded.
+                           (if (not (and (string=? span (string replacement-char))
+                                         is-first-stencil))
+                               (begin
+                                 (set! stencil
+                                       (ly:stencil-combine-at-edge
+                                         stencil
+                                         X
+                                         RIGHT
+                                         ;; if the current glyph is the replacement-char,
+                                         ;; we take the corresponding glyph from the
+                                         ;; bar-glyph-list and insert an empty stencil
+                                         ;; with the appropriate width.
+                                         ;; (this method would fail if the bar-glyph-list
+                                         ;; were shorter than the span-glyph-list,
+                                         ;; but this makes hardly any sense from a
+                                         ;; typographical point of view
+                                         (if (string=? span (string replacement-char))
+                                             ((make-spacer-bar-line bar) grob extent)
+                                             (glyph->stencil span grob extent))
+                                         (if is-first-stencil 0 kern)))
+                                 (set! is-first-stencil #f))))
+                   bar-glyph-list span-glyph-list))
+            ;; if span-glyph is not a string, it may be #f or 'undefined;
+            ;; the latter signals that the span bar for the current bar-glyph
+            ;; is undefined, so we raise a warning.
+            (if (eq? span-glyph 'undefined)
+                (ly:warning
+                  (_ "No span bar glyph defined for bar glyph '~a'; ignoring.")
+                  bar-glyph)))
+        stencil))
+
 ;; The method used in the following routine depends on bar_engraver
 ;; not being removed from staff context.  If bar_engraver is removed,
 ;; the size of the staff lines is evaluated as 0, which results in a
 ;; This routine was originally by Juergen Reuter, but it was a on the
 ;; bulky side. Rewritten by Han-Wen. Ported from c++ to Scheme by Marc Hohl.
 (define-public (ly:span-bar::print grob)
+  "The print routine for span bars."
   (let* ((elts-array (ly:grob-object grob 'elements))
          (refp (ly:grob-common-refpoint-of-array grob elts-array Y))
          (elts (reverse (sort (ly:grob-array->list elts-array)
          ;; Elements must be ordered according to their y coordinates
          ;; relative to their common axis group parent.
          ;; Otherwise, the computation goes mad.
-         (glyph (ly:grob-property grob 'glyph-name))
+         (bar-glyph (ly:grob-property grob 'glyph-name))
          (span-bar empty-stencil))
 
-        (if (string? glyph)
-            (let* ((extents '())
-                   (make-span-bars '())
-                   (model-bar #f))
-
-                  ;; we compute the extents of each system and store them
-                  ;; in a list; dito for the 'allow-span-bar property.
-                  ;; model-bar takes the bar grob, if given.
-                  (map (lambda (bar)
-                       (let* ((ext (bar-line::bar-y-extent bar refp))
-                              (staff-symbol (ly:grob-object bar 'staff-symbol)))
-
-                             (if (ly:grob? staff-symbol)
-                                 (let ((refp-extent (ly:grob-extent staff-symbol refp Y)))
-
-                                      (set! ext (interval-union ext refp-extent))
-
-                                      (if (> (interval-length ext) 0)
+        (if (string? bar-glyph)
+            (let ((extents '())
+                  (make-span-bars '())
+                  (model-bar #f))
+
+                 ;; we compute the extents of each system and store them
+                 ;; in a list; dito for the 'allow-span-bar property.
+                 ;; model-bar takes the bar grob, if given.
+                 (map (lambda (bar)
+                      (let ((ext (bar-line::bar-y-extent bar refp))
+                            (staff-symbol (ly:grob-object bar 'staff-symbol)))
+
+                           (if (ly:grob? staff-symbol)
+                               (let ((refp-extent (ly:grob-extent staff-symbol refp Y)))
+
+                                    (set! ext (interval-union ext refp-extent))
+
+                                    (if (> (interval-length ext) 0)
+                                        (begin
+                                          (set! extents (append extents (list ext)))
+                                          (set! model-bar bar)
+                                          (set! make-span-bars
+                                            (append make-span-bars
+                                                    (list (ly:grob-property
+                                                            bar
+                                                            'allow-span-bar
+                                                            #t))))))))))
+                     elts)
+                 ;; if there is no bar grob, we use the callback argument
+                 (if (not model-bar)
+                     (set! model-bar grob))
+                 ;; we discard the first entry in make-span-bars,
+                 ;; because its corresponding bar line is the
+                 ;; uppermost and therefore not connected to
+                 ;; another bar line
+                 (if (pair? make-span-bars)
+                     (set! make-span-bars (cdr make-span-bars)))
+                 ;; the span bar reaches from the lower end of the upper staff
+                 ;; to the upper end of the lower staff - when allow-span-bar is #t
+                 (reduce (lambda (curr prev)
+                                 (let ((span-extent (cons 0 0))
+                                       (allow-span-bar (car make-span-bars)))
+
+                                      (set! make-span-bars (cdr make-span-bars))
+                                      (if (> (interval-length prev) 0)
                                           (begin
-                                            (set! extents (append extents (list ext)))
-                                            (set! model-bar bar)
-                                            (set! make-span-bars
-                                              (append make-span-bars
-                                                      (list (ly:grob-property bar 'allow-span-bar #t))))))))))
-                       elts)
-                  ;; if there is no bar grob, we use the callback argument
-                  (if (not model-bar)
-                      (set! model-bar grob))
-                  ;; we discard the first entry in make-span-bars, because its corresponding
-                  ;; bar line is the uppermost and therefore not connected to another bar line
-                  (if (pair? make-span-bars)
-                      (set! make-span-bars (cdr make-span-bars)))
-                  ;; the span bar reaches from the lower end of the upper staff
-                  ;; to the upper end of the lower staff - when allow-span-bar is #t
-                  (reduce (lambda (curr prev)
-                                  (let ((l (cons 0 0))
-                                        (allow-span-bar (car make-span-bars)))
-
-                                       (set! make-span-bars (cdr make-span-bars))
-                                       (if (> (interval-length prev) 0)
-                                           (begin
-                                             (set! l (cons (cdr prev) (car curr)))
-                                             (if (or (zero? (interval-length l))
-                                                     (not allow-span-bar))
-                                                 (begin
-                                                   ;; there is overlap between the bar lines
-                                                   ;; or 'allow-span-bar = #f.
-                                                   ;; Do nothing.
-                                                 )
+                                            (set! span-extent (cons (cdr prev)
+                                                                    (car curr)))
+                                            ;; draw the span bar only when the staff lines
+                                            ;; don't overlap and allow-span-bar is #t:
+                                            (and (> (interval-length span-extent) 0)
+                                                 allow-span-bar
                                                  (set! span-bar
-                                                       (ly:stencil-add span-bar
-                                                                       (bar-line::compound-bar-line
-                                                                         model-bar
-                                                                         glyph
-                                                                         l
-                                                                         #f))))))
-                                       curr))
-                          "" extents)
-                  (set! span-bar (ly:stencil-translate-axis
-                                   span-bar
-                                   (- (ly:grob-relative-coordinate grob refp Y))
-                                   Y))))
+                                                       (ly:stencil-add
+                                                         span-bar
+                                                         (span-bar::compound-bar-line
+                                                           model-bar
+                                                           bar-glyph
+                                                           span-extent))))))
+                                      curr))
+                         "" extents)
+                 (set! span-bar (ly:stencil-translate-axis
+                                  span-bar
+                                  (- (ly:grob-relative-coordinate grob refp Y))
+                                  Y))))
         span-bar))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; volta bracket functions
+
+(define-public (allow-volta-hook bar-glyph)
+  "Allow the volta bracket hook being drawn over bar line @var{bar-glyph}."
+  (if (string? bar-glyph)
+      (set! volta-bracket-allow-volta-hook-list
+            (append volta-bracket-allow-volta-hook-list
+                    (list bar-glyph)))
+      (ly:warning (_ ("Volta hook bar line must be a string; ignoring '~a'.")
+                  bar-glyph))))
+
+(define-session-public volta-bracket-allow-volta-hook-list '())
+
+(define-public (volta-bracket::calc-hook-visibility bar-glyph)
+  "Determine the visibility of the volta bracket hook. It is called in
+@code{lily/volta-bracket.cc} and returns @code{#t} if @emph{no} hook
+should be drawn."
+  (not (member bar-glyph volta-bracket-allow-volta-hook-list)))
+
+(define-public (ly:volta-bracket::calc-shorten-pair grob)
+  "Calculate the @code{shorten-pair} values for an ideal placement
+of the volta brackets relative to the bar lines."
+  (let* ((line-thickness (layout-line-thickness grob))
+         (volta-half-line-thickness (* (ly:grob-property grob 'thickness 1.6)
+                                       line-thickness
+                                       1/2))
+         (bar-array (ly:grob-object grob 'bars))
+         (bar-array-length (ly:grob-array-length bar-array))
+         ;; the bar-array starts with the uppermost bar line grob that is
+         ;; covered by the left edge of the volta bracket; more (span)
+         ;; bar line grobs from other staves may follow
+         (left-bar-line (if (> bar-array-length 0)
+                            (ly:grob-array-ref bar-array 0)
+                            '()))
+         ;; we need the vertical-axis-group-index of the left-bar-line
+         ;; to find the corresponding right-bar-line
+         (vag-index (if (null? left-bar-line)
+                        -1
+                        (ly:grob-get-vertical-axis-group-index left-bar-line)))
+         ;; the bar line corresponding to the right edge of the volta bracket
+         ;; is the last entry with the same vag-index, so we transform the array to a list,
+         ;; reverse it and search for suitable entries:
+         (filtered-grobs (filter (lambda (e)
+                                         (eq? (ly:grob-get-vertical-axis-group-index e)
+                                              vag-index))
+                                 (reverse (ly:grob-array->list bar-array))))
+         ;; we need the first one (if any)
+         (right-bar-line (if (pair? filtered-grobs)
+                             (car filtered-grobs)
+                             '()))
+         ;; the left-bar-line may be a #'<Grob Item >,
+         ;; so we add "" as a fallback return value
+         (left-bar-glyph-name (if (null? left-bar-line)
+                                  (string annotation-char)
+                                  (ly:grob-property left-bar-line 'glyph-name "")))
+         (right-bar-glyph-name (if (null? right-bar-line)
+                                   (string annotation-char)
+                                   (ly:grob-property right-bar-line 'glyph-name "")))
+         (left-bar-broken (or (null? left-bar-line)
+                              (not (zero? (ly:item-break-dir left-bar-line)))))
+         (right-bar-broken (or (null? right-bar-line)
+                               (not (zero? (ly:item-break-dir right-bar-line)))))
+         (left-span-stencil-extent (ly:stencil-extent
+                                     (span-bar::compound-bar-line
+                                       left-bar-line
+                                       left-bar-glyph-name
+                                       dummy-extent)
+                                     X))
+         (right-span-stencil-extent (ly:stencil-extent
+                                      (span-bar::compound-bar-line
+                                        right-bar-line
+                                        right-bar-glyph-name
+                                        dummy-extent)
+                                      X))
+         (left-shorten 0.0)
+         (right-shorten 0.0))
+
+        ;; since "empty" intervals may look like (1.0 . -1.0), we use the
+        ;; min/max functions to make sure that the placement is not corrupted
+        ;; in case of empty bar lines
+        (set! left-shorten
+              (if left-bar-broken
+                  (- (max 0 (interval-end left-span-stencil-extent))
+                     (max 0 (interval-end (ly:stencil-extent
+                                            (bar-line::compound-bar-line
+                                              left-bar-line
+                                              left-bar-glyph-name
+                                              dummy-extent)
+                                            X)))
+                     volta-half-line-thickness)
+                  (- (max 0 (interval-end left-span-stencil-extent))
+                     volta-half-line-thickness)))
+
+        (set! right-shorten
+              (if right-bar-broken
+                  (+ (- (max 0 (interval-end right-span-stencil-extent)))
+                     volta-half-line-thickness)
+                  (- (min 0 (interval-start right-span-stencil-extent))
+                     volta-half-line-thickness)))
+
+  (cons left-shorten right-shorten)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; predefined bar glyph print procedures
+
+(add-bar-glyph-print-procedure "" make-empty-bar-line)
+(add-bar-glyph-print-procedure "|" make-simple-bar-line)
+(add-bar-glyph-print-procedure "." make-thick-bar-line)
+(add-bar-glyph-print-procedure "!" make-dashed-bar-line)
+(add-bar-glyph-print-procedure "'" make-tick-bar-line)
+(add-bar-glyph-print-procedure ":" make-colon-bar-line)
+(add-bar-glyph-print-procedure ";" make-dotted-bar-line)
+(add-bar-glyph-print-procedure "k" make-kievan-bar-line)
+(add-bar-glyph-print-procedure "S" (make-segno-bar-line #t))
+(add-bar-glyph-print-procedure "=" (make-segno-bar-line #f))
+(add-bar-glyph-print-procedure "[" (make-bracket-bar-line LEFT))
+(add-bar-glyph-print-procedure "]" (make-bracket-bar-line RIGHT))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; predefined bar lines
+;;
+;; definition of bar lines goes as follows:
+;;
+;; (define-bar-line "normal bar[-annotation]" "end of line" "start of line" "span bar")
+;;
+;; each entry has to be a string or #f.
+;; The empty string "" is allowed and yields in an invisible bar line,
+;; whereas #f reads 'no stencil'.
+;;
+;; Convention: if two bar lines would be identical in their
+;; unbroken bar glyph, we use annotations to make them distinct;
+;; as a general rule of thumb the main difference in their
+;; behavior at the end of a line is used as annotation, cf.
+;;
+;; (define-bar-line ".|:" "|" ".|:" ".|")
+;; (define-bar-line ".|:-||" "||" ".|:" ".|")
+;;
+;; or
+;;
+;; (define-bar-line "S-|" "|" "S" "=")
+;; (define-bar-line "S-S" "S" "" "=")
+
+;; common bar lines
+(define-bar-line "" "" "" #f)
+(define-bar-line "-" #f #f #f)
+(define-bar-line "|" "|" #f "|")
+(define-bar-line "|-s" #f "|" "|")
+(define-bar-line "." "." #f ".")
+(define-bar-line ".|" "|" ".|" ".|")
+(define-bar-line "|." "|." #f "|.")
+(define-bar-line "||" "||" #f "||")
+(define-bar-line ".." ".." #f "..")
+(define-bar-line "|.|" "|.|" #f "|.|")
+(define-bar-line "!" "!" #f "!")
+(define-bar-line ";" ";" #f ";")
+(define-bar-line "'" "'" #f #f)
+
+;; repeats
+(define-bar-line ":|.:" ":|." ".|:"  " |.")
+(define-bar-line ":..:" ":|." ".|:" " ..")
+(define-bar-line ":|.|:" ":|." ".|:" " |.|")
+(define-bar-line ":.|.:" ":|." ".|:" " .|.")
+(define-bar-line ":|." ":|." #f " |.")
+(define-bar-line ".|:" "|" ".|:" ".|")
+(define-bar-line "[|:" "|" "[|:" " |")
+(define-bar-line ":|]" ":|]" #f " |")
+(define-bar-line ":|][|:" ":|]" "[|:" " |  |")
+(define-bar-line ".|:-||" "||" ".|:" ".|")
+
+;; segno bar lines
+(define-bar-line "S" "||" "S" "=")
+(define-bar-line "S-|" "|" "S" "=")
+(define-bar-line "S-S" "S" #f "=")
+(define-bar-line ":|.S" ":|." "S" " |.")
+(define-bar-line ":|.S-S" ":|.S" "" " |.")
+(define-bar-line "S.|:" "|" "S.|:" " .|")
+(define-bar-line "S.|:-S" "S" ".|:" " .|")
+(define-bar-line ":|.S.|:" ":|." "S.|:" " |. .|")
+(define-bar-line ":|.S.|:-S" ":|.S" ".|:" " |. .|")
+
+;; ancient bar lines
+(define-bar-line "k" "k" #f #f) ;; kievan style
+
+;; volta hook settings
+(allow-volta-hook ":|.")
+(allow-volta-hook ".|:")
+(allow-volta-hook "|.")
+(allow-volta-hook ":..:")
+(allow-volta-hook ":|.|:")
+(allow-volta-hook ":|.:")
+(allow-volta-hook ".|")
+(allow-volta-hook ":|.S")
+(allow-volta-hook ":|.S-S")
+(allow-volta-hook ":|.S.|:")
+(allow-volta-hook ":|.S.|:-S")
+(allow-volta-hook ":|]")
+(allow-volta-hook ":|][|:")
index 16a1b21b1ead90d461c8671c8ee9716d47819b71..c1c006cf06f0d347de07fdc5a0a3fb42bb4a13cd 100644 (file)
@@ -213,7 +213,7 @@ This variable is read by @rinternals{Timing_translator} at
 frets for tablatures and fretboards if no strings are provided in
 the notes for the current moment.")
      (doubleRepeatSegnoType ,string? "Set the default bar line for
-the combinations double repeat with segno. Default is @samp{:|S|:}.")
+the combinations double repeat with segno. Default is @samp{:|.S.|:}.")
      (doubleRepeatType ,string? "Set the default bar line for double
 repeats.")
      (doubleSlurs ,boolean? "If set, two slurs are created for every
@@ -231,7 +231,7 @@ the symbol @samp{hihat}) as keys, and a list
 values.")
 
      (endRepeatSegnoType ,string? "Set the default bar line for the
-combinations ending of repeat with segno. Default is @samp{:|S}.")
+combinations ending of repeat with segno. Default is @samp{:|.S}.")
      (endRepeatType ,string? "Set the default bar line for the ending
 of repeats.")
      (explicitClefVisibility ,vector? "@samp{break-visibility}
@@ -485,7 +485,7 @@ part-combining.")
      (stanza ,markup? "Stanza @q{number} to print before the start of a
 verse.  Use in @code{Lyrics} context.")
      (startRepeatSegnoType ,string? "Set the default bar line for the
-combinations beginning of repeat with segno. Default is @samp{.S|:}.")
+combinations beginning of repeat with segno. Default is @samp{S.|:}.")
      (startRepeatType ,string? "Set the default bar line for the beginning
 of repeats.")
      (stemLeftBeamCount ,integer? "Specify the number of beams to draw
index eb76e96e0b53e76bccc60a281543bb0013700f09..bb6197463b492192cffce1dea25a14702bd62c50 100644 (file)
@@ -41,44 +41,13 @@ note)."
  "Print a special bar symbol.  It replaces the regular bar
 symbol with a special symbol.  The argument @var{bartype}
 is a string which specifies the kind of bar line to print.
-Options are @code{|}, @code{:|}, @code{|:}, @code{:|:}, @code{:|.|:},
-@code{:|.:}, @code{.}, @code{||}, @code{|.}, @code{.|}, @code{.|.},
-@code{|.|}, @code{:}, @code{dashed}, @code{'} and @code{S}.
-
-These produce, respectively, a normal bar line, a right repeat, a left repeat,
-a thick double repeat, a thin-thick-thin double repeat,
-a thin-thick double repeat, a thick bar, a double bar, a start bar,
-an end bar, a thick double bar, a thin-thick-thin bar,
-a dotted bar, a dashed bar, a tick as bar line and a segno bar.
-
-In addition, there is an option
-@code{||:} which is equivalent to @code{|:} except at line
-breaks, where it produces a double bar (@code{||}) at the
-end of the line and a repeat sign (@code{|:}) at the
-beginning of the new line.
-
-For segno, @code{S} produces a segno sign except at line breaks,
-where it produces a double bar (@code{||}) at the
-end of the line and a segno sign at the beginning of the new line.
-@code{|S} is equivalent to @code{S} but produces a simple bar line
-(@code{|}) instead of a double bar line (@code{||}) at line breaks.
-@code{S|} produces the segno sign at line breaks and starts the following
-line without special bar lines.
-
-@code{S|:} and @code{:|S} are used for repeat/segno combinations that are
-separated at line breaks.  Alternatively, @code{.S|:} and @code{:|S.}
-may be used which combine repeat signs and segno at the same line in
-case of a line break.  @code{:|S|:} is a combination of a left repeat
-(@code{:|}), a segno (@code{S}) and a right repeat @code{|:} which
-splits before the segno at line breaks; @code{:|S.|:} splits after
-the segno sign.
-
-If @var{bartype} is set to @code{empty} then nothing is
-printed, but a line break is allowed at that spot.
+
+The list of allowed glyphs and predefined bar lines can be
+found in @file{scm/bar-line.scm}.
 
 @code{gap} is used for the gaps in dashed bar lines."
  '(allow-span-bar bar-extent gap glyph glyph-name has-span-bar
-   hair-thickness kern thin-kern thick-thickness))
+   hair-thickness kern rounded thin-kern thick-thickness))
 
 (ly:add-interface
  'bass-figure-interface
index 39dba17c1f3e949ef978c8344824dca14c8ea831..f8c5b29ba815d4efe20c481f011d2eb2c2b426ab 100644 (file)
@@ -429,8 +429,15 @@ read from the NonMusicalPaperColumn that begins the measure.")
 by glissandi?")
      (glyph ,string? "A string determining what @q{style} of glyph is
 typeset.  Valid choices depend on the function that is reading this
-property.")
-     (glyph-name ,string? "The glyph name within the font.")
+property.
+
+In combination with (span) bar lines, it is a string resembling the
+bar line appearance in ASCII form.")
+     (glyph-name ,string? "The glyph name within the font.
+
+In the context of (span) bar lines, @var{glyph-name} represents
+a processed form of @code{glyph}, where decisions about line breaking
+etc. are already taken.")
      (glyph-name-alist ,list? "An alist of key-string pairs.")
      (graphical ,boolean? "Display in graphical (vs. text) form.")
      (grow-direction ,ly:dir? "Crescendo or decrescendo?")
@@ -745,6 +752,7 @@ of an object (e.g., between note and its accidentals).")
      (rotation ,list? "Number of degrees to rotate this object, and
 what point to rotate around.  For example, @code{'(45 0 0)} rotates
 by 45 degrees around the center of this object.")
+     (rounded ,boolean? "Decide whether lines should be drawn rounded or not.")
      (round-up-to-longer-rest ,boolean? "Displays the longer multi-measure
 rest when the length of a measure is between two values of
 @code{usable-duration-logs}.  For example, displays a breve instead of a whole
index b66bca7550d81ca5aee384e3c9ed9f66a6ec7a10..28bc6d04d4199d2f0528b3b5ecce554f7ff93f68 100644 (file)
 
        (layer . 0)
        (non-musical . #t)
+       (rounded . #f)
        (space-alist . (
                        (time-signature . (extra-space . 0.75))
                        (custos . (minimum-space . 2.0))
        (break-align-symbol . staff-bar)
        (cross-staff . #t)
        (glyph-name . ,ly:span-bar::calc-glyph-name)
-
-       ;; ugh duplication! (these 4 properties were copied from Barline)
-       ;;
-       ;; Ross. page 151 lists other values, we opt for a leaner look
-       ;;
-       (kern . 3.0)
-       (thin-kern . 3.0)
-       (hair-thickness . 1.6)
-       (thick-thickness . 6.0)
-
        (layer . 0)
        (non-musical . #t)
        (stencil . ,ly:span-bar::print)
        (edge-height . (2.0 . 2.0)) ;; staff-space;
        (font-encoding . fetaText)
        (font-size . -4)
+       (shorten-pair . ,ly:volta-bracket::calc-shorten-pair)
        (stencil . ,ly:volta-bracket-interface::print)
        (thickness . 1.6) ;; line-thickness
        (word-space . 0.6)
index 15161032f2b251155b69cfc3b1ef4c58fb5775c0..77d47d7dcdbd453f41d3fa47d9f784e752ff13d7 100644 (file)
@@ -233,7 +233,7 @@ def dump_default_bar (outf):
     Nowadays abc2ly outputs explicits barlines (?)
     """
     ## < 2.2
-    outf.write ("\n\\set Score.defaultBarType = \"empty\"\n")
+    outf.write ("\n\\set Score.defaultBarType = \"\"\n")
 
 
 def dump_slyrics (outf):
@@ -1124,12 +1124,12 @@ old_bar_dict = {
 '|]' : '|.',
 '||' : '||',
 '[|' : '||',
-':|' : ':|',
+':|' : ':|.',
 '|:' : '|:',
-'::' : ':|:',
+'::' : ':|.|:',
 '|1' : '|',
 '|2' : '|',
-':|2' : ':|',
+':|2' : ':|.',
 '|' :  '|'
 }
 bar_dict = {
index 0e7fb9c83e6fd9c7af8c33a83077680901646c05..bb61108383b95b7e1fe57104ccc550af9d175114 100644 (file)
@@ -576,7 +576,7 @@ class Staff:
                     last_time = g.timesig
 
                 if 'start' in g.repeats:
-                    e = e + ' \\bar "|:" ' 
+                    e = e + ' \\bar ".|:" '
 
 
                 # we don't attempt voltas since they fail easily.
@@ -608,7 +608,7 @@ class Staff:
             if g:
                 gap = rat_add (gap, g.length ())
                 if 'stop' in g.repeats:
-                    k = k + ' \\bar ":|" '
+                    k = k + ' \\bar ":|." '
                 
         k = '%sglobal = { %s }\n\n ' % (self.staffid (), k)
         return k