]> git.donarmstrong.com Git - lilypond.git/commitdiff
Imported Upstream version 2.19.52
authorDr. Tobias Quathamer <toddy@debian.org>
Fri, 9 Dec 2016 11:06:32 +0000 (12:06 +0100)
committerDr. Tobias Quathamer <toddy@debian.org>
Fri, 9 Dec 2016 11:06:32 +0000 (12:06 +0100)
27 files changed:
.gitfilelist
Documentation/changes.tely
Documentation/fr/learning/templates.itely
Documentation/fr/notation/ancient.itely
Documentation/notation/spacing.itely
Documentation/web/news-front.itexi
Documentation/web/news-headlines.itexi
Documentation/web/news.itexi
NEWS.txt
VERSION
config.make.in
configure
configure.ac
input/regression/one-page-breaking.ly [new file with mode: 0644]
lily/include/one-page-breaking.hh [new file with mode: 0644]
lily/one-page-breaking.cc [new file with mode: 0644]
lily/page-breaking-scheme.cc
ly/Welcome-to-LilyPond-MacOS.ly
ly/Welcome_to_LilyPond.ly
ly/performer-init.ly
make/lilypond-book-rules.make
make/lilypond-vars.make
make/lysdoc-targets.make
out/ChangeLog
out/RELEASE-COMMIT
po/lilypond.pot
stepmake/stepmake/texinfo-rules.make

index 8fd803b17c7c0a0d662e664350c7ee45c195ec05..c3e71e9eae3ec9602f4060cbf8755e756bf6d085 100644 (file)
@@ -3318,6 +3318,7 @@ input/regression/number-staff-lines.ly
 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
@@ -4165,6 +4166,7 @@ lily/include/note-head.hh
 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
@@ -4356,6 +4358,7 @@ lily/note-spacing-engraver.cc
 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
index 64707801d2c6cf9913948c66efe1b8c34956074d..2407b3d018f3c664b9e6c387b04647684db2cea4 100644 (file)
@@ -209,11 +209,12 @@ dimensions from a markup object, given as first argument.
 @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.
index 6b5ece6bacb0058ec98b2df7a49fc5c4209f47c2..4f8748ca93134b8cdc6064951a9774b7ee9e4384 100644 (file)
@@ -399,7 +399,7 @@ sont pas réalisables avec ce gabarit préprogrammé.
 @appendixsec Modèles pour piano
 @translationof Piano templates
 
-+@menu
+@menu
 * Piano seul::
 * Chant et accompagnement::
 * Piano et paroles entre les portées::
index 2e27808c6aba965000df09cc95ed4893c01db8e1..a21092a7148d83c687258ac43ce1ecef30a1e010 100644 (file)
@@ -87,7 +87,7 @@ Manuel de notation :
 
 
 @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
index 23ed5c0f308f7d26913e2c2c1ae407900124715a..9a4e91d49b287b2d867f15b826be8cdf3e3944d8 100644 (file)
@@ -892,8 +892,9 @@ Default values not listed here are defined in
 
 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
@@ -968,7 +969,9 @@ Notation Reference:
 @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}.
@@ -1560,6 +1563,7 @@ how to modify them.
 * 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::
@@ -1706,6 +1710,26 @@ Snippets:
 @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
 
index ffd1266cc470e2dd419cd72b705928c43c888dd1..daa179dc339eb655a291d065741175fcd7240ca0 100644 (file)
@@ -9,10 +9,10 @@
 @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
index 79e76c2b598c813241702fb6f0faf0281a419f2a..22149e72078ba22160c9be578bd76f982c8ef6ad 100644 (file)
@@ -11,7 +11,7 @@
 @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}}
 
@@ -23,8 +23,8 @@
 @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}}
index 478814c51293e70cfda8e6bdd2374ee1ae54471b..81b61be2b5f762541e4b95773b69315fb251f819 100644 (file)
@@ -26,6 +26,18 @@ NOTE:
   * 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}
 
index ac7ad1d469bac66018b7a3c410c2ef93358bdbc7..8cfbabb20ea026e58a4b266b3a5a63029f379b67 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -124,11 +124,13 @@ New features in 2.20 since 2.18
           }
           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’
diff --git a/VERSION b/VERSION
index 7e5143a73ecf89066c3f9dcf20ce68e44c4f4a20..f30c36be30e877dd95a0d405e0a049d5bd590679 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 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
index d376a59f481c18a385d8b9703617d94ab8aa4662..3bf17671a029f0b3123277d98e0afb322fe415d9 100644 (file)
@@ -38,6 +38,8 @@ PACKAGE_NAME = @PACKAGE_NAME@
 
 HOST_ARCH=@HOST_ARCH@
 
