From 2300d7a9af31442ba44d3d328bb2544c2e4964d2 Mon Sep 17 00:00:00 2001 From: matsb Date: Mon, 22 Sep 2003 12:59:13 +0000 Subject: [PATCH] 2003-09-22 Mats Bengtsson * scripts/lilypond.py: add support for 'legal' and 'tabloid' paper sizes. Remove support for 'ledger'(=tabloid+landscape). --- ChangeLog | 5 +++++ ly/{ledger-init.ly => tabloid-init.ly} | 2 +- scripts/lilypond.py | 20 ++++++++++++-------- 3 files changed, 18 insertions(+), 9 deletions(-) rename ly/{ledger-init.ly => tabloid-init.ly} (75%) diff --git a/ChangeLog b/ChangeLog index 2d68801a15..8228563a7e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-09-22 Mats Bengtsson + + * scripts/lilypond.py: add support for 'legal' and 'tabloid' paper + sizes. Remove support for 'ledger'(=tabloid+landscape). + 2003-09-22 Han-Wen Nienhuys * scm/font.scm (paper20-style-sheet-alist): add cmss entries. diff --git a/ly/ledger-init.ly b/ly/tabloid-init.ly similarity index 75% rename from ly/ledger-init.ly rename to ly/tabloid-init.ly index 00b6d9bb8a..41f0e88bc3 100644 --- a/ly/ledger-init.ly +++ b/ly/tabloid-init.ly @@ -1,6 +1,6 @@ \version "1.9.8" -% ledger.ly +% tabloid-init.ly hsize = 11.0 \in vsize = 17.0 \in diff --git a/scripts/lilypond.py b/scripts/lilypond.py index 96ed054826..f75cb4c624 100644 --- a/scripts/lilypond.py +++ b/scripts/lilypond.py @@ -383,6 +383,8 @@ ly_paper_to_latexpaper = { 'a4' : 'a4paper', 'a5' : 'a5paper', 'a6' : 'a6paper', + 'legal' : 'legalpaper', + 'tabloid' : 'papersize={11in,17in}', } #TODO: should set textheight (enlarge) depending on papersize. @@ -394,13 +396,6 @@ def global_latex_preamble (extra): options = '' - if extra['papersize']: - try: - options = ly_paper_to_latexpaper[extra['papersize'][0]] - except KeyError: - ly.warning (_ ("invalid value: `%s'") % `extra['papersize'][0]`) - pass - if extra['latexoptions']: options = options + ',' + extra['latexoptions'][-1] @@ -419,6 +414,15 @@ def global_latex_preamble (extra): unit = extra['unit'][-1] + + papersize = '' + if extra['papersize']: + try: + papersize = ly_paper_to_latexpaper[extra['papersize'][0]] + ',' + except KeyError: + ly.warning (_ ("invalid value: `%s'") % `extra['papersize'][0]`) + pass + textheight = '' if extra['textheight']: textheight = ',textheight=%f%s' % (extra['textheight'][0], unit) @@ -434,7 +438,7 @@ def global_latex_preamble (extra): linewidth = '597pt' else: linewidth = '%d%s' % (maxlw, unit) - s = s + '\geometry{width=%s%s,headheight=2mm,footskip=2mm,%s}\n' % (linewidth, textheight, orientation) + s = s + '\geometry{%swidth=%s%s,headheight=2mm,footskip=2mm,%s}\n' % (papersize, linewidth, textheight, orientation) if 'twoside' in extra['latexoptions'] : -- 2.39.5