-1.3.121.jcn2
+1.3.121.hwn1
============
-* Renamed last instances of musical_*pitch to pitch.
+* Small lilypond-book cleanups.
-* Bugfix: actually read pitch value in \pitch #(make-pitch ...)
+* Bugfix: fix lyric extenders.
-* Bugfix(?): always allow explicit duration entry.
+1.3.121.mb2
+===========
-* Fixed .po charsets for upcoming msgfmt release (Bruno Haible).
+* Bugfix: svenska.ly and norsk.ly
-* Some doco updates and fixes.
+* Bugfix: tied-over accidentals handled more correctly.
-1.3.121.jcn1
+1.3.121.jcn2
============
-* Updated doco for autobeam, chords.
-
-* Renamed property drarnChords to chordChanges.
-
-* Bugfix: --srcdir build.
+* Renamed last instances of musical_*pitch to pitch.
-* Bugfix: (math) font selection for jazz chords.
+* Bugfix: actually read pitch value in \pitch #(make-pitch ...)
-1.3.121
-============
+* Bugfix(?): always allow explicit duration entry.
+* Fixed .po charsets for upcoming msgfmt release (Bruno Haible).
-1.3.120.jcn1
-============
+* Some doco updates and fixes.
* Bugfix Ly2dvi: reset LC_ALL and LC_LANG too.
* Several fixes for --srcdir build, allowing build from read only media.
* Moved make/toplevel.make.in to less unusual GNUmakefile.in
-
+
+* Bugfix: changed beam thickness to .48 staff-space.
+
+
1.3.120.uu1
===========
met through music.
- Those deserving special mentioning (in no particular order):
-Esther, Marijke, Heike, Inge, Judith, Hannah, Auke, Ilse, Evelyn,
-Maartje, Suzanne, Ilse (gee, again?), Marieke, Irene and last (but
+ Those deserving special mentioning (in no particular order): Esther,
+Marijke, Heike, Inge, Judith, Hannah, Auke, Ilse, Evelyn, Maartje, Suzanne,
+Ilse (gee, again?), Marieke, Irene, Martine and last (but
certainly not least) Janneke!
HWN
@top
-
-@chapter Getting involved
-
-Please help us make LilyPond a better program. You can help LilyPond in
-several ways. Not all tasks requiring programming or understanding the
-full source code. You can write to the mailing list
-(@email{gnu-music-discuss@@gnu.org} for more information)
-
-@unnumberedsubsec Users
-
-Mutopia needs your help. The mutopia project is a collection of public
-domain sheet music. You can help the project by entering music (either
-by hand, or by converting from scans or MIDI) and submitting it. Point
-your browser to the @uref{http://sca.uwaterloo.ca/Mutopia, Mutopia
-webpage}.
-
-@unnumberedsubsec Font designers
-
-Our set of glyphs (the Feta font) is far from complete. We need the
-following glyphs: segno, coda. The fonts have been coded in MetaFont,
-so you will need to know MetaFont if you want to contribute a glyph.
-
-@unnumberedsubsec Writers
-
-The documentation of LilyPond and related utilities needs a lot of
-work. The documentation is written in
-@uref{http://www.gnu.org/software/texinfo,texinfo}. The documentation of
-LilyPond is sorely lacking in terms of completeness, depth and
-organisation.
-
-Write if you know how to write english documentation in texinfo, and
-know about music and music notation. You must also know how to use
-LilyPond (or be prepared to learn using it). The task is not especially
-hard, but it is a lot of work, and you must be familiar with LilyPond.
-
-@unnumberedsubsec Translators
-
-LilyPond is completely ready for internationalized messages, but there
-are only a few translations so far (dutch, italian, german, japanese,
-french, russian). Translation involves writing a .po file, which is
-relatively easy, and does not even require running LilyPond.
-
-@unnumberedsubsec Hackers
-
-There are lots of possibilities of improving the program itself. There
-are both small projects and big ones. Most of them are listed in our
-TODO file, listed on the homepage of Jan and
-@uref{http://www.cs.uu.nl/~hanwen/lily-devel,Han-Wen}. Modifying
-LilyPond almost always requires patches to the C++ part.
-
-There are also numerous other interesting projects that are more or less
-related to LilyPond
-
-@itemize @bullet
-@item Writing convertors, eg. from NIFF and MIDI (we tried writing one with
-limited success: midi2ly, included with lilypond.)
-
-We found that writing them in Python is the easiest.
-
-@item Writing a GUI frontend to
-LilyPond. At the moment @uref{denemo,denemo.sourceforge.net} is the most
-advanced.
-
-@item Helping write @uref{ http://solfege.sourceforge.net/,solfege
-tools}
-
-@item Helping @uref{primrose.sourceforge.net,primrose}, a tool for
-scanning sheet music.
-@end itemize
-
-
-@chapter LilyPond internals
-
@itemize @bullet
-@item @uref{hacking.html,Internals} details of the implementation
@item @uref{README-W32.html,Compiling and running on Windows32}
@item @uref{../misc/out-www/CHANGES-0.0.html, Change logs from 0.0 till 0.1 }
@item @uref{../misc/out-www/CHANGES-0.1.html, Change logs from 0.1 till 1.0 }
safest method for upgrading is to use @file{xdelta}, see
@uref{ftp://ftp.xcf.berkeley.edu/pub/xdelta/}.
-The following command produces @file{lilypond-1.1.55.tar.gz} from
-@file{lilypond-1.1.54} identical (up to compression dates) to the .55 on
+The following command produces @file{lilypond-1.3.122.tar.gz} from
+@file{lilypond-1.3.121} identical (up to compression dates) to the .122 on
the FTP site.
@example
- xdelta patch lilypond-1.1.54-1.1.55.xd lilypond-1.1.54.tar.gz
+ xdelta patch lilypond-1.3.121-1.3.122.xd lilypond-1.3.121.tar.gz
@end example
@section Prerequisites
or at mirror site @uref{ftp://ftp.dante.de,ftp://ftp.dante.de}
@item MetaPost, needed for generating PostScript fonts. Please
-note that tetex-0.4pl8 (included with Redhat 5.x) does not include
+note that tetex-0.4pl8 (included with Red Hat 5.x) does not include
@file{mfplain.mp}, which is needed for producing the scalable font
files.
make htmldoc
@end example
-This does require a functioning LilyPond. The binary doesn't have to
+This does require a functioning LilyPond. The binary doesn't have to
be installed.
If you want to auto-generate Lily's website, you'll need some additional
conversion tools.
@itemize @bullet
-@item xpmtoppm (from the netpbm package: the Portable Bitmap Utilities) (For RedHat Linux
+@item xpmtoppm (from the netpbm package: the Portable Bitmap Utilities) (For Red Hat Linux
users: it is included within the package libgr-progs).
- the original is at
+ The original is at
@uref{ftp://ftp.x.org/contrib/utilities/netpbm-1mar1994.p1.tar.gz,ftp://ftp.x.org/contrib/utilities/netpbm-1mar1994.p1.tar.gz}
-@item pnmtopng (also in libgr-progs for RedHat). The original is
+@item pnmtopng (also in libgr-progs for Red Hat). The original is
at
@uref{ftp://swrinde.nde.swri.edu/pub/png/applications/pnmtopng-2.37.2.tar.gz,ftp://swrinde.nde.swri.edu/pub/png/applications/pnmtopng-2.37.2.tar.gz}.i
-The version of @file{pnmtopng} that is distributed with RedHat 5.1 and
+The version of @file{pnmtopng} that is distributed with Red Hat 5.1 and
5.2 contains a bug: pnmtopng is dynamically linked to the wrong
version of libpng.
provided to do the work for you, see @file{bin/clean-fonts.sh}.
-@section Redhat linux
+@section Red Hat Linux
-RedHat Linux users can compile an RPM. A spec file is in
-@file{make/out/lilypond.spec}, it is distributed along with the
+Red Hat Linux users can compile an RPM. A spec file is in
+@file{make/out/lilypond.spec}; it is distributed along with the
sources.
You can make the rpm by issuing
@end example
-Precompiled RedHat-7.0 i386 RPMS are available from
+Precompiled Red Hat 7.0 i386 RPMS are available from
@uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/RedHat/}.
-For compilation on a RedHat system you need these packages,
+For compilation on a Red Hat system you need these packages,
in addition to the those needed for running:
@itemize @bullet
@item glibc-devel
@item tetex-devel
@end itemize
-@section Debian GNU/linux
+@section Debian GNU/Linux
-A Debian package is also available; see
-@uref{http://packages.debian.org/lilypond,http://packages.debian.org/lilypond}
-or contact Anthony Fok @email{foka@@debian.org} for more information.
+A Debian package is also available. You may install it easily by using
+apt-get as root:
-The build scripts are in the subdirectory @file{debian/}; you can
-make the .deb by doing
+@example
+ apt-get install lilypond1.3
+@end example
-@example
+Alternatively, visit
- tar xzf lilypond-x.y.z.tar.gz
- cd lilypond-x.y.z
- dpkg-buildpackage
- dpkg -i ../lilypond_x.y.z*deb
-
-@end example
+@itemize @bullet
+@item @uref{http://packages.debian.org/lilypond,http://packages.debian.org/lilypond}
+@item @uref{http://ftp.debian.org/debian/pool/main/l/lilypond1.3/,http://ftp.debian.org/debian/pool/main/l/lilypond1.3/}
+for latest package uploaded to Debian unstable;
+@item @uref{http://people.debian.org/~foka/lilypond/,http://people.debian.org/~foka/lilypond/}
+for latest semi-unofficial build of LilyPond 1.3.121 for Debian 2.2r2 (potato) users.
+The official stable Debian 2.2r2 is stuck with the old LilyPond-1.3.24.
+@end itemize
+
+You may contact Anthony Fok @email{foka@@debian.org} for more information.
+
+The build scripts are in the subdirectory @file{debian/}; you can
+make the .deb by doing, for example:
+
+@example
+ $ su - root
+ # dpkg --purge lilypond lilypond1.3
+ # exit
+ $ tar xzf lilypond-1.3.122.tar.gz
+ $ cd lilypond-1.3.122
+ $ dch -p -v 1.3.122-0.local.1 "Local build."
+ $ debuild
+ $ su - root
+ # dpkg -i ../lilypond1.3_1.3.122*.deb
+ # exit
+ $
+@end example
For compilation on a Debian GNU/Linux system you need these packages,
in addition to the those needed for running:
+
@itemize @bullet
-@item libc6-dev
-@item libstdc++<your-libstdc++-version-here>-dev
+@item g++, cpp, libc6-dev, libstdc++<your-libstdc++-version-here>-dev
@item libguile<your-libguile-version-here>-dev
-@item flex
-@item bison
+@item make, m4, flex, bison
@item gettext
-@item texinfo
-@item tetex-dev
-@item debhelper
+@item groff, texinfo, bibtex2html (not in 2.2r2)
+@item tetex-base, tetex-bin, tetex-extra, libkpathsea-dev or tetex-dev
+@item dpkg-dev, debhelper, fakeroot
+@item gs, netpbm, pnmtopng
@end itemize
+Most of these are listed on the Build-Depends line in the
+debian/control file. To ensure the creation of the lilypond deb is
+trouble-free, we recommend that you first install the following packages
+before starting dpkg-buildpackage by running apt-get as root.
+
+For Debian 2.2 (or 2.2r2, 2.2r3):
+
+@example
+ apt-get install task-debian-devel task-c++-dev \
+ python-base libguile6-dev tetex-bin tetex-dev \
+ tetex-extra flex bison texinfo groff gs \
+ netpbm pnmtopng m4 gettext
+@end example
+
+For Debian in development ("unstable", the future 2.3 or 3.0):
+
+@example
+ apt-get install task-debian-devel task-c++-dev \
+ python-base libguile9-dev tetex-bin libkpathsea-dev \
+ tetex-extra flex bison texinfo bibtex2html groff gs \
+ netpbm pnmtopng m4 gettext
+@end example
+
+And, just so that old fonts from previous versions of LilyPond won't
+interfere with your build, you may want to do this before the build too:
+
+@example
+ dpkg --purge lilypond lilypond1.3
+@end example
+
@section Windows NT/95
@end example
This behaviour has been observed with machines that have old libg++
-versions (LinuxPPC feb '98, RedHat 4.x).
+versions (LinuxPPC feb '98, Red Hat 4.x).
@end itemize
@quotation
Some versions of the AIX binder (linker) can fail with a relocation
overflow severe error when the -bbigtoc option is used to link
- GCC-produced object files into an executable that overflows the TOC. A
- fix for APAR IX75823 (OVERFLOW DURING LINK WHEN USING GCC AND
+ GCC-produced object files into an executable that overflows the TOC.
+ A fix for APAR IX75823 (OVERFLOW DURING LINK WHEN USING GCC AND
-BBIGTOC) is available from IBM Customer Support and from its
27service.boulder.ibm.com website as PTF U455193.
-@node Reporting Bugs
+@node Reporting Bugs, , , top
@chapter Bug reports
+@cindex bugs
+@cindex reporting bugs
LilyPond development moves quickly, so if you have a problem, it is
wise to check if it has been fixed in a newer release. If you think
-@node convert-ly
+
+@node convert-ly, , , Top
@chapter convert-ly
@code{convert-ly} sequentially applies different
lilypond-conversions to upgrade a Lilypond input file. It uses
-@node Internals
-@chapter Internals
+@node Internals, , , Top
@menu
* Conversion stages:: Lilypond is a multi-pass program.
-
* Grobs:: Graphical object
* Engraver::
* Music_iterator::
When translating the input to notation, there are number of distinct
phases. We list them here:
-
@table @samp
@item Parsing:
each contain @code{Music} and paper/midi-definitions.
@item Interpreting music
+@cindex interpreting music
All music events are "read" in the same order as they would be played
(or read from paper). At every step of the interpretation, musical
@item Prebreaking
+@cindex prebreaking
+
At places where line breaks may occur, clefs and bars are prepared for
a possible line break.
@item Preprocessing
+@cindex preprocessing
+
In this stage, all information that is needed to determine line breaking
is computed.
@node Molecules
@section Molecules
+@cindex Molecule
+@cindex Atom
+@cindex Output description
+
The objective of any typesetting system is to put ink on paper in the
right places. For LilyPond, this final stage is left to the TeX and the
printer subsystem. For lily, the last stage in processing a score is
what-to-print-where.
Conceptually, Molecules can be constructed from Scheme code, by
-translating a Molecule and by combining two molecules. In BNF notation:
+translating a Molecule and by combining two molecules. In BNF
+notation:
@example
Molecule = COMBINE Molecule Molecule
;
@end example
+If you are interested in seeing how this information is stored, you
+can run with the @code{-f scm} option. The scheme expressions are then
+dumped onto the output file.
+
(refer to the C++ code for more details). All visible,
-ie. non-transparent, grobs have a callback to create a Molecule. The
+ie. non-transparant, grobs have a callback to create a Molecule. The
name of the property is @code{molecule-callback}, and its value should
be a Scheme function taking one argument (the grob) and returning a
Molecule.
-@node Development
+@node Development, , , top
@chapter Development
@menu
* CodingStyle::
* Making patches::
* Localisation::
+* Helping with development::
@end menu
-@node CodingStyle
+@node CodingStyle, , , Development
@section CodingStyle - standards while programming for GNU LilyPond
As a general rule, you should always try to continue computations, even
Use them.
-@node Making patches
+@node Making patches, , , Development
@section Making patches
@unnumberedsec Track and distribute your code changes
@end example
-@node Localisation
+@node Localisation, , , Development
@section Localisation - User messages in LilyPond
This document provides some guidelines for uniformising user messages.
Please don't run make po/po-update with GNU gettext < 0.10.35
@end itemize
+
+@node Helping with development, , , Development
+
+@chapter Getting involved
+
+If you want to help developing LilyPond your efforts are appreciated.
+You can help LilyPond in several ways. Not all tasks requiring
+programming or understanding the full source code.
+
+Please don't expect us to give you instructions on what you should
+do. We're just a bunch of simple hackers, and we're absolutely
+incompetent about management, design in advance, delegating work.
+Some people write to us "I want to help, what should I do?", but we
+never know what to answer them.
+
+If you want to hack, just start hacking. You can send us the result as
+a patch, and we'll gladly incorporate it.
+
+If you need some hints on where to get started: there are a number of
+specific areas where you could do work.
+
+@unnumberedsubsec Users
+
+Mutopia needs your help. The mutopia project is a collection of public
+domain sheet music. You can help the project by entering music (either
+by hand, or by converting from scans or MIDI) and submitting it. Point
+your browser to the @uref{http://sca.uwaterloo.ca/Mutopia, Mutopia
+webpage}.
+
+@unnumberedsubsec Writers
+
+The documentation of LilyPond and related utilities needs a lot of
+work. The documentation is written in
+@uref{http://www.gnu.org/software/texinfo,texinfo}. The documentation of
+LilyPond is sorely lacking in terms of completeness, depth and
+organisation.
+
+Write if you know how to write english documentation in texinfo, and
+know about music and music notation. You must also know how to use
+LilyPond (or be prepared to learn using it). The task is not especially
+hard, but it is a lot of work, and you must be familiar with LilyPond.
+
+@unnumberedsubsec Translators
+
+LilyPond is completely ready for internationalized messages, but there
+are only a few translations so far (dutch, italian, german, japanese,
+french, russian). Translation involves writing a .po file, which is
+relatively easy, and does not even require running LilyPond.
+
+@unnumberedsubsec Hackers
+
+There are lots of possibilities of improving the program itself. There
+are both small projects and big ones. Most of them are listed in our
+TODO file, listed on the homepage of Jan and
+@uref{http://www.cs.uu.nl/~hanwen/lily-devel,Han-Wen}. Modifying
+LilyPond almost always requires patches to the C++ part.
+
+There are also numerous other interesting projects that are more or less
+related to LilyPond
+
+@itemize @bullet
+@item Writing convertors, eg. from NIFF and MIDI (we tried writing one with
+limited success: midi2ly, included with lilypond.)
+
+We found that writing them in Python is the easiest.
+
+@item Writing a GUI frontend to
+LilyPond. At the moment @uref{denemo,denemo.sourceforge.net} is the most
+advanced.
+
+@item Helping write @uref{http://solfege.sourceforge.net/,solfege
+tools}
+
+@item Helping @uref{primrose.sourceforge.net,primrose}, a tool for
+scanning sheet music.
+@end itemize
+
+
-@node Invoking LilyPond
+@node Invoking LilyPond, , , top
+
@chapter Invoking LilyPond
@cindex Invoking LilyPond
+@cindex command line options
+@cindex options, command line
+@cindex switches
@example
- @strong{lilypond} [OPTION]... [MUDELA-FILE]...
+ lilypond [OPTION]... [MUDELA-FILE]...
@end example
-@section Options
+@unnumberedsec Lilypond Command Options
@table @samp
@item -f,--format=
Output format for sheet music. Choices are tex (for @TeX{}
- output), ps (for PostScript) and scm (for GUILE)
+ output), ps (for PostScript) and scm (for a direct Scheme
+ dump)
+
@item -h,--help
Show a summary of usage.
@item --include, -I=DIRECTORY
adding `@file{.ly}' as an extension first.
When LilyPond processes @file{filename.ly} it will produce
-@file{filename.tex} as output (or @file{filename.ps} for
-PostScript output). If @file{filename.ly} contains more than one
-@code{\score} block, then LilyPond will output the rest in numbered
-files, starting with @file{filename-1.tex}. Several files can be
-specified; they will each be processed independently. @footnote{The
-status of GUILE is not reset across invocations, so be careful not to
- change defaults settings from within Scheme .}
+@file{filename.tex} as output (or @file{filename.ps} for PostScript
+output). If @file{filename.ly} contains more than one @code{\score}
+block, then LilyPond will output the rest in numbered files, starting
+with @file{filename-1.tex}. Several files can be specified; they will
+each be processed independently. @footnote{The status of GUILE is not
+reset across invocations, so be careful not to change any default
+settings from within Scheme .}
@section Environment variables
* Invoking LilyPond:: Operation.
* Reporting Bugs:: Where to report bugs.
* Reference Manual:: Reference Manual.
-* Internals:: Internals
+@c Move to Reference Manual?
* Internals:(lilypond-internals). Auto generated detailed documentation.
-* Development:: Some hints on developing for LilyPond.
* convert-ly:: Upgrading input files.
+* Internals:: How it all works.
+* Development:: On developing code for LilyPond.
* Index:: Unified index.
@end menu
@contents
@macro keyindex {word}
-@cindex \word\
-
+@cindex \\@code{\word\}
@end macro
@macro indexcode {word}
-@cindex \word\
-
+@cindex @code{\word\}
@end macro
@mbinclude tutorial.itely
-@include invoking.itexi
+@mbinclude invoking.itexi
-@include bugs.itexi
+@mbinclude bugs.itexi
@mbinclude refman.itely
-@include convert-ly.itexi
+@mbinclude convert-ly.itexi
-@include development.itexi
+@mbinclude development.itexi
-@node Index
+@node Index, , , top
@unnumbered Index
@printindex cp
@c - Fix indexing (keyindex) so it doesn't add line breaks /MB
@c ugh: because of @include, we need to fill in these nodes
-@node Reference Manual
+
+@node Reference Manual, , , top
@chapter Reference Manual
@menu
can enter and edit them in manageable chunks.
@end itemize
-
-
@node Top level
@section Top level
-@cindex top level
-
This section describes what you may enter at top level.
@node Pitch names
@section Pitch names
+@cindex pitch names
+@cindex note names
+@cindex chord modifier names
+
Note names and chord modifiers can be customised for nationalities.
languages and conventions. The syntax is as follows.
@example
See @file{ly/nederlands.ly} and @file{ly/chord-modifiers.ly} for
specific examples how to do this. tables can be tailored specified
-using. Some national note names have been provided, see @ref{Other
-languages}.
-
+using. Some national note names have been provided, see
+@ref{Other languages}.
A @code{\paper} block at top level sets the default paper block. A
@code{\midi} block at top level works similarly.
-
-
Identifier assignments may appear at top level. Semicolons are
forbidden after top level assignments.
+@cindex assignments
@node Lexical conventions
@indexcode{%}
-
A one line comment is introduced by a `@code{%}' character.
Block comments are started by `@code{%@{}' and ended by `@code{%@}}'.
They cannot be nested.
LilyPond contains a Scheme interpreter (the GUILE library) for
internal use. The interpreter is accessed by the pound sign:
+@cindex Scheme
+@cindex GUILE
+@cindex Scheme, in-line code
+
Whereever the syntax allows Scheme expressions, you may enter one as
@example
argument is a version string in quotes, for example @code{"1.2.0"}.
This is used to detect invalid input, and to aid
@code{convert-ly}, a tool that automatically upgrades input files.
-
+@cindex convert-ly
@node Other languages
@section Other languages
-@cindex Other languages
+@cindex Note names, international
Note name definitions have been provided in various languages.
Simply include the language specific init file. For example:
natural, negative to add flats, or positive to add sharps.
In Note and Chord mode, pitches may be designated by names. See
-section @ref{Other languages} for pitch names in different languages.
+section
+ @c @ref{Other languages} FIXME
+ for pitch names in different languages.
The syntax for duration specification is
LilyPond has predefined sets of notenames for various languages. See
@ref{Other languages}.
-
-
The optional octave specification takes the form of a series of
single quote (`@code{'}@indexcode{'}') characters or a series of comma
(`@code{,}@indexcode{,}') characters. Each @code{'} raises the pitch by one
ceses' eses' geses' ases' beses'
@end lilypond
-Whenever a C-sharp is desired, you must specify a C-sharp. LilyPond
+Whenever a C-sharp is desired, you must specify a C-sharp. LilyPond
will determine what accidentals to typeset depending on the key and
-context. A reminder accidental
+context. A reminder accidental
@cindex reminder accidental
- can be
-forced by adding an exclamation mark `@code{!}' after the pitch. A
-cautionary accidental,
+can be forced by adding an exclamation mark `@code{!}' after the pitch.
+A cautionary accidental,
@cindex cautionary accidental
- i.e., an
-accidental within parentheses can be obtained by adding the question
-mark `@code{?}@indexcode{?}' after the pitch.
+i.e., an accidental within parentheses can be obtained by adding the
+question mark `@code{?}@indexcode{?}' after the pitch.
@lilypond[fragment,verbatim,center]
cis' d' e' cis' c'? d' e' c'!
e' ~ e' <c' e' g'> ~ <c' e' g'>
@end lilypond
-
-
-[TODO: explain Requests]
-
-
@cindex articulations
@cindex scripts
@TeX{} above or below notes by using a string instead of an
identifier: `@code{c^"text"}'. Fingerings
@cindex fingering
- can be
-placed by simply using digits. All of these note ornaments appear in
-the printed output but have no effect on the MIDI rendering of the
-music.
+can be placed by simply using digits. All of these note ornaments
+appear in the printed output but have no effect on the MIDI rendering of
+the music.
To save typing, fingering instructions (digits 0 to 9 are
supported) and single characters shorthands exist for a few
\score {
\notes {
- \property Voice.textStyle = typewriter
+ \property Voice.TextScript \set #'font-style = #'typewriter
c''4-._"c-." s4
c''4--_"c-{}-" s4
c''4-+_"c-+" s4
This is equivalent to `@code{c4-6 c4-"foo"}'.
-
@cindex scripts
@example
@c -*-texinfo-*-
@c ugh: because of @include, we need to fill in these nodes?
-@node Tutorial
+@node Tutorial, , , Top
@chapter Tutorial
@menu
Now that we are familiar with the procedure of producing output, we
will analyse the input, line by line.
-@ignore
-Let's try to redo this
@example
-
% lines preceded by a percent are comments which
% are ignored by Lilypond.
-
-
@end example
The percent sign, `@code{%}', introduces a line comment. If you want to
make larger comments, you can use block comments. These are delimited
by `@code{%@{}' and `@code{%@}}'
-@end ignore
-@multitable @columnfractions .60 .39
-@item
-@noindent
-@c @example urg: no tt font
-@c @exdent % lines preceded by a percent are comments.
-@exdent @code{% lines preceded by a percent are comments.}
-@c @end example
-@tab
-The percent sign, `@code{%}', introduces a line comment. If you
-want to make larger comments, you can use block comments. These
-are delimited by `@code{%@{}' and `@code{%@}}'
-@end multitable
@example
\input "paper16.ly"
the safest method for upgrading is to use `xdelta', see
`ftp://ftp.xcf.berkeley.edu/pub/xdelta/'.
- The following command produces `lilypond-1.1.55.tar.gz' from
-`lilypond-1.1.54' identical (up to compression dates) to the .55 on the
-FTP site.
- xdelta patch lilypond-1.1.54-1.1.55.xd lilypond-1.1.54.tar.gz
+ The following command produces `lilypond-1.3.122.tar.gz' from
+`lilypond-1.3.121' identical (up to compression dates) to the .122 on
+the FTP site.
+ xdelta patch lilypond-1.3.121-1.3.122.xd lilypond-1.3.121.tar.gz
Prerequisites
=============
or at mirror site ftp://ftp.dante.de (ftp://ftp.dante.de)
* MetaPost, needed for generating PostScript fonts. Please note that
- tetex-0.4pl8 (included with Redhat 5.x) does not include
+ tetex-0.4pl8 (included with Red Hat 5.x) does not include
`mfplain.mp', which is needed for producing the scalable font
files.
documentation on-line documentation. It is made by entering
make htmldoc
- This does require a functioning LilyPond. The binary doesn't have
-to be installed.
+ This does require a functioning LilyPond. The binary doesn't have to
+be installed.
If you want to auto-generate Lily's website, you'll need some
additional conversion tools.
* xpmtoppm (from the netpbm package: the Portable Bitmap Utilities)
- (For RedHat Linux users: it is included within the package
- libgr-progs). the original is at
+ (For Red Hat Linux users: it is included within the
+ package libgr-progs). The original is at
ftp://ftp.x.org/contrib/utilities/netpbm-1mar1994.p1.tar.gz
(ftp://ftp.x.org/contrib/utilities/netpbm-1mar1994.p1.tar.gz)
- * pnmtopng (also in libgr-progs for RedHat). The original is at
+ * pnmtopng (also in libgr-progs for Red Hat). The original is at
ftp://swrinde.nde.swri.edu/pub/png/applications/pnmtopng-2.37.2.tar.gz
(ftp://swrinde.nde.swri.edu/pub/png/applications/pnmtopng-2.37.2.tar.gz).i
- The version of `pnmtopng' that is distributed with RedHat 5.1 and
+ The version of `pnmtopng' that is distributed with Red Hat 5.1 and
5.2 contains a bug: pnmtopng is dynamically linked to the wrong
version of libpng.
`.pk' and `.tfm' files of the fonts. A script has been provided to do
the work for you, see `bin/clean-fonts.sh'.
-Redhat linux
-============
+Red Hat Linux
+=============
- RedHat Linux users can compile an RPM. A spec file is in
-`make/out/lilypond.spec', it is distributed along with the sources.
+ Red Hat Linux users can compile an RPM. A spec file is in
+`make/out/lilypond.spec'; it is distributed along with the sources.
You can make the rpm by issuing
rpm -tb lilypond-x.y.z.tar.gz
rpm -i /usr/src/redhat/RPMS/i386/lilypond-x.y.z
- Precompiled RedHat-7.0 i386 RPMS are available from
+ Precompiled Red Hat 7.0 i386 RPMS are available from
`ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/RedHat/'.
- For compilation on a RedHat system you need these packages, in
+ For compilation on a Red Hat system you need these packages, in
addition to the those needed for running:
* glibc-devel
* tetex-devel
-Debian GNU/linux
+Debian GNU/Linux
================
- A Debian package is also available; see
-http://packages.debian.org/lilypond
-(http://packages.debian.org/lilypond) or contact Anthony Fok
-<foka@debian.org> for more information.
+ A Debian package is also available. You may install it easily by
+using apt-get as root:
- The build scripts are in the subdirectory `debian/'; you can make
-the .deb by doing
+ apt-get install lilypond1.3
+ Alternatively, visit
- tar xzf lilypond-x.y.z.tar.gz
- cd lilypond-x.y.z
- dpkg-buildpackage
- dpkg -i ../lilypond_x.y.z*deb
+ * http://packages.debian.org/lilypond
+ (http://packages.debian.org/lilypond)
+
+ * http://ftp.debian.org/debian/pool/main/l/lilypond1.3/
+ (http://ftp.debian.org/debian/pool/main/l/lilypond1.3/) for latest
+ package uploaded to Debian unstable;
+
+ * http://people.debian.org/~foka/lilypond/
+ (http://people.debian.org/~foka/lilypond/) for latest
+ semi-unofficial build of LilyPond 1.3.121 for Debian 2.2r2
+ (potato) users. The official stable Debian 2.2r2 is stuck with
+ the old LilyPond-1.3.24.
+
+ You may contact Anthony Fok <foka@debian.org> for more information.
+
+ The build scripts are in the subdirectory `debian/'; you can make
+the .deb by doing, for example:
+
+ $ su - root
+ # dpkg --purge lilypond lilypond1.3
+ # exit
+ $ tar xzf lilypond-1.3.122.tar.gz
+ $ cd lilypond-1.3.122
+ $ dch -p -v 1.3.122-0.local.1 "Local build."
+ $ debuild
+ $ su - root
+ # dpkg -i ../lilypond1.3_1.3.122*.deb
+ # exit
+ $
For compilation on a Debian GNU/Linux system you need these packages,
in addition to the those needed for running:
- * libc6-dev
- * libstdc++<your-libstdc++-version-here>-dev
+ * g++, cpp, libc6-dev, libstdc++<your-libstdc++-version-here>-dev
* libguile<your-libguile-version-here>-dev
- * flex
-
- * bison
+ * make, m4, flex, bison
* gettext
- * texinfo
+ * groff, texinfo, bibtex2html (not in 2.2r2)
+
+ * tetex-base, tetex-bin, tetex-extra, libkpathsea-dev or tetex-dev
+
+ * dpkg-dev, debhelper, fakeroot
+
+ * gs, netpbm, pnmtopng
+
+ Most of these are listed on the Build-Depends line in the
+debian/control file. To ensure the creation of the lilypond deb is
+trouble-free, we recommend that you first install the following packages
+before starting dpkg-buildpackage by running apt-get as root.
+
+ For Debian 2.2 (or 2.2r2, 2.2r3):
+
+ apt-get install task-debian-devel task-c++-dev \
+ python-base libguile6-dev tetex-bin tetex-dev \
+ tetex-extra flex bison texinfo groff gs \
+ netpbm pnmtopng m4 gettext
+
+ For Debian in development ("unstable", the future 2.3 or 3.0):
+
+ apt-get install task-debian-devel task-c++-dev \
+ python-base libguile9-dev tetex-bin libkpathsea-dev \
+ tetex-extra flex bison texinfo bibtex2html groff gs \
+ netpbm pnmtopng m4 gettext
- * tetex-dev
+ And, just so that old fonts from previous versions of LilyPond won't
+interfere with your build, you may want to do this before the build too:
- * debhelper
+ dpkg --purge lilypond lilypond1.3
Windows NT/95
=============
Includable_lexer::new_input (this=0x8209a00, s={strh_ = {
This behaviour has been observed with machines that have old libg++
- versions (LinuxPPC feb '98, RedHat 4.x).
+ versions (LinuxPPC feb '98, Red Hat 4.x).
Solaris:
********
Some versions of the AIX binder (linker) can fail with a
relocation overflow severe error when the -bbigtoc option
is used to link GCC-produced object files into an
- executable that overflows the TOC. A fix for APAR IX75823
+ executable that overflows the TOC. A fix for APAR IX75823
(OVERFLOW DURING LINK WHEN USING GCC AND -BBIGTOC) is
available from IBM Customer Support and from its
27service.boulder.ibm.com website as PTF U455193.
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=3
-PATCH_LEVEL=121
-MY_PATCH_LEVEL=jcn2
+PATCH_LEVEL=122
+MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
CONF_FILES = changelog control copyright doc-base emacsen-startup \
preinst postinst postrm prerm rules watch
EXTRA_DIST_FILES = README.Debian TODO $(CONF_FILES) \
- control.foka
+ control.foka control.potato
#OUTCONF_FILES = $(addprefix $(outdir)/, $(basename $(CONF_FILES))) $(OUTIN_FILES)
OUTCONF_FILES = $(OUTIN_FILES)
OUT_DIST_FILES = $(OUTIN_FILES)
+lilypond1.3 (1.3.121-1) unstable; urgency=low
+
+ * New upstream release.
+ * Added more detailed instruction for building lilypond1.3 on Debian
+ in Documentation/topdocs/INSTALL.texi (hence INSTALL.txt).
+ * Applied Han-wen's one-line patch to lily/system-start-delimiter.cc
+ to remove bracket-width.
+ * It seems that bracket-width needs to be removed from
+ scm/grob-description.scm and scm/interface-description.scm too.
+
+ -- Anthony Fok <foka@debian.org> Sun, 7 Jan 2001 02:34:46 -0700
+
lilypond1.3 (1.3.119-1) unstable; urgency=low
* New upstream release.
Source: lilypond1.3
-Build-Depends: debhelper (>= 2.0.72), python-base (>= 1.5.2-4), libguile9-dev, tetex-bin, libkpathsea-dev, tetex-extra, flex, bison, texinfo (>= 4.0-1), groff, gs, netpbm, pnmtopng, m4, gettext (>= 0.10.35-13)
+Build-Depends: debhelper (>= 2.0.72), python-base (>= 1.5.2-4), libguile9-dev, tetex-bin, libkpathsea-dev, tetex-extra, flex, bison, texinfo (>= 4.0-1), bibtex2html, groff, gs, netpbm, pnmtopng, m4, gettext (>= 0.10.35-13)
Section: tex
Priority: optional
Maintainer: Anthony Fok <foka@debian.org>
Source: lilypond1.3
-Build-Depends: debhelper (>= 2.0.72), python-base (>= 1.5.2-4), libguile9-dev, tetex-bin, libkpathsea-dev, tetex-extra, flex, bison, texinfo (>= 4.0-1), groff, gs, netpbm, pnmtopng, m4, gettext (>= 0.10.35-13)
+Build-Depends: debhelper (>= 2.0.72), python-base (>= 1.5.2-4), libguile9-dev, tetex-bin, libkpathsea-dev, tetex-extra, flex, bison, texinfo (>= 4.0-1), bibtex2html, groff, gs, netpbm, pnmtopng, m4, gettext (>= 0.10.35-13)
Section: tex
Priority: optional
Maintainer: Anthony Fok <foka@debian.org>
--- /dev/null
+Source: lilypond1.3
+Build-Depends: debhelper (>= 2.0.72), python-base (>= 1.5.2-4), libguile6-dev, tetex-bin, tetex-dev, tetex-extra, flex, bison, texinfo (>= 4.0-1), groff, gs, netpbm, pnmtopng, m4, gettext (>= 0.10.35-13)
+Section: tex
+Priority: optional
+Maintainer: Anthony Fok <foka@debian.org>
+Standards-Version: 3.2.1
+
+Package: lilypond1.3
+Architecture: any
+Replaces: lilypond
+Provides: lilypond
+Depends: ${shlibs:Depends}, tetex-bin (>= 1.0.5-1), python-base (>= 1.5.2-4), guile
+Recommends: tetex-extra (>= 1.0-1)
+Conflicts: lilypond, musixtex-fonts
+Description: A program for printing sheet music.
+ LilyPond is a music typesetter. It produces beautiful sheet music
+ using a high level description file as input. LilyPond is part of
+ the GNU Project.
+ .
+ This is the developmental 1.3 branch of LilyPond. It is not intended for
+ use with stable projects, although 1.3.x is most likely to be less buggy
+ and much more featureful than then the old "stable" 1.2.17.
+ .
+ URLs: http://www.cs.uu.nl/~hanwen/lilypond/
+ http://www.xs4all.nl/~jantien/lilypond/
+ http://sca.uwaterloo.ca/lilypond/
+ http://www.lilypond.org/
+ Authors: Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ Jan Nieuwenhuizen <janneke@gnu.org>
\header{
texidoc="
Breaks can be encouraged and discouraged using @code{\break} and
-@code{\nobreak}. They are abbrevs for @code{\penalty} commands.
+@code{\noBreak}. They are abbrevs for @code{\penalty} commands.
";
}
\score{
\notes\context Voice{
\emptyText
- c1 c1^"no break after 2nd note" \nobreak c1 c1
+ c1 c1^"no break after 2nd note" \noBreak c1 c1
c1^"break after this" \break c1 c1
}
-\version "1.3.117";
+\version "1.3.122";
FontBody= \notes\transpose c''{
\bar "|:";
\transpose c'{
\time 4/4;
- \property Voice . textStyle = "finger"
+ \property Voice . TextScript \override #'font-style = #'Finger
\property Voice . noteHeadStyle = #'diamond
c1^"1" d2^"2" e4^"3"
\property Voice . noteHeadStyle = #'cross
a^"0"_"9"
a'^\flageolet
- \property Voice . textStyle = "roman"
+ \property Voice . TextScript \override #'font-style = #'roman
\time 1/2; a2 |
\time 3/2; < a1.
{ s4 \ppp \< s4 \! s4 \fff s4 \> s4 \! s4\ppp} >
\time 12/8; a1. |
\time 12/4;
r1. r2. r4. r8. r16. r32. r64. r64. |
- c2\sustaindown c\sustainup |
+ c2\sustainDown c\sustainUp |
}
}
}
thenotes = \notes \relative cis' { \time 4/4;
-gis'2 gis ~ |
+g'2 g ~ |
+g g4 gis |
+gis2 gis ~ |
gis4 gis8 ~ gis g4 gis |
g2 gis ~ |
gis g4 gis |
g2 gis( |
)g! gis4 gis |
-
+\break
\key a \major;
+gis2 gis ~ |
+gis4 gis8 ~ gis g4 gis |
gis2 g ~ |
g4 gis8 ~ gis g4 gis |
g2 gis ~ |
\addlyrics
\context Staff = mel
- { \property Staff.noAutoBeaming = "1"
- \property Staff.automaticMelismas = "1"
+ { \property Staff.noAutoBeaming = ##t
+ \property Staff.automaticMelismata = ##t
\melody }
\context Lyrics \text
}
virtual bool try_music (Music*);
virtual void stop_translation_timestep();
virtual void start_translation_timestep ();
- virtual void create_grobs ();
+ virtual void process_music ();
private:
};
Extender_engraver::acknowledge_grob (Grob_info i)
{
// -> text_item
- if (i.elem_l_->has_interface (ly_symbol2scm("text-item-interface")))
-
+ if (i.elem_l_->has_interface (ly_symbol2scm("lyric-syllable-interface")))
{
current_lyric_l_ = i.elem_l_;
if (extender_p_
&& !extender_p_->get_bound (RIGHT)
)
{
- Lyric_extender(extender_p_).set_textitem (RIGHT, dynamic_cast<Item*> (i.elem_l_));
+ Lyric_extender::set_textitem (extender_p_, RIGHT, dynamic_cast<Item*> (i.elem_l_));
}
}
}
}
void
-Extender_engraver::create_grobs ()
+Extender_engraver::process_music ()
{
if (req_l_ && ! extender_p_)
{
extender_p_ = new Spanner (get_property ("LyricExtender"));
- Lyric_extender (extender_p_).set_textitem (LEFT, last_lyric_l_);
+ Lyric_extender::set_textitem (extender_p_, LEFT, last_lyric_l_);
announce_grob (extender_p_, req_l_);
}
}
for on a word's last syllable. The extender should be aligned
with the left side of the last note of the melissima, and not
extend beond, lasting the whole duration of the melissima
- (as in MUP, urg).
-
*/
class Lyric_extender
{
public:
- Spanner*elt_l_;
- Lyric_extender (Spanner*);
- void set_textitem (Direction, Grob*);
+ static void set_textitem (Spanner*, Direction, Grob*);
DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
};
SCM prev = scm_assoc (gh_cons (gh_int2scm (o), gh_int2scm (n)), localsig);
if (prev == SCM_BOOL_F)
prev = scm_assoc (gh_int2scm (n), localsig);
- int prev_acc = (prev == SCM_BOOL_F) ? 0 : gh_scm2int (gh_cdr (prev));
- bool different = prev_acc != a;
-
+ SCM prev_acc = (prev == SCM_BOOL_F) ? gh_int2scm(0) : gh_cdr (prev);
+ bool different = !gh_equal_p(prev_acc , gh_int2scm(a));
+ int p = gh_number_p(prev_acc) ? gh_scm2int(prev_acc) : 0;
+
bool tie_changes = tied_l_arr_.find_l (support_l) && different;
if ((to_boolean (note_l->get_mus_property ("force-accidental"))
|| different) && !tie_changes)
bool extra_natural =
- sign (prev_acc) * (prev_acc - a) == 1
- && abs(prev_acc) == 2;
+ sign (p) * (p - a) == 1
+ && abs(p) == 2;
Local_key_item::add_pitch (key_item_p_, *unsmob_pitch (note_l->get_mus_property ("pitch")),
to_boolean (note_l->get_mus_property ("cautionary")),
*/
bool forget = to_boolean (get_property ("forgetAccidentals"));
- if (!forget && !tie_changes)
+ if (tie_changes)
+ {
+ /*
+ Remember an alteration that is different both from
+ that of the tied note and of the key signature.
+ */
+ localsig = scm_assoc_set_x (localsig, gh_cons (gh_int2scm (o),
+ gh_int2scm (n)),
+ SCM_BOOL_T);
+
+ }
+ else if (!forget)
{
/*
not really really correct if there are more than one
}
void
-Lyric_extender::set_textitem (Direction d, Grob*s)
+Lyric_extender::set_textitem (Spanner*sp, Direction d, Grob*s)
{
- elt_l_->set_bound (d, s);
- elt_l_->add_dependency (s);
+ sp->set_bound (d, s);
+ sp->add_dependency (s);
}
-Lyric_extender::Lyric_extender (Spanner*s)
-{
- elt_l_ = s;
-}
%}
-\pitchnames #'(
+\pitchnames #`(
(ceses . ,(make-pitch -1 0 -2 ))
(cessess . ,(make-pitch -1 0 -2 ))
(ces . ,(make-pitch -1 0 -1 ))
%
% by Mats Bengtsson.
-\pitchnames #'(
+\pitchnames #`(
(cessess . ,(make-pitch -1 0 -2 ))
(cess . ,(make-pitch -1 0 -1 ))
(c . ,(make-pitch -1 0 0 ))
Begin3
Title: LilyPond
-Version: 1.3.121
-Entered-date: 07JAN01
+Version: 1.3.122
+Entered-date: 09JAN01
Description:
Keywords: music notation typesetting midi fonts engraving
Author: hanwen@cs.uu.nl (Han-Wen Nienhuys)
janneke@gnu.org (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
- 1000k lilypond-1.3.121.tar.gz
+ 1000k lilypond-1.3.122.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 1000k lilypond-1.3.121.tar.gz
+ 1000k lilypond-1.3.122.tar.gz
Copying-policy: GPL
End
%define info yes
Name: lilypond
-Version: 1.3.121
+Version: 1.3.122
Release: 1
License: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.121.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.122.tar.gz
Summary: A program for printing sheet music.
URL: http://www.cs.uu.nl/~hanwen/lilypond
# Icon: lilypond-icon.gif
;; guile> (load "backend-documentation-lib.scm")
;; For some reason, this can't be generated when lilypond is loaded;
;; the regexp stuff behaves weird.
-(define (list-interface-names) '("general-grob-interface" "beam-interface" "clef-interface" "axis-group-interface" "note-column-interface" "stem-interface" "slur-interface" "side-position-interface" "accidentals-interface" "line-of-score-interface" "note-head-interface" "note-name-interface" "rhythmic-head-interface" "rest-interface" "tuplet-bracket-interface" "align-interface" "aligned-interface" "break-aligned-interface" "chord-name-interface" "time-signature-interface" "bar-line-interface" "hairpin-interface" "arpeggio-interface" "note-collision-interface" "custos-interface" "dot-interface" "font-interface" "text-interface" "dot-column-interface" "dynamic-interface" "finger-interface" "separation-spanner-interface" "text-script-interface" "grace-alignment-interface" "hara-kiri-group-interface" "line-spanner-interface" "lyric-hyphen-interface" "key-signature-interface" "lyric-extender-interface" "lyric-syllable-interface" "mark-interface" "multi-measure-rest-interface" "paper-column-interface" "spaceable-element-interface" "rest-collision-interface" "script-interface" "script-column-interface" "spacing-spanner-interface" "span-bar-interface" "staff-symbol-interface" "stem-tremolo-interface" "separation-item-interface" "sustain-pedal-interface" "system-start-delimiter-interface" "text-spanner-interface" "tie-interface" "tie-column-interface" "volta-bracket-interface"))
+(define (list-interface-names) '("general-grob-interface" "general-grob-interface" "beam-interface" "clef-interface" "axis-group-interface" "note-column-interface" "stem-interface" "slur-interface" "side-position-interface" "accidentals-interface" "line-of-score-interface" "note-head-interface" "note-name-interface" "rhythmic-head-interface" "rest-interface" "tuplet-bracket-interface" "align-interface" "aligned-interface" "align-interface" "break-aligned-interface" "chord-name-interface" "time-signature-interface" "bar-line-interface" "hairpin-interface" "arpeggio-interface" "note-collision-interface" "custos-interface" "dot-interface" "font-interface" "text-interface" "dot-column-interface" "dynamic-interface" "finger-interface" "separation-spanner-interface" "text-script-interface" "grace-alignment-interface" "hara-kiri-group-interface" "line-spanner-interface" "lyric-hyphen-interface" "key-signature-interface" "lyric-extender-interface" "lyric-syllable-interface" "mark-interface" "multi-measure-rest-interface" "font-interface" "paper-column-interface" "spaceable-element-interface" "rest-collision-interface" "script-interface" "script-column-interface" "spacing-spanner-interface" "staff-symbol-interface" "stem-tremolo-interface" "separation-item-interface" "sustain-pedal-interface" "system-start-delimiter-interface" "text-spanner-interface" "tie-interface" "tie-column-interface" "volta-bracket-interface"))
(eval-string (ly-gulp-file "interface-description.scm"))
;; todo: clean this up a bit: the list is getting
;; rather long.
(molecule-callback . ,Beam::brew_molecule)
- (thickness . 0.42) ; in staff-space, should use stafflinethick?
+ (thickness . 0.48) ; in staff-space
(before-line-breaking-callback . ,Beam::before_line_breaking)
(after-line-breaking-callback . ,Beam::after_line_breaking)
(default-neutral-direction . 1)
(lily-interface
'stem-tremolo-interface
""
- '(
- stem
- beam-width
- beam-thickness
- beam-space-function
+ '( stem beam-width beam-thickness beam-space-function
)))
(define separation-item-interface
str = re.sub ('(paper_[a-z]+)', regularize_paper, str)
str = re.sub ('sustainup', 'sustainUp', str)
+ str = re.sub ('nobreak', 'noBreak', str)
str = re.sub ('sustaindown', 'sustainDown', str)
str = re.sub ('sostenutoup', 'sostenutoUp', str)
str = re.sub ('sostenutodown', 'sostenutoDown', str)
default_music_fontsize = 16
default_text_fontsize = 12
+paperguru = None
-
+# this code is ugly. It should be cleaned
class LatexPaper:
def __init__(self):
self.m_paperdef = {
- # the dimentions are from geometry.sty
+ # the dimensions are from geometry.sty
'a0paper': (mm2pt(841), mm2pt(1189)),
'a1paper': (mm2pt(595), mm2pt(841)),
'a2paper': (mm2pt(420), mm2pt(595)),
def set_geo_option(self, name, value):
if name == 'body' or name == 'text':
if type(value) == type(""):
- self._set_dimen('m_geo_textwidth', value)
+ self.m_geo_textwidth = value
else:
- self._set_dimen('m_geo_textwidth', value[0])
+ self.m_geo_textwidth = value[0]
self.__body = 1
elif name == 'portrait':
self.m_geo_landscape = 0
if self.m_geo_includemp == None:
self.m_geo_includemp = 1
elif name == 'marginparwidth' or name == 'marginpar':
- self._set_dimen('m_geo_x_marginparwidth', value)
+ self.m_geo_x_marginparwidth = value
self.m_geo_includemp = 1
elif name == 'marginparsep':
- self._set_dimen('m_geo_x_marginparsep', value)
+ self.m_geo_x_marginparsep = value
self.m_geo_includemp = 1
elif name == 'scale':
if type(value) == type(""):
elif name == 'hscale':
self.m_geo_width = self.get_paperwidth() * float(value)
elif name == 'left' or name == 'lmargin':
- self._set_dimen('m_geo_lmargin', value)
+ self.m_geo_lmargin = value
elif name == 'right' or name == 'rmargin':
- self._set_dimen('m_geo_rmargin', value)
+ self.m_geo_rmargin = value
elif name == 'hdivide' or name == 'divide':
if value[0] not in ('*', ''):
- self._set_dimen('m_geo_lmargin', value[0])
+ self.m_geo_lmargin = value[0]
if value[1] not in ('*', ''):
- self._set_dimen('m_geo_width', value[1])
+ self.m_geo_width = value[1]
if value[2] not in ('*', ''):
- self._set_dimen('m_geo_rmargin', value[2])
+ self.m_geo_rmargin = value[2]
elif name == 'hmargin':
if type(value) == type(""):
- self._set_dimen('m_geo_lmargin', value)
- self._set_dimen('m_geo_rmargin', value)
+ self.m_geo_lmargin = value
+ self.m_geo_rmargin = value
else:
- self._set_dimen('m_geo_lmargin', value[0])
- self._set_dimen('m_geo_rmargin', value[1])
+ self.m_geo_lmargin = value[0]
+ self.m_geo_rmargin = value[1]
elif name == 'margin':#ugh there is a bug about this option in
# the geometry documentation
if type(value) == type(""):
- self._set_dimen('m_geo_lmargin', value)
- self._set_dimen('m_geo_rmargin', value)
+ self.m_geo_lmargin = value
+ self.m_geo_rmargin = value
else:
- self._set_dimen('m_geo_lmargin', value[0])
- self._set_dimen('m_geo_rmargin', value[0])
+ self.m_geo_lmargin = value[0]
+ self.m_geo_rmargin = value[0]
elif name == 'total':
if type(value) == type(""):
- self._set_dimen('m_geo_width', value)
+ self.m_geo_width = value
else:
- self._set_dimen('m_geo_width', value[0])
+ self.m_geo_width = value[0]
elif name == 'width' or name == 'totalwidth':
- self._set_dimen('m_geo_width', value)
+ self.m_geo_width = value
elif name == 'paper' or name == 'papername':
self.m_papersize = value
elif name[-5:] == 'paper':
self.m_papersize = name
else:
self._set_dimen('m_geo_'+name, value)
- def _set_dimen(self, name, value):
- if type(value) == type("") and value[-2:] == 'pt':
- self.__dict__[name] = float(value[:-2])
- elif type(value) == type("") and value[-2:] == 'mm':
- self.__dict__[name] = mm2pt(float(value[:-2]))
- elif type(value) == type("") and value[-2:] == 'cm':
- self.__dict__[name] = 10 * mm2pt(float(value[:-2]))
- elif type(value) == type("") and value[-2:] == 'in':
- self.__dict__[name] = in2pt(float(value[:-2]))
+ def __setattr__(self, name, value):
+ if type(value) == type("") and \
+ dimension_conversion_dict.has_key (value[-2:]):
+ f = dimension_conversion_dict[dim]
+ self.__dict__[name] = f(float(value[:-2]))
else:
self.__dict__[name] = value
- def display(self):
- print "LatexPaper:\n-----------"
+
+ def __str__(self):
+ s = "LatexPaper:\n-----------"
for v in self.__dict__.keys():
if v[:2] == 'm_':
- print v, self.__dict__[v]
- print "-----------"
+ s = s + str (v) + ' ' + str (self.__dict__[v])
+ s = s + "-----------"
+ return s
+
def get_linewidth(self):
w = self._calc_linewidth()
if self.m_num_cols == 2:
mp = mp + self.m_geo_x_marginparwidth
else:
mp = mp + self.m_geo_marginparwidth[self.m_fontsize]
- if self.__body:#ugh test if this is necessary
+
+ #ugh test if this is necessary
+ if self.__body:
mp = 0
- def tNone(a, b, c):
- return a == None, b == None, c == None
+
if not self.m_use_geometry:
return latex_linewidths[self.m_papersize][self.m_fontsize]
else:
- if tNone(self.m_geo_lmargin, self.m_geo_width,
- self.m_geo_rmargin) == (1, 1, 1):
+ geo_opts = (a == None, b == None, c == None)
+
+ if geo_opts == (1, 1, 1):
if self.m_geo_textwidth:
return self.m_geo_textwidth
w = self.get_paperwidth() * 0.8
return w - mp
- elif tNone(self.m_geo_lmargin, self.m_geo_width,
- self.m_geo_rmargin) == (0, 1, 1):
+ elif geo_opts == (0, 1, 1):
if self.m_geo_textwidth:
return self.m_geo_textwidth
return self.f1(self.m_geo_lmargin, mp)
- elif tNone(self.m_geo_lmargin, self.m_geo_width,
- self.m_geo_rmargin) == (1, 1, 0):
+ elif geo_opts == (1, 1, 0):
if self.m_geo_textwidth:
return self.m_geo_textwidth
return self.f1(self.m_geo_rmargin, mp)
- elif tNone(self.m_geo_lmargin, self.m_geo_width,
- self.m_geo_rmargin) \
+ elif geo_opts \
in ((0, 0, 1), (1, 0, 0), (1, 0, 1)):
if self.m_geo_textwidth:
return self.m_geo_textwidth
return self.m_geo_width - mp
- elif tNone(self.m_geo_lmargin, self.m_geo_width,
- self.m_geo_rmargin) in ((0, 1, 0), (0, 0, 0)):
- w = self.get_paperwidth() - self.m_geo_lmargin - self.m_geo_rmargin - mp
+ elif geo_opts in ((0, 1, 0), (0, 0, 0)):
+ w = self.get_paperwidth() \
+ - self.m_geo_lmargin - self.m_geo_rmargin - mp
if w < 0:
w = 0
return w
return x * 2.8452756
def in2pt(x):
return x * 72.26999
-def em2pt(x, fontsize):
+def em2pt(x, fontsize = 10):
return {10: 10.00002, 11: 10.8448, 12: 11.74988}[fontsize] * x
-def ex2pt(x, fontsize):
+def ex2pt(x, fontsize = 10):
return {10: 4.30554, 11: 4.7146, 12: 5.16667}[fontsize] * x
+
+def pt2pt(x):
+ return x
+
+dimension_conversion_dict ={
+ 'mm': mm2pt,
+ 'in': in2pt,
+ 'em': em2pt,
+ 'ex': ex2pt,
+ 'pt': pt2pt
+ }
+
# latex linewidths:
# indices are no. of columns, papersize, fontsize
'singleline-comment': r"(?m)^.*?(?P<match>(?P<code>^%.*$\n+))",
'numcols': r"(?P<code>\\(?P<num>one|two)column)",
},
-
+
+
+ # why do we have distinction between @mbinclude and @include?
'texi': {
'include': '(?m)^[^%\n]*?(?P<match>@mbinclude[ \n\t]+(?P<filename>[^\t \n]*))',
'input': no_match,
if 'singleline' in opts:
l = -1.0;
else:
- l = paperguru.get_linewidth()
+ l = __main__.paperguru.get_linewidth()
if 'relative' in opts:#ugh only when is_fragment
body = '\\relative c { %s }' % body
s = s[m.end():]
d[m.group(1)] = 1
continue
- print "trøbbel:%s:" % s
+
+ error ("format of option string invalid (was `%')" % s)
return d
def scan_latex_preamble(chunks):
def scan_texi_preamble (chunks):
# this is not bulletproof..., it checks the first 10 chunks
- idx = 0
- while 1:
- if chunks[idx][0] == 'input':
+ for c in chunks[:10]:
+ if c[0] == 'input':
for s in ('afourpaper', 'afourwide', 'letterpaper',
'afourlatex', 'smallbook'):
- if string.find(chunks[idx][1], "@%s" % s) != -1:
+ if string.find(c[1], "@%s" % s) != -1:
paperguru.m_papersize = s
- idx = idx + 1
- if idx == 10 or idx == len(chunks):
- break
def scan_preamble (chunks):
if __main__.format == 'texi':
read_files = []
def find_file (name):
+ """
+ Search the include path for NAME. If found, return the contents of teh file.
+ """
f = None
for a in include_path:
try:
except IOError:
pass
if f:
+ sys.stderr.write ("Reading `%s'\n" % nm)
return f.read ()
else:
error ("File not found `%s'\n" % name)
newchunks.append(c)
return newchunks
-def read_doc_file (filename):
- """Read the input file, find verbatim chunks and do \input and \include
- """
- str = ''
- str = find_file(filename)
-
+def determine_format (str):
if __main__.format == '':
+
latex = re.search ('\\\\document', str[:200])
texinfo = re.search ('@node|@setfilename', str[:200])
- if (texinfo and latex) or not (texinfo or latex):
+
+ f = ''
+ g = None
+
+ if texinfo and latex == None:
+ f = 'texi'
+ elif latex and texinfo == None:
+ f = 'latex'
+ else:
error("error: can't determine format, please specify")
- if texinfo:
- __main__.format = 'texi'
+ __main__.format = f
+
+ if __main__.paperguru == None:
+ if __main__.format == 'texi':
+ g = TexiPaper()
else:
- __main__.format = 'latex'
- if __main__.format == 'texi':
- __main__.paperguru = TexiPaper()
- else:
- __main__.paperguru = LatexPaper()
+ g = LatexPaper()
+
+ __main__.paperguru = g
+
+
+def read_doc_file (filename):
+ """Read the input file, find verbatim chunks and do \input and \include
+ """
+ str = find_file(filename)
+ determine_format (str)
+
chunks = [('input', str)]
+
# we have to check for verbatim before doing include,
# because we don't want to include files that are mentioned
# inside a verbatim environment
+++ /dev/null
-% pedal.tex
-
-% fix chord.cc::banter_str before removing these
-\def\fetdef#1#2{%
- \def#1{\hbox{\char#2}}}
-
-\fetdef\pedalasterisk{101}
-\fetdef\pedaldash{102}
-\fetdef\pedaldot{103}
-\fetdef\pedalP{104}
-\fetdef\pedald{105}
-\fetdef\pedale{106}
-
-
-\font\fetaelevenfont=feta11
-\font\fetathirteenfont=feta13
-\font\fetasixteenfont=feta16
-\font\fetatwentyfont=feta20
-\font\fetatwentythreefont=feta23
-\font\fetatwentysixfont=feta26
-
-\font\fetaelevenfontt=feta11 scaled \magstep 4
-\font\fetathirteenfontt=feta13 scaled \magstep 4
-\font\fetasixteenfontt=feta16 scaled \magstep 4
-\font\fetatwentyfontt=feta20 scaled \magstep 4
-\font\fetatwentythreefontt=feta23 scaled \magstep 4
-\font\fetatwentysixfontt=feta26 scaled \magstep 4
-
-\def\fetafont{\fetasixteenfont}
-
-\def\test{
-\hbox {
-\hbox { \pedalP\kern-0.05ex\pedale\kern -0.6ex\pedald\pedaldot}
-\kern 1ex
-\pedalasterisk
-\kern 1ex
-\hbox {\pedaldash\pedalP}
-}
-}
-
-\magnification \magstep 4
-\baselineskip 12mm
-
-\vbox{
-\fetaelevenfont \test
-\fetathirteenfont \test
-\fetasixteenfont \test
-\fetatwentyfont \test
-\fetatwentythreefont \test
-\fetatwentysixfont \test
-
-%\fetaelevenfontt \test
-%\fetathirteenfontt \test
-\fetasixteenfontt \test
-\fetatwentyfontt \test
-\fetatwentythreefontt \test
-\fetatwentysixfontt \test
-}
-
-\end
-
-%\endinput