input/regression/offsets.ly
input/regression/one-line-auto-height-breaking.ly
input/regression/one-line-breaking.ly
+input/regression/one-page-breaking.ly
input/regression/one-staff.ly
input/regression/optimal-page-breaking-hstretch.ly
input/regression/option-help.ly
lily/include/note-spacing.hh
lily/include/one-line-auto-height-breaking.hh
lily/include/one-line-page-breaking.hh
+lily/include/one-page-breaking.hh
lily/include/open-type-font.hh
lily/include/optimal-page-breaking.hh
lily/include/output-def.hh
lily/note-spacing.cc
lily/one-line-auto-height-breaking.cc
lily/one-line-page-breaking.cc
+lily/one-page-breaking.cc
lily/open-type-font-scheme.cc
lily/open-type-font.cc
lily/optimal-page-breaking.cc
@end lilypond
@item
-A new page breaking function @code{ly:one-line-auto-height-breaking}
-places a whole score on a single line and changes the page width
-to match, just like @code{ly:one-line-breaking}. The difference is that
-it also automatically modifies the height of the page to fit the height
-of the music.
+There are two new page breaking functions. @code{ly:one-page-breaking}
+automatically adjusts the height of the page to fit the music, so that
+everything fits on one page. @code{ly:one-line-auto-height-breaking}
+is like @code{ly:one-line-breaking}, placing the music on a single
+line and adjusting the page width accordingly, however it also
+automatically adjusts the page height to fit the music.
@item
Markup-command @code{\draw-squiggle-line} is now available.
@appendixsec Modèles pour piano
@translationof Piano templates
-+@menu
+@menu
* Piano seul::
* Chant et accompagnement::
* Piano et paroles entre les portées::
@node Formes de notation ancienne prises en charge
-@unnumberedsubsubsec Formes de notation ancienne prises en charge
+@subsection Formes de notation ancienne prises en charge
@translationof Overview of the supported styles
En matière de chant grégorien, LilyPond dispose de trois différents
The page-breaking algorithm to use. Choices are
@code{ly:minimal-breaking}, @code{ly:page-turn-breaking},
-@code{ly:one-line-breaking}, @code{ly:one-line-auto-height-breaking},
-and @code{ly:optimal-breaking} (the default).
+@code{ly:one-page-breaking}, @code{ly:one-line-breaking},
+@code{ly:one-line-auto-height-breaking}, and @code{ly:optimal-breaking}
+(the default).
@item page-breaking-system-system-spacing
@funindex page-breaking-system-system-spacing
@ref{Optimal page breaking},
@ref{Optimal page turning},
@ref{Minimal page breaking},
-@ref{One-line page breaking}.
+@ref{One-page page breaking},
+@ref{One-line page breaking},
+@ref{One-line-auto-height page breaking}.
Installed Files:
@file{ly/paper-defaults-init.ly}.
* Manual page breaking::
* Optimal page breaking::
* Minimal page breaking::
+* One-page page breaking::
* One-line page breaking::
* One-line-auto-height page breaking::
* Optimal page turning::
@rlsr{Spacing}.
+@node One-page page breaking
+@unnumberedsubsubsec One-page page breaking
+
+@funindex ly:one-page-breaking
+
+The @code{ly:one-page-breaking} function is a special-purpose
+page breaking algorithm that automatically adjusts the page height to
+fit the music, so that everything fits on a single page. The
+@code{paper-height} variable in the paper block is ignored, but other
+settings work as usual. In particular, the spacing between the last
+system (or top level markup) and the footer can be customized with
+@code{last-bottom-spacing} in the paper block. The width of the page
+is left unmodified by default but can be set with @code{paper-width}
+in the paper block.
+
+@knownissues
+@code{ly:one-page-breaking} is not currently compatible with
+@code{\bookpart}.
+
+
@node One-line page breaking
@unnumberedsubsubsec One-line page breaking
@c used for news about the upcoming release; see CG on Release Work
@newsItem
-@subheading LilyPond 2.19.51 released @emph{November 20, 2016}
+@subheading LilyPond 2.19.52 released @emph{December 4, 2016}
We are happy to announce the release of LilyPond
-2.19.51. This release includes a number of enhancements, and contains some
+2.19.52. This release includes a number of enhancements, and contains some
work in progress. You will have access to the very latest features, but
some may be incomplete, and you may encounter bugs and crashes. If you
require a stable version of LilyPond, we recommend using the 2.18
@ifclear web_version
@c no anchor links, just link to News page
-@ref{News, LilyPond 2.19.51 released - @emph{November 20, 2016}}
+@ref{News, LilyPond 2.19.52 released - @emph{December 4, 2016}}
@ref{News, Two LilyPond projects in Google Summer of Code 2016 - @emph{April 23, 2016}}
@ifset web_version
@c anchor links, link to individual news items by their <a> tag
-@uref{news.html#LilyPond-2_002e19_002e51-released-November-20_002c-2016,
- LilyPond 2.19.51 released - @emph{November 20, 2016}}
+@uref{news.html#LilyPond-2_002e19_002e51-released-December-4_002c-2016,
+ LilyPond 2.19.52 released - @emph{December 40, 2016}}
@uref{news.html#Two-LilyPond-projects-in-Google-Summer-of-Code-2016-April-23_002c-2016,
Two LilyPond projects in Google Summer of Code 2016 - @emph{April 23, 2016}}
* don't duplicate entries from news-front.itexi
@end ignore
+@newsItem
+@subheading LilyPond 2.19.51 released @emph{November 20, 2016}
+
+We are happy to announce the release of LilyPond
+2.19.51. This release includes a number of enhancements, and contains some
+work in progress. You will have access to the very latest features, but
+some may be incomplete, and you may encounter bugs and crashes. If you
+require a stable version of LilyPond, we recommend using the 2.18
+version.
+
+@newsEnd
+
@newsItem
@subheading LilyPond 2.19.50 released @emph{November 6, 2016}
}
image of music
- • A new page breaking function ‘ly:one-line-auto-height-breaking’
- places a whole score on a single line and changes the page width to
- match, just like ‘ly:one-line-breaking’. The difference is that it
- also automatically modifies the height of the page to fit the
- height of the music.
+ • There are two new page breaking functions. ‘ly:one-page-breaking’
+ automatically adjusts the height of the page to fit the music, so
+ that everything fits on one page.
+ ‘ly:one-line-auto-height-breaking’ is like ‘ly:one-line-breaking’,
+ placing the music on a single line and adjusting the page width
+ accordingly, however it also automatically adjusts the page height
+ to fit the music.
• Markup-command ‘\draw-squiggle-line’ is now available. Customizing
is possible with overrides of ‘thickness’, ‘angularity’, ‘height’
PACKAGE_NAME=LilyPond
MAJOR_VERSION=2
MINOR_VERSION=19
-PATCH_LEVEL=51
+PATCH_LEVEL=52
MY_PATCH_LEVEL=
VERSION_STABLE=2.18.2
-VERSION_DEVEL=2.19.51
+VERSION_DEVEL=2.19.52
HOST_ARCH=@HOST_ARCH@
+USE_EXTRACTPDFMARK=@USE_EXTRACTPDFMARK@
+
################################################################
## FILESYSTEM
################################################################
DEFINES = @DEFS@ @DEFINES@
DEFS = @DEFS@
DOCUMENTATION = @DOCUMENTATION@
+EXTRACTPDFMARK = @EXTRACTPDFMARK@
FIND = @FIND@
FCLIST = @FCLIST@
FLEX = @FLEX@
FLEXLEXER_FILE = @FLEXLEXER_FILE@
FONTFORGE = @FONTFORGE@
GROFF = @GROFF@
+GS920 = @GS920@
GUILE = @GUILE@
GUILE_CFLAGS = @GUILE_CFLAGS@
GUILE_CONFIG = @GUILE_CONFIG@
DBLATEX
TEXI2HTML
MAKEINFO
+USE_EXTRACTPDFMARK
+EXTRACTPDFMARK
+GS920
GHOSTSCRIPT
PERL
GUILE
+
+
+
+ for ac_prog in gs
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_GS920+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$GS920"; then
+ ac_cv_prog_GS920="$GS920" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_GS920="$ac_prog"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+GS920=$ac_cv_prog_GS920
+if test -n "$GS920"; then
+ { $as_echo "$as_me:$LINENO: result: $GS920" >&5
+$as_echo "$GS920" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$GS920" && break
+done
+test -n "$GS920" || GS920="no"
+
+
+
+ r="`eval echo '$'"GS920"`"
+ if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"GS920"`' : '.*\(echo\)' > /dev/null; then
+ true
+ else
+ ##STEPMAKE_WARN(cannot find . )
+ false
+ fi
+
+ if test $? -ne 0; then
+
+ eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \"gs\"`\"
+
+ if test "OPTIONAL" = "REQUIRED"; then
+ command="echo ERROR: gs not found"
+ # abort configure process here?
+ else
+ command="- echo gs not found"
+ fi
+ eval "GS920"='$command'
+ false
+ else
+ true
+ fi
+
+ if test $? -eq 0 -a -n "9.20"; then
+
+ r="`eval echo '$'"GS920"`"
+ { $as_echo "$as_me:$LINENO: checking $r version" >&5
+$as_echo_n "checking $r version... " >&6; }
+ exe=`
+ ## which doesn't work in ash, if /usr/bin/which isn't installed
+ ## type -p doesn't work in ash
+ ## command -v doesn't work in zsh
+ ## command -v "$r" 2>&1
+ ## this test should work in ash, bash, pdksh (ksh), zsh
+ type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+`
+ if test -n ""; then
+ ver=""
+ else
+ ver=`
+ ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
+ ##
+ ## ARG.
+ ## Workaround for broken Debian gcc version string:
+ ## gcc (GCC) 3.1.1 20020606 (Debian prerelease)
+ ##
+ ## -V: Workaround for python
+
+ #dnl
+
+ ## Assume and hunt for dotted version multiplet.
+ ## use eval trickery, because we cannot use multi-level $() instead of ``
+ ## for compatibility reasons.
+
+ ## grab the first version number in --version output.
+ eval _ver=\"\`("$exe" --version || "$exe" -V) 2>&1 |
+ grep -E '(^| )[0-9][0-9]*\.[0-9]' |
+ head -n 1 |
+ tr ' ' '\n' |
+ sed 's/\([0-9][0-9]*\.[0-9][0-9.]*\).*/\1/g' |
+ grep -E '(^| )[0-9][0-9]*\.[0-9]' |
+ head -n 1\`\"
+
+ if test -z "$_ver"; then
+ ## If empty, try date [fontforge]
+ eval _ver=\"\`("$exe" --version || "$exe" -V) 2>&1 \
+ | grep '\(^\|[^0-9a-f]\)[0-9]\{6,8\}\([^0-9a-f]\|$\)' \
+ | head -n 1 \
+ | sed -e 's/^[^.0-9]*//' -e 's/[^.0-9]*$//'\`\"
+ fi
+ echo "$_ver"
+ #dnl
+`
+ fi
+ num=`
+ echo "$ver" | awk -F. '
+ {
+ if ($3) {three = $3}
+ else {three = 0}
+ }
+ {printf "%.0f\n", $1*1000000 + $2*1000 + three}'
+`
+ req=`
+ echo "9.20" | awk -F. '
+ {
+ if ($3) {three = $3}
+ else {three = 0}
+ }
+ {printf "%.0f\n", $1*1000000 + $2*1000 + three}'
+`
+ { $as_echo "$as_me:$LINENO: result: $ver" >&5
+$as_echo "$ver" >&6; }
+ if test "$num" -lt "$req"; then
+
+ eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \""$r >= 9.20 (installed: $ver)"\"`\"
+
+ fi
+ vervar="`echo GS920 | tr 'a-z' 'A-Z'`_VERSION"
+ eval `echo $vervar=$num`
+## AC_SUBST(`eval echo $vervar`)
+
+ fi
+
+
+ for ac_prog in extractpdfmark
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_EXTRACTPDFMARK+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$EXTRACTPDFMARK"; then
+ ac_cv_prog_EXTRACTPDFMARK="$EXTRACTPDFMARK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_EXTRACTPDFMARK="$ac_prog"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+EXTRACTPDFMARK=$ac_cv_prog_EXTRACTPDFMARK
+if test -n "$EXTRACTPDFMARK"; then
+ { $as_echo "$as_me:$LINENO: result: $EXTRACTPDFMARK" >&5
+$as_echo "$EXTRACTPDFMARK" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$EXTRACTPDFMARK" && break
+done
+test -n "$EXTRACTPDFMARK" || EXTRACTPDFMARK="no"
+
+
+
+ r="`eval echo '$'"EXTRACTPDFMARK"`"
+ if test -n "$r" -a "$r" != "error" -a "$r" != "no" && expr '`eval echo '$'"EXTRACTPDFMARK"`' : '.*\(echo\)' > /dev/null; then
+ true
+ else
+ ##STEPMAKE_WARN(cannot find . )
+ false
+ fi
+
+ if test $? -ne 0; then
+
+ eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \"extractpdfmark\"`\"
+
+ if test "OPTIONAL" = "REQUIRED"; then
+ command="echo ERROR: extractpdfmark not found"
+ # abort configure process here?
+ else
+ command="- echo extractpdfmark not found"
+ fi
+ eval "EXTRACTPDFMARK"='$command'
+ false
+ else
+ true
+ fi
+
+ if test $? -eq 0 -a -n ""; then
+
+ r="`eval echo '$'"EXTRACTPDFMARK"`"
+ { $as_echo "$as_me:$LINENO: checking $r version" >&5
+$as_echo_n "checking $r version... " >&6; }
+ exe=`
+ ## which doesn't work in ash, if /usr/bin/which isn't installed
+ ## type -p doesn't work in ash
+ ## command -v doesn't work in zsh
+ ## command -v "$r" 2>&1
+ ## this test should work in ash, bash, pdksh (ksh), zsh
+ type -p $r 2>/dev/null | tail -n 1 | awk '{print $NF}'
+`
+ if test -n ""; then
+ ver=""
+ else
+ ver=`
+ ## "$exe" --version 2>&1 | grep -v '^$' | head -n 1 | awk '{print $NF}'
+ ##
+ ## ARG.
+ ## Workaround for broken Debian gcc version string:
+ ## gcc (GCC) 3.1.1 20020606 (Debian prerelease)
+ ##
+ ## -V: Workaround for python
+
+ #dnl
+
+ ## Assume and hunt for dotted version multiplet.
+ ## use eval trickery, because we cannot use multi-level $() instead of ``
+ ## for compatibility reasons.
+
+ ## grab the first version number in --version output.
+ eval _ver=\"\`("$exe" --version || "$exe" -V) 2>&1 |
+ grep -E '(^| )[0-9][0-9]*\.[0-9]' |
+ head -n 1 |
+ tr ' ' '\n' |
+ sed 's/\([0-9][0-9]*\.[0-9][0-9.]*\).*/\1/g' |
+ grep -E '(^| )[0-9][0-9]*\.[0-9]' |
+ head -n 1\`\"
+
+ if test -z "$_ver"; then
+ ## If empty, try date [fontforge]
+ eval _ver=\"\`("$exe" --version || "$exe" -V) 2>&1 \
+ | grep '\(^\|[^0-9a-f]\)[0-9]\{6,8\}\([^0-9a-f]\|$\)' \
+ | head -n 1 \
+ | sed -e 's/^[^.0-9]*//' -e 's/[^.0-9]*$//'\`\"
+ fi
+ echo "$_ver"
+ #dnl
+`
+ fi
+ num=`
+ echo "$ver" | awk -F. '
+ {
+ if ($3) {three = $3}
+ else {three = 0}
+ }
+ {printf "%.0f\n", $1*1000000 + $2*1000 + three}'
+`
+ req=`
+ echo "" | awk -F. '
+ {
+ if ($3) {three = $3}
+ else {three = 0}
+ }
+ {printf "%.0f\n", $1*1000000 + $2*1000 + three}'
+`
+ { $as_echo "$as_me:$LINENO: result: $ver" >&5
+$as_echo "$ver" >&6; }
+ if test "$num" -lt "$req"; then
+
+ eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \""$r >= (installed: $ver)"\"`\"
+
+ fi
+ vervar="`echo EXTRACTPDFMARK | tr 'a-z' 'A-Z'`_VERSION"
+ eval `echo $vervar=$num`
+## AC_SUBST(`eval echo $vervar`)
+
+ fi
+
+req=`
+ echo "9.20" | awk -F. '
+ {
+ if ($3) {three = $3}
+ else {three = 0}
+ }
+ {printf "%.0f\n", $1*1000000 + $2*1000 + three}'
+`
+USE_EXTRACTPDFMARK=yes
+if test "$GS920_VERSION" -lt "$req"; then
+ GS920=
+ USE_EXTRACTPDFMARK=no
+fi
+if test "$EXTRACTPDFMARK" != "extractpdfmark"; then
+ EXTRACTPDFMARK=
+ USE_EXTRACTPDFMARK=no
+fi
+if test "$USE_EXTRACTPDFMARK" != "yes"; then
+
+ eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \""(Optionally using Ghostscript >= 9.20 together with"\"`\"
+
+
+ eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \"" Extract PDFmark can significantly reduce the disk space required"\"`\"
+
+
+ eval "OPTIONAL"=\"`eval echo \"'$'OPTIONAL\" \"" for building the documentation and the final PDF files.)"\"`\"
+
+fi
+
+
for ac_prog in makeinfo
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
STEPMAKE_PATH_PROG(GHOSTSCRIPT, gs, $DOCUMENTATION_REQUIRED, 8.60)
+AC_SUBST(GS920)
+AC_SUBST(EXTRACTPDFMARK)
+AC_SUBST(USE_EXTRACTPDFMARK)
+STEPMAKE_PROGS(GS920, gs, OPTIONAL, 9.20)
+STEPMAKE_PROGS(EXTRACTPDFMARK, extractpdfmark, OPTIONAL)
+req=`STEPMAKE_NUMERIC_VERSION(9.20)`
+USE_EXTRACTPDFMARK=yes
+if test "$GS920_VERSION" -lt "$req"; then
+ GS920=
+ USE_EXTRACTPDFMARK=no
+fi
+if test "$EXTRACTPDFMARK" != "extractpdfmark"; then
+ EXTRACTPDFMARK=
+ USE_EXTRACTPDFMARK=no
+fi
+if test "$USE_EXTRACTPDFMARK" != "yes"; then
+ STEPMAKE_ADD_ENTRY(OPTIONAL,
+ ["(Optionally using Ghostscript >= 9.20 together with"])
+ STEPMAKE_ADD_ENTRY(OPTIONAL,
+ [" Extract PDFmark can significantly reduce the disk space required"])
+ STEPMAKE_ADD_ENTRY(OPTIONAL,
+ [" for building the documentation and the final PDF files.)"])
+fi
+
STEPMAKE_PROGS(MAKEINFO, makeinfo, REQUIRED, 4.11)
STEPMAKE_PROGS(TEXI2HTML, texi2html, $DOCUMENTATION_REQUIRED, 1.82)
STEPMAKE_PROGS(DBLATEX, dblatex, $DOCUMENTATION_REQUIRED, 0.1.4)
--- /dev/null
+\version "2.19.36"
+
+\header {
+ texidoc = "The @var{ly:one-page-breaking} algorithm puts everything
+on one page by adjusting the page-height to fit the content.
+"
+}
+
+\paper {
+ paper-width = 120
+ page-breaking = #ly:one-page-breaking
+}
+
+\include "typography-demo.ly"
--- /dev/null
+/*
+ This file is part of LilyPond, the GNU music typesetter.
+
+ Copyright (C) 2016 Paul Morris
+
+ LilyPond is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LilyPond is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef ONE_PAGE_BREAKING_HH
+#define ONE_PAGE_BREAKING_HH
+
+#include "page-breaking.hh"
+#include "page-spacing.hh"
+
+class One_page_breaking: public Page_breaking
+{
+public:
+ virtual SCM solve ();
+
+ One_page_breaking (Paper_book *pb);
+ virtual ~One_page_breaking ();
+private:
+ SCM read_spacing_alist (SCM spec, SCM sym);
+};
+
+#endif /* ONE_PAGE_BREAKING_HH */
--- /dev/null
+/*
+ This file is part of LilyPond, the GNU music typesetter.
+
+ Copyright (C) 2016 Paul Morris
+
+ LilyPond is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LilyPond is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "international.hh"
+#include "one-page-breaking.hh"
+#include "output-def.hh"
+#include "page-spacing.hh"
+#include "paper-book.hh"
+#include "paper-score.hh"
+#include "system.hh"
+
+One_page_breaking::One_page_breaking (Paper_book *pb)
+ : Page_breaking (pb, 0, 0)
+{
+}
+
+One_page_breaking::~One_page_breaking ()
+{
+}
+
+SCM
+One_page_breaking::read_spacing_alist (SCM spec, SCM sym)
+{
+ SCM pair = scm_sloppy_assq (sym, spec);
+ if (scm_is_pair (pair) && scm_is_number (scm_cdr (pair)))
+ return scm_cdr (pair);
+ else
+ return scm_from_int (0);
+}
+
+/*
+ This is a somewhat unconventional page-breaking algorithm. The
+ @code{paper-height} setting (in the paper block) is automatically
+ modified to fit the height of the content so that everything exactly
+ fits on a single page with no compression. As usual (in the paper
+ block) the width of the page can be customized with
+ @code{paper-width} or @code{set-paper-size}, and the spacing between
+ the footer and the last system (or top level markup) can be customized
+ with @code{last-bottom-spacing}.
+
+ It works by (1) temporarily setting the page height to a very large
+ value, (2) doing line breaking and page breaking, much like in
+ @code{ly:minimal-line-breaking}, (3) calculate and set the final
+ height of the page based on the results, taking last-bottom-spacing,
+ footer, top and bottom margins, etc. into account.
+*/
+SCM
+One_page_breaking::solve ()
+{
+ // TEMPORARILY SET VERY LARGE PAPER HEIGHT
+ // Stencil::translate throws a programming error (for the tagline
+ // position) if this is set any larger than 1e6
+ book_->paper_->set_variable (ly_symbol2scm ("paper-height"), scm_from_double (1e6));
+
+ // LINE BREAKING
+ message (_ ("Calculating line breaks..."));
+ vsize end = last_break_position ();
+ set_to_ideal_line_configuration (0, end);
+ break_into_pieces (0, end, current_configuration (0));
+
+ // PAGE BREAKING
+ message (_ ("Fitting music on 1 page..."));
+ vsize first_page_num = robust_scm2int (book_->paper_->c_variable ("first-page-number"), 1);
+ Page_spacing_result res = space_systems_on_n_pages (0, 1, first_page_num);
+ SCM lines = systems ();
+ SCM pages = make_pages (res.systems_per_page_, lines);
+
+ // GET VERTICAL POSITIONS
+ // Larger values are lower on the page. We can't just use the last
+ // one, because the last does not necessarily have the lowest bound.
+ vector<Real> line_posns;
+ SCM lowest_line_pos = scm_from_int (0);
+
+ Prob *page_pb = unsmob<Prob> (scm_car (pages));
+ SCM config = page_pb->internal_get_property (ly_symbol2scm ("configuration"));
+
+ for (SCM c = config; scm_is_pair (c); c = scm_cdr (c))
+ {
+ SCM this_pos = scm_car (c);
+ line_posns.push_back (scm_to_double (this_pos));
+ if (scm_gr_p (this_pos, lowest_line_pos))
+ lowest_line_pos = this_pos;
+ }
+
+ // CALCULATE THE LOWEST LOWER BOUND OF ALL LINES ON THE PAGE
+ vector<Real> line_heights;
+ for (vsize i = 0; i < system_specs_.size (); i++)
+ {
+ if (Paper_score *ps = system_specs_[i].pscore_)
+ {
+ // musical systems
+ vsize broken_intos_size = ps->root_system ()->broken_intos_.size ();
+ for (vsize s = 0; s < broken_intos_size; s++)
+ {
+ Grob *system = ps->root_system ()->broken_intos_[s];
+ line_heights.push_back (system->extent (system, Y_AXIS).length ());
+ }
+ }
+ else if (Prob *pb = system_specs_[i].prob_)
+ {
+ // top-level markups
+ Stencil *stil = unsmob<Stencil> (pb->internal_get_property (ly_symbol2scm ("stencil")));
+ line_heights.push_back (stil->extent (Y_AXIS).length ());
+ }
+ }
+
+ Real lowest_bound = 0;
+ for (vsize i = 0; i < line_heights.size (); i++)
+ {
+ Real low_bound = line_heights[i] + line_posns[i];
+ if (low_bound > lowest_bound)
+ lowest_bound = low_bound;
+ }
+
+ // HANDLE LAST-BOTTOM-SPACING
+ SCM last_bottom = book_->paper_->c_variable ("last-bottom-spacing");
+
+ SCM padding = read_spacing_alist (last_bottom, ly_symbol2scm("padding"));
+ lowest_bound += scm_to_double (padding);
+
+ SCM basic_dist = read_spacing_alist (last_bottom, ly_symbol2scm("basic-distance"));
+ SCM minimum_dist = read_spacing_alist (last_bottom, ly_symbol2scm("minimum-distance"));
+ SCM max_dist = scm_max (basic_dist, minimum_dist);
+
+ // If the last line is a musical system get the distance between its
+ // refpoint and its upper bound. If it is a top level markup its
+ // refpoint is 0.
+ SCM refpoint_dist = scm_from_int (0);
+
+ SCM lines_probs = page_pb->internal_get_property (ly_symbol2scm ("lines"));
+ Prob *last_line_pb = unsmob<Prob> (scm_list_ref (lines_probs, scm_oneminus (scm_length (lines_probs))));
+
+ SCM refpoint_extent = last_line_pb->internal_get_property (ly_symbol2scm ("staff-refpoint-extent"));
+
+ if (scm_is_pair (refpoint_extent) && scm_is_number (scm_car (refpoint_extent)))
+ refpoint_dist = scm_product (scm_car (refpoint_extent), scm_from_int (-1));
+
+ Real last_bottom_bound = scm_to_double (scm_sum (lowest_line_pos, scm_sum (refpoint_dist, max_dist)));
+ if (last_bottom_bound > lowest_bound)
+ lowest_bound = last_bottom_bound;
+
+ // SET FINAL PAPER HEIGHT
+ Stencil *foot_stil = unsmob<Stencil> (page_pb->internal_get_property (ly_symbol2scm ("foot-stencil")));
+ Real foot_height = foot_stil->extent (Y_AXIS).length ();
+
+ SCM top_margin = book_->paper_->c_variable ("top-margin");
+ SCM bottom_margin = book_->paper_->c_variable ("bottom-margin");
+ SCM margins = scm_sum (top_margin, bottom_margin);
+
+ SCM ppr_height = scm_sum (margins, scm_from_double (lowest_bound + foot_height));
+
+ book_->paper_->set_variable (ly_symbol2scm ("paper-height"), ppr_height);
+
+ // bottom-edge determines placement of footer (tagline, footnotes, etc.)
+ page_pb->set_property ("bottom-edge", scm_difference (ppr_height, bottom_margin));
+
+ return pages;
+}
#include "page-turn-page-breaking.hh"
#include "one-line-page-breaking.hh"
#include "one-line-auto-height-breaking.hh"
+#include "one-page-breaking.hh"
#include "optimal-page-breaking.hh"
#include "minimal-page-breaking.hh"
return b.solve ();
}
+LY_DEFINE (ly_one_page_breaking, "ly:one-page-breaking",
+ 1, 0, 0, (SCM pb),
+ "Put each score on a single page. The paper-height settings"
+ " are modified so each score fits on one page, and the"
+ " height of the page matches the height of the full score.")
+{
+ One_page_breaking b (unsmob<Paper_book> (pb));
+ return b.solve ();
+}
+
LY_DEFINE (ly_one_line_breaking, "ly:one-line-breaking",
1, 0, 0, (SCM pb),
"Put each score on a single line, and put each line on its own"
%}
-\version "2.19.51" % necessary for upgrading to future LilyPond versions.
+\version "2.19.52" % necessary for upgrading to future LilyPond versions.
\header{
title = "A scale in LilyPond"
%}
-\version "2.19.51" % necessary for upgrading to future LilyPond versions.
+\version "2.19.52" % necessary for upgrading to future LilyPond versions.
\header{
title = "A scale in LilyPond"
\accepts Lyrics
\accepts MensuralStaff
\accepts NoteNames
- \accepts NullVoice
\accepts OneStaff
\accepts PetrucciStaff
\accepts PianoStaff
\accepts ChordNames
\accepts FiguredBass
\accepts DrumStaff
+ \accepts Dynamics
\accepts GrandStaff
\accepts Lyrics
\accepts OneStaff
ifeq (,$(findstring pdflatex,$(MISSING_OPTIONAL)))
$(outdir)/%.pdf: $(outdir)/%.tex
cd $(outdir) && $(buildscript-dir)/run-and-check "$(PDFLATEX) -halt-on-error $(notdir $<)" "$*.pdflatex.log"
+ifeq ($(USE_EXTRACTPDFMARK),yes)
+ $(EXTRACTPDFMARK) -o $(outdir)/$*.pdfmark $@
+ $(GS920) -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=$(outdir)/$*.final.pdf -c "30000000 setvmthreshold" -f $(top-build-dir)/out-fonts/*.font.ps $(outdir)/$*.pdfmark $@
+ rm $@
+ mv $(outdir)/$*.final.pdf $@
+endif
endif
############## Texinfo ######################
ifeq (,$(findstring dblatex,$(MISSING_OPTIONAL)))
$(outdir)/%.pdf: $(outdir)/%.xml
cd $(outdir) && $(buildscript-dir)/run-and-check "$(DBLATEX) $(DBLATEX_BACKEND) $(notdir $<)" "$*.dblatex.log"
+ifeq ($(USE_EXTRACTPDFMARK),yes)
+ $(EXTRACTPDFMARK) -o $(outdir)/$*.pdfmark $@
+ $(GS920) -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=$(outdir)/$*.final.pdf -c "30000000 setvmthreshold" -f $(top-build-dir)/out-fonts/*.font.ps $(outdir)/$*.pdfmark $@
+ rm $@
+ mv $(outdir)/$*.final.pdf $@
+endif
endif
-ddump-signatures \
-danti-alias-factor=$(ANTI_ALIAS_FACTOR)
+ifeq ($(USE_EXTRACTPDFMARK),yes)
+LILYPOND_BOOK_LILYPOND_FLAGS+= \
+-dfont-export-dir=$(top-build-dir)/out-fonts \
+-dgs-never-embed-fonts
+endif
+
ifdef QUIET_BUILD
LILYPOND_BOOK_WARN = --loglevel=NONE
else
echo -e '\n\n\n' ; \
(cd $(top-src-dir) && git diff ) ; \
fi > $(outdir)/tree.gittxt
+ifeq ($(USE_EXTRACTPDFMARK),yes)
+ $(MAKE) LILYPOND_BOOK_LILYPOND_FLAGS="-dbackend=eps --formats=ps $(LILYPOND_JOBS) -dseparate-log-files -dinclude-eps-fonts -dgs-load-fonts --header=texidoc -I $(top-src-dir)/Documentation/included/ -ddump-profile -dcheck-internal-types -ddump-signatures -danti-alias-factor=1 -dfont-export-dir=$(top-build-dir)/out-fonts -dgs-never-embed-fonts" LILYPOND_BOOK_WARN= $(outdir)/collated-files.html LYS_OUTPUT_DIR=$(top-build-dir)/out/lybook-testdb
+else
$(MAKE) LILYPOND_BOOK_LILYPOND_FLAGS="-dbackend=eps --formats=ps $(LILYPOND_JOBS) -dseparate-log-files -dinclude-eps-fonts -dgs-load-lily-fonts --header=texidoc -I $(top-src-dir)/Documentation/included/ -ddump-profile -dcheck-internal-types -ddump-signatures -danti-alias-factor=1" LILYPOND_BOOK_WARN= $(outdir)/collated-files.html LYS_OUTPUT_DIR=$(top-build-dir)/out/lybook-testdb
+endif
rsync -L -a --exclude 'out-*' --exclude 'out' --exclude mf --exclude source --exclude mf $(top-build-dir)/out/share $(outdir)
-See http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=log;h=refs/tags/release/2.19.51-1
+See http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=log;h=refs/tags/release/2.19.52-1
-commit 083b99742f8089f5ad1018e7e69db1b947e7d736
+commit 1f42b413de732a86da5ecda7f809e24c74dbdb4a
Author: Phil Holmes <mail@philholmes.net>
-Date: Sat Nov 19 13:48:32 2016 +0000
+Date: Sat Dec 3 12:30:56 2016 +0000
Release: bump Welcome versions.
diff --git a/ly/Welcome-to-LilyPond-MacOS.ly b/ly/Welcome-to-LilyPond-MacOS.ly
-index 6bdccfb..ea56eb9 100644
+index ea56eb9..f18b73e 100644
--- a/ly/Welcome-to-LilyPond-MacOS.ly
+++ b/ly/Welcome-to-LilyPond-MacOS.ly
@@ -23,7 +23,7 @@ That's it. For more information, visit http://lilypond.org .
%}
--\version "2.19.50" % necessary for upgrading to future LilyPond versions.
-+\version "2.19.51" % necessary for upgrading to future LilyPond versions.
+-\version "2.19.51" % necessary for upgrading to future LilyPond versions.
++\version "2.19.52" % necessary for upgrading to future LilyPond versions.
\header{
title = "A scale in LilyPond"
diff --git a/ly/Welcome_to_LilyPond.ly b/ly/Welcome_to_LilyPond.ly
-index 922e638..8bdd018 100644
+index 8bdd018..cfca7fe 100644
--- a/ly/Welcome_to_LilyPond.ly
+++ b/ly/Welcome_to_LilyPond.ly
@@ -32,7 +32,7 @@ Good luck with LilyPond! Happy engraving.
%}
--\version "2.19.50" % necessary for upgrading to future LilyPond versions.
-+\version "2.19.51" % necessary for upgrading to future LilyPond versions.
+-\version "2.19.51" % necessary for upgrading to future LilyPond versions.
++\version "2.19.52" % necessary for upgrading to future LilyPond versions.
\header{
title = "A scale in LilyPond"
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: lilypond 2.19.51\n"
+"Project-Id-Version: lilypond 2.19.52\n"
"Report-Msgid-Bugs-To: http://post.gmane.org/post.php?group=gmane.comp.gnu."
"lilypond.bugs\n"
-"POT-Creation-Date: 2016-11-19 13:46+0000\n"
+"POT-Creation-Date: 2016-12-03 12:27+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "cannot write to file: `%s'"
msgstr ""
-#: minimal-page-breaking.cc:40 paper-score.cc:116
+#. LINE BREAKING
+#: minimal-page-breaking.cc:40 one-page-breaking.cc:72 paper-score.cc:116
msgid "Calculating line breaks..."
msgstr ""
msgid "NoteEvent without pitch"
msgstr ""
+#. PAGE BREAKING
+#: one-page-breaking.cc:78 optimal-page-breaking.cc:114
+msgid "Fitting music on 1 page..."
+msgstr ""
+
#: open-type-font-scheme.cc:149 open-type-font-scheme.cc:195
#: open-type-font-scheme.cc:241 pfb-scheme.cc:60 ttf.cc:512 ttf.cc:561
msgid "font index must be non-negative, using index 0"
"systems-per-page"
msgstr ""
-#: optimal-page-breaking.cc:114
-msgid "Fitting music on 1 page..."
-msgstr ""
-
#: optimal-page-breaking.cc:116
#, c-format
msgid "Fitting music on %d pages..."
else
PDFTEX=$(PDFTEX) PDFLATEX=$(PDFLATEX) $(buildscript-dir)/run-and-check "cd $(outdir); texi2pdf $(TEXI2PDF_FLAGS) -I $(abs-src-dir) $(TEXINFO_PAPERSIZE_OPTION) $(<F) < /dev/null" "$*.texi2pdf.log"
endif
+ifeq ($(USE_EXTRACTPDFMARK),yes)
+ $(EXTRACTPDFMARK) -o $(outdir)/$*.pdfmark $@
+ $(GS920) -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=$(outdir)/$*.final.pdf -c "30000000 setvmthreshold" -f $(top-build-dir)/out-fonts/*.font.ps $(outdir)/$*.pdfmark $@
+ rm $@
+ mv $(outdir)/$*.final.pdf $@
+endif
$(outdir)/%.txt: $(outdir)/%.texi $(outdir)/version.itexi $(outdir)/weblinks.itexi | $(OUT_TEXINFO_MANUALS)
$(buildscript-dir)/run-and-check "$(MAKEINFO) -I$(src-dir) -I$(outdir) --no-split --no-headers --output $@ $<" "$*.makeinfotxt.log"