From: fred Date: Tue, 26 Mar 2002 21:49:44 +0000 (+0000) Subject: lilypond-1.1.44 X-Git-Tag: release/1.5.59~2444 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b9f5e240facd0dd8163695702b7dc27cd609a110;p=lilypond.git lilypond-1.1.44 --- diff --git a/lily/include/paper-outputter.hh b/lily/include/paper-outputter.hh index 1b62555d03..847ae9ec12 100644 --- a/lily/include/paper-outputter.hh +++ b/lily/include/paper-outputter.hh @@ -37,6 +37,7 @@ public: void output_scheme (SCM scm); void start_line (Real height); void stop_line (); + void stop_last_line (); void switch_to_font (String fontname); Paper_stream* outstream_l_; diff --git a/lily/p-score.cc b/lily/p-score.cc index a3194757f2..4edfd1b3e9 100644 --- a/lily/p-score.cc +++ b/lily/p-score.cc @@ -221,8 +221,7 @@ Paper_score::process () line_l->post_processing (); *mlog << i << flush; - line_l->output_all (); - + line_l->output_all (i + 1 == lines.size()); if (experimental_features_global_b) *mlog << '(' << elem_p_arr_.size () + span_p_arr_.size () << ')'; diff --git a/lily/paper-outputter.cc b/lily/paper-outputter.cc index 4337ad92d6..96ba69012f 100644 --- a/lily/paper-outputter.cc +++ b/lily/paper-outputter.cc @@ -292,3 +292,10 @@ Paper_outputter::stop_line () SCM scm = gh_list (ly_symbol ("stop-line"), SCM_UNDEFINED); output_scheme (scm); } + +void +Paper_outputter::stop_last_line () +{ + SCM scm = gh_list (ly_symbol ("stop-last-line"), SCM_UNDEFINED); + output_scheme (scm); +} diff --git a/scm/lily.scm b/scm/lily.scm index 0e30e6190c..74d1d2f10d 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -253,7 +253,8 @@ ) (define (stop-line) "}\\vss}\\interscoreline") - + (define (stop-last-line) + "}\\vss}") (define (filledbox breapth width depth height) (string-append "\\kern" (number->dim (- breapth)) @@ -301,6 +302,7 @@ (define select-font ,select-font) (define start-line ,start-line) (define stop-line ,stop-line) + (define stop-last-line ,stop-last-line) (define text ,text) (define tuplet ,tuplet) (define volta ,volta) @@ -328,6 +330,7 @@ ((eq? action-name 'start-line) start-line) ((eq? action-name 'stem) stem) ((eq? action-name 'stop-line) stop-line) + ((eq? action-name 'stop-last-line) stop-last-line) ((eq? action-name 'volta) volta) (else (error "unknown tag -- PS-TEX " action-name)) ) @@ -520,6 +523,7 @@ (define start-line ,start-line) (define stem ,stem) (define stop-line ,stop-line) + (define stop-last-line ,stop-line) (define text ,text) )) ((eq? action-name 'tuplet) tuplet) diff --git a/scripts/mudela-book.py b/scripts/mudela-book.py index fd535434c8..46b6a61778 100644 --- a/scripts/mudela-book.py +++ b/scripts/mudela-book.py @@ -7,10 +7,6 @@ # help-gnu-music@gnu.org # # TODO: -# * Spacing before and after mudela blocks should be fixed. No empy lines -# before and after the mudela block should make just little space between -# music and text, one or more empy lines should make bigger space, like -# between paragraphs. # * center option (??) # * make mudela-book understand usepackage{geometry} # * check that linewidth set in \paper is not wider than actual linewidth? @@ -396,21 +392,24 @@ class Tex_output: def write_outfile(self): file = open(self.output_fn+'.latex', 'w') file.write('% Created by mudela-book\n') + last_line = None for line in self.__lines: if type(line)==type([]): - if line[0] == 'tex': - #\\def\\interscoreline{} + if last_line == '\n': + file.write(r'\vspace{0.5cm}') + if line[0] == 'tex': file.write('\\preMudelaExample \\input %s \\postMudelaExample\n'\ - # TeX applies the prefix of the main source automatically. % (line[1]+'.tex')) -# % (outdir+line[1]+'.tex')) if line[0] == 'eps': ps_dim = ps_dimention(outdir+line[1]+'.eps') file.write('\\noindent\\parbox{%ipt}{\includegraphics{%s}}\n' \ % (ps_dim[0], line[1]+'.eps')) -# % (ps_dim[0], outdir+line[1]+'.eps')) else: file.write(line) + if type(last_line)==type([]): + if line=='\n': + file.write(r'\vspace{0.5cm}') + last_line = line file.close() # given parameter s="\mudela[some options]{CODE} some text and commands" diff --git a/tex/lilyponddefs.tex b/tex/lilyponddefs.tex index 6ef9ca21b8..794397fcf4 100644 --- a/tex/lilyponddefs.tex +++ b/tex/lilyponddefs.tex @@ -44,7 +44,8 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% set up dimensions -\parindent=0pt +% mudela-book don't like this: +%\parindent=0pt \newdimen\smallspace \newdimen\interlinedist