lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lilypond-book: ignoring LaTeX errors


From: Mats Bengtsson
Subject: Re: lilypond-book: ignoring LaTeX errors
Date: Thu, 29 Mar 2007 10:04:30 +0200
User-agent: Thunderbird 1.5.0.10 (X11/20070221)

If I were you, I would rather try to get rid of the LaTeX error message
instead of adding a cludge to lilypond-book.
Thanks for sharing your solution on the mailing list. I don't think the problem is common enough to include your patch in the official releases, but if somebody else hits upon the same problem, they can now find it in the mailing list archives.

   /Mats

Dmytro O. Redchuk wrote:
Hello,

   i've started to think about how good it could be to re-type one of
   already prepared score brochures from musixtex to lilypond (A4, 40-50
   pages).

   So, i took the same tex source (with the same geometry) and tried to
   replace some scores with lilypond made ones.

   Mmm.. The problem is that lilypond-book stops if child process ("latex
   $TEMP/some_temp_file.tex") returned non-zero. I needed other behaviour
   (that errors didn't confuse resulting output), so i wrote a little
   patch (sorry, again,-) to lilypond-book (attached). This possibility
   (to ignore child process errors) provided by lilylib, i've not touched
   it at all.

   If there is no other (better) solution, it would be not too bad, i
   guess, to add this possibility -- to ignore child latex return code --
   to lilypond-book.

   If there IS other (better) solution -- please, let me know :-)

A lot of thanks,
------------------------------------------------------------------------

--- lilypond-book.2.10.20.orig  2007-03-28 14:07:13 +0300
+++ lilypond-book       2007-03-29 09:23:27 +0300
@@ -167,6 +167,12 @@
                   dest="create_pdf",
                   help="Create PDF files for use with PDFTeX",
                   default=False)
+
+    p.add_option ('--ignore-ltx-errors',
+                  action="store_true",
+                  dest="ignore_ltx_errors",
+                  help="Ignore LaTeX subprocess errors",
+                  default=False)
p.add_option ('', '--psfonts', action="store_true", dest="psfonts",
                   help=_ ('''extract all PostScript fonts into INPUT.psfonts 
for LaTeX
@@ -1511,7 +1517,10 @@
     tmp_handle.write (latex_document)
     tmp_handle.close ()
- ly.system ('latex %s' % tmpfile, be_verbose=global_options.verbose)
+    ly.system (
+ 'latex %s' % tmpfile, + be_verbose=global_options.verbose,
+            ignore_error=global_options.ignore_ltx_errors )
     parameter_string = open (logfile).read()
os.unlink (tmpfile) ------------------------------------------------------------------------

_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

[Prev in Thread] Current Thread [Next in Thread]