[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: new option for lilypond-book
From: |
Jan Nieuwenhuizen |
Subject: |
Re: new option for lilypond-book |
Date: |
Mon, 21 Oct 2002 13:59:43 +0200 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu) |
Werner LEMBERG <address@hidden> writes:
> Shame on me! It's fixed now in the CVS (`tex-html' should be
> `texi-html', so you get the described error
OK, thanks.
> -- can someone please add
> a guard to lilypond-script to make it default to, say, `texi' if an
> unknown format is used?)
I don't think that's a smart thing to do; it will cause strange
parse errors if texi is not the format? Here's the code snippet from
lilypond-book:
def determine_format (str):
if __main__.format == '':
html = re.search ('(?i)<[dh]tml', str[:200])
latex = re.search (r'''\\document''', str[:200])
texi = re.search ('@node|@setfilename', str[:200])
f = ''
g = None
if html and not latex and not texi:
f = 'html'
elif latex and not html and not texi:
f = 'latex'
elif texi and not html and not latex:
f = 'texi'
else:
error ("can't determine format, please specify")
__main__.format = f
better just get the error?
> The default value for LILYPOND_BOOK_FORMAT is set in
> lilypond-vars.make; it defaults to `texi' for speed reasons. For web
> builds, it should be overridden with `texi-html' to produce PNGs also.
> As mentioned earlier, I don't know the `correct' way to fix the
> Makefiles, so I tried the simplest solution I could find.
I see, and it's fine. You(?) already did it the right way in
stepmake/www-targets.make (the www-*.make files should not be part of
stepmake, as it seems), but as the top level GNUmakefile.in has
different targets; it just needs to be there too.
Jan.
--
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien | http://www.lilypond.org