lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue 4169: Line and page breaking syntactic sugar (issue 156400043


From: tdanielsmusic
Subject: Re: Issue 4169: Line and page breaking syntactic sugar (issue 156400043 by address@hidden)
Date: Sun, 19 Oct 2014 18:04:32 +0000

Reviewers: janek,

Message:
On 2014/10/19 16:58:04, dak wrote:
https://codereview.appspot.com/156400043/diff/1/ly/property-init.ly
File ly/property-init.ly (right):


https://codereview.appspot.com/156400043/diff/1/ly/property-init.ly#newcode359
ly/property-init.ly:359: lineBreaksOn =
It might be more consistent with other overrides in this file to make
the
commands for (re-)establishing the default settings, namely
\lineBreaksOn and
\pageBreaksOn, be reverts rather than overrides.

done

Description:
Issue 4169: Line and page breaking syntactic sugar

  Install line- and page-breaking controls and document them.

  Amend indexing.

Please review this at https://codereview.appspot.com/156400043/

Affected files (+47, -9 lines):
  M Documentation/notation/spacing.itely
  M ly/property-init.ly


Index: Documentation/notation/spacing.itely
diff --git a/Documentation/notation/spacing.itely b/Documentation/notation/spacing.itely index 1cded7566af4e6d379f2c0ba73656300e7029b97..94f14d6ef83763276fbf1509d59cfc8453a5a651 100644
--- a/Documentation/notation/spacing.itely
+++ b/Documentation/notation/spacing.itely
@@ -1372,7 +1372,13 @@ staff lines.
 @node Line breaking
 @subsection Line breaking

address@hidden line breaks
address@hidden \break
address@hidden \noBreak
address@hidden \breaksOff
address@hidden \breaksOn
address@hidden \lineBreaksOff
address@hidden \lineBreaksOn
address@hidden manual line breaks
 @cindex breaking lines

 Line breaks are normally determined automatically.  They are
@@ -1430,6 +1436,13 @@ c8 c] c2. |
 The @code{\noBreak} command forbids a line break at the bar line
 where it is inserted.

+Within a score, line breaks are prevented within music lying between
address@hidden and @code{\lineBreaksOn} commands.  If page
+breaks should also be prevented, the commands @code{\breaksOff} and
address@hidden should be used.  Note that inhibiting line breaks
+will cause music to run over the right margin if it cannot all be
+contained within one line.
+
 The most basic settings influencing line spacing are @code{indent}
 and @code{line-width}.  They are set in the @code{\layout} block.
 They control the indentation of the first line of music, and the
@@ -1474,10 +1487,12 @@ broken every 4 measures, and only there:


 @predefined
address@hidden \break
 @code{\break},
address@hidden \noBreak
address@hidden
address@hidden,
address@hidden,
address@hidden,
address@hidden,
address@hidden
 @endpredefined

 @seealso
@@ -1510,16 +1525,25 @@ how to modify them.
 @node Manual page breaking
 @unnumberedsubsubsec Manual page breaking

address@hidden \pageBreak
address@hidden \noPageBreak
address@hidden \pageBreaksOn
address@hidden \pageBreaksOff
address@hidden page breaking, manual
+
 The default page breaking may be overridden by inserting
 @code{\pageBreak} or @code{\noPageBreak} commands.  These commands
 are analogous to @code{\break} and @code{\noBreak}.  They should
 be inserted at a bar line.  These commands force and forbid a
-page-break from happening.  Of course, the @code{\pageBreak}
-command also forces a line break.
+page-break from happening at that bar line.  Of course, the
address@hidden command also forces a line break.

 The @code{\pageBreak} and @code{\noPageBreak} commands may also be
 inserted at top-level, between scores and top-level markups.

+Within a score, page breaks are prevented within music lying between
address@hidden and @code{\pageBreaksOn} commands.
+
 There are also analogous settings to @code{ragged-right} and
 @code{ragged-last} which have the same effect on vertical spacing.
 If @code{ragged-bottom} is set to @code{#t} the systems will not
@@ -1577,10 +1601,10 @@ functions may also be used in different book parts.


 @predefined
address@hidden \pageBreak
 @code{\pageBreak},
address@hidden \noPageBreak
address@hidden
address@hidden,
address@hidden,
address@hidden
 @endpredefined

 @seealso
Index: ly/property-init.ly
diff --git a/ly/property-init.ly b/ly/property-init.ly
index 8d6d892d17d3d790139c636302266321ebfb7361..06da3bc49990349f3f00d5f8b981644ad264a281 100644
--- a/ly/property-init.ly
+++ b/ly/property-init.ly
@@ -352,6 +352,20 @@ kievanOff = {
  \revert NoteHead.duration-log
 }

+%% line and page breaking controls
+
+lineBreaksOff =
+  \override Score.NonMusicalPaperColumn.line-break-permission = ##f
+lineBreaksOn =
+  \override Score.NonMusicalPaperColumn.line-break-permission = #'allow
+pageBreaksOff =
+  \override Score.NonMusicalPaperColumn.page-break-permission = ##f
+pageBreaksOn =
+  \override Score.NonMusicalPaperColumn.page-break-permission = #'allow
+breaksOff = { \lineBreaksOff \pageBreaksOff }
+breaksOn = { \lineBreaksOn \pageBreaksOn }
+
+
 %% merging

 mergeDifferentlyDottedOn =





reply via email to

[Prev in Thread] Current Thread [Next in Thread]