+USE_EXTRACTPDFMARK=@USE_EXTRACTPDFMARK@
+
 ################################################################
 ## FILESYSTEM
 ################################################################
@@ -110,12 +112,14 @@ DBLATEX = @DBLATEX@
 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@
index f45f4faade8cde231293078caa2cb51c0ae0429c..a779d129943badbc493d2f48766d11da65f2224a 100755 (executable)
--- a/configure
+++ b/configure
@@ -651,6 +651,9 @@ BIBTEX
 DBLATEX
 TEXI2HTML
 MAKEINFO
+USE_EXTRACTPDFMARK
+EXTRACTPDFMARK
+GS920
 GHOSTSCRIPT
 PERL
 GUILE
@@ -13193,6 +13196,338 @@ $as_echo "$ver" >&6; }
 
 
 
+
+
+
+    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.
index 19ffd18bf31663cda5177993589e8f7d6edcb405..d77ea1588120c1dccbf0980cded2798251579cc5 100644 (file)
@@ -281,6 +281,30 @@ fi
 
 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)
diff --git a/input/regression/one-page-breaking.ly b/input/regression/one-page-breaking.ly
new file mode 100644 (file)
index 0000000..5f663a6
--- /dev/null
@@ -0,0 +1,14 @@
+\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"
diff --git a/lily/include/one-page-breaking.hh b/lily/include/one-page-breaking.hh
new file mode 100644 (file)
index 0000000..def8715
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+  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 */
diff --git a/lily/one-page-breaking.cc b/lily/one-page-breaking.cc
new file mode 100644 (file)
index 0000000..6962aaf
--- /dev/null
@@ -0,0 +1,174 @@
+/*
+  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;
+}
index 0c806493b499fcad2b60e558e7f7710e4f51c2ed..d9e62fa4fee535250f52f854c4bd49ff55e47613 100644 (file)
@@ -21,6 +21,7 @@
 #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"
 
@@ -54,6 +55,16 @@ LY_DEFINE (ly_minimal_breaking, "ly:minimal-breaking",
   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"
index ea56eb95046aa2a852a9aebe81b339cb73e90aa5..f18b73e77fdb15071ba7f92b3ba9319547af282f 100644 (file)
@@ -23,7 +23,7 @@ That's it.  For more information, visit http://lilypond.org .
 
 %}
 
-\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"
index 8bdd018636a38b0cdbb93826e2e8e24ac9af1709..cfca7fe331f6815c60504c022ba30f958651d62d 100644 (file)
@@ -32,7 +32,7 @@ Good luck with LilyPond!  Happy engraving.
 
 %}
 
-\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"
index 644a0bd2d6cc0c83c1dce217b3f6d3c73b9f8a14..419d52baa59ab01fa4dd6834d210b10483e27bf0 100644 (file)
   \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
index 3dda429003e092aa813c3ab319b7036c257b68d7..e0c0756bc403af37cb02b5a4f339c72d6ee5ed4a 100644 (file)
@@ -27,6 +27,12 @@ $(outdir)/%.tex:  %.latex
 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 ######################
@@ -53,4 +59,10 @@ $(outdir)/%.xml:  %.lyxml
 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
index e67a570c92706d79e0913034b599577ef3e656ce..1fd163caa174dec5cf62a6fac438266049a219b1 100644 (file)
@@ -48,6 +48,12 @@ $(LANG_TEXIDOC_FLAGS) \
 -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
index 5290e3962feb6cbc06192050791facc66f2349fe..547614cbd5164842da94832aa7123a841e51fe02 100644 (file)
@@ -16,6 +16,10 @@ local-test:
                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)
 
index db4dc38f8e3ac9b78a12eb43fd846e6c4828961e..c836d2687d6cc26fbe44d4b4d0f07f81c9d64a75 100644 (file)
@@ -1 +1 @@
-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
index b668769f2047999f220b42e0de2a6b73694d35c4..120b3abc58953cf41f15e0ec0dfaae8d094baa41 100644 (file)
@@ -1,32 +1,32 @@
-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"
index 51868313a7f7015759180bc4c78aa3a4a9f36129..70330c6b40da6f1918a952c62f5f35759c17eddf 100644 (file)
@@ -6,10 +6,10 @@
 #, 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"
@@ -2581,7 +2581,8 @@ msgstr ""
 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 ""
 
@@ -2628,6 +2629,11 @@ 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"
@@ -2735,10 +2741,6 @@ msgid ""
 "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..."
index 4747347a9042909e3466373ba888833f5889f8fa..007f88fdad9eb87bab1d4f4e62010c6c428e6584 100644 (file)
@@ -72,6 +72,12 @@ ifeq ($(WEB_VERSION),yes)
 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"