]> git.donarmstrong.com Git - lilypond.git/commitdiff
(convert-to-ps): invoke dvips with -t
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 9 Oct 2004 23:30:57 +0000 (23:30 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 9 Oct 2004 23:30:57 +0000 (23:30 +0000)
landscape.
(header): add landscape and papersize options.

ChangeLog
lily/book-paper-def.cc
lily/slur-configuration.cc
make/lilypond-vars.make
scm/framework-tex.scm
tex/lilyponddefs.tex

index edede6c420428654df54f8cbfad192b625e736f5..0d0247da4abca59df00b72f6816f667dbadffaef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-10-10  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * scm/framework-tex.scm (convert-to-ps): invoke dvips with -t
+       landscape.
+       (header): add landscape and papersize options.
+
 2004-10-09  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
        * lily/*.cc: use robust_scm2moment() where appropriate.
index 5c2f0befecd7c60126d966c5fec435ad19944067..4584fe9ee11953565327b19381da14c78a875fed 100644 (file)
@@ -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)
     {
index ede2fcc8f9ca872d3a054bc0bab8c7a280e691b3..0cedafeeb6c75d4df00cec77758f0e0dc5aed3e8 100644 (file)
@@ -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);
index 939329fe9fb706e9223f40b9808be341cdc9cb4f..b5ae24f1daac6ef016ca76005d127e68ec793edd 100644 (file)
@@ -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)
index 8e2c65b63508754a1663575911aaddbb7f224533..f9b9e454e11f876c9f182b7c1ff19e12b2238dc9 100644 (file)
                     "{" (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"
      (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
 
 (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))
index ff2fa55deccf5de0346cc2f12f07f6cec757bb59..36b31f70445b3d22ce915c7a8b871876491b4b19 100644 (file)
        \def\lilypondfontencoding####1{
          \fontencoding{####1}
          \selectfont}
-       \documentclass[a4paper]{article}
+       \documentclass[\lilyponddocumentclassoptions]{article}
        %% safe-mode
        \nofiles
        \usepackage[\lilypondpaperinputencoding]{inputenc}