From 2ceb589a4aa3060867116d8fc130fa994dc7e43a Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sat, 9 Oct 2004 23:30:57 +0000 Subject: [PATCH] (convert-to-ps): invoke dvips with -t landscape. (header): add landscape and papersize options. --- ChangeLog | 6 ++++++ lily/book-paper-def.cc | 1 - lily/slur-configuration.cc | 1 + make/lilypond-vars.make | 2 +- scm/framework-tex.scm | 21 +++++++++++++++++---- tex/lilyponddefs.tex | 2 +- 6 files changed, 26 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index edede6c420..0d0247da4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-10-10 Han-Wen Nienhuys + + * scm/framework-tex.scm (convert-to-ps): invoke dvips with -t + landscape. + (header): add landscape and papersize options. + 2004-10-09 Han-Wen Nienhuys * lily/*.cc: use robust_scm2moment() where appropriate. diff --git a/lily/book-paper-def.cc b/lily/book-paper-def.cc index 5c2f0befec..4584fe9ee1 100644 --- a/lily/book-paper-def.cc +++ b/lily/book-paper-def.cc @@ -38,7 +38,6 @@ find_scaled_font (Output_def *mod, mod->set_variable (ly_symbol2scm ("scaled-fonts"), font_table); } - SCM sizes = scm_hashq_ref (font_table, f->self_scm (), SCM_BOOL_F); if (sizes != SCM_BOOL_F) { diff --git a/lily/slur-configuration.cc b/lily/slur-configuration.cc index ede2fcc8f9..0cedafeeb6 100644 --- a/lily/slur-configuration.cc +++ b/lily/slur-configuration.cc @@ -333,6 +333,7 @@ Slur_configuration::score_encompass (Slur_score_state const &state) variance_penalty = variance_penalty >? 0.0; variance_penalty *= state.parameters_.head_slur_distance_factor_; } + #if DEBUG_SLUR_SCORING score_card_ += to_string ("C%.2f", demerit); score_card_ += to_string ("D%.2f", variance_penalty); diff --git a/make/lilypond-vars.make b/make/lilypond-vars.make index 939329fe9f..b5ae24f1da 100644 --- a/make/lilypond-vars.make +++ b/make/lilypond-vars.make @@ -38,7 +38,7 @@ CONVERT_LY = $(script-dir)/convert-ly.py LILYPOND = $(builddir)/lily/$(outconfbase)/lilypond LILYPOND_BOOK = $(script-dir)/lilypond-book.py LILYPOND_BOOK_INCLUDES = -I $(pwd) -I $(outdir) -I$(input-dir) -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ -I $(builddir)/mf/$(outconfbase)/ -I $(builddir)/mf/out/ -LILYPOND_BOOK_FLAGS = --process="lilypond -f tex --tex --header=texidoc -I $(srcdir)/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'" +LILYPOND_BOOK_FLAGS = --process="lilypond -f tex --tex --header=texidoc -I $(srcdir)/input/test -e '(ly:set-option (quote internal-type-checking) \#t)'" #texi-html for www only: LILYPOND_BOOK_FORMAT=$(if $(subst out-www,,$(notdir $(outdir))),texi,texi-html) diff --git a/scm/framework-tex.scm b/scm/framework-tex.scm index 8e2c65b635..f9b9e454e1 100644 --- a/scm/framework-tex.scm +++ b/scm/framework-tex.scm @@ -123,8 +123,13 @@ "{" (sanitize-tex-string str) "}%\n"))) (define (header bookpaper page-count classic?) - (let ((scale (ly:output-def-lookup bookpaper 'outputscale))) - + (let ((scale (ly:output-def-lookup bookpaper 'outputscale)) + (texpaper (string-append + (ly:output-def-lookup bookpaper 'papersizename) + "paper")) + (landscape? (eq? #t (ly:output-def-lookup bookpaper 'landscape))) + ) + (string-append "% Generated by LilyPond " (lilypond-version) "\n" @@ -140,7 +145,10 @@ (tex-string-def "lilypondpaper" 'linewidth (ly:number->string (* scale (ly:output-def-lookup bookpaper 'linewidth)))) - + "\\def\\lilyponddocumentclassoptions{" + texpaper + (if landscape? ",landscape" "") + "}%\n" (tex-string-def "lilypondpaper" 'interscoreline (ly:number->string @@ -274,7 +282,12 @@ (define-public (convert-to-ps book name) (let* - ((cmd (string-append "dvips -u+ec-mftrace.map -u+lilypond.map -Ppdf " + ((bookpaper (ly:paper-book-book-paper book)) + (papersize (ly:output-def-lookup bookpaper 'papersizename)) + (landscape? (eq? #t (ly:output-def-lookup bookpaper 'landscape))) + (cmd (string-append "dvips -t " papersize + (if landscape? " -t landscape " " ") + " -u+ec-mftrace.map -u+lilypond.map -Ppdf " (basename name ".tex")))) (display (format #f (_ "Invoking ~S") cmd) (current-error-port)) diff --git a/tex/lilyponddefs.tex b/tex/lilyponddefs.tex index ff2fa55dec..36b31f7044 100644 --- a/tex/lilyponddefs.tex +++ b/tex/lilyponddefs.tex @@ -143,7 +143,7 @@ \def\lilypondfontencoding####1{ \fontencoding{####1} \selectfont} - \documentclass[a4paper]{article} + \documentclass[\lilyponddocumentclassoptions]{article} %% safe-mode \nofiles \usepackage[\lilypondpaperinputencoding]{inputenc} -- 2.39.5