% hmm
% /setgray { 1 add } bind def
-/staff-line-thickness lilypondpaperstafflinethickness def
+/staff-line-thickness lilypondpaperlinethickness def
/staff-height lilypondpaperstaffheight def
/line-width lilypondpaperlinewidth def
% FIXME: why isn't this set (by default) by lily?
% /text-height lilypondpapertextheight def
-/output-scale lilypondpaperoutputscale def
+/lily-output-units 2.83464 def %% milimeter
+% /lily-output-units 0.996264 def %% true points.
+
+/output-scale
+lilypondpaperoutputscale lily-output-units mul
+def
+
+/set-ps-scale-to-lily-scale
+{
+output-scale output-scale scale
+} bind def
+
/paper-size { lilypondpaperpapersize } bind def
% FIXME
grestore
} bind def
-/start-line % height
+/start-system % height
{
dup base-line-skip gt {
/line-height exch def
line-x line-y translate
} bind def
-/stop-line
+/stop-system
{
/the-line exch def
the-line
% initialise paper dimensions
staff-height init-paper
-/line-x left-margin def
+/line-x left-margin output-scale div def
/line-y vsize top-margin sub def
make-lilypond-title