+@funindex \defineBarLine
+@funindex defineBarLine
+@cindex bar lines, defining
+@cindex defining bar lines
+
+New bar line types can be defined with @code{\defineBarLine}:
+
+@example
+\defineBarLine @var{bartype} #'(@var{end} @var{begin} @var{span})
+@end example
+
+The @code{\defineBarline} variables can include the
+@q{empty} string @code{""}, which is equivalent to an invisible
+bar line being printed. Or they can be set to @code{#f} which
+prints no bar line at all.
+
+After the definiton, the new bar line can be used by
+@code{\bar} @var{bartype}.
+
+There are currently ten bar line elements available:
+
+@lilypond[quote,verbatim]
+\defineBarLine ":" #'("" ":" "")
+\defineBarLine "=" #'("=" "" "")
+\defineBarLine "[" #'("" "[" "")
+\defineBarLine "]" #'("]" "" "")
+
+\new Staff {
+ s1 \bar "|"
+ s1 \bar "."
+ s1 \bar "!"
+ s1 \bar ";"
+ s1 \bar ":"
+ s1 \bar "k"
+ s1 \bar "S"
+ s1 \bar "="
+ s1 \bar "["
+ s1 \bar "]"
+ s1 \bar ""
+}
+@end lilypond
+
+The @code{"="} bar line provides the double span bar line, used
+in combination with the segno sign. Do not use it as a standalone
+double thin bar line; here, @code{\bar} @var{"||"} is
+preferred.
+
+The @code{"-"} sign starts annotations to bar lines which
+are useful to distinguish those with identical appearance
+but different behavior at line breaks and/or different span bars.
+The part following the @code{"-"} sign is not used for building up
+the bar line.
+
+@lilypond[quote,relative=2,verbatim]
+\defineBarLine "||-dashedSpan" #'("||" "" "!!")
+
+\new StaffGroup <<
+ \new Staff {
+ c1 \bar "||"
+ c1 \bar "||-dashedSpan"
+ c1
+ }
+ \new Staff {
+ c1
+ c1
+ c1
+ }
+>>
+@end lilypond
+
+Furthermore, the space character @code{" "} serves as a placeholder
+for defining span bars correctly aligned to the main bar lines:
+
+@lilypond[quote,relative=2,verbatim]
+\defineBarLine ":|.-wrong" #'(":|." "" "|.")
+\defineBarLine ":|.-right" #'(":|." "" " |.")
+
+\new StaffGroup <<
+ \new Staff {
+ c1 \bar ":|.-wrong"
+ c1 \bar ":|.-right"
+ c1
+ }
+ \new Staff {
+ c1
+ c1
+ c1
+ }
+>>
+@end lilypond
+
+If additional elements are needed, LilyPond provides a simple
+way to define them. For more informations on modifying or adding
+bar lines, see file @file{scm/bar-line.scm}.