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_;
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 () << ')';
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);
+}
)
(define (stop-line)
"}\\vss}\\interscoreline")
-
+ (define (stop-last-line)
+ "}\\vss}")
(define (filledbox breapth width depth height)
(string-append
"\\kern" (number->dim (- breapth))
(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)
((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))
)
(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)
# 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?
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"
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% set up dimensions
-\parindent=0pt
+% mudela-book don't like this:
+%\parindent=0pt
\newdimen\smallspace
\newdimen\interlinedist