From: Han-Wen Nienhuys Date: Wed, 29 Nov 2000 16:48:43 +0000 (+0100) Subject: release: 1.3.113 X-Git-Tag: release/1.3.113 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=fe551209fdc4301746a0ece6ca1fb674db24b5a5;p=lilypond.git release: 1.3.113 ============ * Added stems to font for use in markup text. * Fixed markup text kerning, see input/test/metronome.ly. (Ugh, only feasible if kerning is first markup -- markup text should be revised.) * Fixed molecule caching problem with stem-tremolo: fixes vertical positioning of stem-tremolo. * Added forced slur direction (stemUp no longer implies slurUp) in cross-staff slur example. * Fixes to Glissando and line-spanner. Behaves reasonably across line breaks. * Added: Align_interface::fixed_distance_alignment_callback that does not compute the extents of the to-be-aligned objects. This delays many brew_molecule() calls, because staff-height is no longer needed for aligning. * Bugfix: allows linebreaks for some types of beam. * Bugfix: add braces in larger size range; prevents "Unknown character 127" messages, hopefully. 1.3. --- diff --git a/CHANGES b/CHANGES index 27b8019a26..8f22b24788 100644 --- a/CHANGES +++ b/CHANGES @@ -6,13 +6,8 @@ * Fixed markup text kerning, see input/test/metronome.ly. (Ugh, only feasible if kerning is first markup -- markup text should be revised.) -1.3.112.jcn2 -============ - -* Fixed stem-tremolo (caching problem). - -1.3.112.jcn1 -============ +* Fixed molecule caching problem with stem-tremolo: fixes vertical +positioning of stem-tremolo. * Added forced slur direction (stemUp no longer implies slurUp) in cross-staff slur example. @@ -20,9 +15,18 @@ cross-staff slur example. * Fixes to Glissando and line-spanner. Behaves reasonably across line breaks. +* Added: Align_interface::fixed_distance_alignment_callback that does +not compute the extents of the to-be-aligned objects. This delays many +brew_molecule() calls, because staff-height is no longer needed for +aligning. -1.3.111.jcn3 -============ +* Bugfix: allows linebreaks for some types of beam. + +* Bugfix: add braces in larger size range; prevents "Unknown character +127" messages, hopefully. + +1.3.112 +======= * Allow two consecutive glissandi. @@ -34,7 +38,7 @@ staff. * Added simple glissando line. -* Bugfix: broken [crescendo] text spanner. +* Bugfix: broken text spanner (ie. crescendo) * Bugfix: chord tremolos diff --git a/Documentation/user/latex-lilypond-example.latex b/Documentation/user/latex-lilypond-example.latex index d155917b56..6906eab7e9 100644 --- a/Documentation/user/latex-lilypond-example.latex +++ b/Documentation/user/latex-lilypond-example.latex @@ -158,7 +158,6 @@ text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text -%% need to use an -I ../../../input/test to find the file -%% \lilypondfile{tie.ly} + \end{document} diff --git a/Documentation/user/lilypond-book.tely b/Documentation/user/lilypond-book.tely index 125303f3ef..49fc1f8256 100644 --- a/Documentation/user/lilypond-book.tely +++ b/Documentation/user/lilypond-book.tely @@ -93,11 +93,10 @@ or @command{texi2dvi}. The result is a text document with formatted music integrated. @command{lilypond-book} will do its best to try to align the music to -the left and right margins. Currently all papersizes, one- and -twocolumn mode and the @code{geometry} package is supported. -The TeXinfo command @code{pagesize} is on the TODO list for Lilypond 1.4. -But changing the linewidth in other ways will not give you a straight -right margin. +the left and right margins. Currently the most used papersizes and +one- and twocolumn mode is supported. But if you use some more +advances features, like the geometry-package or change the margins in +La@TeX{} or use @code{@@pagesize} in texinfo, will break. This document assumes you have basic knowledge of GNU LilyPond and La@TeX{} or texinfo. @@ -121,11 +120,10 @@ or These commands should be in the beginning of the document: @itemize @bullet @item @code{@@afourpaper} -@item @code{@@afourlatex} @item @code{@@afourwide} @item @code{@@smallbook} @end itemize -@code{@@pagesizes} are not yet supported. +@code{@@pagesizes} are not supported. @subsection Examples @@ -210,9 +208,11 @@ or \lilypond@{ YOUR LILYPOND CODE @} @end example +The 'geometry' package is is not supported. The most popular +papersizes should work. + Lilypond-book know about the @code{\onecolumn} and -@code{\twocolumn} commands, the @code{geometry} package and -all the standard paper sizes. +@code{\twocolumn} commands. The music will be surrounded by @code{\preLilypondExample} and @code{\postLilypondExample}. The variables are @@ -221,6 +221,26 @@ to whatever he wants. @strong{[UGH: THIS DOES NOT HAPPEN WHEN YOU USE THE SHORT FORM, \LILYPOND@{ ... @}, CHECK OUT WHY]} +@subsection @code{landscape} package +There is some simple support for landscape paper format, and this +can be combined with the @code{\twocolumn} command. Only a4 and +letter paper is supported, more to come... + +A more complete +support, maybe also supporting the geometry package is planned, but +there are more work that has to be done on @command{lilypond-book} +first. + +This should work: +@example +\documentclass@{article@} +\usepackage@{landscape@} +\begin@{document@} +\twocolumn +BLA BLA BLA +\end@{document@} +@end example + @subsection Examples @example @@ -301,7 +321,7 @@ overwritten. If you use @code{--outdir}, you should also @code{cd} to that directory before running LaTeX or makeinfo. -@strong{[UGH: IS THIS THE BEST WAY TO DO IT? MAYBE ADD A COMMENT LINE TO THE +@strong{[UGH: IS THIS THE BEST WAY TO DO IT. MAYBE ADD A COMMENT LINE TO THE GENERATED FILE, SO LILYPOND-BOOK CAN TEST IF THE FILE IT IS TO OVERWRITE IS GENERATED.]} diff --git a/VERSION b/VERSION index 92ad983687..0647cd6d6f 100644 --- a/VERSION +++ b/VERSION @@ -1,8 +1,8 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=1 MINOR_VERSION=3 -PATCH_LEVEL=112 -MY_PATCH_LEVEL=tca1 +PATCH_LEVEL=113 +MY_PATCH_LEVEL= # use the above to send patches: MY_PATCH_LEVEL is always empty for a # released version. diff --git a/lily/align-interface.cc b/lily/align-interface.cc index db7963ad21..58077373c8 100644 --- a/lily/align-interface.cc +++ b/lily/align-interface.cc @@ -26,26 +26,82 @@ Align_interface::alignment_callback (SCM element_smob, SCM axis) Grob * par = me->parent_l (ax); if (par && !to_boolean (par->get_grob_property ("alignment-done"))) { - Align_interface::do_side_processing (par, ax); + Align_interface::align_to_extents (par, ax); } return gh_double2scm (0.0); } +MAKE_SCHEME_CALLBACK(Align_interface,fixed_distance_alignment_callback,2); +SCM +Align_interface::fixed_distance_alignment_callback (SCM element_smob, SCM axis) +{ + Grob * me = unsmob_grob (element_smob); + Axis ax = (Axis )gh_scm2int (axis); + Grob * par = me->parent_l (ax); + if (par && !to_boolean (par->get_grob_property ("alignment-done"))) + { + Align_interface::align_to_fixed_distance (par, ax); + } + return gh_double2scm (0.0); +} + +void +Align_interface::align_to_fixed_distance (Grob *me , Axis a) +{ + me->set_grob_property ("alignment-done", SCM_BOOL_T); + + SCM d = me->get_grob_property ("stacking-dir"); + + + Direction stacking_dir = gh_number_p(d) ? to_dir (d) : CENTER; + if (!stacking_dir) + stacking_dir = DOWN; + + + SCM force = me->get_grob_property ("forced-distance"); + + Real dy = 0.0; + if (gh_number_p (force)) + { + dy = gh_scm2double (force); + } + + Link_array elems + = Pointer_group_interface__extract_elements ( me, (Grob*) 0, "elements"); + Real where_f=0; + for (int j=0 ; j < elems.size(); j++) + { + where_f += stacking_dir * dy; + elems[j]->translate_axis (where_f, a); + } +} /* Hairy function to put elements where they should be. Can be tweaked from the outside by setting minimum-space and extra-space in its children */ void -Align_interface::do_side_processing (Grob * me, Axis a) +Align_interface::align_to_extents (Grob * me, Axis a) { me->set_grob_property ("alignment-done", SCM_BOOL_T); SCM d = me->get_grob_property ("stacking-dir"); + + Direction stacking_dir = gh_number_p(d) ? to_dir (d) : CENTER; if (!stacking_dir) stacking_dir = DOWN; + + + Interval threshold = Interval (0, Interval::infinity ()); + SCM thr = me->get_grob_property ("threshold"); + if (gh_pair_p (thr)) + { + threshold[SMALLER] = gh_scm2double (gh_car (thr)); + threshold[BIGGER] = gh_scm2double (gh_cdr (thr)); + } + Array dims; @@ -82,24 +138,16 @@ Align_interface::do_side_processing (Grob * me, Axis a) dims.push (y); } } - - Interval threshold = Interval (0, Interval::infinity ()); - SCM thr = me->get_grob_property ("threshold"); - if (gh_pair_p (thr)) - { - Real ss = 1.0; - threshold[SMALLER] = ss *gh_scm2double (gh_car (thr)); - threshold[BIGGER] = ss * gh_scm2double (gh_cdr (thr)); - } - + Real where_f=0; for (int j=0 ; j < elems.size(); j++) { - Real dy = - stacking_dir * dims[j][-stacking_dir]; + Real dy = 0.0; + dy = - stacking_dir * dims[j][-stacking_dir]; if (j) dy += stacking_dir * dims[j-1][stacking_dir]; - + if (j) { dy = (dy >? threshold[SMALLER] ) @@ -138,9 +186,9 @@ Align_interface::get_count (Grob*me,Grob*s) } void -Align_interface::add_element (Grob*me,Grob* s) +Align_interface::add_element (Grob*me,Grob* s, SCM cb) { - s->add_offset_callback (Align_interface::alignment_callback_proc, Align_interface::axis (me)); + s->add_offset_callback (cb, Align_interface::axis (me)); Axis_group_interface::add_element (me, s); } diff --git a/lily/align-note-column-engraver.cc b/lily/align-note-column-engraver.cc index 5904c223e7..0f7f67afab 100644 --- a/lily/align-note-column-engraver.cc +++ b/lily/align-note-column-engraver.cc @@ -116,8 +116,7 @@ Align_note_column_engraver::create_grobs () if (now_column_l_) { - - Align_interface::add_element (align_item_p_,now_column_l_); + Align_interface::add_element (align_item_p_,now_column_l_, Align_interface::alignment_callback_proc); now_column_l_ =0; } } diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index 80b812b951..fdb459ccb2 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -48,6 +48,7 @@ protected: virtual void create_grobs (); virtual void acknowledge_grob (Grob_info); virtual bool try_music (Music*); + virtual void process_music (); public: Beam_engraver (); @@ -114,9 +115,8 @@ Beam_engraver::set_melisma (bool m) daddy_trans_l_->set_property ("beamMelismaBusy", m ? SCM_BOOL_T :SCM_BOOL_F); } - void -Beam_engraver::create_grobs () +Beam_engraver::process_music () { if (reqs_drul_[STOP]) { @@ -145,7 +145,12 @@ Beam_engraver::create_grobs () else e->forbid_breaks (); } - +} + + +void +Beam_engraver::create_grobs () +{ if (reqs_drul_[START]) { if (beam_p_) diff --git a/lily/break-align-item.cc b/lily/break-align-item.cc index 38705e1d74..4b5c956cc7 100644 --- a/lily/break-align-item.cc +++ b/lily/break-align-item.cc @@ -169,7 +169,7 @@ Break_align_interface::do_alignment (Grob *me) /* Force callbacks for alignment to be called */ - Align_interface::do_side_processing (me, X_AXIS); + Align_interface::align_to_extents (me, X_AXIS); Real pre_space = elems[0]->relative_coordinate (column, X_AXIS); diff --git a/lily/cross-staff.cc b/lily/cross-staff.cc index c45395ae5a..4bb5e0de00 100644 --- a/lily/cross-staff.cc +++ b/lily/cross-staff.cc @@ -4,6 +4,8 @@ #include "spanner.hh" #include "warn.hh" #include "paper-def.hh" + + /* JUNKME */ @@ -16,16 +18,12 @@ calc_interstaff_dist (Item *item, Spanner *span) if (Align_interface::has_interface (common) && Align_interface::axis(common) == Y_AXIS) { - SCM threshold = common->get_grob_property ("threshold"); - if (!gh_pair_p (threshold) - || !scm_equal_p (gh_car (threshold), gh_cdr (threshold))) - warning (_ ("minVerticalAlign != maxVerticalAlign: cross staff spanners may be broken")); - - - + SCM threshold = common->get_grob_property ("forced-distance"); interstaff = 1.0; - if (gh_pair_p (threshold)) - interstaff = gh_scm2double (gh_car (threshold)) * interstaff; + if (!gh_number_p (threshold)) + warning (_ ("not a forced distance; cross-staff spanners may be broken")); + else + interstaff *= gh_scm2double (threshold); Grob * span_refpoint = span; while (span_refpoint->parent_l (Y_AXIS) != common) diff --git a/lily/include/align-interface.hh b/lily/include/align-interface.hh index 058d4c7a14..9b7c646ef7 100644 --- a/lily/include/align-interface.hh +++ b/lily/include/align-interface.hh @@ -16,14 +16,15 @@ struct Align_interface { DECLARE_SCHEME_CALLBACK(alignment_callback, (SCM element, SCM axis)); - static void do_side_processing (Grob*,Axis a); + DECLARE_SCHEME_CALLBACK(fixed_distance_alignment_callback, (SCM element, SCM axis)); + static void align_to_fixed_distance (Grob*,Axis a); + static void align_to_extents (Grob*,Axis a); static void set_axis (Grob*,Axis); static Axis axis (Grob*) ; - static void add_element (Grob*,Grob*); + static void add_element (Grob*,Grob*, SCM callback); static int get_count (Grob*,Grob*); static void set_interface (Grob*); static bool has_interface (Grob*); - DECLARE_SCHEME_CALLBACK(center_on_element, (SCM element, SCM axis)); }; #endif /* ALIGN_INTERFACE_HH */ diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index b791c222ff..0ae73fb423 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -122,7 +122,7 @@ Note_heads_engraver::start_translation_timestep () { /* TODO:make this settable? */ - if (note_end_mom_ > now_mom()) + if (note_end_mom_ > now_mom() ) { Score_engraver * e = 0; Translator * t = daddy_grav_l (); diff --git a/lily/vertical-align-engraver.cc b/lily/vertical-align-engraver.cc index 442731b5f3..59449e1f0e 100644 --- a/lily/vertical-align-engraver.cc +++ b/lily/vertical-align-engraver.cc @@ -62,7 +62,7 @@ Vertical_align_engraver::acknowledge_grob (Grob_info i) { if (qualifies_b (i)) { - Align_interface::add_element (valign_p_,i.elem_l_); + Align_interface::add_element (valign_p_,i.elem_l_, get_property ("verticalAlignmentChildCallback")); } } diff --git a/ly/engraver.ly b/ly/engraver.ly index d44bd8fbf6..eb328cb685 100644 --- a/ly/engraver.ly +++ b/ly/engraver.ly @@ -208,7 +208,8 @@ PianoStaffContext = \translator{ \consists "Vertical_align_engraver"; alignmentReference = \center; - VerticalAlignment \override #'threshold = #'(12 . 12) + verticalAlignmentChildCallback = #Align_interface::fixed_distance_alignment_callback + VerticalAlignment \override #'forced-distance = #12 % \consistsend "Axis_group_engraver"; } @@ -399,6 +400,8 @@ ScoreContext = \translator { scriptDefinitions = #default-script-alist + verticalAlignmentChildCallback = #Align_interface::alignment_callback + startSustain = #"Ped." stopSustain = #"*" stopStartSustain = #"*Ped." diff --git a/ly/italiano.ly b/ly/italiano.ly index 442528b175..92be0119a0 100644 --- a/ly/italiano.ly +++ b/ly/italiano.ly @@ -10,7 +10,7 @@ % contributed by Paolo Zuliani -\pitchnames #'( +\pitchnames #`( (dobb . ,(make-pitch -1 0 -2 )) (dob . ,(make-pitch -1 0 -1 )) (do . ,(make-pitch -1 0 0 )) diff --git a/make/ly-rules.make b/make/ly-rules.make index e95bfafe62..a9d1be58fe 100644 --- a/make/ly-rules.make +++ b/make/ly-rules.make @@ -2,20 +2,17 @@ .SUFFIXES: .doc .dvi .mudtex .tely .texi -SUBST_TEXI_DEPS=sed 's! \.\./! !g' < $(basename $@).dep > $(outdir)/temp.dep ; mv $(outdir)/temp.dep $(basename $@).dep $(outdir)/%.latex: %.doc rm -f $@ LILYPONDPREFIX=$(LILYPONDPREFIX)/.. $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) -I .. -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ $< chmod -w $@ - $(SUBST_TEXI_DEPS) # don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir. # it is not, for --scrdir builds $(outdir)/%.texi: %.tely rm -f $@ LILYPONDPREFIX=$(LILYPONDPREFIX)/.. $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) -I .. -I $(input-dir)/test/ --dependencies --format=texi $< - $(SUBST_TEXI_DEPS) chmod -w $@ # nexi: no-lily texi @@ -24,7 +21,6 @@ $(outdir)/%.nexi: %.tely rm -f $@ LILYPONDPREFIX=$(LILYPONDPREFIX)/.. $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) --no-lily -I .. -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ --format=texi $< mv $(@D)/$(*F).texi $@ - $(SUBST_TEXI_DEPS) chmod -w $@ # nfo: info from non-lily texi diff --git a/make/out/lilypond.lsm b/make/out/lilypond.lsm index 56ec2fd2ac..216364cd31 100644 --- a/make/out/lilypond.lsm +++ b/make/out/lilypond.lsm @@ -1,15 +1,15 @@ Begin3 Title: LilyPond -Version: 1.3.112 -Entered-date: 28NOV00 +Version: 1.3.113 +Entered-date: 29NOV00 Description: Keywords: music notation typesetting midi fonts engraving Author: hanwen@cs.uu.nl (Han-Wen Nienhuys) janneke@gnu.org (Jan Nieuwenhuizen) Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys) Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert - 1000k lilypond-1.3.112.tar.gz + 1000k lilypond-1.3.113.tar.gz Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/ - 1000k lilypond-1.3.112.tar.gz + 1000k lilypond-1.3.113.tar.gz Copying-policy: GPL End diff --git a/make/out/lilypond.spec b/make/out/lilypond.spec index f590cc7453..d8ce40d2d2 100644 --- a/make/out/lilypond.spec +++ b/make/out/lilypond.spec @@ -1,11 +1,11 @@ %define info yes Name: lilypond -Version: 1.3.112 +Version: 1.3.113 Release: 1 License: GPL Group: Applications/Publishing -Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.112.tar.gz +Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.113.tar.gz Summary: A program for printing sheet music. URL: http://www.cs.uu.nl/~hanwen/lilypond # Icon: lilypond-icon.gif diff --git a/mf/feta-beugel.mf b/mf/feta-beugel.mf index 1461401cb9..db3c642752 100644 --- a/mf/feta-beugel.mf +++ b/mf/feta-beugel.mf @@ -40,8 +40,8 @@ endchar; enddef; -for h := 2 staffsize# step 1 pt# until (7 * staffsize#): +for x := 1 step 1 until 160: % note: define_pixels (x) multiplies x by hppp, % we must never get bigger than infinity - draw_brace (min (h, infinity/hppp - 1), staff_space#); + draw_brace (min (x * pt#, infinity/hppp - 1), staff_space#); endfor diff --git a/scm/backend-property.scm b/scm/backend-property.scm index a42cee3427..f78f582867 100644 --- a/scm/backend-property.scm +++ b/scm/backend-property.scm @@ -142,6 +142,7 @@ is used by @ref{note-collision-interface}") (elt-property-description 'full-size-change boolean? "if set, don't make a change clef smaller.") (elt-property-description 'glyph symbol? "a string determining what (style) of glyph is typeset. Valid choices depend on the function that is reading this property. ") +(elt-property-description 'gap number? "Size of a gap in a variable symbol") (elt-property-description 'glyph-name string? "a name of character within font") (elt-property-description 'grow-direction dir? "crescendo or decrescendo?") @@ -285,6 +286,7 @@ horizontal mode: set all text on one line (default) (elt-property-description 'thick-thickness number? "thickness, measured in stafflinethickness") (elt-property-description 'thickness number? "thickness, measured in stafflinethickness") (elt-property-description 'thin-kern number? "space after a hair-line") +(elt-property-description 'forced-distance number? "forced distance for an alignment") (elt-property-description 'threshold number-pair? "(cons MIN MAX), where MIN and MAX are dimensions in staffspace") (elt-property-description 'transparent boolean? "This is almost the same as setting molecule-callback to #f, but this retains the diff --git a/scm/interface.scm b/scm/interface.scm index 38cacd00fd..91209c9db6 100644 --- a/scm/interface.scm +++ b/scm/interface.scm @@ -466,11 +466,8 @@ font-point-size font-relative-size) we don't contain any interesting items after linebreaking, then gracefully commit suicide. Objective: don't disgrace Lily by typesetting empty lines in orchestral scores." - '( - items-worth-living - - - ))) + '( items-worth-living ) +)) (define line-spanner-interface (lily-interface @@ -478,12 +475,7 @@ font-point-size font-relative-size) "Generic line drawn between two objects, eg. for use with glissandi. gap is measured in staff-spaces. " - '(gap - dash-period - dash-length - line-thickness - type - ) + '(gap dash-period dash-length line-thickness type ) )) (define lyric-hyphen-interface diff --git a/scm/translator-properties.scm b/scm/translator-properties.scm index 42a14ef3c4..dec53c5905 100644 --- a/scm/translator-properties.scm +++ b/scm/translator-properties.scm @@ -253,6 +253,10 @@ context Voice imes 2/3 @{ (translator-property-description 'unirhythm boolean? "set if unirhythm is detected") (translator-property-description 'unisilence boolean? "set if unisilence is detected") (translator-property-description 'unison boolean? "set if unisono is detected ") +(translator-property-description 'verticalAlignmentChildCallback +procedure? "what callback to add to children of a vertical alignment. +It determines what alignment procedure is used on the alignment +itself. ") (translator-property-description 'voltaSpannerDuration moment? "maximum duration of the volta bracket. Set to a duration to control the size of the brackets printed by diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 9adb9c3e61..a871fb4298 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -4,12 +4,8 @@ # * Figure out clean set of options. Hmm, isn't it pretty ok now? # * add support for .lilyrc # * EndLilyPondOutput is def'd as vfil. Causes large white gaps. -# * texinfo: add support for @pagesize -# todo: dimension handling (all the x2y) is clumsy. (tca: Thats -# because the values are taken directly from texinfo.tex, -# geometry.sty and article.cls. Give me a hint, and I'll -# fix it.) +# todo: dimension handling (all the x2y) is clumsy. # This is was the idea for handling of comments: # Multiline comments, @ignore .. @end ignore is scanned for @@ -42,7 +38,7 @@ import operator program_version = '@TOPLEVEL_VERSION@' if program_version == '@' + 'TOPLEVEL_VERSION' + '@': - program_version = '1.3.113' + program_version = '1.3.106' include_path = [os.getcwd()] @@ -254,7 +250,7 @@ class LatexPaper: class TexiPaper: def __init__(self): - self.m_papersize = 'letterpaper' + self.m_papersize = 'a4' self.m_fontsize = 12 def get_linewidth(self): return texi_linewidths[self.m_papersize][self.m_fontsize] @@ -282,11 +278,10 @@ latex_linewidths = { 'executivepaper':{10: 345, 11: 360, 12: 379}} texi_linewidths = { - 'afourpaper': {12: mm2pt(160)}, - 'afourwide': {12: in2pt(6.5)}, - 'afourlatex': {12: mm2pt(150)}, - 'smallbook': {12: in2pt(5)}, - 'letterpaper': {12: in2pt(6)}} + 'a4': {12: 455}, + 'a4wide': {12: 470}, + 'smallbook': {12: 361}, + 'texidefault': {12: 433}} option_definitions = [ ('EXT', 'f', 'format', 'set format. EXT is one of texi and latex.'), @@ -434,8 +429,6 @@ def get_re (name): return re_dict[format][name] def bounding_box_dimensions(fname): - if g_outdir: - fname = os.path.join(g_outdir, fname) try: fd = open(fname) except IOError: @@ -569,10 +562,12 @@ def scan_texi_preamble (chunks): idx = 0 while 1: if chunks[idx][0] == 'input': - for s in ('afourpaper', 'afourwide', 'letterpaper', - 'afourlatex', 'smallbook'): - if string.find(chunks[idx][1], "@%s" % s) != -1: - paperguru.m_papersize = s + if string.find(chunks[idx][1], "@afourpaper") != -1: + paperguru.m_papersize = 'a4' + elif string.find(chunks[idx][1], "@afourwide") != -1: + paperguru.m_papersize = 'a4wide' + elif string.find(chunks[idx][1], "@smallbook") != -1: + paperguru.m_papersize = 'smallbook' idx = idx + 1 if idx == 10 or idx == len(chunks): break