Lilylib: When formatting the options help, use only one level of indentation
We tweaked the IndentedHelpFormatter to not indent the headings at all (even if we have
nested groups), so it does not make sense to indent the options themselves, either.
Thus, we now have either no indent or exactly indent_increment.
Lilypond-book: Add cmd line option to load additional python files
To customize the output of lilypond-book, a --load-custom-package=file
cmd line option has been added. The passed file can e.g. contain a custom
output formatter class (derived from some book_base.BookOutputFormat
derived class and registered via BookBase.register_format).
Lilypond-book: Factor out the formatting from lilypond-book into separate classes
-) One base class BookOutputFormat for all output formats that contains most
of the output logic
-) Each output format has its own BookOutputFormat-derived class with class-
specific settings.
-) Each snippet type still has its own class, but calls appropriate hook
functions of the format class to generate the actual output
This makes it much easier to add new formats in the future or use a
customized output format for special purposes (e.g. the MusicXML test
suite).
Also, got rid of the vars () idiom (which breaks when splitting up code
into separate functions/classes) and use a proper hash instead.
Graham Percival [Thu, 10 Jun 2010 21:07:24 +0000 (22:07 +0100)]
Doc: revert bad fix for 617.
Neil said "This is not recommended at all. The default callback
is a closure, combining the result of
ly:self-alignment-interface:x-aligned-on-self *and*
ly:break-alignable-interface::self-align-callback. Thus
overriding X-offset also causes 'break-align-symbols to be
ignored, messing up the positioning completely."
I don't understand it, but I understand that he knows more than
me. :) I've left the little clean-up that James did.
LilyLib: error and warning as functions, program_name and _version as variables
These were originally defined in lilypond-book.py, but make more sense
in the library, which can be used by other python applications as well
(e.g. musicxml2ly)
James Lowe [Sun, 6 Jun 2010 11:46:13 +0000 (12:46 +0100)]
Web: Add color to bach-schenker.ly - issue 1018
Added colors to various parts of the schenker example.
Added comments in .ly file to see where specific edits were made to
the original .ly file
Added Line in ../web/introduction.itexi commenting on the addition of color
James Lowe [Sun, 6 Jun 2010 11:04:10 +0000 (12:04 +0100)]
Web: Tidy up Bach-Schenker.ly
Tidy up as per CG for .ly examples
Add some note durations
Remove awkward line breaks
Correct spacing for indentation
Change HTML Link in comment to reflect new location of article source
James Lowe [Wed, 2 Jun 2010 18:01:48 +0000 (19:01 +0100)]
Doc: NR - Chord Repetition - examples and wording
Updated the .ly examples to show many different instances of how
this symbol can be used.
Reworded some uncomfortable syntax for the explanations and descriptions.
RemoveEmptyStaves: Remove Harakiri engraver before adding it again.
If RemoveEmptyStaves is called twice (e.g. an include file with global
settings is included twice), two Hara_kiri_engravers would be added,
which leads to a warning.
This patch makes sure that no previous Hara_kiri_engraver is left
before adding a new one.
-) Add a search field to the toc pane in our docs. If the user types three
letters or more, an AJAX request is sent to the server to perform a
search. The AJAX part is implemented in JS, the search part itself is
implemented in PHP on the server side, which wades through a pre-generated
index file (pure text).
-) The texi2html init file now has the ability to create our own search
index file, currently in pure text (the search script will go through it
line for line.
-) The search box is shown via JavaScript only if the files are viewed over
http. If the user has JavaScript disabled or if the files are viewed as
static pages (and not over http), then no search box appears, since it
would not work anyway.
-) Also, don't show search box when AJAX initialization failed.
-) Print nice message if search index can't be opened, don't fail with error
-) Install and use language-dependent index files for all known languages
-) If we don't have a texinfo index, don't load the JS and don't print
out the search box. (Workaround: css_lines is called before
init_out, so we need to do the check already in css_lines!)
If the index would be empty, don't create an empty .idx file
-) If AJAX works and a user presses enter, the same AJAX query is triggered
as when entering some letters, and the results appear on the same page.
However, if for some reason AJAX does not work (in particular, if the
onSubmit action handler isn't called), then a search page is loaded
with the same results as the AJAX query...