From 1a8a888956bee0b0794ddd00ff32487ad4d3134f Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Mon, 28 Nov 2005 10:07:37 +0000 Subject: [PATCH] * scripts/lilypond-book.py (do_file): search chunks for \\begin{document} * GNUmakefile.in: add copy step in between so we can lose the out-www directories. --- ChangeLog | 10 ++++++++++ Documentation/index.html.in | 32 ++++++++++++++++---------------- GNUmakefile.in | 21 ++++++++++++++++----- VERSION | 2 +- lily/main.cc | 4 ++-- scripts/lilypond-book.py | 16 ++++++++++++---- 6 files changed, 57 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8d0a694704..0277a1315b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-11-28 Han-Wen Nienhuys + + * scripts/lilypond-book.py (do_file): search chunks for + \\begin{document} + + * GNUmakefile.in: add copy step in between so we can lose the + out-www directories. + 2005-11-27 Han-Wen Nienhuys * lily/pango-font.cc (pango_item_string_stencil): put @@ -14,6 +22,8 @@ 2005-11-25 Han-Wen Nienhuys + * VERSION: release 2.7.19 + * lily/figured-bass-engraver.cc (process_music): check figuredBassCenterContinuations first. diff --git a/Documentation/index.html.in b/Documentation/index.html.in index c53ec96ab3..d1befa15e2 100644 --- a/Documentation/index.html.in +++ b/Documentation/index.html.in @@ -42,7 +42,7 @@ @@ -50,11 +50,11 @@ @@ -64,23 +64,23 @@   @@ -89,18 +89,18 @@  
  • - Program reference - (in one big page) + Program reference + (in one big page)
    (definitions for tweaking)
  • - Regression tests (in PDF) ~ 2.4Mb + Regression tests (in PDF) ~ 2.4Mb
    (for developers) -
  • Bibliography +
  • Bibliography
    (background information)
  • Thank yous diff --git a/GNUmakefile.in b/GNUmakefile.in index 8cd8fb7d5d..83e65c7991 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -70,16 +70,27 @@ footifymail = MAILADDRESS=bug-lilypond@gnu.org local-WWW-post: # need UTF8 setting in case this is hosted on a website. echo -e 'AddDefaultCharset utf-8\nAddCharset utf-8 .html\nAddCharset utf-8 .en\nAddCharset utf-8 .nl\nAddCharset utf-8 .txt\n' > $(top-build-dir)/.htaccess - $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(top-build-dir)/examples.html ./ + $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(outdir)/examples.html ./ + echo '' > $(outdir)/index.html + echo 'Redirecting to the documentation index...' >> $(outdir)/index.html + cd $(top-build-dir) && $(FIND) . -name '*.html' -print | $(footifymail) xargs $(footify) cd $(top-build-dir) && find . -name \*.html~ -print | xargs rm -f cd $(top-build-dir) && find Documentation input \ $(web-ext:%=-path '*/out-www/*.%' -or) -type l \ > $(outdir)/weblist - echo '' > $(top-build-dir)/index.html - echo 'Redirecting to the documentation index...' >> $(top-build-dir)/index.html - cd $(top-build-dir) && ls *.html >> $(outdir)/weblist - cat $(outdir)/weblist | (cd $(top-build-dir); GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -) + ls $(outdir)/*.html >> $(outdir)/weblist + +## rewrite paths so we lose out-www + rm -rf $(outdir)/web-root/ + mkdir $(outdir)/web-root/ + cat $(outdir)/weblist | (cd $(top-build-dir); tar -cf- -T- ) | \ + tar -C $(outdir)/web-root/ -xf - + cd $(outdir)/web-root/ && \ + for a in `find -name out-www`; do \ + mv $$a/* $$a/.. ; \ + rmdir $$a ; \ + done tree-prefix = $(outdir) tree-bin = $(tree-prefix)/bin diff --git a/VERSION b/VERSION index e54171247a..811df0c26a 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=7 -PATCH_LEVEL=19 +PATCH_LEVEL=20 MY_PATCH_LEVEL= diff --git a/lily/main.cc b/lily/main.cc index 7dd752baf4..c36c90760f 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -140,7 +140,7 @@ static Getopt_long *option_parser = 0; static Long_option_init options_static[] = { - {_i ("BACK"), "backend", 'b', _i ("use backend BACK (gnome, ps [default],eps,\nscm, svg, tex, texstr)")}, + {_i ("BACK"), "backend", 'b', _i ("use backend BACK (gnome, ps,eps,\nscm, svg, tex, texstr)\ndefault: PS")}, {_i ("SYM=VAL"), "define-default", 'd', _i ("set a Scheme program option. Uses #t if VAL is not specified\n" @@ -246,7 +246,7 @@ LY_DEFINE (ly_usage, "ly:usage", printf (Long_option_init::table_string (options_static).to_str0 ()); printf ("\n"); printf (_f ("Report bugs to %s or via %s", - "bug-lilypond@gnu.org" + "bug-lilypond@gnu.org", "http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs" ).to_str0 ()); printf ("\n"); diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index d349c29bc3..673afa8d33 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -710,6 +710,9 @@ class Chunk: def png_is_outdated (self): return 0 + def is_plain (self): + return false + class Substring (Chunk): def __init__ (self, source, start, end, line_number): self.source = source @@ -717,6 +720,9 @@ class Substring (Chunk): self.end = end self.line_number = line_number self.override_text = None + + def is_plain (self): + return true def replacement_text (self): if self.override_text: @@ -1521,10 +1527,12 @@ def do_file (input_filename): ly.progress (_ ("Dissecting...")) chunks = find_toplevel_snippets (source, snippet_types) - if format == LATEX: - modify_preamble (chunks[0]) - - + if format == LATEX: + for c in chunks: + if (c.is_plain () and + re.search (r"\\begin{document}", c.replacement_text())): + modify_preamble (chunks[0]) + break ly.progress ('\n') if filter_cmd: -- 2.39.2