depth = ..
NAME = documentation
-SUBDIRS=user bibliography pictures topdocs ntweb misc
+SUBDIRS=user bibliography pictures topdocs misc
STEPMAKE_TEMPLATES=documentation texinfo tex
LOCALSTEPMAKE_TEMPLATES=lilypond ly
@lilypondfile[printfilename]{dynamics-broken-hairpin.ly}
-
+@lilypondfile[printfilename]{dynamics-unbound-hairpin.ly}
@section Chord names
@lilypondfile[printfilename]{keys.ly}
+@lilypondfile[printfilename]{key-signature-scordatura.ly}
+
@section Hacks and Features
@lilypondfile[printfilename]{generic-output-property.ly}
@end example
-@subsection Is there an emacs mode?
-
-Yes. It is included with the source archive as
-@file{lilypond-mode.el} and @file{lilypond-font-lock.el}. If you have
-an RPM, it is in @file{/usr/share/doc/lilypond-X/}. You have to install
-it yourself.
-
-Add this to your ~/.emacs or ~/.emacs.el:
-@example
- (load-library "lilypond-mode.el")
- (setq auto-mode-alist
- (cons '("\\.ly$" . LilyPond-mode) auto-mode-alist))
- (add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock)))
-@end example
-
-If you have the latest LilyPond-1.3.x Debian package, LilyPond-mode
-is automatically loaded, so you need not modify your ~/.emacs file.
-
-
@subsection I downloaded the windows32 port, and it doesn't match the website!
The website is usually made from the latest snapshots. Binary releases,
@uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/,
ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/}.
+There are three options for downloading sources.
+
+@itemize
+@item if you don't have any version, then you can download
+ the entire @file{.tar.gz} file.
+
+@item if you have an unpacked source tree of a previous version, you
+may use the diffs .
+
@emph{If you upgrade by patching do remember to rerun autoconf after
applying the patch}.
-If you do not want to download the entire archive for each version, the
-safest method for upgrading is to use @file{xdelta}, see
-@uref{ftp://ftp.xcf.berkeley.edu/pub/xdelta/}.
+
+@item if you have the @code{.tar.gz} file of a previous release, you can
+use
+@uref{ftp://ftp.xcf.berkeley.edu/pub/xdelta/, xdelta}.
+ This is much safer than using normal diffs, and is the recommended way.
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.
+@file{lilypond-1.3.121} identical (up to compression dates) to the .122
+on the FTP site.
@example
xdelta patch lilypond-1.3.121-1.3.122.xd lilypond-1.3.121.tar.gz
@end example
+@end itemize
-@section Prerequisites
-
-For compilation you need:
-
-@itemize @bullet
-@item A GNU system: GNU LilyPond is known to run on these GNU systems: Linux
- (PPC, intel), FreeBSD, AIX, NeXTStep, IRIX, Digital Unix and
- Solaris.
+@section Build requirements
-@item Lots of disk space: LilyPond takes between 30 and 100 mb to
-compile if you use debugging information. If you are short on
-disk-space run configure with @code{--disable-debugging}.
+This document describes how to build LilyPond on Unix platforms. It is
+also known to run and compile on Windows NT/95/98 as well. More
+information on this topic can be found at
+@uref{http://appel.lilypond.org/lilypond/gnu-windows/, Jan's windows
+page}.
-@item
-Although we recommend to use Unix, LilyPond is known to run on Windows
-NT/95/98 as well. See Section Windows NT/95,es.
+You need the following packages to compile Lilypond.
-@item A reasonable C++ compiler: EGCS 1.1, GCC 2.95.2 or newer. Check out @uref{ftp://ftp.gnu.org/gnu/gcc/}.
+@itemize
+@item A reasonably new C++ compiler: EGCS 1.1, GCC 2.95.2 or
+newer. Check out @uref{ftp://ftp.gnu.org/gnu/gcc/, the gcc site}.
@item Python 1.5,
-Check out @uref{ftp://ftp.python.org} or
-@uref{ftp://ftp.cwi.nl/pub/python}.
+Check out @uref{http://www.python.org, the python website}.
@item GUILE 1.3.4 or newer, check out
-@uref{http://www.gnu.org/software/guile/guile.html,http://www.gnu.org/software/guile/guile.html}.
+@uref{http://www.gnu.org/software/guile/guile.html,the GUILE webpage}.
Version 1.4 is recommended for better performance.
@item GNU Make.
Check out
-@uref{ftp://ftp.gnu.org/gnu/make/,ftp://ftp.gnu.org/gnu/make/}.
+@uref{ftp://ftp.gnu.org/gnu/make/, the GNU
+make FTP directory}.
@item Flex (version 2.5.4a or newer).
-Check out @uref{ftp://ftp.gnu.org/pub/gnu/non-gnu/flex/,ftp://ftp.gnu.org/pub/gnu/non-gnu/flex/}.
+Check out @uref{http://www.gnu.org/software/flex/,the Flex webpage}.
@item Bison (version 1.25 or newer).
-Check out @uref{ftp://ftp.gnu.org/gnu/bison/,ftp://ftp.gnu.org/gnu/bison/}.
+Check out @uref{http://www.gnu.org/software/bison/,the bison webpage}
+
+@item TeX.
-@item TeX. If you want LilyPond to use kpathsea support (recommended),
-make sure you have tetex 1.0 or newer (1.0.6 is known to work). You may
-need to install a tetex-devel or tetex-dev package too.
+If you want LilyPond to use kpathsea support (recommended), make sure
+you have tetex 1.0 or newer (1.0.6 is known to work). You may need to
+install a tetex-devel or tetex-dev package too.
-@item Texinfo (version 4.0 or newer).
-Check out @uref{ftp://ftp.gnu.org/gnu/texinfo/,ftp://ftp.gnu.org/gnu/texinfo/}.
-Most documentation is in texinfo.
+@item Texinfo (version 4.0 or newer).
+The documentation of lily is written in texinfo. Check out
+@uref{ftp://ftp.gnu.org/gnu/texinfo/,the texinfo FTP directory}.
@item The geometry package for LaTeX is needed to use ly2dvi.
-Available at
-@uref{ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/supported/geometry,ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/supported/geometry}
-or at mirror site @uref{ftp://ftp.dante.de,ftp://ftp.dante.de}
+It is available at
+@uref{ftp://ftp.ctan.org/tex-archive/macros/latex/contrib/supported/geometry,the
+FTP directory for @code{geometry}}. This package is normally included
+with the @TeX{} distribution.
@item MetaPost, needed for generating PostScript fonts. Please
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.
-If you do not want to use PostScript output, edit @file{mf/GNUmakefile},
-removing the line saying @code{PFA_FILES=}
+If you don't have MetaPost and don't want to use PostScript output, then
+edit @file{mf/GNUmakefile}, removing the line saying @code{PFA_FILES=}.
@item kpathsea, a library for searching (TeX) files. @code{kpathsea} is
usually included with your installation of TeX.
@end itemize
-@section Running
+@section Running requirements
GNU LilyPond does use a lot of resources. For operation you need the
following software
@itemize @bullet
@item TeX.
-@item A PostScript printer and/or viewer (such as Ghostscript) is strongly
- recommended. Xdvi will show all embedded PostScript too if you have
- Ghostscript installed.
-@item GUILE 1.3.4, or newer. Check out @uref{http://www.gnu.org/programs/guile.html,http://www.gnu.org/software/guile/}
+@item Xdvi and ghostscript
+@item GUILE 1.3.4, or newer. Check out
+@uref{http://www.gnu.org/software/guile.html,the GUILE webpage}
@end itemize
For running LilyPond successfully you have to help TeX and MetaFont find
various files. The recommended way of doing so is adjusting the
environment variables in the start-up scripts of your shell. Appropriate
-Csh and sh scripts are left in @file{buildscripts/out/lilypond-profile}
-and @file{buildscripts/out/lilypond-login} after compilation.
-
-The empty path component represents TeX and MetaFont's default search
-paths. Scripts with the proper paths for the bourne and C-shell
-respectively are generated in @file{buildscripts/out/lilypond-profile}
-and @file{buildscripts/out/lilypond-login} during compilation.
+Csh and bourne sh scripts are left in
+@file{buildscripts/out/lilypond-profile} and
+@file{buildscripts/out/lilypond-login} after compilation.
LilyPond is a big and slow program. A fast CPU and plenty of RAM is
recommended for comfortable use.
-@section Website
-
-The website is the most convenient form to use for reading the
-documentation on-line documentation. It is made by entering
+@section Website requirements
+The documentation comes in the form of a website. You can view this
+website on the internet, but you can also build it locally. This process
+requires a successful compile of lilypond. The website is built
+by issuing
@example
make web-doc
@end example
-This does require a functioning LilyPond. The executable doesn't have
-to be installed, though.
-If you want to auto-generate Lily's website, you'll need some additional
-conversion tools.
+Building the website requires some additional tools:
@itemize @bullet
-@item xpmtoppm (from the netpbm package: the Portable Bitmap Utilities) (For Red Hat Linux
- users: it is included within the package libgr-progs).
+@item xpmtoppm (from the netpbm package: the Portable Bitmap Utilities).
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}
+@uref{ftp://ftp.x.org/contrib/utilities/netpbm-1mar1994.p1.tar.gz,the
+netpbm FTP site}
-@item pnmtopng (also in libgr-progs for Red Hat). The original is
+@item pnmtopng. 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 Red Hat 5.1 and
-5.2 contains a bug: pnmtopng is dynamically linked to the wrong
-version of libpng.
+@uref{ftp://swrinde.nde.swri.edu/pub/png/applications/pnmtopng-2.37.2.tar.gz,in
+the pnmtopng FTP site}.
@item @uref{http://www.lri.fr/~filliatr/ftp/bibtex2html/, Bibtex2html}, or
@uref{http://www.uni-koblenz.de/ag-ki/ftp/bib2html/, Bib2html}.
@section Configuring and compiling
-to install GNU LilyPond, simply type:
+to install GNU LilyPond, type:
@example
gunzip -c lilypond-x.y.z | tar xf -
cd lilypond-x.y.z
- ./configure # fill in your standard prefix with --prefix
+ ./configure # run with --help to see appropriate options
make
make install
+ sh buildscripts/clean-fonts.sh
@end example
-This will install a number of files, something close to:
-
-@example
- /usr/local/man/man1/midi2ly.1
- /usr/local/man/man1/abc2ly.1
- /usr/local/man/man1/etf2ly.1
- /usr/local/man/man1/convert-ly.1
- /usr/local/man/man1/lilypond-book.1
- /usr/local/man/man1/lilypond.1
- /usr/local/bin/lilypond
- /usr/local/bin/midi2ly
- /usr/local/bin/convert-ly
- /usr/local/bin/lilypond-book
- /usr/local/bin/abc2ly
- /usr/local/bin/pmx2ly
- /usr/local/bin/musedata2ly
- /usr/local/bin/etf2ly
- /usr/local/share/lilypond/*
- /usr/local/share/locale/@{....@}/LC_MESSAGES/lilypond.mo
-@end example
+If you are doing an upgrade, you should remove all @file{feta}
+@code{.pk} and @file{.tfm} files. A script has been provided to do the
+work for you, see @file{buildscripts/clean-fonts.sh}.
-The above assumes that you are root and have the GNU development
-tools, and your make is GNU make. If this is not the case, you can
-adjust your environment variables to your taste:
-
+If you are not root, you should choose a @code{--prefix} argument that
+points into your home directory, eg.
@example
- export CPPFLAGS="-I /home/me/my_include -DWEIRD_FOOBAR"
- ./configure
+ ./configure --prefix=$HOME/usr
@end example
-@code{CPPFLAGS} are the preprocessor flags.
+In this case, you have to insert the contents of
+@code{buildscripts/out/lilypond-login} or
+@code{buildscripts/out/lilypond-profile} into your start up scripts by
+hand.
-The configure script is Cygnus configure, and it will accept
-@code{--help}. If you are not root, you will probably have to make it
-with a different @code{--prefix} option. Our favourite location is
+
+@section Configuring for multiple platforms
+
+If you want to build multiple versions of LilyPond with different
+configuration settings, you can use the @code{--enable-config=CONF}
+option of configure. You should use @samp{make conf=CONF} to generate
+the output in @file{out-CONF}. Example: suppose I want to build with
+and without profiling. Then I'd use the following for the normal build,
@example
- ./configure --prefix=$HOME/usr
-
+ ./configure --prefix=~ --enable-checking
+ make
+ make install
@end example
-In this case, you will have to set up MFINPUTS, and TEXINPUTS accordingly.
-
-Since GNU LilyPond currently is beta, you are advised to also use
+and for the profiling version, I specify a different configuration.
@example
- --enable-debugging
- --enable-checking
-
-@end example
-
-Options to configure include:
+ ./configure --prefix=~ --enable-profiling --enable-config=prof --disable-checking
+ make conf=prof
+ make conf=prof install
-@table @samp
-@item @code{--enable-printing}
- Enable debugging print routines (lilypond @code{-D} option)
-@item @code{--enable-optimise}
- Set maximum optimisation: compile with @code{-O2}. This can be
-unreliable on some compiler/platform combinations (eg, DEC Alpha and PPC)
-@item @code{--enable-profiling}
- Compile with support for profiling.
-@item @code{--enable-config=CONF}
- Output to different configuration files. Enables different binary
- builds alongside eachother, eg, multi-configuration (debugging,
- profiling), or multi-platform builds. Use `make conf=CONF' to
- build for a specific configuration.
-@end table
+@end example
-All options are documented in the @file{configure} help
-The option @code{--enable-optimise} is recommended for Real Life usage.
-If you do
-@example
- make all
-
-@end example
-everything will be compiled, but nothing will be installed. The
-resulting binaries can be found in the subdirectories @file{out/} (which
-contain all files generated during compilation).
@section Emacs mode
-
An emacs mode for LilyPond is included with the source archive as
@file{lilypond-mode.el} and @file{lilypond-font-lock.el}. If you have
an RPM, it is in @file{/usr/share/doc/lilypond-X/}. You have to install
(add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock)))
@end example
-If you have the latest LilyPond-1.3.x Debian package, LilyPond-mode
-is automatically loaded, so you need not modify your ~/.emacs file.
-
-
-@section Configuring for multiple platforms
-
-If you want to build multiple versions of LilyPond with different
-configuration settings, you can use the @code{--enable-config=CONF}
-option. You should use @samp{make conf=CONF} to generate the output in
-@file{out-CONF}. Example: suppose I want to build with and without
-profiling. Then I'd use the following for the normal build,
-
-@example
-
- ./configure --prefix=~ --disable-optimise --enable-checking
- make
- make install
-
-@end example
-
-and for the profiling version, I specify a different configuration.
-
-@example
-
- ./configure --prefix=~ --enable-profiling --enable-config=prof --enable-optimise --disable-checking
- make conf=prof
- make conf=prof install
-
-@end example
-
-
-@section Installing
-
-if you have done a successful @code{make}, then a simple
-
-@example
-
- make install
-
-@end example
-
-should do the trick.
-
-If you are doing an upgrade, please remember to remove obsolete
-@file{.pk} and @file{.tfm} files of the fonts. A script has been
-provided to do the work for you, see @file{bin/clean-fonts.sh}.
+If you have the latest LilyPond-1.3.x Debian package, LilyPond-mode is
+automatically loaded, so you need not modify your @code{~/.emacs} file.
@section Red Hat Linux
-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.
+Red Hat 7.0 i386 RPMS are available from
+@uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/RedHat/}.
-You can make the rpm by issuing
+You can also compile them yourself. A spec file is in
+@file{make/out/lilypond.spec}. This file is distributed along with the
+sources. You can make the rpm by issuing
@example
rpm -tb lilypond-x.y.z.tar.gz
@end example
-Precompiled Red Hat 7.0 i386 RPMS are available from
-@uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/RedHat/}.
+For running on a Red Hat system you need these packages: guile, tetex,
+tetex-dvips, libstdc++, python, ghostscript.
-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 libstdc++-devel
-@item guile-devel
-@item flex
-@item bison
-@item texinfo
-@item tetex-devel
-@end itemize
+For compilation on a Red Hat system you need these packages, in addition
+to the those needed for running: glibc-devel, gcc-c++, libstdc++-devel,
+guile-devel, flex, bison, texinfo, tetex-devel, groff, libgr-progs.
@section SuSE
Install @code{tetex}, @code{te_mpost}, @code{te_kpath}.
+@section Mandrake
+
+[TODO]
+
@section Debian GNU/Linux
A Debian package is also available. You may install it easily by using
@end example
-@section Windows NT/95
-
-Separate instructions on building for W32 are available; See the files
-in @file{Documentation/ntweb/}, included with the sources.
@section Problems
For help and questions use @email{help-gnu-music@@gnu.org} and
@email{gnu-music-discuss@@gnu.org}. Please consult the faq before
-mailing your problems.
-
-If you find bugs, please send bug reports to
+mailing your problems. If you find bugs, please send bug reports to
@email{bug-gnu-music@@gnu.org}.
-Bugs that are LilyPond's fault are listed in our TODO list on the
-web, or demonstrated in @file{input/bugs/}.
-
-Bugs that are not LilyPond's fault are documented here.
-
-
-@unnumbered LinuxPPC Bugs:
-
-@itemize @bullet
-@item egcs-1.1.2-12c (stock LinuxPPC R5) has a serious bug, upgrade to
-fixed in egcs-1.1.2-12f or gcc-2.95-0a, @uref{ftp://dev.linuxppc.org/users/fsirl/R5/RPMS/ppc/}
-
-@item egcs-1.0.2 (LinuxPPC R4):
-all compiling with @code{-O2} is suspect, in particular guile-1.3, and
-Lily herself will break.
-@end itemize
-
-
-
-@unnumbered Linux-i386
-
-@itemize @bullet
-@item SuSE6.2 and similar platforms (glibc 2.1, libstdc++ 2.9.0)
-
-Lily will crash during parsing (which suggests a C++ library
-incompatibility). Precise cause, precise platform description or
-solution are not known.
-
-Note that this only happens on some computers with the said platform.
-
-@item libg++ 2.7
-
-LilyPond occasionally crashes while parsing the initialisation files.
-This is a very obscure bug, and usually entering the commandline
-differently "fixes" it.
-
-@example
- lilypond input.ly
-@end example
-
-and
-@example
- lilypond -I. ./input.ly
-@end example
-makes a difference
-
-Typical stacktrace:
-@example
- SIGSEGV
- __libc_malloc (bytes=16384)
- ?? ()
- yyFlexLexer::yy_create_buffer ()
- Includable_lexer::new_input (this=0x8209a00, s=@{strh_ = @{
-@end example
-
-This behaviour has been observed with machines that have old libg++
-versions (LinuxPPC feb '98, Red Hat 4.x).
-@end itemize
-
-
+Bugs that are not fault of LilyPond are documented here.
@unnumbered Solaris:
@section Requirements
For the compilation and running of LilyPond you need some additional
-packages. Please refer to the installation instructions.
+packages. Please refer to the installation instructions in
+@file{INSTALL.txt}.
NOTE: If you downloaded a binary (.rpm or a W95/NT .zip file),
you don't have to compile LilyPond.
@section Documentation
-The real documentation is the directory Documentation/
-
-If you want to read the documentation online, these are options:
+The documentation is available online at
+@uref{http://www.cs.uu.nl/~hanwen/lilypond/index.html}. You can also
+build it locally. This does require a working LilyPond binary. The
+following formats are supported:
@itemize @bullet
-@item use HTML. Refer to INSTALL.txt for information
+@item HTML. Refer to INSTALL.txt for information
on how to make the HTML documentation.
-@item use HTML. Point your browser to
-@uref{http://www.cs.uu.nl/~hanwen/lilypond/index.html}.
-@item use @file{.dvi}, for the tutorial and reference manual. Do
-
+@item @file{.dvi}, for the tutorial and reference manual. Do
@example
- make -C Documentation/user/ dvi
-@end example
-You need a working LilyPond binary to create the DVI and HTML sources.
+ make -C Documentation/user/ dvi
-@item use ASCII. Do
-using @example
- make doc
@end example
+The printable documentation is left in @file{Documentation/user/out/}.
+
+@item paper. Create the .dvi documentation, and print it with dvips.
@end itemize
@section Comments
-LilyPond is a long way from finished and polished. We do appreciate
-criticism, comments, bugreports, patches, etc., but please,
-@example
+LilyPond is a long way from finished and polished, so we please send
+your criticism, comments, bugreports, patches, etc., to the mailing
+list. and @emph{not} to us personally.
- Please send your e-mail to one of the MAILING LISTS
-
-@end example
-
-and @emph{not} to us personally. We have the following mailing lists:
+We have the following mailing lists:
@itemize @bullet
@item @uref{http://mail.gnu.org/mailman/listinfo/info-gnu-music,info-gnu-music@@gnu.org}
is a low-volume list for information on the GNU Music project.
This list is moderated; ask
@email{drl@@gnu.org, David R. Linn} or
- @email{hanwen@@cs.uu.nl, Han-Wen} to send announcements for this list.
+ @email{hanwen@@cs.uu.nl, Han-Wen} to send announcements for this
+list.
+@item
+@uref{http://mail.gnu.org/mailman/listinfo/gnu-music-discuss,gnu-music-discuss@@gnu.org}
+ For general discussions concerning LilyPond.
+
@item @uref{http://mail.gnu.org/mailman/listinfo/help-gnu-music,help-gnu-music@@gnu.org}
For help with using LilyPond.
@item @uref{http://mail.gnu.org/mailman/listinfo/bug-gnu-music,bug-gnu-music@@gnu.org}
source package, since it might contain more documentation
@uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/}
-If you decide to build LilyPond from source, please read the INSTALL.txt
-document first, especially the Windows NT/95 section.
-
@section Caveats
If you have installed a previous version, be sure to remove old font
-\input texinfo @c -*-texinfo-*-
+i\input texinfo @c -*-texinfo-*-
@setfilename index.info
@settitle LilyPond homepage
<img src="Documentation/pictures/out-www/lelie-logo.png" alt="[logo]">
@end html
-@c @unnumberedsec LilyPond -- The GNU Project Music Typesetter
-
-@c something breaks on 3.12 f
@unnumberedsec What is LilyPond?
+@c also use keywords: music notation software
LilyPond is a music typesetter. It produces beautiful sheet music
using a high level description file as input. It excels at typesetting
classical music, but you can also print pop-songs. With LilyPond we
editor to enter it, you can put it in mail or embed it in an article like
this:
-@quotation
+
@lilypond[fragment,verbatim]
\relative c'' { \key c \minor; r8 c16 b c8 g as c16 b c8 d | g,4 }
@end lilypond
-@end quotation
The output looks very good: the font and the layout algorithms were
inspired by engraved music, so you can expect that same clear and
elegant look from your LilyPond output. And if you don't like the
looks, you can tweak almost everything.
-The program also has limited MIDI functionality: you can write MIDI files with
-lilypond, and we have a simple MIDI to lilypond conversion tool,
-@file{midi2ly}. Conversion tools for PMX, MUP, ABC, Finale and Musedata are
-also included.
+The program also has limited MIDI functionality: you can write MIDI
+files with lilypond. You can also import files in PMX, MUP, MIDI, ABC,
+Finale and Musedata format.
LilyPond is free software. It is licensed under GNU General Public
License, so you can use, modify and redistribute the program with
AC_HAVE_HEADERS(assert.h sys/stat.h)
AC_HEADER_STAT
-if test "$optimise_b" = yes; then
- DEFINES="$DEFINES -DSTRING_UTILS_INLINED"
- AC_DEFINE(STRINGS_UTILS_INLINED)
-fi
+DEFINES="$DEFINES -DSTRING_UTILS_INLINED"
+AC_DEFINE(STRINGS_UTILS_INLINED)
AC_STEPMAKE_CXX
AC_STEPMAKE_GXX
AC_STEPMAKE_CXXTEMPLATE
AC_STEPMAKE_LEXYACC
AC_STEPMAKE_LIB
-# AC_STEPMAKE_LIBTOOL
AC_STEPMAKE_LOCALE
AC_STEPMAKE_GETTEXT
AC_STEPMAKE_MSGFMT
#endif
#include "file-path.hh"
-#include "flower-debug.hh"
+
#ifndef PATHSEP
#define PATHSEP ':'
String
File_path::find (String nm) const
{
- DEBUG_OUT << "looking for" << nm << ": ";
if (!nm.length_i () || (nm == "-") )
return nm;
for (int i=0; i < size (); i++)
path += nm;
- DEBUG_OUT << path << "? ";
#if 0
/*
FILE *f = fopen (path.ch_C (), "r"); // ugh!
if (f)
{
- DEBUG_OUT << "found\n";
fclose (f);
return path;
}
}
- DEBUG_OUT << '\n';
return "";
}
return ((1.0 - x) * Real (elem (LEFT)) + (x + 1.0) * Real (elem (RIGHT))) * 0.5;
}
String str () const;
- void print () const;
+
bool elem_b (T r);
void negate () {
T r = -elem (LEFT);
#include <math.h>
#include "interval.hh"
#include "string.hh"
-#include "flower-debug.hh"
-template<class T>
-void
-Interval_t<T>::print () const
-{
- if (flower_dstream)
- *flower_dstream << str ();
-}
template<class T>
int
depth = ..
-SUBDIRS=bugs tricks test regression tutorial no-notation ascii-art
+SUBDIRS=bugs test regression tutorial no-notation ascii-art
examples=trip star-spangled-banner paddy scarlatti-test
flexamples=
\consists "Output_property_engraver";
Generic_property_list = #generic-voice-properties
\consists "Property_engraver";
- DynamicsMinimumVerticalExtent = #(cons -3 -3)
+ MinimumVerticalExtent = #(cons -3 -3)
VerticalAlignment \override #'threshold = #'(9 . 9)
startSustain = #"Ped."
--- /dev/null
+
+\header {
+texidoc = "Crescendi may start off-notes. In that case, they should not collapse into flat lines.";
+}
+
+\score { \notes { \context Voice {
+ < f''1 { s4 s4 \< \! s4 \> \! s4 } >
+}}
+
+\paper { linewidth = -1. ;}
+}
--- /dev/null
+
+\header { texidoc = "Key signatures can be set per pitch
+individually. This can be done bby setting @code{Staff.keySignature}
+directly.";
+
+}
+\score { \notes
+\relative c'
+\context Staff {
+ \property Staff.keySignature = #'(((1 . 2) . 1) ((0 . 3) . -1))
+ f8 a c e
+ \property Staff.keySignature = #'(((1 . 2) . -1) ((0 . 4) . 2))
+ e a, g a
+}
+}
--- /dev/null
+\header {
+texidoc= "Using make-music, you can add
+various stuff to notes. Here is an example
+how to add an extra fingering.
+
+In general, first do a display of the music you want ot
+create, then write a function that will build the structure for you.";
+}
+
+#(define (make-script x)
+ (let* ( (m (ly-make-music "Text_script_req"))
+ )
+
+ (ly-set-mus-property m 'text-type 'finger)
+ (ly-set-mus-property m 'text x)
+ m
+ ))
+
+#(define (add-script m x)
+ (if (equal? (ly-music-name m) "Request_chord")
+ (ly-set-mus-property m 'elements
+ (cons (make-script x) (ly-get-mus-property m 'elements)))
+
+ (let* ( (es (ly-get-mus-property m 'elements))
+ (e (ly-get-mus-property m 'element)) )
+ (map (lambda (y) (add-script y x)) es)
+ (if (music? e)
+ (add-script e x))
+ )
+ )
+ m
+)
+
+\score { \apply #(lambda (x) (add-script x "6") (display x) x ) \notes { c4-3 } }
+
--- /dev/null
+
+
+fragment = \notes {
+ f'32 g a b b a g f
+
+ \property Voice.autoBeamSettings
+ \set #'(end * * * *) = #(make-moment 1 4)
+ f32 g a b b a g f
+
+ f32 g a
+ \property Voice.stemRightBeamCount = #1 b
+ \property Voice.stemLeftBeamCount = #1 b
+ a g f
+}
+
+\paper { linewidth = -1.; }
+
+\score {
+ \notes\relative c \fragment
+ \paper { }
+}
--- /dev/null
+
+\header{
+texidoc="
+There are several ways to calculate the direction of a beam
+
+@table @samp
+@item majority
+number count of up or down notes
+@item mean
+mean centre distance of all notes
+@item median
+mean centre distance weighted per note
+@end table
+
+We should see:
+
+ up down down
+
+ up up down
+";
+}
+
+\score {
+ \notes \relative c'' {
+ % the default
+ %\property Voice.Beam \set #'dir-function = #beam-dir-majority
+ [d8 a]
+ \property Voice.Beam \set #'dir-function = #beam-dir-mean
+ [d a]
+ \property Voice.Beam \set #'dir-function = #beam-dir-median
+ [d a]
+
+ \property Voice.Beam \set #'dir-function = #beam-dir-majority
+ \time 3/8;
+ [d8 a a]
+ \property Voice.Beam \set #'dir-function = #beam-dir-mean
+ [d a a]
+ \property Voice.Beam \set #'dir-function = #beam-dir-median
+ [d a a]
+ }
+}
--- /dev/null
+
+
+fragment = \notes {
+ [b''8 b]
+ \property Voice.Beam \set #'default-neutral-direction = #-1
+ [b b]
+}
+
+\paper { linewidth = -1.; }
+
+\score {
+ \notes\relative c \fragment
+ \paper { }
+}
--- /dev/null
+
+
+fragment = \notes {
+ \property Voice.Beam \set #'staff-position = #2
+ \property Voice.Beam \set #'height = #-2
+ [c'8 c]
+}
+
+\paper { linewidth = -1.; }
+
+\score {
+ \notes\relative c \fragment
+ \paper { }
+}
--- /dev/null
+
+\header{
+texidoc="
+Beams over rests.
+";
+}
+
+\score{
+ \context Staff=one \notes\relative c''{
+ r4 [r8 g a]
+ [bes8 r16 f g a]
+ [bes8 r16 \property Voice.stemLeftBeamCount = #1 f g a]
+ }
+
+ \paper{
+ linewidth =-1;
+ }
+}
-\score {
- \context Voice \notes\relative c {
- [c''16 b] [a b]
-
- }
+
+fragment = \notes {
+ \property Voice.Beam \set #'direction = #1
+ \property Voice.Beam \set #'height-hs = #0
+ [a''8 e' d c]
+}
+
+\paper { linewidth = -1.; }
+
+\score {
+ \notes\relative c \fragment
\paper { }
- \midi { }
}
--- /dev/null
+\header {
+
+texidoc = "overriding the molecule callback can also be used to draw a
+ box around arbitrary grobs.
+
+ TODO: check whether the corners are really correct.
+
+ ";
+}
+#(define (box-molecule xext yext)
+ (ly-make-molecule
+ (list 'filledbox (- (car xext)) (cdr xext)
+ (- (car yext)) (cdr yext))
+ xext yext)
+)
+
+#(define (widen-interval iv amount)
+ (cons (- (car iv) amount)
+ (+ (cdr iv) amount))
+)
+
+#(define (make-molecule-boxer callback)
+ (define (molecule-boxer grob)
+ (let*
+ (
+ (mol (callback grob))
+ (box-padding 0.1)
+ (x-ext (widen-interval (ly-get-molecule-extent mol 0) box-padding))
+ (y-ext (widen-interval (ly-get-molecule-extent mol 1) box-padding))
+ (rule-thick 0.1)
+ (x-rule (box-molecule (widen-interval x-ext rule-thick)
+ (cons 0 rule-thick)))
+ (y-rule (box-molecule (cons 0 rule-thick) y-ext))
+ )
+
+ (set! mol (ly-combine-molecule-at-edge mol 0 1 y-rule (* 0.5 box-padding)))
+ (set! mol (ly-combine-molecule-at-edge mol 0 -1 y-rule (* 0.5 box-padding)))
+ (set! mol (ly-combine-molecule-at-edge mol 1 1 x-rule 0.0))
+ (set! mol (ly-combine-molecule-at-edge mol 1 -1 x-rule 0.0))
+
+ mol
+ ))
+ molecule-boxer
+ )
+
+
+ \score { \notes {
+
+ \property Voice.TextScript \override #'molecule-callback =
+ #(make-molecule-boxer Text_item::brew_molecule)
+
+ c'4^"foo"
+
+\property Voice.Stem \override #'molecule-callback =
+ #(make-molecule-boxer Stem::brew_molecule)
+
+ c''8
+ }}
--- /dev/null
+
+
+fragment = \notes {
+ \context Voice {
+ \property Voice.crescendoText = "cresc."
+ \property Voice.crescendoSpanner = #'dashed-line
+ a''2\mf\< a a \!a
+ }
+}
+
+\paper { linewidth = -1.; }
+
+\score {
+ \notes\relative c \fragment
+ \paper { }
+}
--- /dev/null
+
+\header{
+texidoc="
+Slurs can be forced to always attach to note heads.
+";
+}
+
+fragment = \notes {
+ \property Voice.Slur \set #'direction = #1
+ \property Voice.Slur \set #'attachment = #'(head . head)
+ g''16()g()g()g()d'()d()d()d
+}
+
+\paper { linewidth = -1.; }
+
+\score {
+ \notes\relative c \fragment
+ \paper { }
+}
--- /dev/null
+% tests drum notation and midi-drums.
+% see ly/drumpitch.ly for list of instruments and paper-kits.
+% scm/midi.scm for list of midi-drumkits.
+
+\include "drumpitch.ly";
+
+\version "1.3.142"
+
+drh = \notes { cymc4.^"crash" hhc16^"h.h." hh \repeat "unfold" 5 {hhc8 hho hhc8 hh16 hh} hhc4 r4 r2 }
+drl = \notes {\repeat "unfold" 3 {bd4 sn8 bd bd4 <bd ss>} bd8 tommh tommh bd toml toml bd tomfh16 tomfh }
+timb = \notes \repeat "unfold" 2 {timh4 ssh timl8 ssh r timh r4 ssh8 timl r4 cb8 cb}
+
+\score { \repeat "volta" 2
+ <
+ \context TwoLineStaff=timbst \notes <
+ \property Staff.instrument="timbales"
+ \clef "percussion";
+ \apply #(drums->paper 'timbales) \timb
+ >
+ \context Staff=drumst \notes <
+ \property Staff.instrument="drums"
+ \clef "percussion";
+ \apply #(drums->paper 'drums) <
+ \context Voice=voa {\stemUp \drh }
+ \context Voice=vob {\stemDown \drl }
+ >
+ >
+ >
+ \paper {
+ \translator {
+ \StaffContext
+ \consists Instrument_name_engraver;
+ Script \override #'padding = #0.5
+ }
+ \translator {
+ \StaffContext
+ \name TwoLineStaff;
+ \alias Staff;
+ \consists Instrument_name_engraver;
+ StaffSymbol \override #'line-count = #2;
+ BarLine \override #'bar-size = #2;
+ }
+ \translator {
+ \ScoreContext
+ \accepts TwoLineStaff;
+ }
+ }
+}
+
+\score { \repeat "unfold" 2
+ \context Staff \notes <
+ \property Staff.instrument="drums"
+ \timb
+ \drh
+ \drl
+ >
+ \midi{ \tempo 4=120; }
+}
+
--- /dev/null
+\header {
+ texidoc = "By inserting the @TeX{} command \embeddedps, you can
+insert postscript directly into the output.
+
+TODO: make molecule-callback to do this.
+ ";
+}
+
+\score {
+ \notes \relative c'' {
+ a-#"\\embeddedps{3 4 moveto 5 3 rlineto stroke}"
+ -#"\\embeddedps{ [ 0 1 ] 0 setdash 3 5 moveto 5 -3 rlineto stroke}"
+ b-#"\\embeddedps{3 4 moveto 0 0 1 2 8 4 20 3.5 rcurveto stroke}"
+ s2
+ a'1
+ }
+ \paper { linewidth = 70 * \staffspace; }
+}
--- /dev/null
+
+
+fragment = \notes {
+ a''^"3 $\\times$ \\`a deux"
+}
+
+\paper { linewidth = -1.; }
+
+\score {
+ \notes\relative c \fragment
+ \paper { }
+}
linewidth = 15.0\mm;
\translator {
\StaffContext
- StaffMinimumVerticalExtent = #(cons 0 0)
+ MinimumVerticalExtent = #(cons 0 0)
}
}
}
--- /dev/null
+
+\header{
+texidoc="
+Theads can be traced automagically when they switch staffs by setting
+property @code{followVoice}.
+";
+}
+
+\version "1.3.139"
+% followVoice: connect note heads with line when thread switches staff
+
+fragment = \notes {
+ \context PianoStaff <
+ \property PianoStaff.followVoice = ##t
+ \property Voice.VoiceFollower \set #'type = #'dashed-line
+ \context Staff \context Voice {
+ c'1
+ \translator Staff=two
+ b2 a
+ }
+ \context Staff=two {\clef bass; \skip 1*2;}
+ >
+}
+
+\paper { linewidth = -1.; }
+
+\score {
+ \notes\relative c \fragment
+ \paper { }
+}
--- /dev/null
+
+improOn = \notes {\translator Voice = impro }
+improOff = \notes {\translator SquashVoice = melo }
+
+global = \notes { s1*3 \bar "|."; }
+
+\score {
+ <
+ \context ChordNames \chords {e8:m7*7 a2.:m7 bes4:m7 b1:m7 e8:m }
+ \context Staff \notes <
+ \context SquashVoice = impro { \global }
+ \context Voice = melo \transpose c'' {
+ e8 e g a a16()bes()a8 g \improOn e8
+ ~e2~e8 f4 fis8
+ ~fis2 \improOff a16()bes a8 g e
+ }
+ >
+ >
+ \paper {
+ \translator {
+ \VoiceContext
+ \name SquashVoice;
+ \alias Voice;
+ \consists Pitch_squash_engraver;
+ \consists Local_key_engraver;
+ squashedPosition = 6;
+ NoteHead \override #'style = #'slash
+ Accidentals \override #'transparent = ##t
+ }
+ \translator {
+ \VoiceContext
+ \alias SquashVoice;
+ \consists Local_key_engraver;
+ }
+ \translator {
+ \ScoreContext
+ \accepts SquashVoice;
+ }
+ \translator {
+ \StaffContext
+ \remove Local_key_engraver;
+ \accepts SquashVoice;
+ }
+ linewidth = -1;
+ }
+}
--- /dev/null
+
+
+
+% Test scm markup text and kerning
+
+% Warning
+%
+% This is not a feature, it is a hack. If you change anything,
+% it will probably break (that's because scm markup text is a
+% bit broken and needs fixing). Chances are, it's already
+% broken by the time you read this. Don't complain.
+%
+% FIXME: put in an item, and typeset by an engraver.
+
+#(define note '(rows (music "noteheads-2" ((kern . -0.1) "flags-stem"))))
+#(define eight-note `(rows ,note ((kern . -0.1) (music ((raise . 3.5) "flags-u3")))))
+#(define dotted-eight-note `(rows ,eight-note (music "dots-dot")))
+
+\score {
+ \notes\relative c'' {
+ a1^#`((rows (font-relative-size . -1)) ,dotted-eight-note " = 64")
+ }
+ \paper {
+ linewidth = -1.;
+ \translator{
+ \ScoreContext
+ TextScript \override #'font-shape = #'upright
+ }
+ }
+}
--- /dev/null
+
+\score {
+ \context Staff \notes <
+ \context Voice=i {
+ \property Voice.MultiMeasureRest \override #'staff-position = #3
+ R1
+ }
+ \context Voice=ii {
+ \property Voice.MultiMeasureRest \override #'staff-position = #-3
+ R1
+ }
+ >
+ \paper {
+ \translator {
+ \StaffContext
+ \remove Multi_measure_rest_engraver;
+ \remove Bar_engraver;
+ }
+ \translator {
+ \VoiceContext
+ \consists Multi_measure_rest_engraver;
+ \consists Bar_engraver;
+ }
+ }
+}
--- /dev/null
+
+
+fragment = \notes {
+ \outputproperty #(make-type-checker 'note-head-interface)
+ #'extra-offset = #'(2 . 3)
+ c''2 c
+}
+
+\paper { linewidth = -1.; }
+
+\score {
+ \notes\relative c \fragment
+ \paper { }
+}
--- /dev/null
+
+#(define (make-text-checker text)
+ (lambda (grob) (equal? text (ly-get-grob-property grob 'text))))
+
+\score {
+ \notes\relative c''' {
+ \property Voice.Stem \set #'direction = #1
+ \outputproperty #(make-text-checker "m.d.")
+ #'extra-offset = #'(-3.5 . -4.5)
+ a^2^"m.d."
+ }
+ \paper { linewidth = -1.; }
+}
--- /dev/null
+
+\score {
+ \notes \relative c'' {
+ a b c d
+ d c b a
+ }
+ \paper {
+ linewidth = -1.;
+ \translator {
+ \StaffContext
+ whichBar = #""
+ \remove "Time_signature_engraver";
+ }
+ }
+}
+
--- /dev/null
+
+\score {
+ \notes { c4 c4 c8 c8 }
+ \paper {
+ linewidth = -1.;
+ \translator {
+ \StaffContext
+ \remove Staff_symbol_engraver;
+ \consists Pitch_squash_engraver;
+ \remove Clef_engraver;
+ }
+ }
+}
+
--- /dev/null
+
+
+fragment = \notes {
+ a'''' b c a
+ \property Voice.TextSpanner \set #'type = #'dotted-line
+ \property Voice.TextSpanner \set #'edge-height = #'(0 . 1.5)
+ \property Voice.TextSpanner \set #'edge-text = #'("8va " . "")
+ \property Staff.centralCPosition = #-13
+ a\spanrequest \start "text" b c a \spanrequest \stop "text"
+}
+
+\paper { linewidth = -1.; }
+
+\score {
+ \notes\relative c \fragment
+ \paper { }
+}
--- /dev/null
+
+\header{
+texidoc="
+In orchestral scores and hymns, voices are traditionally combined onto
+one staff. LilyPond has a part combiner, that combines or separates two
+voices according to actual rhythm and pitch. User-defined texts such as
+``solo'' and ``@`a2'' are typeset automagically, as appropriate.
+";
+}
+
+\score{
+ \context Staff = flauti <
+ \time 4/4;
+ \context Voice=one \partcombine Voice
+ \context Thread=one \notes\relative c'' {
+ c4 d e f | b,4 d c d | r2 e4 f | c4 d e f |
+ c4 r e f | c4 r e f | c4 r a r | a a r a |
+ a2 \property Voice.soloADue = ##f a |
+ }
+ \context Thread=two \notes\relative c'' {
+ g4 b d f | r2 c4 d | a c c d | a4. b8 c4 d
+ c r e r | r2 s2 | a,4 r a r | a r r a |
+ a2 \property Voice.soloADue = ##f a |
+ }
+ >
+ \paper{
+ linewidth = 80 * \staffspace;
+ \translator{
+ \ThreadContext
+ \consists Rest_engraver;
+ }
+ \translator{
+ \VoiceContext
+ \remove Rest_engraver;
+ }
+ }
+}
+
--- /dev/null
+
+%{ When entering half music (I.e. for students to complete by hand)
+ you need the spacing to correspond to the timing - all measures same length, etc.
+ This thing implements it by adding invisible staff with lots of fast notes.
+%}
+
+\include "paper16.ly"
+
+
+quickmeasure = \notes {[\repeat unfold 16 c''16]}
+mel = \notes \relative c' {c16 d16 e8 a4 g2 e8 d c2. g'1 e4 d c2}
+
+\score {
+\context PianoStaff \notes <
+ \context Staff = v <
+ \clef G;
+ \context Voice=melo {\mel}
+ \context Voice=invisible {
+ \property Voice.NoteHead \override #'transparent = ##t
+ \property Voice.Stem \override #'transparent = ##t
+ \property Voice.Beam \override #'transparent = ##t
+ \repeat unfold 4 \quickmeasure
+ }
+ >
+ \context Staff = empty \notes {\clef F; s1*4}
+>
+\paper {}
+}
--- /dev/null
+
+\header {
+texidoc="
+Simple customised music apply.
+";
+}
+
+music = \notes { c'4 d'4( e'4 f'4 }
+
+#(define (reverse-music music)
+ (let* ((elements (ly-get-mus-property music 'elements))
+ (reversed (reverse elements))
+ (span-dir (ly-get-mus-property music 'span-direction)))
+
+ (ly-set-mus-property music 'elements reversed)
+
+ (if (dir? span-dir)
+ (ly-set-mus-property music 'span-direction (- span-dir)))
+
+ (map reverse-music reversed)
+
+ music))
+
+\score {
+ \context Voice {
+ \music
+ \apply #reverse-music \music
+ }
+ \paper { linewidth = -1.; }
+}
+
--- /dev/null
+
+\header{
+texidoc="
+In some cases, you may want to set slur attachments by hand.
+";
+}
+
+
+fragment = \notes {
+ \property Voice.Stem \set #'direction = #1
+ \property Voice.Slur \set #'direction = #1
+ d'32( d'4 )d8..
+ \property Voice.Slur \set #'attachment = #'(stem . stem)
+ d,32( d'4 )d8..
+}
+
+\paper { linewidth = -1.; }
+
+\score {
+ \notes\relative c \fragment
+ \paper { }
+}
--- /dev/null
+
+
+fragment = \notes {
+ \property Voice.Slur \set #'direction = #1
+ \property Voice.Stem \set #'length = #5.5
+ g''8(g)g4
+ g4(g8)g
+ \property Voice.Slur \set #'attachment = #'(stem . stem)
+ g8(g)g4
+ g4(g8)g
+}
+
+\paper { linewidth = -1.; }
+
+\score {
+ \notes\relative c \fragment
+ \paper { }
+}
--- /dev/null
+
+\header {
+texidoc="You can get ugly slurs, if you want.
+";
+}
+
+baseWalk = \notes \relative c {
+ d,8( a' d f a d f d a f d )a
+}
+
+\score {
+ \notes \context PianoStaff <
+ \time 6/4;
+ \context Staff=up { s1 * 6/4 }
+ \context Staff=down <
+ \clef bass;
+ \autochange Staff \context Voice \baseWalk
+ >
+ >
+ \paper {
+ linewidth = -1.;
+ \translator {
+ \VoiceContext
+ Slur \override #'beautiful = #5.0
+ Slur \override #'direction = #1
+ Stem \override #'direction = #-1
+ autoBeamSettings \override #'(end * * * *)
+ = #(make-moment 1 2)
+ }
+ \translator {
+ \PianoStaffContext
+ VerticalAlignment \override #'threshold = #'(5 . 5)
+ }
+ }
+}
+
--- /dev/null
+
+\header {
+texidoc="
+@example
+ Here's a copy of my feature request :
+@quotation
+ Your task, if you accept it is to implement a \smarttranspose
+ command> that would translate such oddities into more natural
+ notations. Double accidentals should be removed, as well as E-sharp
+ (-> F), bC (-> B), bF (-> E), B-sharp (-> C).
+@end quotation
+
+You mean like this. (Sorry 'bout the nuked indentation.)
+@end example
+";
+}
+
+#(define (unhair-pitch p)
+ (let* ((o (pitch-octave p))
+ (a (pitch-alteration p))
+ (n (pitch-notename p)))
+
+ (cond
+ ((and (> a 0) (or (eq? n 6) (eq? n 2)))
+ (set! a (- a 1)) (set! n (+ n 1)))
+ ((and (< a 0) (or (eq? n 0) (eq? n 3)))
+ (set! a (+ a 1)) (set! n (- n 1))))
+
+ (cond
+ ((eq? a 2) (set! a 0) (set! n (+ n 1)))
+ ((eq? a -2) (set! a 0) (set! n (- n 1))))
+
+ (if (< n 0) (begin (set! o (- o 1)) (set! n (+ n 7))))
+ (if (> n 7) (begin (set! o (+ o 1)) (set! n (- n 7))))
+
+ (make-pitch o n a)))
+
+#(define (smart-transpose music pitch)
+ (let* ((es (ly-get-mus-property music 'elements))
+ (e (ly-get-mus-property music 'element))
+ (p (ly-get-mus-property music 'pitch))
+ (body (ly-get-mus-property music 'body))
+ (alts (ly-get-mus-property music 'alternatives)))
+
+ (if (pair? es)
+ (ly-set-mus-property
+ music 'elements
+ (map (lambda (x) (smart-transpose x pitch)) es)))
+
+ (if (music? alts)
+ (ly-set-mus-property
+ music 'alternatives
+ (smart-transpose alts pitch)))
+
+ (if (music? body)
+ (ly-set-mus-property
+ music 'body
+ (smart-transpose body pitch)))
+
+ (if (music? e)
+ (ly-set-mus-property
+ music 'element
+ (smart-transpose e pitch)))
+
+ (if (pitch? p)
+ (begin
+ (set! p (unhair-pitch (Pitch::transpose p pitch)))
+ (ly-set-mus-property music 'pitch p)))
+
+ music))
+
+
+music = \notes \relative c' { c4 d e f g a b c }
+
+\score {
+ \notes \context Staff {
+ \transpose ais' \music
+ \apply #(lambda (x) (smart-transpose x (make-pitch 0 5 1)))
+ \music
+ }
+ \paper { linewidth = -1.; }
+}
+
--- /dev/null
+
+
+\header {
+
+ texidoc = "By splitting the grouping (Axis_group_engraver) and
+creation functionality into separate contexts, you can override
+interesting things. You can also drop the \consistsend feature.";
+
+}
+
+
+\score {
+ \notes <
+ \context StaffContainer = SA { \property StaffContainer.StaffSymbol \set
+ #'staff-space = #0.8
+ \context Staff { c4 c4 } }
+ \context StaffContainer =SB { \context Staff { d f } }
+ >
+
+\paper {
+ \translator {
+ \ScoreContext
+ \accepts StaffContainer;
+ \denies Staff;
+ }
+ \translator {
+ \type Engraver_group_engraver;
+ \consists "Axis_group_engraver";
+ \accepts "Staff";
+ \name StaffContainer;
+
+ }
+ \translator {
+ \StaffContext
+ \remove Axis_group_engraver;
+ }
+}
+}
+
--- /dev/null
+\header {
+
+texidoc = "If you specify two different key sigs at one point, a
+ warning is printed.";
+
+}
+
+\score { \notes
+\context Voice <
+ { \key cis \major; cis4 \key bes \major; bes4 }
+ { \key cis \major; fis4 \key es \major; g4 }
+>
+}
+\header { texidoc = "vertical extents may be overriden by
+VerticalExtent, VerticalExtent, VerticalExtent. These are
+normal property values, and are written itno the grob when the
+associated context finishes, so using it in \property works.
+
+ "; }
+\version "1.3.145";
\score {
\notes <
\context Staff = upper {
- \property Staff.StaffVerticalExtent = #'(-15.0 . 0.0)
+ \property Staff.VerticalExtent = #'(-15.0 . 0.0)
\clef alto;
c1 \break c1
}
\context Staff = lower {
- \property Staff.StaffVerticalExtent = #'(-0.0 . 15.0)
+ \property Staff.VerticalExtent = #'(-0.0 . 15.0)
\clef alto;
g1 \break g1
}
interscoreline = 13.0\mm;
interscorelinefill = 0;
\translator{\ScoreContext \remove "Bar_number_engraver";}
- \translator{\StaffContext StaffMinimumVerticalExtent = #'(-2.0 . 2.0)}
+ \translator{\StaffContext MinimumVerticalExtent = #'(-2.0 . 2.0)}
}
}
Axis_group_engraver::finalize ()
{
String type = daddy_grav_l ()->type_str_ ;
- SCM dims = get_property ((type + "VerticalExtent").ch_C ());
+ SCM dims = get_property ("VerticalExtent");
if (gh_pair_p (dims) && gh_number_p (gh_car (dims))
&& gh_number_p (gh_cdr (dims)))
staffline_p_->set_grob_property ("extent-Y", dims);
}
- dims = get_property ((type + "MinimumVerticalExtent").ch_C ());
+ dims = get_property ("MinimumVerticalExtent");
if (gh_pair_p (dims) && gh_number_p (gh_car (dims))
&& gh_number_p (gh_cdr (dims)))
staffline_p_->set_grob_property ("minimum-extent-Y", dims);
- dims = get_property ((type + "ExtraVerticalExtent").ch_C ());
+ dims = get_property ("ExtraVerticalExtent");
if (gh_pair_p (dims) && gh_number_p (gh_car (dims))
&& gh_number_p (gh_cdr (dims)))
staffline_p_->set_grob_property ("extra-extent-Y", dims);
*/
#include <math.h>
+
#include "config.h"
#include "warn.hh"
-
#include "libc-extension.hh"
#include "bezier.hh"
#include "polynomial.hh"
set_mus_property ("pitch-alist", newlist);
}
-Break_req::Break_req ()
+
+bool
+alist_equal_p (SCM a, SCM b)
{
+ for (SCM s = a;
+ gh_pair_p (s); s = gh_cdr (s))
+ {
+ SCM key = gh_caar (s);
+ SCM val = gh_cdar (s);
+ SCM l = scm_assoc (key, b);
+
+ if (l == SCM_BOOL_F
+ || !gh_equal_p ( gh_cdr (l), val))
+
+ return false;
+ }
+ return true;
}
+bool
+Key_change_req::do_equal_b (Request const * m )const
+{
+ Key_change_req const * kc =dynamic_cast<Key_change_req const*> (m);
+
+ if(!kc)
+ return false;
+ return alist_equal_p (get_mus_property ("pitch-alist"),
+ kc->get_mus_property ("pitch-alist"));
+}
+
+
bool
Mark_req::do_equal_b (Request const * r) const
script_p_->set_grob_property ("text",
script_req_l_->get_mus_property ("text"));
- Side_position_interface::set_direction (script_p_, LEFT);
+ Side_position_interface::set_direction (script_p_, DOWN);
if (Direction d = script_req_l_->get_direction ())
Directional_element_interface::set (line_spanner_, d);
*/
- if (!finished_line_spanner_->get_bound (RIGHT)
- && finished_line_spanner_->get_bound (LEFT))
- finished_line_spanner_->set_bound (RIGHT, finished_line_spanner_->get_bound (LEFT));
-
+ Grob * l = finished_line_spanner_->get_bound (LEFT );
+ Grob * r = finished_line_spanner_->get_bound (RIGHT);
+ if (!r && l)
+ finished_line_spanner_->set_bound (RIGHT, l);
+ else if (!l && r)
+ finished_line_spanner_->set_bound (LEFT, r);
+ else if (!r && !l)
+ {
+ /*
+ This is a isolated dynamic apparently, and does not even have
+ any interesting support item.
+ */
+ Grob * cc = unsmob_grob (get_property ("currentMusicalColumn"));
+ Item * ci = dynamic_cast<Item*>(cc);
+ finished_line_spanner_->set_bound (RIGHT, ci);
+ finished_line_spanner_->set_bound (LEFT, ci);
+ }
+
typeset_grob (finished_line_spanner_);
finished_line_spanner_ = 0;
}
class Break_req : public Request {
public:
-
- Break_req ();
protected:
VIRTUAL_COPY_CONS (Music);
};
protected:
VIRTUAL_COPY_CONS (Music);
+ bool do_equal_b (Request const * ) const;
void transpose (Pitch d);
};
#define DEBUG_HH
#include <assert.h>
-#include "dstream.hh"
+
#include "real.hh"
#include "lily-proto.hh"
-#include "flower-debug.hh"
#include "warn.hh"
void progress_indication (String);
struct Key_item
{
- static int calculate_position (Grob*,SCM pair) ;
+
static void set_interface (Grob*);
static bool has_interface (Grob*);
DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
Staff_symbol_referencer::set_interface (item_p_);
Key_item::set_interface (item_p_);
- SCM prop = get_property ("keyOctaviation");
- bool multi = to_boolean (prop);
-
- if (multi)
- item_p_->set_grob_property ("multi-octave", gh_bool2scm (multi));
announce_grob (item_p_,keyreq_l_);
}
{
if (Key_change_req *kc = dynamic_cast <Key_change_req *> (req_l))
{
- if (keyreq_l_)
- warning (_ ("FIXME: key change merge"));
+ if (keyreq_l_ && !keyreq_l_->equal_b (kc))
+ {
+ kc->origin ()->warning (_ ("Conflicting key signatures found."));
+ keyreq_l_->origin ()->warning (_ ("This was the other key definition."));
+ return false;
+ }
keyreq_l_ = kc;
read_req (keyreq_l_);
+
return true;
}
return false;
/*
FIXME: key-item should just get a list of (position, acc), and leave
the thinking to other parties.
- */
+
+ - TODO: put this in Scheme
+
+ - lots of values trivially shared (key doesn't change very
+ often). Compute those once, and use that as cache for the rest.
+
+*/
int
-Key_item::calculate_position (Grob *ki, SCM pair)
+alteration_pos (SCM what, int alter, int c0p)
{
- int p = gh_scm2int (gh_car (pair));
- int a = gh_scm2int (gh_cdr (pair));
- int c0p = gh_scm2int (ki->get_grob_property ("c0-position"));
- if (to_boolean (ki->get_grob_property ("multi-octave")))
- {
- return p + c0p;
- }
- else {
- // Find the c in the range -4 through 2
- int from_bottom_pos = c0p + 4;
- from_bottom_pos = from_bottom_pos%7;
- from_bottom_pos = (from_bottom_pos + 7)%7; // Precaution to get positive.
- int c0 = from_bottom_pos - 4;
+ if (gh_pair_p (what))
+ return gh_scm2int (gh_car (what)) * 7 + gh_scm2int (gh_cdr (what)) + c0p;
+
+ int p = gh_scm2int (what);
+
+ // Find the c in the range -4 through 2
+ int from_bottom_pos = c0p + 4;
+ from_bottom_pos = from_bottom_pos%7;
+ from_bottom_pos = (from_bottom_pos + 7)%7; // Precaution to get positive.
+ int c0 = from_bottom_pos - 4;
- if ((a<0 && ((p>FLAT_TOP_PITCH) || (p+c0>4)) && (p+c0>1))
- ||
- (a>0 && ((p>SHARP_TOP_PITCH) || (p+c0>5)) && (p+c0>2)))
- {
- p -= 7; /* Typeset below c_position */
- }
- /* Provide for the four cases in which there's a glitch
+ if ((alter <0 && ((p>FLAT_TOP_PITCH) || (p+c0>4)) && (p+c0>1))
+ ||
+ (alter >0 && ((p>SHARP_TOP_PITCH) || (p+c0>5)) && (p+c0>2)))
+ {
+ p -= 7; /* Typeset below c_position */
+ }
+ /* Provide for the four cases in which there's a glitch
it's a hack, but probably not worth
the effort of finding a nicer solution.
--dl. */
- if (c0==2 && a>0 && p==3)
- p -= 7;
- if (c0==-3 && a>0 && p==-1)
- p += 7;
- if (c0==-4 && a<0 && p==-1)
- p += 7;
- if (c0==-2 && a<0 && p==-3)
- p += 7;
+ if (c0==2 && alter >0 && p==3)
+ p -= 7;
+ if (c0==-3 && alter>0 && p==-1)
+ p += 7;
+ if (c0==-4 && alter<0 && p==-1)
+ p += 7;
+ if (c0==-2 && alter<0 && p==-3)
+ p += 7;
- return p + c0;
- }
+ return p + c0;
}
/*
{
Grob*me =unsmob_grob (smob);
-
Real inter = Staff_symbol_referencer::staff_space (me)/2.0;
SCM newas = me->get_grob_property ("new-accidentals");
SCM lists are stacks, so we work from right to left, ending with
the cancellation signature.
*/
+ int c0p = gh_scm2int (me->get_grob_property ("c0-position"));
for (SCM s = newas; gh_pair_p (s); s = gh_cdr (s))
{
- int a = gh_scm2int (gh_cdar (s));
- Molecule m = Font_interface::get_default_font (me)->find_by_name ("accidentals-" + to_str (a));
- m.translate_axis (calculate_position (me, gh_car (s)) * inter, Y_AXIS);
+ SCM what = gh_caar (s);
+ int alter = gh_scm2int (gh_cdar (s));
+ int pos = alteration_pos (what, alter, c0p);
+
+ Molecule m = Font_interface::get_default_font (me)->find_by_name ("accidentals-" + to_str (alter));
+ m.translate_axis (pos * inter, Y_AXIS);
mol.add_at_edge (X_AXIS, LEFT, m, 0);
}
if (it->break_status_dir () != RIGHT)
{
SCM old = me->get_grob_property ("old-accidentals");
+
/*
Add half a space between cancellation and key sig.
Interval y (0,0);
mol.add_at_edge (X_AXIS, LEFT, Lookup::blank (Box (x,y)),0);
+
+ Molecule natural;
+ if (gh_pair_p (old))
+ natural=Font_interface::get_default_font (me)->find_by_name ("accidentals-0");
for (; gh_pair_p (old); old = gh_cdr (old))
{
- SCM found = SCM_EOL;
-
- /*
- find correspondences in pitches
- */
- for (SCM s = newas; gh_pair_p (s); s = gh_cdr (s))
- if (gh_caar (s) == gh_caar (old))
- found = gh_car (s);
-
- if (found == SCM_EOL || gh_cdr (found) != gh_cdar (old))
+ SCM found = scm_assoc (gh_caar (old), newas);
+ if (found == SCM_BOOL_F
+ || gh_cdr (found) != gh_cdar (old))
{
- Molecule m =Font_interface::get_default_font (me)->find_by_name ("accidentals-0");
+ SCM what = gh_caar (old);
+ int alter = 0;
+ int pos = alteration_pos (what, alter, c0p);
+
+ Molecule m = natural;
+ m.translate_axis (pos* inter, Y_AXIS);
- m.translate_axis (calculate_position (me, gh_car (old)) * inter, Y_AXIS);
- mol.add_at_edge (X_AXIS, LEFT, m,0);
+ mol.add_at_edge (X_AXIS, LEFT, m, 0);
}
}
}
<version>\"[^"]*\";? { /* got the include file name */
String s (YYText ()+1);
s = s.left_str (s.index_last_i ('"'));
- DEBUG_OUT << "#version `" << s << "'\n";
+
yy_pop_state ();
if (!valid_version_b (s))
return INVALID;
<incl>\"[^"]*\";? { /* got the include file name */
String s (YYText ()+1);
s = s.left_str (s.index_last_i ('"'));
- DEBUG_OUT << "#include `" << s << "'\n";
+
new_input (s,source_global_l);
yy_pop_state ();
}
strip_trailing_white (s);
if (s.length_i () && (s[s.length_i () - 1] == ';'))
s = s.left_str (s.length_i () - 1);
- DEBUG_OUT << "#include `\\" << s << "'\n";
+
SCM sid = lookup_identifier (s);
if (gh_string_p (sid)) {
new_input (ly_scm2string (sid), source_global_l);
*yylval.string += YYText ();
}
\" {
- DEBUG_OUT << "quoted string: `" << *yylval.string << "'\n";
+
yy_pop_state ();
/* yylval is union. Must remember STRING before setting SCM*/
_ ("Brace found at end of lyric. Did you forget a space?"));
yylval.scm = ly_str02scm (s.ch_C ());
- DEBUG_OUT << "lyric : `" << s << "'\n";
+
return STRING;
}
. {
}
<<EOF>> {
- DEBUG_OUT << "<<eof>>";
+
if (! close_input ()) {
yyterminate (); // can't move this, since it actually rets a YY_NULL
Real r;
int cnv=sscanf (YYText (), "%lf", &r);
assert (cnv == 1);
- DEBUG_OUT << "REAL" << r<<'\n';
+
yylval.real = r;
return REAL;
}
}
[{}] {
- DEBUG_OUT << "parens\n";
+
return YYText ()[0];
}
[*:=] {
char c = YYText ()[0];
- DEBUG_OUT << "misc char" <<c<<"\n";
+
return c;
}
int
main (int argc, char **argv)
{
- debug_init (); // should be first (can see that; but Why?)
setup_paths ();
/* Prepare GUILE for heavy memory usage. If you have plenty memory,
#include "multi-measure-rest.hh"
#include "paper-column.hh"
#include "engraver-group-engraver.hh"
-#include "bar.hh"
+
#include "staff-symbol-referencer.hh"
#include "engraver.hh"
#include "moment.hh"
/**
The name says it all: make multi measure rests
-FIXME? The MM rest engraver must be able to see bar lines, so it won't
-work at Voice level. Not a problem in practice, but aesthetically pleasing?
-
*/
class Multi_measure_rest_engraver : public Engraver
{
Multi_measure_rest_engraver ();
protected:
- virtual void acknowledge_grob (Grob_info i);
virtual bool try_music (Music*);
virtual void process_music ();
virtual void stop_translation_timestep ();
new_req_l_ = busy_span_req_l_ = stop_req_l_ =0;
}
-void
-Multi_measure_rest_engraver::acknowledge_grob (Grob_info i)
-{
- Item * item = dynamic_cast<Item*> (i.elem_l_);
- if (item && Bar::has_interface (item))
- {
- if (mmrest_p_)
- Multi_measure_rest::add_column (mmrest_p_,item);
- if (lastrest_p_)
- Multi_measure_rest::add_column (lastrest_p_,item);
- }
-}
bool
Multi_measure_rest_engraver::try_music (Music* req_l)
= gh_scm2int (get_property ("currentBarNumber"));
}
-
+ if (gh_string_p (get_property ("whichBar")))
+ {
+ Grob *cmc = unsmob_grob (get_property( "currentCommandColumn"));
+ Item *it = dynamic_cast<Item*> (cmc);
+ if (mmrest_p_)
+ add_bound_item (mmrest_p_, it);
+ if (lastrest_p_)
+ add_bound_item (lastrest_p_,it);
+ }
}
void
if (mmrest_p_ && (now_mom () >= start_moment_)
&& !mp
- && (scm_ilength (mmrest_p_->get_grob_property ("columns")) >= 2))
+ && mmrest_p_->get_bound (LEFT) && mmrest_p_->get_bound (RIGHT))
{
typeset_grob (mmrest_p_);
/*
if (lastrest_p_)
{
/* sanity check */
- if (scm_ilength (lastrest_p_->get_grob_property ("columns")) >= 2
- && lastrest_p_->get_bound (LEFT) && lastrest_p_->get_bound (RIGHT)
+ if (lastrest_p_->get_bound (LEFT) && lastrest_p_->get_bound (RIGHT)
&& lastrest_p_->get_bound (LEFT) != lastrest_p_->get_bound (RIGHT))
typeset_grob (lastrest_p_);
lastrest_p_ = 0;
progress_indication (_ ("Parsing..."));
- set_yydebug (flower_dstream &&!flower_dstream->silent_b ("Parser"));
+ set_yydebug (0);
lexer_p_->new_input (init, source_l_);
do_yyparse ();
for (int i=0; i < steps; i++)
{
Real area = enclosed_area_f ();
- if (!i)
- DEBUG_OUT << to_str ("Init area: %f\n", area);
-
if (area <= beautiful)
break;
curve_.control_[1][X_AXIS] -= da[0] * u * pct;
curve_.control_[2][X_AXIS] -= da[1] * u * pct;
}
-
- // Real area = enclosed_area_f ();
}
%}
\consistsend "Axis_group_engraver";
+
+ MinimumVerticalExtent = ##f
+ ExtraVerticalExtent = ##f
+ VerticalExtent = ##f
% explicitly set instrument, so we don't get
% weird effects when doing instrument names for
StaffContainerContext = \translator {
\type Engraver_group_engraver;
\consists "Axis_group_engraver";
+ MinimumVerticalExtent = ##f
+ ExtraVerticalExtent = ##f
+ VerticalExtent = ##f
+
\accepts Staff;
\name StaffContainer;
}
\consists "Output_property_engraver";
Generic_property_list = #generic-staff-properties
+ MinimumVerticalExtent = ##f
+ ExtraVerticalExtent = ##f
+ VerticalExtent = ##f
\consists "Pitch_squash_engraver";
\consists "Separating_line_group_engraver";
LyricsVoiceContext= \translator{
\type "Engraver_group_engraver";
\consistsend "Axis_group_engraver";
- LyricsVoiceMinimumVerticalExtent = #(cons -1.2 1.2)
-
+ MinimumVerticalExtent = #(cons -1.2 1.2)
+ ExtraVerticalExtent = ##f
+ VerticalExtent = ##f
\name LyricsVoice ;
\consists "Separating_line_group_engraver";
\consists "Lyric_engraver";
\type "Engraver_group_engraver";
\name NoteNames;
\consistsend "Axis_group_engraver";
+
+ MinimumVerticalExtent = ##f
+ ExtraVerticalExtent = ##f
+ VerticalExtent = ##f
+
+
\consists "Note_name_engraver";
\consists "Separating_line_group_engraver";
}
Generic_property_list = #generic-lyrics-properties
\consists "Property_engraver";
\consistsend "Axis_group_engraver";
+ MinimumVerticalExtent = ##f
+ ExtraVerticalExtent = ##f
+ VerticalExtent = ##f
\accepts "LyricsVoice";
}
\consists "Chord_name_engraver";
\consists "Skip_req_swallow_translator";
\consistsend "Axis_group_engraver";
+ MinimumVerticalExtent = ##f
+ ExtraVerticalExtent = ##f
+ VerticalExtent = ##f
VerticalAxisGroup \override #'invisible-staff = ##t
}
-(translator-property-description 'CONTEXTNAMEMinimumVerticalExtent number-pair? "minimum vertical extent, same format as CONTEXTNAMEVerticalExtent [fixme, naming]")
-(translator-property-description 'CONTEXTNAMEVerticalExtent number-pair? "hard coded vertical extent.
+(translator-property-description 'MinimumVerticalExtent number-pair?
+ "minimum vertical extent, same format as VerticalExtent")
+
+(translator-property-description 'VerticalExtent number-pair?
+ "hard coded vertical extent.
The format is a pair of dimensions, for example, this sets the sizes
of a staff to 10 (5+5) staffspaces high.
@example
-property Staff.StaffVerticalExtent = #(-5.0 . 5.0)
+property Staff.VerticalExtent = #(-5.0 . 5.0)
@end example
- [fixme, naming]")
-(translator-property-description 'CONTEXTNAMExtraVerticalExtent number-pair? "extra vertical extent, same format
-CONTEXTNAMEMinimumVerticalExtent [fixme, naming]")
+VerticalExtent, MinimumVerticalExtent and ExtraVerticalExtent are
+predefined in all relevant contexts to @code{#f}, so they will not
+inherit values.
+
+Note that these VerticalExtents can only operate on vertical groups,
+and therefore only work in contexts which contain an
+@code{Axis_group_engraver}.
+")
+
+(translator-property-description 'ExtraVerticalExtent
+ number-pair? "extra vertical extent, same format as MinimumVerticalExtent")
+
(translator-property-description 'Generic_property_list list? "description of the conversion.
Defines names and types for generic properties. These are properties
Alist that defines in what order alterations should be printed.
The format is (NAME . ALTER), where NAME is from 0 .. 6 and ALTER from -1, 1.
")
-(translator-property-description 'keyOctaviation boolean? "")
-(translator-property-description 'keySignature list? "The current key signature. This is an alist containing (NAME . ALTER) pairs, where NAME is from 0.. 6 and ALTER from -2,-1,0,1,2 ")
+(translator-property-description 'keySignature list? "The current key signature. This is an alist containing (NAME . ALTER) or ((OCTAVE . NAME) . ALTER) pairs, where NAME is from 0.. 6 and ALTER from -2,-1,0,1,2 ")
(translator-property-description 'localKeySignature list? "the key
-signature at this point in the measure. The format is an alist with
-entries of the form (NAME . ALTER)
-or ((OCTAVE . NAME) . ALTER),
-where NAME is from 0.. 6 and ALTER from -2,-1,0,1,2"
+signature at this point in the measure. The format is the same as for keySignature. "
)
(translator-property-description 'measureLength moment? "Length of one
-################ TODO: lots of other syntax change should be done here as well
-
-
+# TODO: lots of other syntax change should be done here as well
if 1:
def conv (str):
str = re.sub ('basicCollisionProperties', 'NoteCollision', str)
conversions.append (((1,3,97), conv, 'ChordName -> ChordNames'))
-## TODO: add lots of these
+# TODO: add lots of these
if 1:
def conv (str):
conversions.append (((1,3,144), conv, 'Chorda -> Corda'))
-############################
-
+if 1:
+ def conv (str):
+ str = re.sub ('([A-Za-z]+)MinimumVerticalExtent', 'MinimumV@rticalExtent', str)
+ str = re.sub ('([A-Za-z]+)ExtraVerticalExtent', 'ExtraV@rticalExtent', str)
+ str = re.sub ('([A-Za-z]+)VerticalExtent', 'VerticalExtent', str)
+ str = re.sub ('ExtraV@rticalExtent', 'ExtraVerticalExtent', str)
+ str = re.sub ('MinimumV@rticalExtent', 'MinimumVerticalExtent', str)
+ return str
+
+ conversions.append (((1,3,145), conv,
+ 'ContextNameXxxxVerticalExtent -> XxxxVerticalExtent'))
+
+################################
+# END OF CONVERSIONS
+################################
def get_conversions (from_version, to_version):
def version_b (v, f = from_version, t = to_version):
AC_DEFUN(AC_STEPMAKE_COMPILE, [
# -O is necessary to get inlining
- OPTIMIZE=""
CFLAGS=${CFLAGS:-""}
CXXFLAGS=${CXXFLAGS:-$CFLAGS}
LDFLAGS=${LDFLAGS:-""}
checking_b=yes
- optimise_b=no
+ optimise_b=yes
profile_b=no
debug_b=yes
[ --enable-debugging compile with debugging info. Default: on],
[debug_b=$enableval])
- AC_ARG_ENABLE(optimise,
- [ --enable-optimise use maximal speed optimisations. Default: off],
- [optimise_b=$enableval])
-
AC_ARG_ENABLE(profiling,
[ --enable-profiling compile with gprof support. Default: off],
[profile_b=$enableval])
- AC_ARG_ENABLE(mingw-prefix,
- [ --enable-mingw-prefix=DIR
- set the mingw32 directory (standalone windows32 exes)],
- [MINGWPREFIX=$enableval],
- [MINGWPREFIX=no])
if test "$checking_b" = no; then
# ugh
OPTIMIZE="-O2 -finline-functions"
fi
- if test "$optimise_b" = no; then
- OPTIMIZE=""
- fi
if test $profile_b = yes; then
EXTRA_LIBES="-pg"
OPTIMIZE="$OPTIMIZE -g"
fi
- # however, C++ support in mingw32 v 0.1.4 is still flaky
- if test x$MINGWPREFIX != xno; then
- ICFLAGS="-I$MINGWPREFIX/include"
- ILDFLAGS="-$MINGWPREFIX/lib"
- fi
AC_PROG_CC
LD='$(CC)'
[ --with-kpathsea use kpathsea lib. Default: on],
[kpathsea_b=$enableval])
- if test $kpathsea_b = yes; then
+ if test "$kpathsea_b" = "yes"; then
AC_HAVE_HEADERS(kpathsea/kpathsea.h)
AC_CHECK_LIB(kpathsea, kpse_find_file)
- # urg: kpse_find_tfm is a #define, how to check for this?
- # AC_CHECK_LIB(kpathsea, kpse_find_tfm)
- # AC_CHECK_FUNCS(kpse_find_file kpse_find_tfm,, AC_STEPMAKE_WARN(Cannot find kpathsea functions. You may have to create TFM files manually.))
- AC_CHECK_FUNCS(kpse_find_file,, AC_STEPMAKE_WARN(Cannot find kpathsea functions. You may have to create TFM files manually.) kpathsea_b=no)
+ AC_CHECK_FUNCS(kpse_find_file,, AC_ERROR(Cannot find kpathsea functions. Rerun with --without-kpathsea.) )
fi
AC_MSG_CHECKING(whether to use kpathsea)
- if test $kpathsea_b = yes; then
+ if test "$kpathsea_b" = yes; then
AC_MSG_RESULT(yes)
KPATHSEA=1
else