diff --git a/.htaccess b/.htaccess index ec3ea62838a1ab9559591684c057ab0c8e0dd91c..b89142ff673fb09c2a57ee36d12e045cb1cf299d 100644 --- a/.htaccess +++ b/.htaccess @@ -1,3 +1,13 @@ -order deny,allow -deny from all -allow from 127.0.0.1 +# disable everything, except empty_sheet.php and the images +Order allow,deny +Deny from all + +<Files index.php> + Allow from all +</Files> +<Files empty_sheet.php> + Allow from all +</Files> +<FilesMatch \.(?i:gif|png)$> + Allow from all +</FilesMatch> diff --git a/empty_sheet.php b/empty_sheet.php index 1c6c37d9bff1ddb76a2c63f6276a452553e5bc96..0d2c35f17ce01e0eae01e0fa20af0f3efff06939 100644 --- a/empty_sheet.php +++ b/empty_sheet.php @@ -1,6 +1,6 @@ <?php -umask (0001); +umask (0000); $basedir=dirname(__FILE__); $user = "lilyjail"; @@ -10,15 +10,17 @@ $lilyworkdir = "$lilyhome/empty_sheet"; $ly_cmd = "/usr/bin/sudo /opt/lily2.14/bin/lilypond -j$user,$user,$lilymnt,$lilyhome --png --pdf -dpixmap-format=pngalpha -dresolution=20 "; -include('smarty3/Smarty.class.php'); -$smarty = new Smarty(); +$format="pdf"; +if (isset ($_REQUEST["preview"])) + $format="png"; +elseif (isset ($_REQUEST["create_lily"])) + $format="ly"; +else + $format="pdf"; + + -$smarty->setCompileDir($basedir.'/smarty/templates_c'); -$smarty->setCacheDir($basedir.'/smarty/cache'); -$smarty->setConfigDir($basedir.'/smarty/configs'); -$smarty->left_delimiter = '{{'; -$smarty->right_delimiter = '}}'; function robust_request_string ($parm, $default) { if (isset ($_REQUEST[$parm]) && is_string ($_REQUEST[$parm])) { @@ -60,7 +62,7 @@ function robust_request_bool ($parm, $default) { // {...} ... GrandStaff // (...) ... <<..>> -$known_staff_types = array ("S0", "S", "S8", "Sa", "St", "Sb", "O", "P", "Ch2", "Ch4", "Rh", "Tab"); +$known_staff_types = array ("S0", "S", "S8", "Sa", "St", "Sb", "O", "P", "Ch2", "Ch4", "Rh", "Tab", "Dr"); $known_group_types = array ("{" => "GrandStaff", "(" => "", "[" => "StaffGroup"); $known_group_endings = array ("{" => "}", "(" => ")", "[" => "]"); @@ -134,7 +136,7 @@ $pages = robust_request_number ("pages", 2, 1, 20); $title = robust_request_string ("title", NULL); $subtitle = robust_request_string ("subtitle", NULL); $composer = robust_request_string ("composer", NULL); -$arranger = robust_request_string ("composer", NULL); +$arranger = robust_request_string ("arranger", NULL); $instrument = robust_request_string ("instrument", NULL); $header_space = robust_request_bool ("header_space", false); $metainfo = $title . $subtitle . $composer . $instrument.$header_space; @@ -157,26 +159,49 @@ if ($pages > 1) { $png_file = $base_file . ".png"; } -// If the file exists, return it now. -if (isset ($_REQUEST["preview"])) { - if (file_exists ($lilymnt.$png_file)) { - header('Content-type: image/png'); - header('Content-Description: Empty Music Score Preview'); - header('Content-Length: ' . filesize($lilymnt.$png_file)); - readfile($lilymnt.$png_file); - exit (0); +function send_file_if_exists () +{ + global $format, $lilymnt, $png_file, $ly_file, $pdf_file; + if ($format == "png") { + if (file_exists ($lilymnt.$png_file)) { + header('Content-type: image/png'); + header('Content-Description: Empty Music Score Preview'); + header('Content-Length: ' . filesize($lilymnt.$png_file)); + readfile($lilymnt.$png_file); + return TRUE; + } + } elseif ($format == "ly") { + if (file_exists ($lilymnt.$ly_file)) { + header('Content-type: text/plain'); + header('Content-Description: Empty Music Score Sheets - provided by Edition Kainhofer'); + header('Content-Length: ' . filesize($lilymnt.$ly_file)); + header('Content-Disposition: attachment; filename=' . basename($lilymnt.$ly_file)); + readfile($lilymnt.$ly_file); + return TRUE; + } + } elseif ($format == "pdf") { + if (file_exists ($lilymnt.$pdf_file)) { + header('Content-type: application/pdf'); + header('Content-Description: Empty Music Score Sheets - provided by Edition Kainhofer'); + header('Content-Length: ' . filesize($lilymnt.$pdf_file)); + header('Content-Disposition: attachment; filename=' . basename($lilymnt.$pdf_file)); + readfile($lilymnt.$pdf_file); + return TRUE; + } } -} elseif (file_exists ($lilymnt.$pdf_file)) { - header('Content-type: application/pdf'); - header('Content-Description: Empty Music Score Sheets - provided by Edition Kainhofer'); - header('Content-Length: ' . filesize($lilymnt.$pdf_file)); - header('Content-Disposition: inline; filename=' . basename($lilymnt.$pdf_file)); - readfile($lilymnt.$pdf_file); +} + +// If the file already exists, simply send it +if (send_file_if_exists ()) { exit (0); } +/////////////////////////////////////////////////////////////////////////// +// Create the .ly file +/////////////////////////////////////////////////////////////////////////// + // Parse the score type: if (isset ($_REQUEST["score_type"])) { $score_type = parse_score_type ($_REQUEST["score_type"]); @@ -185,7 +210,14 @@ if (isset ($_REQUEST["score_type"])) { } - +/////// Smarty setup +include('smarty3/Smarty.class.php'); +$smarty = new Smarty(); +$smarty->setCompileDir($basedir.'/smarty/templates_c'); +$smarty->setCacheDir($basedir.'/smarty/cache'); +$smarty->setConfigDir($basedir.'/smarty/configs'); +$smarty->left_delimiter = '{{'; +$smarty->right_delimiter = '}}'; /////// Output variables for the template $smarty->assign('paper_size', $paper_size); @@ -206,44 +238,36 @@ $smarty->assign('contents', $score_type); $smarty->allow_php_tag = true; -//////// Check for the pdf file, create it if needed and return it: +///// Create the lilypond file $lycode = $smarty->fetch('empty_sheet.tpl.ly'); +$fh = fopen($lilymnt.$ly_file, 'w') or die("can't open file $lilymnt$ly_file for writing"); +fwrite($fh, $lycode); +fclose($fh); +// Make sure jailed lilypond running as user lilyjail can read it: +chmod ($lilymnt.$ly_file, 0644); + +// If .ly file was requested, send it without running lilypond +if ($format == "ly" && send_file_if_exists ()) { + exit (0); +} -if (!file_exists ($pdf_file)) { - // Create the lilypond file - $fh = fopen($lilymnt.$ly_file, 'w') or die("can't open file $lilymnt$ly_file for writing"); - fwrite($fh, $lycode); - fclose($fh); - // Make sure jailed lilypond running as user lilyjail can read it: - chmod ($lilymnt.$ly_file, 0644); +/////////////////////////////////////////////////////////////////////////// +// Run LilyPond on the .ly and return the result +/////////////////////////////////////////////////////////////////////////// - // run it through lilypond to create the pdf - // As we are running inside the jail, we don't include $lilymnt in the pathes! - $cmd = "$ly_cmd -o $base_file $ly_file 2>&1"; -// print "<p>Command: <pre>$cmd</pre></p>"; - $lily_result = exec($cmd, $output, $retval); -} +// run it through lilypond to create the pdf +// As we are running inside the jail, we don't include $lilymnt in the pathes! +$cmd = "$ly_cmd -o $base_file $ly_file 2>&1"; +$lily_result = exec($cmd, $output, $retval); -if (isset ($_REQUEST["preview"])) { - if (file_exists ($lilymnt.$png_file)) { - header('Content-type: image/png'); - header('Content-Description: Empty Music Score Preview'); - header('Content-Length: ' . filesize($lilymnt.$png_file)); -// header('Content-Disposition: inline; filename=' . basename($lilymnt.$png_file)); - readfile($lilymnt.$png_file); - } -} elseif (file_exists ($lilymnt.$pdf_file)) { - header('Content-type: application/pdf'); - header('Content-Description: Empty Music Score Sheets - provided by Edition Kainhofer'); - header('Content-Length: ' . filesize($lilymnt.$pdf_file)); - header('Content-Disposition: inline; filename=' . basename($lilymnt.$pdf_file)); - readfile($lilymnt.$pdf_file); -} else { +if (!send_file_if_exists ()) { print ("Unable to create the score file. Wrong input or server error encountered."); - print ("The output from running lilypond is:\n<pre>"); - print_r ($output); - print ("</pre>\n"); + if ($output) { + print ("The output from running lilypond is:\n<pre>"); + print_r ($output); + print ("</pre>\n"); + } } ?> diff --git a/empty_sheet_form.php b/empty_sheet_form.php index 002128cc033332ebfe1e13346267fb99fdd0e1a9..8455ebef45102868921476f14acae64193727d62 100644 --- a/empty_sheet_form.php +++ b/empty_sheet_form.php @@ -1,13 +1,29 @@ +<?php + $full = array_key_exists ("full", $_REQUEST); + $debug = array_key_exists ("debug", $_REQUEST); + if ($debug) { + echo "<p id=debug></p>"; + } +?> +<?php +// The absolute URL to the current script, needed for all references +// to scripts in this directoty! +$abs_path = substr (dirname(__FILE__), strlen($_SERVER["DOCUMENT_ROOT"])); +?> <div id="music_score_form"> <style type="text/css" > + table.music_score_settings_table td.submit_button_cell { + text-align: center; + } #preview { border: 1px solid black; } .vsep { background: darkgray; } #previewdiv { position: relative; + background: white; } #loadingOverlay { - background-image: url('loading.gif'); + background-image: url('<?php echo $abs_path ?>/loading.gif'); position: absolute; z-index: 1; top: 40%; @@ -22,49 +38,102 @@ function loadPreview () { // Show loading overlay, will be hidden in onLoad handler of the image! document.getElementById("loadingOverlay").style.visibility = "visible"; - // Add all non-button form elements: - var src = "empty_sheet.php?preview=True"; + // Add all non-button form elements: + var src = "<?php echo $abs_path ?>/empty_sheet.php?preview=True"; var elt = document.score_form.elements; - for(var i=0; i < elt.length; i++){ - if (elt[i].type != 'submit' && elt[i].type != 'reset') { - src += "&" + encodeURIComponent (elt[i].name) + "=" + - encodeURIComponent (elt[i].value); + for(var i=0; i < elt.length; i++) { + var type = elt[i].type; + if (type != 'submit' && type != 'reset' && !elt[i].disabled) { + if (( type === "radio" || type === "checkbox") && !elt[i].checked) { + // do nothing for unchecked checkboxes + } else { + src += "&" + encodeURIComponent (elt[i].name) + "=" + encodeURIComponent (elt[i].value); + } } } document.getElementById("preview").src = src; + <?php if ($debug) { ?> + document.getElementById("debug").innerHTML = src; + <?php } ?> + } + + var staff_numbers = {"S0":1, "S":1, "S8":1, "Sa":1, "St":1, "Sb":1, "O":3, "P":2, "Ch2":2, "Ch4":4, "Rh":0.5, "Tab":1.35, "Dr":1}; + var page_height = {"a4":297, "a5":210, "a6":148, "a4 landscape":210, "a5 landscape":148, "a6 landscape":105, + "letter":279, "legal":356, "11x17":432, + "letter landscape":216, "legal landscape":216, "11x17 landscape":279} + function checkStaffCount () { + // Staff type, without group structure + var type = document.getElementById("score_type").value.replace(/[{}\(\)\[\]]/g, ""); + // Split into individual staves, sum up their count + staves = type.match(/[A-Z][^A-Z]*/g); + var count=0; + for (var i = 0; i < staves.length; ++i) { + count += staff_numbers[staves[i]]; + } + // Check how many staves could fit on one page + var staffsize = document.getElementById("staff_size").value; + // Assume 1 staff height min spacing; extent in mm per staff: + var min_space_per_system = 2*staffsize*count/72*25.4; + var paper_size = document.getElementById("paper_size").value; + var available_space = page_height[paper_size] - 20; // paper height + if (document.getElementById("header_space") && document.getElementById("header_space").checked) { + available_space -= 35; // minus 30mm for header + padding + } + var max_staves = Math.floor (available_space / min_space_per_system); + max_staves = Math.max (1, max_staves); // Show at least one staff + // only allow max_staves in the combobox, disable all higher values: + var sys_page_opt = document.getElementById("systems").options; + for (var i = 0; i< sys_page_opt.length; ++i) { + sys_page_opt[i].disabled = (i>=max_staves); + } + if (document.getElementById("systems").selectedIndex >= max_staves) { + document.getElementById("systems").selectedIndex = max_staves-1; + } +<?php if ($debug) { ?> + alert ("We have " + count + " staves in score with structure " + staves.join("/")+ ", max_staves: " + max_staves); +<?php } ?> + } + + function controlChanged () { + checkStaffCount (); + loadPreview (); } </script> <?php - $paper_sizes = array( - "a4" => "A4", - "a5" => "A5", - "a6" => "A6", - "a4 landscape" => "A4 (landscape)", - "a5 landscape" => "A5 (landscape)", - "a6 landscape" => "A6 (landscape)", - "letter" => "US letter", - "legal" => "Legal", + $paper_sizes = array( + "a4" => "A4", + "a5" => "A5", + "a6" => "A6", + "a4 landscape" => "A4 (landscape)", + "a5 landscape" => "A5 (landscape)", + "a6 landscape" => "A6 (landscape)", + "letter" => "US letter", + "legal" => "Legal", "11x17" => "Ledger", - "letter landscape" => "US letter (landscape)", - "legal landscape" => "Legal (landscape)", + "letter landscape" => "US letter (landscape)", + "legal landscape" => "Legal (landscape)", "11x17 landscape" => "Ledger (landscape)"); $paper_sizes_default = "a4"; $staff_sizes = array ( - "11" => "11pt (Pocket scores)", - "12.5" => "12.5pt", - "14" => "14pt", - "15" => "15pt", - "16" => "16pt", - "17" => "17pt", - "18" => "18pt", - "19" => "19pt", - "20" => "20pt (default)", - "22" => "22pt"); + "10" => "3.5mm (10pt)", + "11" => "4mm (11pt, pocket score)", + "12.5" => "4.5mm (12.5pt)", + "14" => "5mm (14pt)", + "15" => "5.3mm (15pt, vocal score)", + "16" => "5.6mm (16pt)", + "17" => "6mm (17pt)", + "18" => "6.3mm (18pt)", + "19" => "6.7mm (19pt)", + "20" => "7mm (20pt, default)", + "23" => "8mm (23pt)", + "26" => "9mm (26pt)", + "28.5" => "10mm (28.5pt, HUGE)" +); $staff_sizes_default = "20"; - + $systems_max = 15; - $systems_default = 7; + $systems_default = 10; $pages_max = 15; $pages_default = 2; @@ -89,25 +158,31 @@ "Ch2" => "Choir, 2 staves (SA + TB)", "Ch4" => "Choir, 4 staves (S, A, T, B)", "sep3" => Null, - "Ch4P" => "Piano reduction for choir", + "Ch4P" => "Piano reduction for choir (4 staves)", + "Ch2P" => "Piano reduction for choir (2 staves)", "S0P" => "Piano reduction for single soloist", "sep4" => Null, "[SSSb]" => "String Trio (2 V, Vc)", "[SSaSb]" => "String Trio (V, Va, Vc)", - "[SStSaSb]" => "String Quartett", - "[StSbP]" => "Piano Trio", - "[StSaSbP]" => "Piano Quartett", + "[SSSaSb]" => "String Quartet", + "[SSbP]" => "Piano Trio", + "[SSaSbP]" => "Piano Quartet", "sep5" => Null, - "" => "Full Score, Chamber Orchestra", - "[SSb][SS][Sb][{SS}SaSb]" => "Full Score, Symphonic Orchestra", - "" => "Full Score, Chamber Orchestra + Choir", - "[SSb][SS][Sb][{SS}Sa]Ch4[Sb]" => "Full Score, Symphonic Orchestra + Choir", +// "" => "Full Score, Chamber Orchestra", + "[SSSb][SS][Sb][{SS}SaSb]" => "Full Score, large Orchestra", +// "" => "Full Score, Chamber Orchestra + Choir", + "[SSb][SS][Sb][{SS}Sa]Ch4[Sb]" => "Full Score, large Orchestra + Choir", + "sep6" => Null, + "Rh" => "Single staff (one line)", + "Dr" => "Single staff, drum clef", + "Tab" => "Single tab staff", + "[S0Tab]" => "Staff + Tab staff", + ); $score_types_default = "S0"; - - $fullheader = array_key_exists ("full", $_REQUEST); - $headercount = $fullheader ? count($score_header_fields) : 1; - + + $headercount = $full ? count($score_header_fields) : 1; + function write_option ($optkey, $optlabel, $optdefault) { $sel = ($optkey == $optdefault) ? ' selected="selected"' : ''; if ($optlabel) { @@ -120,38 +195,37 @@ function write_option ($optkey, $optlabel, $optdefault) { function write_headerfield ($field, $label) { ?> <tr> - <td><INPUT type="checkbox" name="<?php echo $field ?>_check" size="15" onchange="loadPreview();document.score_form.<?php echo $field ?>.disabled = !this.checked" id="<?php echo $field ?>_check"><label for="<?php echo $field ?>_check" ><?php echo $label ?>: </label></td> - <td><INPUT type="text" checked name="<?php echo $field ?>" size="25" maxlength="100" id="<?php echo $field ?>" disabled="disabled" onchange="loadPreview();"></td> + <td><INPUT type="checkbox" name="<?php echo $field ?>_check" value="1" size="15" onchange="document.score_form.<?php echo $field ?>.disabled = !this.checked; controlChanged();" id="<?php echo $field ?>_check"><label for="<?php echo $field ?>_check" ><?php echo $label ?>: </label></td> + <td><INPUT type="text" name="<?php echo $field ?>" size="25" maxlength="100" id="<?php echo $field ?>" disabled="disabled" onchange="controlChanged();"></td> </tr> <?php } ?> - <FORM action="empty_sheet.php" name="score_form" onreset="loadPreview();"> + <FORM action="<?php echo $abs_path ?>/empty_sheet.php" name="score_form" onreset="controlChanged();"> <table class="music_score_settings_table" > <TR> <td><label for="paper_size">Paper size:</label></td> - <td><select name="paper_size" id="paper_size" onchange="loadPreview();"> + <td><select name="paper_size" id="paper_size" onchange="controlChanged();"> <?php - foreach ($paper_sizes as $i => $value) { + foreach ($paper_sizes as $i => $value) { write_option ($i, $value, $paper_sizes_default); } ?> </select></td> - <td rowspan="<?php echo 4+$headercount?>" class="vsep"></td> <td rowspan="<?php echo 4+$headercount?>" colspan=2 align=center class="previewcell"> <div id=previewdiv class="foo"> <div id="loadingOverlay"></div> - <img id=preview src="" onLoad="document.getElementById('loadingOverlay').style.visibility = 'hidden';" alt="PREVIEW"> + <img id=preview src="<?php echo $abs_path; ?>/preview.png" onLoad="document.getElementById('loadingOverlay').style.visibility = 'hidden';" alt="PREVIEW"> </div> </td> </tr> <tr> <td><label for="staff_size">Staff size:</label></td> - <td><select name="staff_size" id="staff_size" onchange="loadPreview();"> + <td><select name="staff_size" id="staff_size" onchange="controlChanged();"> <?php - foreach ($staff_sizes as $i => $value) { + foreach ($staff_sizes as $i => $value) { write_option ($i, $value, $staff_sizes_default); } ?> @@ -159,7 +233,7 @@ function write_headerfield ($field, $label) { </tr> <tr> <td><label for="systems">Systems/page:</label></td> - <td><select name="systems" id="systems" onchange="loadPreview();"> + <td><select name="systems" id="systems" onchange="controlChanged();"> <?php for ($i = 1; $i <= $systems_max; $i++) { write_option ($i, $i, $systems_default); @@ -168,53 +242,55 @@ function write_headerfield ($field, $label) { </select></td> </tr> <tr> - <td><label for="pages">Pages:</label></td> - <td><select name="pages" id="pages" onchange="loadPreview();"> + <td><?php if ($full) { ?><label for="pages">Pages:</label><?php } ?></td> + <td><?php if ($full) { ?><select name="pages" id="pages" onchange="controlChanged();"> <?php for ($i = 1; $i <= $pages_max; $i++) { write_option ($i, $i, $pages_default); } ?> - </select></td> + </select> + <?php } else { ?> + <input type="hidden" name="pages" id="pages" value="3"> + <?php } ?> + </td> </tr> - -<?php -if ($fullheader) { + +<?php +if ($full) { foreach ($score_header_fields as $i => $value) { write_headerfield ($i, $value); } } else { -?> +?> <tr> <td colspan="2"> - <INPUT type="checkbox" name="header_space" id="header_space" onchange="loadPreview();"><label for="header_space" >Reserve space for title</label> + <INPUT type="checkbox" checked value="1" name="header_space" id="header_space" onchange="controlChanged();"><label for="header_space" >Reserve space for title</label> </td> </tr> <?php } ?> -<!-- <tr><TD colspan=5><hr></TD></tr> --> - <tr> <td valign=top><label for="score_type">Score type:</label></td> <td colspan=4> - <SELECT name="score_type" id="score_type" style='width: 100%' size="20" onchange="loadPreview();"> + <SELECT name="score_type" id="score_type" style='width: 100%' size="20" onchange="controlChanged();"> <?php - foreach ($score_types as $i => $value) { + foreach ($score_types as $i => $value) { write_option ($i, $value, $score_types_default); } ?> </SELECT> </td> </tr> - <tr><TD colspan=5 align=center> - <INPUT type="submit" name="create_score" value="Create Score"><INPUT type="reset" value="Reset Values"> + <tr><TD colspan=5 class="submit_button_cell"> + <INPUT type="submit" name="create_score" value="Download PDF"><INPUT type="submit" name="create_lily" value="Download LilyPond"><INPUT type="reset" value="Reset Values"> </TD></tr> </table> </FORM> <script type="text/javascript"> -loadPreview (); -// document.getElementById('loadingOverlay').style.visibility = 'hidden'; +controlChanged (); </script> + </div> \ No newline at end of file diff --git a/preview.png b/preview.png new file mode 100644 index 0000000000000000000000000000000000000000..f6a1f2664b196ff46e00ff750d510cdc4fdd96b4 Binary files /dev/null and b/preview.png differ diff --git a/templates/Dr.tpl.ly b/templates/Dr.tpl.ly new file mode 100644 index 0000000000000000000000000000000000000000..8899dea71119e39a5af4250801002d6a77725392 --- /dev/null +++ b/templates/Dr.tpl.ly @@ -0,0 +1 @@ +{{$indent}}\new DrumStaff \new DrumVoice { \emptymusic } \ No newline at end of file diff --git a/templates/empty_sheet.tpl.ly b/templates/empty_sheet.tpl.ly index 44f5f6137e56ba454469b7c5ffd36375f0c4af21..4feef057dee6d762ae8406a6f01c6fe12ac9acea 100644 --- a/templates/empty_sheet.tpl.ly +++ b/templates/empty_sheet.tpl.ly @@ -2,20 +2,23 @@ #(set-global-staff-size {{$staff_size}}) #(set-default-paper-size "{{$paper_size}}"{{if $orientation}} '{{$orientation}}{{/if}}) +#(ly:set-option 'point-and-click #f) + \header { -{{if $title}} title="{{$title}}" -{{/if}} -{{if $subtitle}} subtitle="{{$subtitle}}" -{{/if}} -{{if $composer}} composer="{{$composer}}" -{{/if}} -{{if $instrument}} instrument="{{$instrument}}" -{{/if}} -{{if $arranger}} arranger="{{$arranger}}" -{{/if}} - copyright="Created by Edition Kainhofer, http://www.edition-kainhofer.com/, using LilyPond 2.14" + title="{{if $title}}{{$title}}{{/if}}" + subtitle="{{if $subtitle}}{{$subtitle}}{{/if}}" + composer="{{if $composer}}{{$composer}}{{/if}}" + instrument="{{if $instrument}}{{$instrument}}{{/if}}" + arranger="{{if $arranger}}{{$arranger}}{{/if}}" + tagline = ##f } \paper { + oddHeaderMarkup = ##f + evenHeaderMarkup = ##f + oddFooterMarkup = \markup \abs-fontsize #8 \with-color #(x11-color 'gray65) \fill-line { + \with-url #"http://www.edition-kainhofer.com/" {"Edition Kainhofer"} + \with-url #"http://www.lilypond.org/" {"LilyPond - Music typesetting for everyone"} + } pages={{$pages}} systems-per-page={{$systems}} ragged-bottom=##f @@ -23,9 +26,16 @@ ragged-last=##f ragged-right=##f #(set-paper-size "{{$paper_size}}"{{if $orientation}} '{{$orientation}}{{/if}}) + top-system-spacing #'basic-distance = #7 + top-markup-spacing #'basic-distance = #5 + last-bottom-spacing #'basic-distance = #10 + markup-system-spacing #'basic-distance = #15 + top-system-spacing #'stretchability = #60 - top-markup-spacing #'stretchability = #60 + top-markup-spacing #'stretchability = #40 last-bottom-spacing #'stretchability = #60 + + markup-system-spacing #'stretchability = #60 system-system-spacing #'stretchability = #40 {{if $header_space}} bookTitleMarkup = \markup { \vspace #5 } {{/if}} @@ -35,9 +45,6 @@ \context { \StaffGroup \override SystemStartBracket #'collapse-height = #1 } -% \context { \Score -% \override SystemStartBar #'collapse-height = #1 -% } \context { \PianoStaff \override SystemStartBrace #'collapse-height = #1 }