From: Han-Wen Nienhuys Date: Sun, 15 Sep 2002 11:29:11 +0000 (+0000) Subject: (make_pixmap): let gs write to X-Git-Tag: release/1.6.3~3 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=06128386ab4f27409d5219b418fb00b1b1e0dac9;p=lilypond.git (make_pixmap): let gs write to outputfile directly --- diff --git a/ChangeLog b/ChangeLog index 9191077ff5..f1996ef337 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,44 @@ +2002-09-15 Han-Wen Nienhuys + + * scripts/lilypond-book.py (make_pixmap): let gs write to + outputfile directly + +2002-09-15 Werner Lemberg + + Improving LilyPond's output to make them ordinary TeX boxes with + predictable dimensions. System boxes are now vertically centered on + the baseline; this offset can be further controlled with + \lilypondscoreshift. + + * lily/system.cc (System::post_processing): Pass length of current + system to `start-system' (including any horizontal indentation). + + * scm/tex.scm, scm/pdftex.scm: Make output of various functions + prettier. + (lily-def): Append `%'. + (start-system): Add parameter `wd'. Output more TeX code to specify + box dimensions. + (stop-system, stop-last-system): Complement changes in + `start-system'. + * scm/sketch.scm, scm/ps.scm, scm/pdf.scm, scm/ascii-script.scm: + Updated. + + * scripts/ly2dvi.py (global_latex_definition): Set \parindent to 0. + * buildscripts/mf-to-table.py (write_tex_defs): Append `%'. + Write final `\endinput'. + + * tex/lily-ps-defs.tex, tex/lily-pdf-defs.tex, + tex/lilypond-plaintex.tex, tex/lilypond-latex.tex, + tex/lilyponddefs.tex, tex/titledefs.tex: Reformat code. Assure that + files and macro definitions don't produce spurious spaces and + paragraphs (using \endlinechar). + * tex/lilyponddefs.tex: New dimension `\scoreshift'. + + * Documentation/user/internals.itely: Improved formatting, fixing + typos + Added a section `Output details' to describe how the TeX code + looks like. + 2002-09-15 Han-Wen Nienhuys * lily/simultaneous-music-iterator.cc diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index d1882ce2ec..47db68f0b3 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -1074,7 +1074,9 @@ def quiet_system (cmd, name): return system (cmd) def get_bbox (filename): - system ('gs -sDEVICE=bbox -q -sOutputFile=- -dNOPAUSE %s -c quit > %s.bbox 2>&1 ' % (filename, filename)) + + # gs bbox device is ugh, it always prints of stderr. + system ('gs -sDEVICE=bbox -q -sOutputFile=- -dNOPAUSE %s -c quit > %s.bbox 2>&1' % (filename, filename)) box = open (filename + '.bbox').read() m = re.match ('^%%BoundingBox: ([0-9]+) ([0-9]+) ([0-9]+) ([0-9]+)', box) @@ -1096,9 +1098,9 @@ def make_pixmap (name): x = (2* margin + bbox[2] - bbox[0]) * res / 72. y = (2* margin + bbox[3] - bbox[1]) * res / 72. - cmd = r'''gs -g%dx%d -sDEVICE=pnggray -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=- -r%d -dNOPAUSE %s %s -c quit > %s''' + cmd = r'''gs -g%dx%d -sDEVICE=pnggray -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -q -sOutputFile=%s -r%d -dNOPAUSE %s %s -c quit ''' - cmd = cmd % (x, y, res, name + '.trans.eps', name + '.eps',name + '.png') + cmd = cmd % (x, y, name + '.png', res, name + '.trans.eps', name + '.eps') status = 0 try: status = system (cmd)