From: matsb Date: Mon, 22 Sep 2003 12:59:13 +0000 (+0000) Subject: 2003-09-22 Mats Bengtsson X-Git-Tag: release/2.1.3~105 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2300d7a9af31442ba44d3d328bb2544c2e4964d2;p=lilypond.git 2003-09-22 Mats Bengtsson * scripts/lilypond.py: add support for 'legal' and 'tabloid' paper sizes. Remove support for 'ledger'(=tabloid+landscape). --- 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/ledger-init.ly deleted file mode 100644 index 00b6d9bb8a..0000000000 --- a/ly/ledger-init.ly +++ /dev/null @@ -1,8 +0,0 @@ -\version "1.9.8" - -% ledger.ly - -hsize = 11.0 \in -vsize = 17.0 \in - - diff --git a/ly/tabloid-init.ly b/ly/tabloid-init.ly new file mode 100644 index 0000000000..41f0e88bc3 --- /dev/null +++ b/ly/tabloid-init.ly @@ -0,0 +1,8 @@ +\version "1.9.8" + +% 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'] :