CVSROOT: /cvsroot/lilypond Module name: lilypond Branch: lilypond_2_6 Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/08/26 07:16:51
Modified files: . : ChangeLog scripts : lilypond-book.py Log message: (get_latex_textwidth): remove unixisms CVSWeb URLs: http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?only_with_tag=lilypond_2_6&tr1=1.3836.2.29&tr2=1.3836.2.30&r1=text&r2=text http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/scripts/lilypond-book.py.diff?only_with_tag=lilypond_2_6&tr1=1.265.2.2&tr2=1.265.2.3&r1=text&r2=text Patches: Index: lilypond/ChangeLog diff -u lilypond/ChangeLog:1.3836.2.29 lilypond/ChangeLog:1.3836.2.30 --- lilypond/ChangeLog:1.3836.2.29 Thu Aug 25 11:14:52 2005 +++ lilypond/ChangeLog Fri Aug 26 07:16:50 2005 @@ -1,3 +1,7 @@ +2005-08-26 Han-Wen Nienhuys <[EMAIL PROTECTED]> + + * scripts/lilypond-book.py (get_latex_textwidth): remove unixisms + 2005-08-25 Han-Wen Nienhuys <[EMAIL PROTECTED]> * scm/define-markup-commands.scm (null): add null markup. Index: lilypond/scripts/lilypond-book.py diff -u lilypond/scripts/lilypond-book.py:1.265.2.2 lilypond/scripts/lilypond-book.py:1.265.2.3 --- lilypond/scripts/lilypond-book.py:1.265.2.2 Tue Aug 16 11:24:10 2005 +++ lilypond/scripts/lilypond-book.py Fri Aug 26 07:16:50 2005 @@ -117,7 +117,6 @@ use_hash_p = 1 format = 0 output_name = '' -latex_filter_cmd = 'cat > %(tmpfile)s && latex "\\nonstopmode \input %(tmpfile)s" && rm %(tmpfile)s' filter_cmd = 0 process_cmd = '' default_ly_options = { 'alt': "[image of music]" } @@ -1263,7 +1262,8 @@ if ly_names: my_system (string.join ([cmd, 'snippet-map.ly'] + ly_names)) -LATEX_DOCUMENT = r''' +LATEX_INSPECTION_DOCUMENT = r''' +\nonstopmode %(preamble)s \begin{document} \typeout{textwidth=\the\textwidth} @@ -1276,12 +1276,16 @@ def get_latex_textwidth (source): m = re.search (r'''(?P<preamble>\\begin\s*{document})''', source) preamble = source[:m.start (0)] - latex_document = LATEX_DOCUMENT % vars () + latex_document = LATEX_INSPECTION_DOCUMENT % vars () # Workaround problems with unusable $TMP on Cygwin: tempfile.tempdir = '' tmpfile = tempfile.mktemp('.tex') - cmd = latex_filter_cmd % vars () - parameter_string = filter_pipe (latex_document, cmd) + logfile = os.path.splitext (tmpfile) + '.log' + open (tmpfile,'w').write (latex_document) + ly.system ('latex %s' % tmpfile) + parameter_string = open (logfile).read() + os.unlink (tmpfile) + os.unlink (logfile) columns = 0 m = re.search ('columns=([0-9.]*)', parameter_string) _______________________________________________ Lilypond-cvs mailing list Lilypond-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-cvs