Hi everybody!
Werner: You reported in 2012 that lilypond emits a space glyph referencing
the century schoolbook font at the top of every page.
David: At that time you were not sure if this is a bug.
The problem is still present, and it definitely is a bug because that extra
space glyph
has a nasty effect:
If you use ghostscript (old versions and current git master) or pdfcrop to crop
the
output of a pdf containing multiple pages and print-page-number = ##f in the
paper
section of the lilypond file , you can observe that there is excessive white
space at the
top of even pages.
We could argue that ghostscript should handle that case better, but a recent gs
bug report
http://bugs.ghostscript.com/show_bug.cgi?id=696445 was closed with a "WONTFIX".
There is a workaround within lilypond:
\paper {
[...]
oddHeaderMarkup = \markup \null
evenHeaderMarkup = \markup \null
}
A look at the lilypond source code reveals that the space glyph is introduced
by the definition
of oddHeaderMarkup and evenHeaderMarkup in ly/titling-init.ly. There we read a
comment that
suggest that the space is necessary:
%% force the header to take some space, otherwise the
%% page layout becomes a complete mess.
Nevertheless, changing " " to "" cured the problem for me and had no negative
side effects here ...
but that probably needs further testing.
As bounding boxes are changed this patch certainly has effects in situations
where lilypond
snippets are used by other programs.
cu,
Knut
>From 02ea463357d23d3ff3eaa42e097be58dc7e62796 Mon Sep 17 00:00:00 2001
From: Knut Petersen
Date: Mon, 21 Dec 2015 13:19:28 +0100
Subject: [PATCH] Dont emit \space glyph as empty page number
Signed-off-by: Knut Petersen
---
ly/titling-init.ly | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/ly/titling-init.ly b/ly/titling-init.ly
index f397ad6..12bfa4f 100644
--- a/ly/titling-init.ly
+++ b/ly/titling-init.ly
@@ -149,9 +149,7 @@ book last one."
oddHeaderMarkup = \markup
\fill-line {
- %% force the header to take some space, otherwise the
- %% page layout becomes a complete mess.
- " "
+ ""
\on-the-fly #not-part-first-page \fromproperty #'header:instrument
\on-the-fly #print-page-number-check-first \fromproperty #'page:page-number-string
}
@@ -162,7 +160,7 @@ evenHeaderMarkup = \markup
\fill-line {
\on-the-fly #print-page-number-check-first \fromproperty #'page:page-number-string
\on-the-fly #not-part-first-page \fromproperty #'header:instrument
- " "
+ ""
}
oddFooterMarkup = \markup {
--
2.1.4
___
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel