]> git.donarmstrong.com Git - lilypond.git/commitdiff
Implement thick bar lines (use \bar "." for this)
authorReinhold Kainhofer <reinhold@kainhofer.com>
Sat, 13 Dec 2008 00:13:45 +0000 (01:13 +0100)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Sat, 7 Mar 2009 23:03:42 +0000 (00:03 +0100)
Until now, \bar"." produced a single dot instead of the bar line, which
was however not used anywhere and also not documented...
Using "." for the bar line style is consistent with other types like
".|" or "|.", where a | indicates a think line and . indicates a thick
line.

Documentation/user/rhythms.itely
input/regression/bar-line-thick.ly [new file with mode: 0644]
lily/bar-line.cc
python/convertrules.py

index 7c5b450db640c083f10ef221cb72a2335f3ed508..e02d14258e5d01a72fe4637a4fe1763beb90422c 100644 (file)
@@ -2039,11 +2039,11 @@ line is inserted at that point in the printed output.  Such insertions
 do not affect the calculation and placement of subsequent automatic
 bar lines.
 
-The simple bar line and five types of double bar line are available
+Two types of simple bar lines and five types of double bar lines are available
 for manual insertion:
 
 @lilypond[quote,relative=1,verbatim]
-f1 \bar "|" g \bar "||" a \bar ".|" b \bar ".|." c \bar "|.|" d \bar "|." e
+f1 \bar "|" f \bar "." g \bar "||" a \bar ".|" b \bar ".|." c \bar "|.|" d \bar "|." e
 @end lilypond
 
 @noindent
@@ -2060,6 +2060,15 @@ and five types of repeat bar line:
 f1 \bar "|:" g \bar ":|:" a \bar ":|.|:" b \bar ":|.:" c \bar ":|" d
 @end lilypond
 
+Additionally, a bar line can be printed as a simple tick:
+@lilypond[quote,relative=1,verbatim]
+f1 \bar "'"
+@end lilypond
+However, as such ticks are typically used in Gregorian chant, it is preferable 
+to use @code{\divisioMinima} there instead, described in the section 
+@ref{Divisiones} in Gregorian chant.
+
+
 @cindex repeats
 
 Although the bar line types signifying repeats may be inserted
diff --git a/input/regression/bar-line-thick.ly b/input/regression/bar-line-thick.ly
new file mode 100644 (file)
index 0000000..09f165f
--- /dev/null
@@ -0,0 +1,15 @@
+
+\header { texidoc = "A thick bar line is created by \bar \".\", which is consistent with e.g. \bar \"|.\"" }
+
+\version "2.12.0"
+
+\paper {  ragged-right = ##t }
+
+\relative \new StaffGroup <<
+  \new Staff {
+    c4 \bar "." c }
+  \new Staff {
+     c c
+  }
+>>
+
index c9d9159a4cfff26591f12404053947c623ef6cba..b6424111fdf39f299d7fada453fc7182e44cd2ad 100644 (file)
@@ -116,6 +116,11 @@ Bar_line::compound_barline (Grob *me, string str, Real h,
       thin.translate_axis (center, Y_AXIS);
       return thin;
     }
+  else if (str == ".")
+    {
+      thick.translate_axis (center, Y_AXIS);
+      return thick;
+    }
   else if (str == "|." || (h == 0 && str == ":|"))
     {
       m.add_at_edge (X_AXIS, LEFT, thick, 0);
@@ -202,10 +207,6 @@ Bar_line::compound_barline (Grob *me, string str, Real h,
     {
       m = tick_bar_line (me, h, rounded);
     }
-  else if (str == ".")
-    {
-      m = dot;
-    }
 
   m.translate_axis (center, Y_AXIS);
   return m;
@@ -355,15 +356,15 @@ ADD_INTERFACE (Bar_line,
               "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{:} and @code{dashed}.\n"
+              "  Options are @code{|}, @code{:|}, @code{|:}, @code{:|:}, @code{:|.|:},"
+              " @code{:|.:}, @code{.}, @code{||}, @code{|.}, @code{.|}, @code{.|.},"
+              " @code{|.|}, @code{:}, @code{dashed} and @code{'}.\n"
               "\n"
-              "These produce, respectively, a right repeat, a left repeat,"
+              "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 double bar, a start bar,"
+              " 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 and a dashed bar."
+              " a dotted bar, a dashed bar and a tick as bar bar line."
               "  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"
index 700b8c40e475561f101445dd12915202462a0c4f..45ade153967a1b2aacc6c30557c537e2a7295299 100644 (file)
@@ -2884,6 +2884,15 @@ longer in reversed order.\n"))
     str = str.replace('"orchestral strings"', '"orchestral harp"')
     return str
 
+@rule ((2, 13, 1),
+       _ ("\\bar \".\" now produces a thick barline"))
+def conv(str):
+    if re.search(r'\\bar\s*"."', str):
+        stderr_write ("\n")
+        stderr_write (NOT_SMART % _("\\bar \".\" now produces a thick barline.\n"))
+        stderr_write (UPDATE_MANUALLY)
+    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,