From: hanwen Date: Thu, 1 Jan 2004 19:07:25 +0000 (+0000) Subject: * lily/accidental-engraver.cc (number_accidentals): remove X-Git-Tag: release/2.1.5~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d0a335c9b4b697e465329719987aa9a4e54ebd48;p=lilypond.git * lily/accidental-engraver.cc (number_accidentals): remove spurious warning about non-parent contexts. * lily/music-output-def.cc (assign_translator): \translator { } for a Foo context implicitly redefines \FooContext. * input/mutopia/F.Schubert/morgenlied.ly (pianoLH): many layout fixes. * lily/slur.cc (brew_molecule): don't use stafflinethickness doubly in slur weight. * input/regression/prefatory-spacing-matter.ly (TODO): add clef :| combination. * scm/define-grobs.scm (all-grob-descriptions): change clef - staffbar distance. * scripts/lilypond.py (global_latex_preamble): crank down size of the margins. Now there is a 12 mm top and bottom margin, which should correspond with the printable area of modern printers. * mf/feta-accordion.mf (accreg_pen): remove circled-R, BB and SB signs. Use \markup instead. (accreg_pen): tweak for accordeon asterisk. --- diff --git a/ChangeLog b/ChangeLog index b6dfe37b36..4f92a2899c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,33 @@ +2004-01-01 Han-Wen Nienhuys + + * lily/accidental-engraver.cc (number_accidentals): remove + spurious warning about non-parent contexts. + + * lily/music-output-def.cc (assign_translator): \translator { } + for a Foo context implicitly redefines \FooContext. + + * input/mutopia/F.Schubert/morgenlied.ly (pianoLH): many layout + fixes. + + * lily/slur.cc (brew_molecule): don't use stafflinethickness + doubly in slur weight. + + * input/regression/prefatory-spacing-matter.ly (TODO): add clef :| + combination. + + * scm/define-grobs.scm (all-grob-descriptions): change clef - + staffbar distance. + + * scripts/lilypond.py (global_latex_preamble): crank down size of + the margins. Now there is a 12 mm top and bottom margin, which + should correspond with the printable area of modern printers. + + This enlarges the music height of the printable page a little. + + * mf/feta-accordion.mf (accreg_pen): remove circled-R, BB and SB + signs. Use \markup instead. + (accreg_pen): tweak for accordeon asterisk. + 2003-12-31 Han-Wen Nienhuys * lily/melisma-engraver.cc (try_music): use melisma_busy() diff --git a/input/mutopia/F.Schubert/GNUmakefile b/input/mutopia/F.Schubert/GNUmakefile index 8f80daa920..e592e2832f 100644 --- a/input/mutopia/F.Schubert/GNUmakefile +++ b/input/mutopia/F.Schubert/GNUmakefile @@ -1,7 +1,6 @@ depth = ../../.. -examples=standchen -mutopia-examples=morgenlied +examples=morgenlied LOCALSTEPMAKE_TEMPLATES=ly mutopia include $(depth)/make/stepmake.make diff --git a/input/mutopia/F.Schubert/morgenlied.ly b/input/mutopia/F.Schubert/morgenlied.ly index 0c4b3f8a43..94717a81b1 100644 --- a/input/mutopia/F.Schubert/morgenlied.ly +++ b/input/mutopia/F.Schubert/morgenlied.ly @@ -14,24 +14,34 @@ not be in the PD - but I am assuming there are no notable ones in this small piece. - The original compresses the entire music onto a single page, in 4 systems." + The original compresses the entire music onto a single page, in 4 + systems. Lily does so too if you tune down spacing-increment, but + chooses line breaks differently. + +" } \version "2.1.3" - +manuscriptBreak = { \break } \paper { staffheight = 6.0 \mm #(define fonts (scale-font-list (/ (* 6 mm) (* 20 pt)) )) \include "params-init.ly" - linewidth = #(* mm 159) + linewidth = #(* mm 160) indent = 8\mm } +modernAccidentals = { + \property Staff.extraNatural = ##f + \property Staff.autoAccidentals = #'(Staff (same-octave . 0) (any-octave . 0) (same-octave . 3)) + \property Staff.autoCautionaries = #'() +} -melody = \notes \relative c'' \repeat volta 2 \context Voice = singer { + +melody = \notes \relative c'' \repeat volta 2 \context Voice = singer { \time 6/8 \autoBeamOff s1*0^\markup { \bold \bigger\bigger { \hspace #-3.0 Lieblich, etwas geschwind } } @@ -57,9 +67,9 @@ melody = \notes \relative c'' \repeat volta 2 \context Voice = singer { firstVerse = \lyrics { \property LyricsVoice . stanza = "1." - Sü -- ßes Licht! Aus gol -- de -- nen Pfor -- ten brichst du __ \break - sie -- gend durch __ die Nacht. Schö -- ner Tag, du __ bist er -- wacht. __ Mit \break - ge -- heim -- nis -- vol -- len Wor -- ten, in me -- lo -- di -- schen Ak -- kor -- den, grüß __ ich __ \break + Sü -- ßes Licht! Aus gol -- de -- nen Pfor -- ten brichst du __ \manuscriptBreak + sie -- gend durch __ die Nacht. Schö -- ner Tag, du __ bist er -- wacht. __ Mit \manuscriptBreak + ge -- heim -- nis -- vol -- len Wor -- ten, in me -- lo -- di -- schen Ak -- kor -- den, grüß __ ich __ \manuscriptBreak dei -- ne Ro -- sen -- pracht, grüß ich __ dei -- ne Ro -- sen -- pracht. } @@ -76,10 +86,11 @@ pianoRH = \notes \relative c''' \repeat volta 2 { g16(_\p fis a g fis g f e d c b a ) | 8( ) r8 r | r8 c'( e,) f r a | - \property Voice.DynamicLineSpanner \set #'padding =#3 - r8_\> << { s8 s8-\! } << { fis( g)\!} \\ { c,4 } >> >> r8 | + \once \property Voice.DynamicLineSpanner \set #'padding =#3 + r8_\> << { s8 s8-\! } << { fis( g) + } \\ { c,4 } >> >> r8 | 4. r8 \clef bass | - e,16_" "_\markup { \italic cresc } g c g e g d gis b gis d g | + e,16_" "_\markup { \italic cresc } g c g e g d gis b gis d gis | c, e a e c e a,-\f d fis d a d | b d g d b g r4\fermata \clef treble g''8 | as4.( g 4.) | fis4. r4 8 ( | @@ -92,6 +103,7 @@ pianoRH = \notes \relative c''' \repeat volta 2 { } pianoLH = \notes \relative c'' \repeat volta 2 { + g16( fis a g fis g f e d c b a) | \clef bass g4.( c,8) r r \clef treble r4 8( ) r | @@ -114,12 +126,14 @@ pianoLH = \notes \relative c'' \repeat volta 2 { << \time 6/8 \addlyrics - \new Staff { \melody } + \new Staff { + \context Staff \modernAccidentals + \melody } \new Lyrics << \context LyricsVoice = "singer-1" \firstVerse \context LyricsVoice = "singer-2" \secondVerse >> - \new PianoStaff << + \new PianoStaff << \property PianoStaff.instrument = \markup { \bold \huge "2. " } @@ -130,13 +144,14 @@ pianoLH = \notes \relative c'' \repeat volta 2 { \paper { \translator { - \LyricsContext + \LyricsVoiceContext minimumVerticalExtent = ##f - LyricText \set #'font-size = #1.5 + LyricText \set #'font-size = #1.0 } \translator { \ScoreContext - SpacingSpanner \set #'common-shortest-duration = #(ly:make-moment 1 8) + Beam \override #'thickness = #0.6 + SpacingSpanner \set #'spacing-increment = #1.0 } \translator { \PianoStaffContext VerticalAlignment \override #'forced-distance = #10 diff --git a/input/regression/prefatory-spacing-matter.ly b/input/regression/prefatory-spacing-matter.ly index 68ff9b9f14..06a81a48a1 100644 --- a/input/regression/prefatory-spacing-matter.ly +++ b/input/regression/prefatory-spacing-matter.ly @@ -1,17 +1,20 @@ \version "1.9.8" \header { -texidoc = "Prefatory spacing. -TODO: Show all common combinations to check for spacing anomalies. -" + texidoc = "Distances between prefatory items (eg. clef, bar, etc.) + are done using engraving standard distances. These distances + depend on which items are combined." + } \score { \notes \relative c'' { \property Staff.instrument = "fobar" \bar "||:" \key cis \major - cis4 cis4 cis4 cis4 \clef bass cis4 cis4 cis4 + cis4 cis4 cis4 cis4 \clef bass cis,1 + \clef treble + \bar ":|" } \paper { raggedright = ##t} } diff --git a/lily/accidental-engraver.cc b/lily/accidental-engraver.cc index 19fb8b16e8..b4dccfadae 100644 --- a/lily/accidental-engraver.cc +++ b/lily/accidental-engraver.cc @@ -117,7 +117,7 @@ calculates the number of accidentals on basis of the current local key sig */ static int -number_accidentals (SCM sig, Music *, Pitch *pitch, SCM curbarnum, SCM lazyness, +number_accidentals_from_sig (SCM sig, Music *, Pitch *pitch, SCM curbarnum, SCM lazyness, bool ignore_octave_b) { int n = pitch->get_notename (); @@ -171,13 +171,14 @@ number_accidentals (Music * note, Pitch *pitch, Translator_group * origin, warning (_f ("Accidental typesetting list must begin with context-name: %s", ly_scm2string (ly_car (accidentals)).to_str0 ())); - while (gh_pair_p (accidentals) && origin) + for (; gh_pair_p (accidentals) && origin; accidentals = gh_cdr (accidentals)) { // If pair then it is a new accidentals typesetting rule to be checked - if (gh_pair_p (ly_car (accidentals))) + SCM rule = gh_car (accidentals); + if (gh_pair_p (rule)) { - SCM type = gh_caar (accidentals); - SCM lazyness = gh_cdar (accidentals); + SCM type = gh_car (rule); + SCM lazyness = gh_cdr (rule); SCM localsig = origin->get_property ("localKeySignature"); bool same_octave_b = @@ -187,7 +188,7 @@ number_accidentals (Music * note, Pitch *pitch, Translator_group * origin, if (same_octave_b || any_octave_b) { - int n = number_accidentals + int n = number_accidentals_from_sig (localsig, note, pitch, curbarnum, lazyness, any_octave_b); diff = diff || (n < 0); number = max (number, abs (n)); @@ -201,21 +202,19 @@ number_accidentals (Music * note, Pitch *pitch, Translator_group * origin, /* if symbol then it is a context name. Scan parent contexts to find it. */ - else if (gh_symbol_p (ly_car (accidentals))) + else if (gh_symbol_p (rule)) { - SCM context =ly_car (accidentals); - while (origin && !origin->is_alias (context)) - origin = origin->daddy_trans_; + Translator_group * dad = origin; + while (dad && !dad->is_alias (rule)) + dad = dad->daddy_trans_; - if (!origin) - warning (_f ("Symbol is not a parent context: %s. Ignored", - ly_symbol2string (context).to_str0 ())); + if (dad) + origin = dad; } - else warning (_f ("Accidental typesetting must be pair or context-name: %s", - ly_scm2string (ly_car (accidentals)).to_str0 ())); - - accidentals = ly_cdr (accidentals); + else warning (_f ("Accidental rule must be pair or context-name; Found %s", + ly_scm2string (rule).to_str0 ())); } + return diff ? -number : number; } diff --git a/lily/break-align-interface.cc b/lily/break-align-interface.cc index 3584e3d077..529b1006ad 100644 --- a/lily/break-align-interface.cc +++ b/lily/break-align-interface.cc @@ -102,8 +102,7 @@ Break_align_interface::do_alignment (Grob *me) { int next_idx = idx+1; while (next_idx < elems.size() && - extents[next_idx].is_empty () - ) + extents[next_idx].is_empty () ) next_idx++; Grob *l = elems[idx]; @@ -188,7 +187,9 @@ Break_align_interface::do_alignment (Grob *me) if (r) { if (type == ly_symbol2scm ("extra-space")) - offsets[next_idx] = extents[idx][RIGHT] + distance; + offsets[next_idx] = extents[idx][RIGHT] + distance + - extents[next_idx][LEFT]; + /* should probably junk minimum-space */ else if (type == ly_symbol2scm("minimum-space")) offsets[next_idx] = extents[idx][RIGHT] >? distance; } diff --git a/lily/music-output-def.cc b/lily/music-output-def.cc index bf03732119..e7b012e203 100644 --- a/lily/music-output-def.cc +++ b/lily/music-output-def.cc @@ -74,6 +74,11 @@ Music_output_def::assign_translator (SCM transdef) assert (tp); translator_tab_->set (tp->type_name_, transdef); + + String nm = ly_symbol2string (tp->type_name_) + "Context"; + + + scm_module_define (scope_, ly_symbol2scm (nm.to_str0()), transdef); } /* diff --git a/lily/parser.yy b/lily/parser.yy index 640eb38819..e66f77bd92 100644 --- a/lily/parser.yy +++ b/lily/parser.yy @@ -744,6 +744,7 @@ music_output_def_body: } | music_output_def_body translator_spec_block { $$->assign_translator ($2); + } | music_output_def_body tempo_event { /* diff --git a/lily/slur.cc b/lily/slur.cc index 713ec88cc3..4e2df22979 100644 --- a/lily/slur.cc +++ b/lily/slur.cc @@ -548,8 +548,12 @@ Slur::brew_molecule (SCM smob) return SCM_EOL; } - Real thick = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")) * - gh_scm2double (me->get_grob_property ("thickness")); + Real base_thick = gh_scm2double (me->get_grob_property ("thickness")); + + Real thick = base_thick * + me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness")); + + Real ss = Staff_symbol_referencer::staff_space (me); Bezier one = get_curve (me); // get_curve may suicide @@ -561,7 +565,8 @@ Slur::brew_molecule (SCM smob) if (gh_number_p (d)) a = Lookup::dashed_slur (one, thick, thick * gh_scm2double (d)); else - a = Lookup::slur (one, get_grob_direction (me) * thick, thick); + a = Lookup::slur (one, get_grob_direction (me) * base_thick * ss / 10.0, + thick); return a.smobbed_copy (); } diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index f44e8b3b0d..087b2d25ca 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -47,12 +47,12 @@ class Tie_engraver : public Engraver Spanner * tie_column_; - protected: virtual void stop_translation_timestep (); virtual void start_translation_timestep (); virtual void acknowledge_grob (Grob_info); virtual bool try_music (Music*); + virtual void process_music (); virtual void process_acknowledged_grobs (); void typeset_tie (Grob*); public: @@ -80,6 +80,13 @@ Tie_engraver::try_music (Music *mus) return true; } +void +Tie_engraver::process_music () +{ + if (event_ && to_boolean (get_property ("automaticMelismata"))) + daddy_trans_->set_property ("tieMelismaBusy", SCM_BOOL_T); +} + void Tie_engraver::acknowledge_grob (Grob_info i) { @@ -131,8 +138,8 @@ void Tie_engraver::start_translation_timestep () { if (to_boolean (get_property ("automaticMelismata"))) - daddy_trans_->set_property ("tieMelismaBusy", - gh_bool2scm (heads_to_tie_.size ())); + daddy_trans_->set_property ("tieMelismaBusy", + gh_bool2scm (heads_to_tie_.size ())); } diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 708fd03967..a00f20e0dc 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -338,10 +338,10 @@ LyricsContext = \translator { \type "Engraver_group_engraver" \name Lyrics \description "Typesets lyrics." + %% To get folded repeats right. \consists Vertical_align_engraver -% \consistsend "Hara_kiri_engraver" minimumVerticalExtent = ##f extraVerticalExtent = ##f verticalExtent = ##f diff --git a/mf/feta-accordion.mf b/mf/feta-accordion.mf index 06215e1af1..9530d0c16d 100644 --- a/mf/feta-accordion.mf +++ b/mf/feta-accordion.mf @@ -155,71 +155,6 @@ def print_penpos (suffix $)= message "z"&str $ &"l = ("&decimal x.$.l&", "&decimal y.$.l&"); z"&str $ &"r = ("&decimal x.$.r&", "&decimal y.$.r&");"; enddef; -%fet_beginchar("accTEST", "accTEST", "accTEST") -% set_char_box(.4(4 staff_space#), .4(4 staff_space#), 0, 2.4staff_space#); -% def_some_vars; -% penlabels(10, 11, 12, 13, 14); -% penstroke z10e--z11e{right}..z12e..z13e{left}--z14e; -%fet_endchar; - -fet_beginchar("accSB", "accSB", "accSB") - set_char_box(.4(4 staff_space#), .4(4 staff_space#), 0, 2.4staff_space#); - def_some_vars; - def_B(.35width, .7height); - - %print_penpos (10); - %print_penpos (11); - %print_penpos (12); - %print_penpos (13); - %print_penpos (14); - penlabels(10, 11, 12, 13, 14); - penstroke z10e--z11e{right}..z12e..z13e{left}--z14e; - - penstroke z13e{right}..z15e{up}..z16e{left}--z17e; - penstroke z18e--z19e; - pickup pencircle scaled .5thick; - drawdot (.37width, .10thick); - currentpicture := currentpicture shifted(.40width, 0); - - def_S(.35width, .7height); - penlabels(1, 2, 3, 4, 5, 6, 7, 8, 9); - filldraw z1r--z8r--z8l--subpath(t, 1) of bue--cycle; - filldraw subpath(t, 1) of bueoverst--z7l--z9r--z9l--cycle; - penstroke z1e{down}..z2e{right}..z3e - ..z4e - ..z5e..z6e{right}...z7e{down}; - pickup pencircle scaled .5thick; - drawdot (.37width, .10thick); - currentpicture := currentpicture shifted (-.40width, -.85height); - draw (-.5width, 0)--(.5width, 0)--(.5width, -height) - --(-.5width, -height)--(-.5width, 0); - currentpicture := currentpicture shifted (0, 2.4staff_space); -fet_endchar; - -fet_beginchar("accBB", "accBB", "accBB") - set_char_box(.4(4 staff_space#), .4(4 staff_space#), 0, 2.4staff_space#); - def_some_vars; - def_B(.35width, .7height); - - penstroke z10e--z11e{right}..z12e{up}..z13e{left}--z14e; - - penstroke z13e{right}..z15e{up}..z16e{left}--z17e; - penstroke z18e--z19e; - penlabels(1, 2, 3, 4, 5, 6, 7, 8, 9); - pickup pencircle scaled .5thick; - drawdot(.37width, .10thick); - currentpicture := currentpicture shifted (.40width, 0); - penstroke z10e--z11e{right}..z12e{up}..z13e{left}--z14e; - penstroke z13e{right}..z15e{up}..z16e{left}--z17e; - penstroke z18e--z19e; - drawdot(.37width, .10thick); - currentpicture := currentpicture shifted(-.40width, -.85height); - draw (-.5width, 0)--(.5width, 0)--(.5width, -height) - --(-.5width, -height)--(-.5width, 0); - penlabels(10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ); - currentpicture := currentpicture shifted (0, 2.4staff_space); -fet_endchar; - %%% strange turning path. fet_beginchar("accOldEE", "accOldEE", "accOldEE") @@ -227,75 +162,34 @@ fet_beginchar("accOldEE", "accOldEE", "accOldEE") show w; show h; r = staff_space; - lr = .3staff_space; - ir = .6staff_space; - pickup accreg_pen; - draw fullcircle scaled 2r; - pickup penrazor; - filldraw fullcircle scaled lr; - z1 = (ir, 0); - z2 = (0, 0) + ir*(dir 45); - z3 = (0, ir); + lr = .4 staff_space - stafflinethickness; + ir = .6 staff_space; + + z1 = (0,0); + z2 = (0, ir); + penpos1 (0,0); + penpos2 ( .05 staff_space + .5 stafflinethickness,0); + + penlabels(1,2,3); + numeric pp; + pickup pencircle scaled blot_diameter; for pp := 0 step 45 until 360: filldraw fullcircle scaled lr shifted (ir*(dir pp)); - endfor; - for pp := 0 step 45 until 360: - filldraw ((0, 0)--(.2lr, ir)--(-.2lr, ir)--cycle) rotated pp; + filldraw (z1r--z1l--z2l--z2r--cycle) rotated pp; endfor - currentpicture := currentpicture shifted (0, r); -fet_endchar; -fet_beginchar("accOldEES", "accOldEES", "accOldEES") - set_char_box(staff_space#, staff_space#, 0, 2staff_space#); - save r, shy; - r = staff_space; - shy = .3; pickup accreg_pen; draw fullcircle scaled 2r; - currentpicture := currentpicture shifted (w/2, shy*h); - save thin, thick, sw, ch, cw, mb, mt; - ch = .6h; - cw = .8w; - % URG. smaller sizes should be wider and fatter - %thin = .05cw; - %thick = .17w; - save bx,hx; 4hx+bx=1.15; 10hx+bx=1; - fatten:=designsize*hx+bx*1.2; - thick:= .17w*fatten; - - % urg: mustn't ever go thinner than blot! - %thin = 0.05staff_space; - %blot#:=.4pt#; - thin#:= blot_diameter#; - define_pixels (thin); + pickup penrazor; + filldraw fullcircle scaled lr; - hs = 0.4staff_space; + currentpicture := currentpicture shifted (0, r); - mb = .53; mt = .47; - sw = .8thick; - z1 = (0, ch-.5thin); penpos1 (thin, -90); - z2 = (.7cw, y1); penpos2 (thin, -90); - z3 = (cw, (mb+.5mt)*ch); penpos3(thick, -180); - z4 = (.65cw, mb*ch); penpos4(thin, 90); - z5 = (sw+thick, mb*ch); penpos5(thin, 90); - z6 = (.9cw, .5mb*ch); penpos6(thick, 0); - z7 = (1.2cw, 0); penpos7(thin, 90); - z8 = (1.3cw, .2mb*ch); penpos8(thin, 180); - penlabels(1, 2, 3, 4, 5, 6, 7, 8); - %%AAARG - pickup pencircle scaled 0.001pt; - filldraw (0, 0)--(0, thin)--(sw, thin)--(sw, ch-thin) - --(sw+thick, ch-thin)--(sw+thick, thin) - --(2sw+thick, thin)--(2sw+thick, 0)--cycle; +fet_endchar; - penstroke z1e--z2e{right}..z3e..z4e{left}--z5e; - penstroke z4e{right}..z6e{down}..z7e{right}..z8e{up}; - currentpicture := currentpicture shifted (-w/2, -shy*h); - currentpicture := currentpicture shifted (0, r); -fet_endchar; fet_endgroup("accordion") diff --git a/mf/feta-test-generic.mf b/mf/feta-test-generic.mf index 91d959c180..702e0e63be 100644 --- a/mf/feta-test-generic.mf +++ b/mf/feta-test-generic.mf @@ -8,11 +8,11 @@ %input feta-banier; %input feta-slag; %input feta-eindelijk; -input feta-klef; +%input feta-klef; % input feta-toevallig; % input feta-schrift; % input feta-haak; % input feta-timesig; % input feta-pendaal; -% input feta-accordion; + input feta-accordion; % input feta-solfa; diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 875faf5b5a..9e4c10bccb 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -228,7 +228,7 @@ (break-align-symbol . clef) (break-visibility . ,begin-of-line-visible) (space-alist . ((ambitus . (extra-space . 2.0)) - (staff-bar . (minimum-space . 3.7)) + (staff-bar . (extra-space . 0.7)) (key-signature . (minimum-space . 4.0)) (time-signature . (minimum-space . 4.2)) (first-note . (minimum-space . 5.0)) diff --git a/scripts/lilypond.py b/scripts/lilypond.py index 74e33482a9..39a70516c6 100644 --- a/scripts/lilypond.py +++ b/scripts/lilypond.py @@ -438,7 +438,7 @@ def global_latex_preamble (extra): linewidth = '597pt' else: linewidth = '%d%s' % (maxlw, unit) - s = s + '\geometry{%swidth=%s%s,headheight=2mm,footskip=2mm,%s}\n' % (papersize, linewidth, textheight, orientation) + s = s + '\geometry{%swidth=%s%s,includehead,bottom=12mm,headsep=2mm,top=12mm,headheight=2mm,footskip=2mm,%s}\n' % (papersize, linewidth, textheight, orientation) if 'twoside' in extra['latexoptions'] :