From: Reinhold Kainhofer Date: Sat, 13 Dec 2008 00:13:45 +0000 (+0100) Subject: Implement thick bar lines (use \bar "." for this) X-Git-Tag: release/2.13.1-1~81 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=eafd157927c2f7292bab0313d26c783570f56343;p=lilypond.git Implement thick bar lines (use \bar "." for this) 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. --- diff --git a/Documentation/user/rhythms.itely b/Documentation/user/rhythms.itely index 7c5b450db6..e02d14258e 100644 --- a/Documentation/user/rhythms.itely +++ b/Documentation/user/rhythms.itely @@ -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 index 0000000000..09f165f8e8 --- /dev/null +++ b/input/regression/bar-line-thick.ly @@ -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 + } +>> + diff --git a/lily/bar-line.cc b/lily/bar-line.cc index c9d9159a4c..b6424111fd 100644 --- a/lily/bar-line.cc +++ b/lily/bar-line.cc @@ -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" diff --git a/python/convertrules.py b/python/convertrules.py index 700b8c40e4..45ade15396 100644 --- a/python/convertrules.py +++ b/python/convertrules.py @@ -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,