From d9fd890ef4a7d067dc8b39fcb7da3e27f948dd83 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 26 Jan 2006 15:08:08 +0000 Subject: [PATCH] * scm/define-markup-commands.scm (verbatim-file): new markup command \verbatim-file * Documentation/topdocs/NEWS.tely: fixup URLs * Documentation/topdocs/NEWS.tely (Top): document new features. * input/regression/page-layout-manual-position.ly (Module): new file. --- ChangeLog | 5 +++++ Documentation/topdocs/NEWS.tely | 18 ++++++++++-------- VERSION | 2 +- .../regression/page-layout-manual-position.ly | 1 + input/regression/page-layout-twopass.ly | 12 ++++++++++-- lily/main.cc | 3 +++ scm/define-markup-commands.scm | 19 +++++++++++++++++++ scm/layout-page-layout.scm | 1 + scm/lily.scm | 1 + 9 files changed, 51 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 30ac881cad..784a214849 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2006-01-26 Han-Wen Nienhuys + * scm/define-markup-commands.scm (verbatim-file): new markup + command \verbatim-file + + * Documentation/topdocs/NEWS.tely: fixup URLs + * input/regression/alignment-vertical-manual-setting.ly (Module): new file. diff --git a/Documentation/topdocs/NEWS.tely b/Documentation/topdocs/NEWS.tely index 4aa94dff73..0174d438d5 100644 --- a/Documentation/topdocs/NEWS.tely +++ b/Documentation/topdocs/NEWS.tely @@ -4,10 +4,10 @@ @ifhtml @macro inputfileref{DIR,NAME} -@uref{../../../\DIR\/collated-files.html#\NAME\,@file{\DIR\/\NAME\}}@c +@uref{../../\DIR\/collated-files.html#\NAME\,@file{\DIR\/\NAME\}}@c @end macro @macro usermanref{NAME} -@inforef{\NAME\,,../../user/lilypond/lilypond}@c +@inforef{\NAME\,,../user/lilypond/lilypond}@c @end macro @end ifhtml @@ -48,10 +48,12 @@ the @uref{../,LilyPond Documentation} @itemize @bullet @item Alignments of staves may be tuned per system. @lilypond[] +#(set-global-staff-size 13) + \relative c'' \new StaffGroup << - \new Staff { c1 c } - \new Staff { c c } - \new Staff { + \new Staff { c1 c } + \new Staff { c c } + \new Staff { \overrideProperty #"Score.NonMusicalPaperColumn" #'line-break-system-details @@ -62,8 +64,8 @@ the @uref{../,LilyPond Documentation} #'line-break-system-details #'((alignment-offsets . (0 -15 -20))) c1 - } - >> + } +>> @end lilypond This feature was sponsored by Trevor Bača. @@ -104,7 +106,7 @@ This feature was sponsored by Trevor Bača and Nicolas Sceaux. @item A linebreaking configuration can now be saved as a @file{.ly} file automatically. This allows vertical alignments to be stretched to fit pages in a second formatting run. See -@inputfileref{input/regression/,page-layout-twopass.ly} for an +@inputfileref{input/regression,page-layout-twopass.ly} for an example. This feature was sponsored by Trevor Bača and Nicolas Sceaux. diff --git a/VERSION b/VERSION index 4453cfda2d..cdc66fdd01 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=7 -PATCH_LEVEL=28 +PATCH_LEVEL=29 MY_PATCH_LEVEL= diff --git a/input/regression/page-layout-manual-position.ly b/input/regression/page-layout-manual-position.ly index b593774ace..d9a98f3449 100644 --- a/input/regression/page-layout-manual-position.ly +++ b/input/regression/page-layout-manual-position.ly @@ -8,6 +8,7 @@ systems may be placed absolutely on the printable area of the page." } +\version "2.7.29" #(set-default-paper-size "a6" 'portrait) diff --git a/input/regression/page-layout-twopass.ly b/input/regression/page-layout-twopass.ly index f0f094dff8..a8a6629349 100644 --- a/input/regression/page-layout-twopass.ly +++ b/input/regression/page-layout-twopass.ly @@ -3,6 +3,7 @@ texidoc = "Page breaking details can be stored for later reference." } +\version "2.7.29" \paper { #(define write-page-layout #t) @@ -26,5 +27,12 @@ bla = \new Staff { tweakFileName = #(format "~a-page-layout.ly" (ly:parser-output-name parser)) #(newline) -#(ly:progress "Including file: ~a" tweakFileName) -\include \tweakFileName +#(ly:progress "Including file: '~a'" tweakFileName) + + +\markup { + \column { + \line { contents of \typewriter tweakFileName: } + \smaller \verbatim-file #tweakFileName + } +} diff --git a/lily/main.cc b/lily/main.cc index 73218de4b3..15a7d6f742 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -559,6 +559,9 @@ parse_argv (int argc, char **argv) break; case 's': be_safe_global = true; + init_scheme_variables + += "(cons \'safe #t)\n"; + break; case 'p': make_preview = true; diff --git a/scm/define-markup-commands.scm b/scm/define-markup-commands.scm index 7e405f0f19..0f5392c850 100644 --- a/scm/define-markup-commands.scm +++ b/scm/define-markup-commands.scm @@ -746,6 +746,25 @@ any sort of property supported by @internalsref{font-interface} and " (interpret-markup layout (cons (list new-prop) props) arg)) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; files +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(def-markup-command (verbatim-file layout props name) (string?) + "Read the contents of a file, and include verbatimly" + + (interpret-markup + layout props + (if (ly:get-option 'safe) + "Cannot read file in Safe mode" + (let* + ((str (ly:gulp-file name)) + (lines (string-split str #\n))) + + (make-typewriter-markup + (make-column-markup lines))) + ))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; fonts. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/scm/layout-page-layout.scm b/scm/layout-page-layout.scm index 69e7c747d9..7137f47de6 100644 --- a/scm/layout-page-layout.scm +++ b/scm/layout-page-layout.scm @@ -101,6 +101,7 @@ (dump-tweaks out-port (reverse val) (ly:make-moment 0 1)) (display "}" out-port)) tweaks) + (close-port out-port) )) (define (handle-page page) diff --git a/scm/lily.scm b/scm/lily.scm index 2689bbcb85..85c2f07dd7 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -31,6 +31,7 @@ similar to chord syntax") (gui #f "running from gui; redirect stderr to log file") (delete-intermediate-files #f "delete unusable PostScript files") + (safe #f "Run safely") (verbose ,(ly:command-line-verbose?) "value for the --verbose flag") (ttf-verbosity 0 "how much verbosity for TTF font embedding?") -- 2.39.2