From 39f1412aab623d7154950692781af36f470bdd6e Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sat, 24 Jul 2004 12:25:49 +0000 Subject: [PATCH] * make/lilypond-vars.make: centralize LILYPOND_BOOK_FLAGS setting. (LILYPOND_BOOK_FLAGS): use -f tex for lilypond-book. * scm/framework-ps.scm (convert-to-pdf): new function. Call ps2pdf. (output-preview-framework): new function. Generate a preview .ps --- Documentation/user/invoking.itexi | 35 +++++++++++++------------- Documentation/user/lilypond-book.itely | 2 +- Documentation/user/tutorial.itely | 2 +- make/lilypond-vars.make | 2 +- make/mutopia-rules.make | 18 ++++--------- scm/framework-ps.scm | 2 +- 6 files changed, 27 insertions(+), 34 deletions(-) diff --git a/Documentation/user/invoking.itexi b/Documentation/user/invoking.itexi index 4aef5cf1f6..710090e4b8 100644 --- a/Documentation/user/invoking.itexi +++ b/Documentation/user/invoking.itexi @@ -6,30 +6,26 @@ This chapter details the technicalities of running LilyPond. @menu -* Invoking lilypond:: Titling LilyPond scores. -* Invoking the lilypond binary:: +* Invoking lilypond:: * Error messages:: * Reporting bugs:: * Editor support:: * Point and click:: +* Invoking lilypond-latex:: @end menu -@node Invoking the lilypond binary -@section Invoking the lilypond binary + +@node Invoking lilypond +@section Invoking lilypond @cindex Invoking LilyPond @cindex command line options @cindex options, command line @cindex switches -The formatting system consists of two parts: a binary executable -(@file{lilypond}), which is responsible for the formatting -functionality, and support scripts, which post-process the resulting -output. Normally, the support scripts are called, which in turn invoke -the @code{lilypond-bin} binary. However, @code{lilypond-bin} may be -called directly as follows. +The @code{lilypond} may be called as follows from the command line. @example - lilypond-bin [@var{option}]@dots{} @var{file}@dots{} + lilypond [@var{option}]@dots{} @var{file}@dots{} @end example @@ -472,16 +468,21 @@ users can set @var{XEDITOR} to @code{gvim --remote +:%l:norm%c| %f}. @node Invoking lilypond-latex @section Invoking lilypond-latex -Before LilyPond 3.0, the task of generating nicely titled output was -relegated to a separate program. This wrapper script -@code{lilypond-latex} uses the LilyPond program and La@TeX{} to create -a nicely titled piece of sheet music. +Before LilyPond 3.0, the @code{lilypond} program only generated music +notation. Titles and page layout was done in a separate wrapper +program. For compatibility with older files, this wrapper program has +been retained as @code{lilypond-latex}. It uses the LilyPond program +and La@TeX{} to create a nicely titled piece of sheet music. Use of +this program is only necessary if the input file contains special +La@TeX{} options or formatting codes in markup texts. +The @code{lilypond-latex} wrapper is invoked from the command-line as +follows @example - @code{lilypond} [@var{option}]@dots{} @var{file}@dots{} + @code{lilypond-latex} [@var{option}]@dots{} @var{file}@dots{} @end example -To have @code{lilypond} read from stdin, use a dash @code{-} for +To have @code{lilypond-latex} read from stdin, use a dash @code{-} for @var{file}. The program supports the following options. @cindex stdin, reading diff --git a/Documentation/user/lilypond-book.itely b/Documentation/user/lilypond-book.itely index 644297fb1a..81c26f4693 100644 --- a/Documentation/user/lilypond-book.itely +++ b/Documentation/user/lilypond-book.itely @@ -379,7 +379,7 @@ Place generated files in @var{dir}. @item @option{-P @var{process}}, @option{--process=@var{COMMAND}} Process lilypond snippets using @var{command}. The default command is -@var{lilypond-bin}. +@code{lilypond}. @item @option{--verbose} Be verbose. diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index 0aa1189ec1..e63d5f5f3f 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -286,7 +286,7 @@ You will see something resembling @example lilypond (GNU LilyPond) 2.2.0 -Running lilypond-bin... +Running lilypond... Now processing `/home/fred/ly/test.ly' Parsing... Interpreting music...[1] diff --git a/make/lilypond-vars.make b/make/lilypond-vars.make index b571b4c160..e78d33c23b 100644 --- a/make/lilypond-vars.make +++ b/make/lilypond-vars.make @@ -42,5 +42,5 @@ LILYPOND_BOOK_FLAGS = --process="lilypond-bin -f tex --header=texidoc -I $(srcdi #texi-html for www only: LILYPOND_BOOK_FORMAT=$(if $(subst out-www,,$(notdir $(outdir))),texi,texi-html) -LY2DVI = $(script-dir)/lilypond.py +LY2DVI = $(LILYPOND) LYS_TO_TELY = $(buildscript-dir)/lys-to-tely.py diff --git a/make/mutopia-rules.make b/make/mutopia-rules.make index 8c51c6f197..a86e9c7e42 100644 --- a/make/mutopia-rules.make +++ b/make/mutopia-rules.make @@ -1,11 +1,5 @@ -$(outdir)/%.png: $(outdir)/%.ps - gs -sDEVICE=pnggray -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sOutputFile="$(name-stem)-page%d.png" -r90 -dNOPAUSE $< -c quit - -mv $(name-stem)-page*.png $(outdir)/ - rm -f $@ - ln -s $(name-stem)-page1.png $@ - $(outdir)/%.ly.txt: %.ly ln -f $< $@ @@ -19,13 +13,11 @@ $(outdir)/%.ly.txt: %.abc $(outdir)/%.ly: %.abc $(PYTHON) $(ABC2LY) --strict -o $@ $< -$(outdir)/%.ps: $(outdir)/%.ly - $(PYTHON) $(LY2DVI) --output=$@ $< - -$(outdir)/%.ps: %.ly - $(PYTHON) $(LY2DVI) --output=$@ $< +$(outdir)/%.png $(outdir)/%.pdf $(outdir)/%.ly $(outdir)/%.ps: $(outdir)/%.ly +# hmm. notdir builds srcdir builds? + cd $(outdir); $(LILYPOND) --pdf --ps --png $(notdir $<) -$(outdir)/%.pdf: $(outdir)/%.ps - ps2pdf -sPAPERSIZE=a4 $< $@ +$(outdir)/%.ly: %.ly + cp $< $@ diff --git a/scm/framework-ps.scm b/scm/framework-ps.scm index 1fd5949691..0dd4ba0c44 100644 --- a/scm/framework-ps.scm +++ b/scm/framework-ps.scm @@ -258,7 +258,7 @@ (define-public (convert-to-pdf book name) (let* ((defs (ly:paper-book-book-paper book)) - (size (ly:output-def-lookup book 'papersize))) + (size (ly:output-def-lookup defs 'papersize))) (postscript->pdf (if (string? size) size "a4") name))) -- 2.39.2