]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' into lilypond/translation
authorJean-Charles Malahieude <lilyfan@orange.fr>
Wed, 7 Apr 2010 18:47:50 +0000 (20:47 +0200)
committerJean-Charles Malahieude <lilyfan@orange.fr>
Wed, 7 Apr 2010 18:47:50 +0000 (20:47 +0200)
47 files changed:
Documentation/changes.tely
Documentation/contributor/release-work.itexi
Documentation/contributor/source-code.itexi
Documentation/contributor/website-work.itexi
Documentation/es/web/community.itexi
Documentation/es/web/manuals.itexi
Documentation/fr/web/introduction.itexi
Documentation/included/generating-output.itexi
Documentation/nl/web.texi
Documentation/nl/web/download.itexi
Documentation/notation/expressive.itely
Documentation/notation/fretted-strings.itely
Documentation/notation/input.itely
Documentation/notation/rhythms.itely
Documentation/web/introduction.itexi
Documentation/web/news-front.itexi
GNUmakefile.in
VERSION
input/regression/context-mod-context.ly [new file with mode: 0644]
input/regression/context-mod-with.ly [new file with mode: 0644]
input/regression/duration-identifier-compressed.ly [new file with mode: 0644]
input/regression/hara-kiri-drumstaff.ly
input/regression/hara-kiri-keep-previous-settings.ly [new file with mode: 0644]
input/regression/hara-kiri-percent-repeat.ly
input/regression/hara-kiri-pianostaff.ly
input/regression/hara-kiri-rhythmicstaff.ly
input/regression/hara-kiri-tabstaff.ly
lily/context-mod-scheme.cc [new file with mode: 0644]
lily/context-mod.cc [new file with mode: 0644]
lily/include/context-mod.hh [new file with mode: 0644]
lily/include/lily-proto.hh
lily/note-column-scheme.cc [new file with mode: 0644]
lily/note-column.cc
lily/parser.yy
ly/engraver-init.ly
ly/music-functions-init.ly
ly/property-init.ly
make/website.make [new file with mode: 0644]
mf/feta-noteheads.mf
python/convertrules.py
scm/define-music-display-methods.scm
scm/define-music-properties.scm
scm/define-music-types.scm
scm/music-functions.scm
scripts/build/create-weblinks-itexi.py
scripts/build/website_post.py
website.make [deleted file]

index 62e625974bf13f1bd92908b06de88fc5a3281ea4..8569dbf56f67004badce4e245c04aaf92d26058c 100644 (file)
@@ -62,6 +62,24 @@ which scares away people.
 
 @end ignore
 
+@item
+Context modifications (@code{\with} blocks) can be stored in variables and
+inserted into contexts or other @code{\with} blocks:
+@lilypond[quote,verbatim]
+coloredheads = \with { \override NoteHead #'color = #red }
+noclef = \with { \remove "Clef_engraver" }
+\score {
+  \new Staff {
+    \new Voice \with { \coloredheads } \relative c' { c4 e g c }
+  }
+  \layout {
+    \context { \Staff
+      \noclef
+    }
+  }
+}
+@end lilypond
+
 @item
 A half-open articulation was added:
 @lilypond[quote,relative=2]
index 867e0b9748382169cef9f9c05997f25ebfb3986e..146fcc45b788f0ff4b33be4bb555f05844f9125b 100644 (file)
@@ -98,8 +98,6 @@ Commit, push, switch back to master:
 @example
 git commit -m "Release: update news." Documentation/web/
 git push origin
-git checkout master
-git merge release/unstable
 @end example
 
 @item (optional) Check that lilypond builds from scratch in an
@@ -149,7 +147,7 @@ from the rsync command in @file{test-lily/rsync-lily-doc.py} and
 @item Upload GUB by running:
 
 @example
-make lilypond-upload LILYPOND_BRANCH=master LILYPOND_REPO_URL=git://git.sv.gnu.org/lilypond.git
+make lilypond-upload LILYPOND_BRANCH=release/unstable LILYPOND_REPO_URL=git://git.sv.gnu.org/lilypond.git
 @end example
 
 @noindent
index 27e30b165a60b326cf7bc87af252181f42484802..80e4358bd24829c576e8cb0aa5274c255a858b4e 100644 (file)
@@ -58,6 +58,15 @@ Navigate to the @file{lilypond-git/} directory to view the source
 files.  You should now be able to modify the source files using
 your normal text editor.
 
+@knownissues
+
+The @qq{Get source} button does not fetch the entire history of
+the git repository, so utilities like @command{gitk} will only
+be able to display the most recent additions.  As you continue to
+work with @command{lily-git}, the @qq{Update source} button will take
+any new additions and add it to whatever is currently in your repository's
+history.
+
 
 @subsubheading New local commit
 
@@ -79,15 +88,19 @@ commit.
 
 You can go back and make changes to the most recent commit with
 the @qq{Amend previous commit} button.  This is useful if a
-mistake is found after you've clicked the @qq{New local commit}
-button.  To amend the most recent commit, edit the source files as
-needed and click the button.  The earlier version of the commit is
-not saved, but is replaced by the new one.
-
-Note that this does not update patch files; if you have a patch
-file from an earlier version of the commit, you will need to make
-another patch set when using this feature.  The old patch file is
-not saved, but is replaced by the new one.
+mistake is found after you have clicked the @qq{New local commit}
+button.
+
+To amend the most recent commit, re-edit the source files as
+needed and then click the @qq{Amend previous commit} button.  The
+earlier version of the commit is not saved, but is replaced by the
+new one.
+
+Note that this does not update the patch @strong{files}; if you
+have a patch file from an earlier version of the commit, you will
+need to make another patch set when using this feature.  The old
+patch file will not be saved, but will be replaced by the new one
+after you click on @qq{Make patch set}.
 
 
 @subsubheading Make patch set
index 7e570aca85896bb7f1d3486c118601a5a4d813ba..774aa4574685314cff40b3949ff875b9ed21c5f5 100644 (file)
@@ -74,7 +74,7 @@ Check for any updates to trusted scripts / files:
 #!/bin/sh
 GIT=$HOME/src/lilypond
 DEST=$HOME/lilypond/trusted-scripts
-diff -u $DEST/website.make $GIT/website.make
+diff -u $DEST/website.make $GIT/make/website.make
 diff -u $DEST/lilypond-texi2html.init $GIT/Documentation/lilypond-texi2html.init
 diff -u $DEST/extract_texi_filenames.py $GIT/scripts/build/extract_texi_filenames.py
 diff -u $DEST/create-version-itexi.py $GIT/scripts/build/create-version-itexi.py
@@ -92,7 +92,7 @@ If the changes look ok, make them trusted:
 #!/bin/sh
 GIT=$HOME/src/lilypond
 DEST=$HOME/lilypond/trusted-scripts
-cp $GIT/website.make $DEST/website.make
+cp $GIT/make/website.make $DEST/website.make
 cp $GIT/Documentation/lilypond-texi2html.init $DEST/lilypond-texi2html.init
 cp $GIT/scripts/build/extract_texi_filenames.py $DEST/extract_texi_filenames.py
 cp $GIT/scripts/build/create-version-itexi.py $DEST/create-version-itexi.py
@@ -155,3 +155,48 @@ rsync -a $EXAMPLES graham@lilypond.org:ly-examples
 
 As it has much more audience, the website should be translated before
 the documentation; see @ref{Translating the documentation}.
+
+In addition to the normal documentation translation practices,
+there are a few additional things to note:
+
+@itemize
+
+@item
+Build the website with:
+
+@example
+make website
+@end example
+
+@noindent
+however, please note that this command is not designed for being
+run multiple times.  If you see unexpected output (mainly the page
+footers getting all messed up), then delete your
+@file{out-website} directory and run @code{make website} again.
+
+@item
+Some of the translation infrastructure is defined in python files;
+you must look at the @code{### translation data} sections in:
+
+@example
+scripts/build/create-weblinks-itexi.py
+scripts/build/website_post.py
+@end example
+
+@item
+Translations are not included by default in @code{make website}.
+To test your translation, edit the @code{WEB_LANGS} line in
+@file{make/website.make}.  Do not submit a patch to add your language
+to this file unless @code{make website} completes with less than 5
+warnings.
+
+@item
+Links to manuals are done with macros like
+@code{@@manualDevelLearningSplit}.  To get translated links, you
+must change that to @code{@@manualDevelLearningSplit-es} (for
+es/Spanish translations, for example).
+
+@end itemize
+
+
+
index 8eb5e0e2f95fb8bbecb0fee43817960a8c7fab1b..f6b447953532817570e89a1df12c5166782c7cb6 100644 (file)
@@ -642,7 +642,7 @@ están en @url{http://lilypond.org}}
 @headitem Para descargar
 
 @item
-@doctarballDevel
+@doctarballDevel-es
 @end ifset
 
 @end multitable
index 8ac8e30f0f67ddfd904ad7dedd2230984be7bb05..76564528fd60ceaf4a5d94e7f92462e7523509aa 100644 (file)
 LilyPond es un sistema de grabado musical @strong{basado en texto}.
 ¡Lea esto primero!
 
-@item @ifWebLinks{@manualStableLearningSplitNoName,@rlearningnamed{Top,Aprendizaje}}
+@item @ifWebLinks{@manualStableLearningSplitNoName-es,@rlearningnamed{Top,Aprendizaje}}
 una introducción a LilyPond amable e @qq{imprescindible}.
 @details{Aprendizaje}
 
-@item @ifWebLinks{@manualStableGlossarySplitNoName,@rglosnamed{Top,Glosario}}
+@item @ifWebLinks{@manualStableGlossarySplitNoName-es,@rglosnamed{Top,Glosario}}
 @emph{(lectura opcional)} términos musicales y traducciones.
 @details{Glosario}
 
-@item @ifWebLinks{@manualStableEssaySplitNoName,@ressaynamed{Top,Ensayo}}
+@item @ifWebLinks{@manualStableEssaySplitNoName-es,@ressaynamed{Top,Ensayo}}
 @emph{(lectura opcional)} la información de trasfondo sobre grabado musical.
 @details{Ensayo}
 
@@ -61,15 +61,15 @@ una introducción a LilyPond amable e @qq{imprescindible}.
 
 @itemize
 
-@item @ifWebLinks{@manualStableNotationSplitNoName,@rusernamed{Top,Notación}}
+@item @ifWebLinks{@manualStableNotationSplitNoName-es,@rusernamed{Top,Notación}}
 referencia de la sintaxis.
 @details{Notación}
 
-@item @ifWebLinks{@manualStableUsageSplitNoName,@rprogramnamed{Top,Utilización}}
+@item @ifWebLinks{@manualStableUsageSplitNoName-es,@rprogramnamed{Top,Utilización}}
 cómo ejecutar los programas.
 @details{Utilización}
 
-@item @ifWebLinks{@manualStableSnippetsSplitNoName,@rlsrnamed{Top,Fragmentos}}
+@item @ifWebLinks{@manualStableSnippetsSplitNoName-es,@rlsrnamed{Top,Fragmentos}}
 trucos y consejos cortos.
 @details{Fragmentos}
 
@@ -90,15 +90,15 @@ Preguntas más frecuentes (Frequently Asked Questions).
 este documento.
 @details{Web}
 
-@item @ifWebLinks{@manualStableChangesSplitNoName,@rchangesnamed{Top,Cambios}}
+@item @ifWebLinks{@manualStableChangesSplitNoName-es,@rchangesnamed{Top,Cambios}}
 ¿qué hay de nuevo?
 @details{Cambios}
 
-@item @ifWebLinks{@manualStableExtendingSplitNoName,@rextendnamed{Top,Extender}}
+@item @ifWebLinks{@manualStableExtendingSplitNoName-es,@rextendnamed{Top,Extender}}
 trucos interesantes.
 @details{Extender}
 
-@item @ifWebLinks{@manualStableInternalsSplitNoName,@rinternalsnamed{Top,Funcionamiento interno}}
+@item @ifWebLinks{@manualStableInternalsSplitNoName-es,@rinternalsnamed{Top,Funcionamiento interno}}
 referencia sobre el trucaje.
 @details{Funcionamiento interno}
 
@@ -419,9 +419,9 @@ producidas en LilyPond a partir de la version estable anterior.
 
 @docLinks{Cambios, changes,
   @rchangesnamed{Top,Cambios},
-  @manualStableChangesSplit,
-  @manualStableChangesBig, 6 KB,
-  @manualStableChangesPdf, 200 KB}
+  @manualStableChangesSplit-es,
+  @manualStableChangesBig-es, 6 KB,
+  @manualStableChangesPdf-es, 200 KB}
 
 @divEnd
 
@@ -441,9 +441,9 @@ Este manual explica cómo escribir extensiones de LilyPond.
 
 @docLinks{Extender, extending,
   @rextendnamed{Top,Extender},
-  @manualStableExtendingSplit,
-  @manualStableExtendingBig, 200 KB,
-  @manualStableExtendingPdf, 400 KB}
+  @manualStableExtendingSplit-es,
+  @manualStableExtendingBig-es, 200 KB,
+  @manualStableExtendingPdf-es, 400 KB}
 
 @divEnd
 
@@ -474,9 +474,9 @@ se refiere a la documentación generada.
 
 @docLinks{Funcionamiento interno, internals,
   @rinternalsnamed{Top,Funcionamiento interno},
-  @manualStableInternalsSplit,
-  @manualStableInternalsBig, 2.5 MB,
-  @manualStableInternalsPdf, 2.8 MB}
+  @manualStableInternalsSplit-es,
+  @manualStableInternalsBig-es, 2.5 MB,
+  @manualStableInternalsPdf-es, 2.8 MB}
 
 @divEnd
 
@@ -509,7 +509,7 @@ sólo están disponibles en @uref{http://lilypond.org}
 @divClass{keep-bullets}
 @itemize
 
-@item @doctarballStable
+@item @doctarballStable-es
 
 @end itemize
 
index 0ca59d7a7f695f23a90c02ab00632fd519ab60ad..8cc18b2b0a59ee56d30110908a8aad535adf1806 100644 (file)
@@ -1,7 +1,7 @@
 @c -*- coding: utf-8; mode: texinfo; documentlanguage: fr -*-
 @c This file is part of web.texi
 @ignore
-    Translation of GIT committish: dee4f5842abe7e7f638485b7b36e9e0dffa56b3e
+    Translation of GIT committish: c650e54334b64e0e9fd534ee13742f6c07257637
 
     When revising a translation, copy the HEAD committish of the
     version that you are working on.  For details, see the Contributors'
@@ -102,6 +102,7 @@ amis et collègues avec des partitions soignées !
 @unnumberedsec Fonctionnalités
 @translationof Features
 
+@ignore
 @help{on voudrait une tentative enthousiaste
 d'incitation à essayer LilyPond.  Les avertissements sur l'écriture de
 la musique sous forme de texte attendront le cours express, ils n'ont
@@ -111,7 +112,7 @@ S'inspirer de
 @uref{http://lilypond.org/web/about/features} et
 @uref{http://lilypond.org/web/switch/tour} et
 @uref{http://lilypond.org/web/switch/advantages}
-
+@end ignore
 
 
 @subheading Pourquoi passer à LilyPond ?
@@ -492,6 +493,7 @@ lire d'abord @ref{Entrée sous forme de texte}.
 @c Frankly, a node just for redirecting the reader just after a reading
 @c direction paragraph is a bit dense, I'd really like to merge this
 @c node into the previous paragraph. -JM
+
 @node Contexte
 @unnumberedsec Contexte
 @translationof Background
@@ -856,7 +858,7 @@ partition.  Pour plus de détails, voir @ref{Facilités d'édition}.
 @divClass{column-center-bottom}
 @subheading Et ensuite ?
 
-Vous êtes désormais prêt(e) à @ref{Download,télécharger LilyPond}.  Si
+Vous êtes désormais prêt(e) à @ref{Téléchargement,télécharger LilyPond}.  Si
 vous n'êtes toujours pas convaincu(e), examinez les @ref{Facilités
 d'édition}.
 
@@ -1017,24 +1019,19 @@ svn co http://svn.textmate.org/trunk/Bundles/LilyPond.tmbundle/
 @divClass{column-center-top}
 @subheading Autres programmes qui exportent du code LilyPond
 
-@ignore
-TODO: change url back to full adress, to make it readable in printouts -ch
-@end ignore
-
-@help mettre de l'ordre dans cette liste, vérifier les liens, etc.
 
 @subsubheading Environnements graphiques
 
 @itemize
 @item
-@uref{http://@/noteedit@/.berlios@/.de,NoteEdit}
-qui importe du @uref{http://@/www@/.musicxml@/.com/xml@/.html,MusicXML}
+@uref{http://noteedit.berlios.de,NoteEdit}
+qui importe du @uref{http://www.musicxml.com/xml.html,MusicXML}
 @item
-@uref{http://@/www@/.rosegardenmusic@/.com,Rosegarden},
+@uref{http://www.rosegardenmusic.com,Rosegarden},
 qui importe du MIDI
 @item
 @uref{http://vsr.informatik.tu-chemnitz.de/staff/jan/nted/nted.xhtml,NtEd},
-qui a une fonction d'export expérimentale pour LilyPond.
+qui a une fonction expérimentale d'export pour LilyPond.
 @item
 @uref{http://www.tuxguitar.com.ar/,TuxGuitar} peut exporter du code LilyPond.
 @item
@@ -1043,17 +1040,20 @@ qui a une fonction d'export expérimentale pour LilyPond.
 @uref{http://canorus.org,Canorus} peut également exporter vers LilyPond,
 mais est encore au stade de développement bêta.  Les testeurs sont les
 bienvenus.
+@uref{http://lilycomp.sourceforge.net,LilyComp} permet de saisir
+graphiquement des notes.  Il fonctionne comme un pavé numérique
+permettant de produire de la notation LilyPond.
 @end itemize
 
 @subsubheading Outils en ligne de commande
 
 @itemize
 @item
-@uref{http://www@/.volny@/.cz/smilauer/rumor/rumor@/.html,Rumor}, un
+@uref{http://www.volny.cz/smilauer/rumor/rumor.html,Rumor}, un
 convertisseur monophonique temps-réel MIDI vers LilyPond.
 @item
-@uref{http://nicolas@/.sceaux@/.free@/.fr/lilypond/lyqi@/.html,lyqi}, un mode
-Emacs majeur.
+@uref{http://nicolas.sceaux.free.fr/lilypond/lyqi.html,lyqi}, un mode
+majeur pour Emacs.
 @item
 @uref{http://@/common-lisp@/.net/project/fomus/,FOMUS},
 un bibliothèque LISP de génération de notation musicale.
index 7d6733d1c3e6228dfd3bac8f3a116016e2f82acc..6f081e58c9af8dc36382f89df8ce0d5c41cb67d4 100644 (file)
@@ -32,7 +32,7 @@ Choose a name for your file, for example @file{test.ly}.
 @subsubheading Step 2. Compile (with LilyPad)
 
 From the same menus, select
-@w{@code{Compile > Tyepset}}.
+@w{@code{Compile > Typeset}}.
 
 @sourceimage{Learning_Macos_Typeset_menu,,,}
 
index 2add4451d7899326f1aa37025b1edba2687b81cf..2a2aa394861c237fe13a348948a8063209e32685 100644 (file)
@@ -133,9 +133,10 @@ Lees meer in onze @ref{Inleiding}!
 
 @subsubheading Ontwikkeling
 
-@ref{Ontwikkeling, Download @versionDevel}
+@c community.itexi met `Ontwikkeling' is nog niet vertaald
+@ref{Development, Download @versionDevel}
 
-@ref{Ontwikkeling, Handleidingen @versionDevel}
+@ref{Development, Handleidingen @versionDevel}
 
 @divEnd
 @end ifset
index 0629a296374c7fef70c6b66c4f0488b5b5ca5dd0..5ebf2b50d18b497064c1ebc36cb829ece168fe83 100644 (file)
@@ -73,7 +73,8 @@ voor packagers
 @ref{Oude downloads}:
 oude versies
 
-@item @ref{Ontwikkeling}:
+@c community.itexi met `Ontwikkeling' is nog niet vertaald
+@item @ref{Development}:
 meest recente ontwikkelversie
 
 @end itemize
index 1c6fc0270db8a31aaf86763153d52650830a0d50..c1a41341a463f3147e61eb65c9df683642e5a64a 100644 (file)
@@ -147,8 +147,8 @@ articulation.  Predefined shorthands exist for @notation{marcato},
 Their corresponding output appears as follows:
 
 @lilypond[verbatim,quote,relative=2]
-c4-^  c-+  c--  c-|
-c4->  c-.  c2-_
+c4-^ c-+ c-- c-|
+c4-> c-. c2-_
 @end lilypond
 
 The rules for the default placement of articulations are defined
@@ -468,7 +468,8 @@ brackets) can be created.  The syntax for markup mode is described
 in @ref{Formatting text}.
 
 @lilypond[verbatim,quote]
-roundF = \markup { \center-align \concat { \bold { \italic ( }
+roundF = \markup {
+    \center-align \concat { \bold { \italic ( }
            \dynamic f \bold { \italic ) } } }
 boxF = \markup { \bracket { \dynamic f } }
 \relative c' {
@@ -514,9 +515,9 @@ mfEspressDynamic = #(make-dynamic-script mfEspress)
 \relative c' {
   c4_\roundFdynamic\< d e f
   g,1~_\boxFdynamic\>
-  g
-  g'~\mfEspressDynamic
-  g
+  g1
+  g'1~\mfEspressDynamic
+  g1
 }
 @end lilypond
 
@@ -925,6 +926,8 @@ indicates the pitch interval that the fall or doit will extend
 @lilypond[verbatim,quote,relative=2]
 c2-\bendAfter #+4
 c2-\bendAfter #-4
+c2-\bendAfter #+6.5
+c2-\bendAfter #-6.5
 c2-\bendAfter #+8
 c2-\bendAfter #-8
 @end lilypond
index a39a809ba2c7e559c378d595e1ded1854625c5c7..e4df5e027f527dac05dd03f8b24a5022fcf8924c 100644 (file)
@@ -1481,12 +1481,12 @@ within normal and tablature staves:
 @lilypond[quote,ragged-right,verbatim]
 music = \relative c' {
   < a\3 \deadNote c\2 a'\1 >4
-  < b\3 \deadNote d\2 b'\1 >4
-  < c\3 \deadNote e\2 c'\1 >8
+  < b\3 \deadNote d\2 b'\1 >
+  < c\3 \deadNote e\2 c'\1 >
   \deadNotesOn
-  \times 2/3 { g16\3 b\2 e\1 }
+  \times 2/3 { g8 b e }
   \deadNotesOff
-  < a,\3 c\2 e\1 >4
+  < a,\3 c\2 e\1 >1
 }
 \new StaffGroup <<
   \new Staff {
index 2a8396163b1a972d1e5ab6af1865a880ffe70969..29e96a5d825e08d3b2a4a39d3485f5f7984fd330 100644 (file)
@@ -1297,7 +1297,8 @@ To enter the copyright sign in the copyright notice use:
 
 @funindex \displayLilyMusic
 Displaying a music expression in LilyPond notation can be
-done using the music function @code{\displayLilyMusic}.  For example,
+done with the music function @code{\displayLilyMusic} but only when
+using the command line.  For example,
 
 @example
 @{
@@ -1311,12 +1312,10 @@ will display
 @{ a,4 cis e fis g @}
 @end example
 
-By default, LilyPond will print these messages to the console along
-with all the other messages.  To split up these messages and save
-the results of @code{\display@{STUFF@}}, redirect the output to
-a file.
-
-@c TODO What happens under Windows?
+By default, LilyPond will print these messages to the console
+along with all the other LilyPond compilation messages.  To split
+up these messages and save the results of @code{\display@{STUFF@}},
+redirect the output to a file.
 
 @example
 lilypond file.ly >display.txt
index 0b4bed4fa667485b2a7886b97330f07c5241e076..279f1ceb9d31bb80b6b674da298e42354b598db8 100644 (file)
@@ -1089,34 +1089,38 @@ entered using the @code{\partial} command, with the syntax
 @end example
 
 @noindent
-where @code{duration} is the rhythmic length of the interval
-before the start of the first complete measure:
+where @code{duration} is the rhythmic length of the remaining
+interval of the current measure before the start of the next.
 
 @lilypond[quote,verbatim,relative=2]
 \partial 4 e4 |
 a2. c,4 |
 @end lilypond
 
-The partial measure can be any duration less than a full measure:
+The partial measure can be any duration less than the full measure:
 
 @lilypond[quote,verbatim,relative=2]
 \partial 8*3 c8 d e |
 a2. c,4 |
 @end lilypond
 
-Internally, @code{\partial} is translated into
+Internally, @code{\partial @var{duration}} is translated into:
 
 @example
-\set Timing.measurePosition = -@var{duration}
+\set Timing.measurePosition -@var{duration}
+@end example
+
+For example, @code{\partial 8*3} becomes:
+
+@example
+\set Timing.measurePosition = #(ly:make-moment -3 8)
 @end example
 
-@noindent
 The property @code{measurePosition} contains a rational number
 indicating how much of the measure has passed at this point.  Note
-that this is set to a negative number by the @code{\partial}
-command: i.e., @code{\partial 4} is internally translated to
-@code{-4}, meaning @qq{there is a quarter note left in the measure.}
-
+that this is set to a negative number by the @code{\partial} command:
+i.e., @code{\partial 4} is internally translated to @code{-4}, meaning
+@qq{there is a quarter note left in the measure.}
 
 @seealso
 Music Glossary:
@@ -1131,12 +1135,12 @@ Snippets:
 Internal Reference:
 @rinternals{Timing_translator}.
 
-
 @knownissues
 
 The @code{\partial} command is intended to be used only at the
 beginning of a piece.  If you use it after the beginning, some
-odd warnings may occur.
+odd warnings or effects may occur, in this case use
+@code{\set Timing.measurePosition} instead.
 
 @node Unmetered music
 @unnumberedsubsubsec Unmetered music
index 815fe760d3ff49109e2e46aa97073402860bebba..3b9f18ba94de15f88069097931a21d4c0a2edea0 100644 (file)
@@ -513,6 +513,14 @@ New York} (engraving by Nicolas Sceaux).
 over 1500 pieces of classical sheet music for free download, and
 the main showcase of LilyPond scores.
 
+@c don't make this "Mutopia" a link, since that looks silly.
+@item
+@uref{http://etudeapp.com, Etude}, @qq{sheet music on steroids} is
+an iPhone app which displays piano music engraved with LilyPond,
+including many pieces from Mutopia.  The app includes a virtual
+piano keyboard showing which keys to press to help beginners learn
+how to read sheet music.
+
 @item
 @uref{http://www.adoromusicpub.com/, Adoro Music Publishing},
 high-quality scores of sacred music, available for immediate
index 10b10c189d571105986c4e909f03ffcfd74e6b19..5fcc42acc609a0c7af37e3ca1df9428850ca8b5b 100644 (file)
@@ -9,6 +9,15 @@
 @c DO NOT WRITE BETWEEN THESE LINES
 @c DO NOT WRITE BETWEEN THESE LINES
 
+@newsItem
+@subsubheading LilyPond 2.13.17 released!  @emph{April 2, 2010}
+
+We are happy to announce the release of LilyPond 2.13.17.  This
+release includes bugfixes for 4 critical issues.  However, 15
+critical issues still remain, so this release is intended for
+developers only.
+@newsEnd
+
 @newsItem
 @subsubheading LilyPond 2.13.16 released!  @emph{March 15, 2010}
 
index ef32c0080f5b15d09fb05ac3e8d28f43f4af929f..7d5bba4d3aa6364243e74dcf3837277c7f0a226a 100644 (file)
@@ -27,7 +27,7 @@ RELEASE_FILES = ChangeLog RELEASE-COMMIT
 RELEASE_OUT_FILES = $(RELEASE_FILES:%=$(outdir)/%)
 OUT_DIST_FILES += $(RELEASE_OUT_FILES)
 EXTRA_DIST_FILES = VERSION .gitignore .mailmap \
-  $(README_FILES) $(SCRIPTS) $(IN_FILES) website.make
+  $(README_FILES) $(SCRIPTS) $(IN_FILES)
 INSTALLATION_DIR=$(local_lilypond_datadir)
 INSTALLATION_FILES=$(config_make) VERSION
 
@@ -294,6 +294,6 @@ test-snippets-clean:
 website:
        $(MAKE) config_make=$(config_make) \
                top-src-dir=$(top-src-dir) \
-               -f $(top-src-dir)/website.make \
+               -f $(top-src-dir)/make/website.make \
                website
 
diff --git a/VERSION b/VERSION
index 5d3c7403b3bb59909e414f6e85b8ce9a43eaa704..7d297a78a3fe678b584a1d5946ba567667e6b54f 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=13
-PATCH_LEVEL=17
+PATCH_LEVEL=18
 MY_PATCH_LEVEL=
 VERSION_STABLE=2.12.3
-VERSION_DEVEL=2.13.16
+VERSION_DEVEL=2.13.17
diff --git a/input/regression/context-mod-context.ly b/input/regression/context-mod-context.ly
new file mode 100644 (file)
index 0000000..020db8c
--- /dev/null
@@ -0,0 +1,43 @@
+\version "2.13.18"
+
+\header  {
+texidoc = "Context modifications can be stored into a variable as a
+\with object. They can be later inserted directly into a context definition."
+}
+
+% Some sample modifications to be inserted into a \with block later on
+ctxmod = \with {
+  \remove "Time_signature_engraver"
+  \consists "Ambitus_engraver"
+  \override StaffSymbol #'line-count = 4
+}
+
+music = \relative c'' { \key fis \minor c1 d e }
+
+\score { <<
+    \new Staff { \music}
+  >>
+  \layout {
+    \context { \Staff
+      \ctxmod
+      \override NoteHead #'style = #'petrucci
+    }
+  }
+}
+
+
+\score { <<
+    \new Staff { \music}
+  >>
+  \layout {
+    \context { \Staff
+      \override StaffSymbol #'line-count = 3
+      \override NoteHead #'style = #'petrucci
+    }
+    % Should override the above definitions, but not reset others
+    \context { \Staff
+      \ctxmod
+    }
+  }
+}
+
diff --git a/input/regression/context-mod-with.ly b/input/regression/context-mod-with.ly
new file mode 100644 (file)
index 0000000..377d3ef
--- /dev/null
@@ -0,0 +1,45 @@
+\version "2.13.18"
+
+\header  {
+texidoc = "Context modifications can be stored into a variable as a
+\with object. They can be later inserted into another \with block."
+}
+
+% Some sample modifications to be inserted into a \with block later on
+ctxmod = \with {
+  \remove "Time_signature_engraver"
+  \consists "Ambitus_engraver"
+  \override StaffSymbol #'line-count = 4
+}
+
+music = \relative c'' { \key fis \minor c1 d e }
+
+\score { <<
+  % No modifications:
+  \new Staff { \music }
+  % Some context modifications manually written in a \with block
+  \new Staff \with {
+    \remove "Time_signature_engraver"
+    \consists "Ambitus_engraver"
+    \override StaffSymbol #'line-count = 4
+  } { \music }
+  % The same mods as direct value of \with
+  \new Staff \with \ctxmod { \music }
+  % Mods as part of a \with block
+  \new Staff \with { \ctxmod } { \music }
+  % Mods before a context mod in a with block are working:
+  \new Staff \with {
+    \remove "Clef_engraver"
+    \ctxmod
+  } { \music }
+  % Mods before and after a context mod in a with block are working:
+  \new Staff \with {
+    \remove "Clef_engraver"
+    \ctxmod
+    \remove "Key_engraver"
+  } { \music }
+  % Mods can be inserted instead of a \with block (i.e. \with is not required)
+  \new Staff \ctxmod { \music }
+  \new Staff { \music }
+>>
+}
diff --git a/input/regression/duration-identifier-compressed.ly b/input/regression/duration-identifier-compressed.ly
new file mode 100644 (file)
index 0000000..2f8cc5a
--- /dev/null
@@ -0,0 +1,15 @@
+\version "2.13.18"
+
+\header {
+  texidoc = "The compression factor of a duration identifier is
+correctly accounted for by the parser."
+}
+
+% looks like a whole note, has duration of half note
+wholeHalved = #(ly:make-duration 0 0 1 2)
+
+
+\displayMusic \relative c' {
+  c\wholeHalved c |
+  c\wholeHalved. c4 |
+}
index 478d23e69552187a95e85643e1c5e6762a2c4b98..ada43ebcb28c538202c636414def02557bed6f2c 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.13.10"
+\version "2.13.18"
 \header {
   texidoc =
 
@@ -18,7 +18,8 @@ and no staff case.
 \layout {
   ragged-right = ##t
   \context {
-    \RemoveEmptyDrumStaffContext
+    \DrumStaff
+    \RemoveEmptyStaves
   }
 }
 
diff --git a/input/regression/hara-kiri-keep-previous-settings.ly b/input/regression/hara-kiri-keep-previous-settings.ly
new file mode 100644 (file)
index 0000000..818376c
--- /dev/null
@@ -0,0 +1,43 @@
+\version "2.13.18"
+
+\header { texidoc =
+
+         "Inserting the harakiri settings globally into the Staff context should
+not erase previous settings to the Staff context.
+"
+
+}
+
+\layout {
+  ragged-right= ##t
+  \context {
+    \Staff
+    \override StaffSymbol #'line-count = 4
+    \consists "Ambitus_engraver"
+    \remove "Clef_engraver"
+  }
+}
+
+% Old \RemoveEmptyStaffContext: Will erase previous settings...
+\score {
+  <<
+    \new Staff \relative c'' {  c4 c c c \break s1 \break c4 c c c \break c c c c}
+    \new Staff \relative c'' {  d4 d d d        s1        s1              s1 }
+    \new Staff \relative c'' {  e4 e e e        s1        e4 e e e        s1 }
+  >>
+  \layout {
+    \context { \RemoveEmptyStaffContext }
+  }
+}
+
+% New \RemoveEmptyStaves settings: Preserves previous settings...
+\score {
+  <<
+    \new Staff \relative c'' {  c4 c c c \break s1 \break c4 c c c \break c c c c}
+    \new Staff \relative c'' {  d4 d d d        s1        s1              s1 }
+    \new Staff \relative c'' {  e4 e e e        s1        e4 e e e        s1 }
+  >>
+  \layout {
+    \context { \Staff \RemoveEmptyStaves }
+  }
+}
index 847e93c688f0045a735b9af0ebea3f93ae2f584d..fdc5338d348c12a335c0cf2722ea444ca0ca7f66 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.13.10"
+\version "2.13.18"
 
 \header {
   texidoc = "Staves, RhythmicStaves, TabStaves and DrumStaves
   \new TabStaff \repeat  percent 4 { c1 }
   \new DrumStaff \drummode { \repeat percent 4 { hh1 } }
   \new RhythmicStaff \repeat percent 4 { c'1 }
->>                          
+>>
 
 \layout {
-  \context { \RemoveEmptyStaffContext }
-  \context { \RemoveEmptyRhythmicStaffContext }
-  \context { \RemoveEmptyDrumStaffContext }
-  \context { \RemoveEmptyTabStaffContext }
-  }
-
+  \context { \Staff \RemoveEmptyStaves }
+  \context { \RhythmicStaff \RemoveEmptyStaves }
+  \context { \DrumStaff \RemoveEmptyStaves }
+  \context { \TabStaff \RemoveEmptyStaves }
+}
index e347ad20293ef3ae2d8cef931a9e16c03038e864..e19aa4fd823747a064f771383aba4b8c3e7efe7f 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.12.0"
+\version "2.13.18"
 
 \header { texidoc =
 
@@ -21,7 +21,8 @@ alignment; this should not confuse the mechanism.
 \layout {
   ragged-right= ##t
   \context {
-    \RemoveEmptyStaffContext
+    \Staff
+    \RemoveEmptyStaves
   }
 }
 
index fd6ccbdd5b488741126cab562d306914da68d675..a554dd2c1afa980112604ea58d75944a6cb57c0f 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.13.10"
+\version "2.13.18"
 \header {
   texidoc =
 
@@ -18,7 +18,8 @@ and no staff case.
 \layout {
   ragged-right= ##t
   \context {
-    \RemoveEmptyRhythmicStaffContext
+    \RhythmicStaff
+    \RemoveEmptyStaves
   }
 }
 
index e5738ab8760e06863f48e93c76b7b099a040d4d4..a692385fc9ccfddafaba5652c3ae9333015cd916 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.13.10"
+\version "2.13.18"
 
 \header {
   texidoc =
@@ -18,7 +18,8 @@ and no staff case."
 \layout {
   ragged-right= ##t
   \context {
-    \RemoveEmptyTabStaffContext
+    \TabStaff
+    \RemoveEmptyStaves
   }
 }
 
diff --git a/lily/context-mod-scheme.cc b/lily/context-mod-scheme.cc
new file mode 100644 (file)
index 0000000..2457496
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+  This file is part of LilyPond, the GNU music typesetter.
+
+  Copyright (C) 2010 Jan Nieuwenhuizen <janneke@gnu.org>
+  Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+  LilyPond is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  LilyPond is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "context.hh"
+#include "context-mod.hh"
+
+LY_DEFINE (ly_get_context_mods,
+          "ly:get-context-mods",
+          1, 0, 0, (SCM contextmod),
+          "Returns the list of context modifications stored in @var{contextmod}.")
+{
+  Context_mod *tr = unsmob_context_mod (contextmod);
+  LY_ASSERT_SMOB (Context_mod, contextmod, 1);
+  return tr->get_mods ();
+}
+
+LY_DEFINE (ly_add_context_mod,
+          "ly:add-context-mod",
+          2, 0, 0, (SCM contextmods, SCM modification),
+          "Adds the given context @var{modification} to the list @var{contextmods} of context modifications.")
+{
+  Context_mod *ctxmod = unsmob_context_mod (contextmods);
+  LY_ASSERT_SMOB (Context_mod, contextmods, 1);
+  ctxmod->add_context_mod (modification);
+  return SCM_UNSPECIFIED;
+}
+
diff --git a/lily/context-mod.cc b/lily/context-mod.cc
new file mode 100644 (file)
index 0000000..691f296
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+  This file is part of LilyPond, the GNU music typesetter.
+
+  Copyright (C) 2010 Reinhold Kainhofer <reinhold@kainhofer.com>
+
+  LilyPond is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  LilyPond is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "context-mod.hh"
+
+Context_mod::Context_mod ()
+{
+  mods_ = SCM_EOL;
+}
+
+Context_mod::Context_mod (Context_mod const &s)
+{
+  mods_ = s.mods_;
+}
+
+#include "ly-smobs.icc"
+IMPLEMENT_SIMPLE_SMOBS (Context_mod);
+IMPLEMENT_DEFAULT_EQUAL_P (Context_mod);
+
+int
+Context_mod::print_smob (SCM smob, SCM port, scm_print_state*)
+{
+  Context_mod *me = (Context_mod *) SCM_CELL_WORD_1 (smob);
+
+  scm_puts ("#<Context_mod ", port);
+  scm_display (me->mods_, port);
+  scm_puts (">", port);
+  return 1;
+}
+
+SCM
+Context_mod::mark_smob (SCM smob)
+{
+  ASSERT_LIVE_IS_ALLOWED ();
+
+  Context_mod *me = (Context_mod *) SCM_CELL_WORD_1 (smob);
+
+  scm_gc_mark (me->mods_);
+  return me->mods_;
+}
+
+void
+Context_mod::add_context_mod (SCM mod)
+{
+  mods_ = scm_cons (mod, mods_);
+}
+
+void
+Context_mod::add_context_mods (SCM mods)
+{
+  for (SCM m = mods; scm_is_pair (m); m = scm_cdr (m))
+    add_context_mod (scm_car (m));
+}
+
+SCM
+Context_mod::get_mods () const
+{
+  return scm_reverse (mods_);
+}
+
diff --git a/lily/include/context-mod.hh b/lily/include/context-mod.hh
new file mode 100644 (file)
index 0000000..babb864
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+  This file is part of LilyPond, the GNU music typesetter.
+
+  Copyright (C) 2010 Reinhold Kainhofer <reinhold@kainhofer.com>
+
+  LilyPond is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  LilyPond is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/**
+ * context-mod.hh
+ * Implement a structure to store context modifications to be inserted
+ * at some later point
+ */
+
+#ifndef CONTEXT_MOD_HH
+#define CONTEXT_MOD_HH
+
+#include "lily-proto.hh"
+#include "smobs.hh"
+#include "virtual-methods.hh"
+
+
+/*
+  Modifications for an interpretation context as given in the
+  input.
+*/
+struct Context_mod
+{
+private:
+  SCM mods_;
+public:
+  void add_context_mod (SCM);
+  void add_context_mods (SCM);
+
+  VIRTUAL_COPY_CONSTRUCTOR (Context_mod, Context_mod);
+
+  SCM get_mods () const;
+
+  Context_mod ();
+  Context_mod (Context_mod const &);
+  DECLARE_SIMPLE_SMOBS (Context_mod);
+};
+
+DECLARE_UNSMOB (Context_mod, context_mod);
+
+#endif /* CONTEXT_MOD_HH */
+
index d9ede2a7657805c9a17c985ef7f59d9ac6e62ac3..04b9b23d53c12b2ecd6b4290c0a1de1438f1214d 100644 (file)
@@ -54,6 +54,7 @@ class Cluster_engraver;
 class Column_x_positions;
 class Context;
 class Context_def;
+class Context_mod;
 class Context_specced_music;
 class Dispatcher;
 class Dot_column;
diff --git a/lily/note-column-scheme.cc b/lily/note-column-scheme.cc
new file mode 100644 (file)
index 0000000..e8b88af
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+  This file is part of LilyPond, the GNU music typesetter.
+
+  Copyright (C) 2010 Nicolas Sceaux <nicolas.sceaux@free.fr>
+
+  LilyPond is free software: you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation, either version 3 of the License, or
+  (at your option) any later version.
+
+  LilyPond is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "note-column.hh"
+#include "lily-guile.hh"
+#include "grob.hh"
+
+LY_DEFINE (ly_note_column_accidentals, "ly:note-column-accidentals",
+          1, 0, 0, (SCM note_column),
+          "Return the @code{AccidentalPlacement} grob from @var{note_column}"
+          "if any, or @code{SCM_EOL} otherwise.")
+{
+  Grob *grob = unsmob_grob (note_column);
+  LY_ASSERT_SMOB (Grob, note_column, 1);
+  Grob *acc = Note_column::accidentals (grob);
+  if (acc)
+    return acc->self_scm ();
+  return SCM_EOL;
+}
+
+LY_DEFINE (ly_note_column_dot_column, "ly:note-column-dot-column",
+          1, 0, 0, (SCM note_column),
+          "Return the @code{DotColumn} grob from @var{note_column}"
+          "if any, or @code{SCM_EOL} otherwise.")
+{
+  Grob *grob = unsmob_grob (note_column);
+  LY_ASSERT_SMOB (Grob, note_column, 1);
+  Grob *dot_column = Note_column::dot_column (grob);
+  if (dot_column)
+    return dot_column->self_scm ();
+  return SCM_EOL;
+}
index c79e5217464c7f4b414ae6c631cd3a6de7117097..843f19158a699c99ba5dc9b25f495d55c7d6e3af 100644 (file)
@@ -161,7 +161,7 @@ Note_column::first_head (Grob *me)
 }
 
 /*
-  Return the first Accidentals grob that we find in a note-head.
+  Return the first AccidentalPlacement grob that we find in a note-head.
 */
 Grob *
 Note_column::accidentals (Grob *me)
@@ -196,7 +196,7 @@ Note_column::dot_column (Grob *me)
       if (dots)
        return dots->get_parent (X_AXIS);
     }
-  
+
   return 0;
 }
 
index 5f18eef53191b046830953038da9a8c2561233ed..41e5080f9854651069dcf7c9ef0c798d0b318716 100644 (file)
@@ -84,6 +84,7 @@ using namespace std;
 
 #include "book.hh"
 #include "context-def.hh"
+#include "context-mod.hh"
 #include "dimensions.hh"
 #include "file-path.hh"
 #include "input.hh"
@@ -279,6 +280,7 @@ If we give names, Bison complains.
 %token <scm> CHORD_MODIFIER
 %token <scm> CHORD_REPETITION
 %token <scm> CONTEXT_DEF_IDENTIFIER
+%token <scm> CONTEXT_MOD_IDENTIFIER
 %token <scm> DRUM_PITCH
 %token <scm> DURATION_IDENTIFIER
 %token <scm> EVENT_IDENTIFIER
@@ -346,6 +348,7 @@ If we give names, Bison complains.
 %type <scm> chord_body_element
 %type <scm> command_element
 %type <scm> command_event
+%type <scm> context_modification
 %type <scm> context_change
 %type <scm> direction_less_event
 %type <scm> direction_reqd_event
@@ -631,6 +634,9 @@ identifier_init:
        | DIGIT {
                $$ = scm_from_int ($1);
        }
+        | context_modification {
+                $$ = $1;
+        }
        ;
 
 context_def_spec_block:
@@ -663,6 +669,13 @@ context_def_spec_body:
        | context_def_spec_body context_mod {
                unsmob_context_def ($$)->add_context_mod ($2);
        }
+       | context_def_spec_body context_modification {
+                Context_def *td = unsmob_context_def ($$);
+                SCM new_mods = unsmob_context_mod ($2)->get_mods ();
+                for (SCM m = new_mods; scm_is_pair (m); m = scm_cdr (m)) {
+                    td->add_context_mod (scm_car (m));
+                }
+       }
        ;
 
 
@@ -1023,22 +1036,45 @@ simple_music:
        | context_change
        ;
 
+context_modification:
+        WITH { PARSER->lexer_->push_initial_state (); } '{' context_mod_list '}'
+        {
+                PARSER->lexer_->pop_state ();
+                $$ = $4;
+        }
+        | WITH CONTEXT_MOD_IDENTIFIER
+        {
+                $$ = $2;
+        }
+        | CONTEXT_MOD_IDENTIFIER
+        {
+                $$ = $1;
+        }
+        ;
+
 optional_context_mod:
-       /**/ { $$ = SCM_EOL; }
-       | WITH { PARSER->lexer_->push_initial_state (); }
-       '{' context_mod_list '}'
-       {
-               PARSER->lexer_->pop_state ();
-               $$ = $4;
-       }
-       ;
+        /**/ {
+            $$ = SCM_EOL;
+        }
+        | context_modification
+        {
+              $$ = $1;
+        }
+        ;
 
 context_mod_list:
-       /* */  { $$ = SCM_EOL; }
-       | context_mod_list context_mod  {
-                $$ = scm_cons ($2, $1);
-       }
-       ;
+        /**/ {
+            $$ = Context_mod ().smobbed_copy ();
+        }
+        | context_mod_list context_mod  {
+                 unsmob_context_mod ($1)->add_context_mod ($2);
+        }
+        | context_mod_list CONTEXT_MOD_IDENTIFIER {
+                 Context_mod *md = unsmob_context_mod ($2);
+                 if (md)
+                     unsmob_context_mod ($1)->add_context_mods (md->get_mods ());
+        }
+        ;
 
 composite_music:
        prefix_composite_music { $$ = $1; }
@@ -1120,10 +1156,18 @@ prefix_composite_music:
                $$ = run_music_function (PARSER, $1);
        }
        | CONTEXT simple_string optional_id optional_context_mod music {
-               $$ = MAKE_SYNTAX ("context-specification", @$, $2, $3, $5, $4, SCM_BOOL_F);
+                Context_mod *ctxmod = unsmob_context_mod ($4);
+                SCM mods = SCM_EOL;
+                if (ctxmod)
+                        mods = ctxmod->get_mods ();
+               $$ = MAKE_SYNTAX ("context-specification", @$, $2, $3, $5, mods, SCM_BOOL_F);
        }
        | NEWCONTEXT simple_string optional_id optional_context_mod music {
-               $$ = MAKE_SYNTAX ("context-specification", @$, $2, $3, $5, $4, SCM_BOOL_T);
+                Context_mod *ctxmod = unsmob_context_mod ($4);
+                SCM mods = SCM_EOL;
+                if (ctxmod)
+                        mods = ctxmod->get_mods ();
+               $$ = MAKE_SYNTAX ("context-specification", @$, $2, $3, $5, mods, SCM_BOOL_T);
        }
 
        | TIMES fraction music {
@@ -1148,7 +1192,11 @@ prefix_composite_music:
                PARSER->lexer_->pop_state ();
        }
        | mode_changing_head_with_context optional_context_mod grouped_music_list {
-               $$ = MAKE_SYNTAX ("context-specification", @$, $1, SCM_EOL, $3, $2, SCM_BOOL_T);
+                Context_mod *ctxmod = unsmob_context_mod ($2);
+                SCM mods = SCM_EOL;
+                if (ctxmod)
+                        mods = ctxmod->get_mods ();
+               $$ = MAKE_SYNTAX ("context-specification", @$, $1, SCM_EOL, $3, mods, SCM_BOOL_T);
                if ($1 == ly_symbol2scm ("ChordNames"))
                {
                  $$ = MAKE_SYNTAX ("unrelativable-music", @$, $$);
@@ -1942,6 +1990,7 @@ steno_duration:
        | DURATION_IDENTIFIER dots      {
                Duration *d = unsmob_duration ($1);
                Duration k (d->duration_log (), d->dot_count () + $2);
+               k = k.compressed (d->factor ());
                *d = k;
                $$ = $1;
        }
@@ -2556,13 +2605,17 @@ Lily_lexer::try_special_identifiers (SCM *destination, SCM sid)
        } else if (scm_is_number (sid)) {
                *destination = sid;
                return NUMBER_IDENTIFIER;
-       } else if (unsmob_context_def (sid)) {
-               Context_def *def= unsmob_context_def (sid)->clone ();
+        } else if (unsmob_context_def (sid)) {
+                Context_def *def= unsmob_context_def (sid)->clone ();
+
+                *destination = def->self_scm ();
+                def->unprotect ();
 
-               *destination = def->self_scm ();
-               def->unprotect ();
+                return CONTEXT_DEF_IDENTIFIER;
+        } else if (unsmob_context_mod (sid)) {
+                *destination = unsmob_context_mod (sid)->smobbed_copy ();
 
-               return CONTEXT_DEF_IDENTIFIER;
+                return CONTEXT_MOD_IDENTIFIER;
        } else if (unsmob_score (sid)) {
                Score *score = new Score (*unsmob_score (sid));
                *destination = score->self_scm ();
index 6d4b656dd7e0cb68a21d1a1f84e41cb84f77ce2c..ee723dc0e1e67947316f5e725543263897b8f1b1 100644 (file)
@@ -451,22 +451,13 @@ printing of a single line of lyrics."
 }
 
 
-RemoveEmptyStaffContext = \context {
-  \Staff
+RemoveEmptyStaves = \with {
   \remove "Axis_group_engraver"
   \consists "Hara_kiri_engraver"
   \override Beam #'auto-knee-gap = #'()
   \override VerticalAxisGroup #'remove-empty = ##t
 }
 
-AncientRemoveEmptyStaffContext = \context {
-%% why not add by default?
-
-  \RemoveEmptyStaffContext
-  \accepts "VaticanaVoice"
-  \accepts "GregorianTranscriptionVoice"
-  \accepts "MensuralVoice"
-}
 
 \context {
   \type "Score_engraver"
@@ -980,24 +971,35 @@ accommodated for typesetting a piece in mensural style."
   printKeyCancellation = ##f
 }
 
+
+%% Keep the old definitions in here for compatibility (they erase previous
+%% settings to the corresponding context!).
+%% For new scores, one should simply insert the \RemoveEmptyStaves settings
+%% into the desired context. That's just as easy, requires only one line more
+%% (the \*Staff), but preserves previous context mods.
+%% TODO: DEPRECATED_2.13.17, remove at some point in the future
+RemoveEmptyStaffContext = \context {
+  \Staff
+  \RemoveEmptyStaves
+}
+
+AncientRemoveEmptyStaffContext = \context {
+  \VaticanaStaff
+  \RemoveEmptyStaves
+}
+
 RemoveEmptyDrumStaffContext = \context {
   \DrumStaff
-  \remove "Axis_group_engraver"
-  \override VerticalAxisGroup #'remove-empty = ##t
-  \consists "Hara_kiri_engraver"
+  \RemoveEmptyStaves
 }
 
 RemoveEmptyRhythmicStaffContext = \context {
   \RhythmicStaff
-  \remove "Axis_group_engraver"
-  \override VerticalAxisGroup #'remove-empty = ##t
-  \consists "Hara_kiri_engraver"
+  \RemoveEmptyStaves
 }
 
 RemoveEmptyTabStaffContext = \context {
   \TabStaff
-  \remove "Axis_group_engraver"
-  \override VerticalAxisGroup #'remove-empty = ##t
-  \consists "Hara_kiri_engraver"
+  \RemoveEmptyStaves
 }
 
index 71a834ba2d718fc1e704cec22fda84fc1aa1f881..52299a036176b3210a42314b26f9be03af591f17 100644 (file)
@@ -1,3 +1,5 @@
+%%%% -*- Mode: Scheme -*-
+
 %%%% This file is part of LilyPond, the GNU music typesetter.
 %%%%
 %%%% Copyright (C) 2003--2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
@@ -16,8 +18,6 @@
 %%%% You should have received a copy of the GNU General Public License
 %%%% along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
 
-% -*-Scheme-*-
-
 \version "2.12.0"
 
 
@@ -54,29 +54,25 @@ addQuote =
 %% keep these two together
 afterGraceFraction = #(cons 6 8)
 afterGrace =
-#(define-music-function
-  (parser location main grace)
-  (ly:music? ly:music?)
-  (_i "Create @var{grace} note(s) after a @var{main} music expression.")
-  (let*
-      ((main-length (ly:music-length main))
-       (fraction  (ly:parser-lookup parser 'afterGraceFraction)))
-
-    (make-simultaneous-music
-     (list
-      main
-      (make-sequential-music
-       (list
-
-       (make-music 'SkipMusic
-                   'duration (ly:make-duration
-                              0 0
-                              (* (ly:moment-main-numerator main-length)
-                                 (car fraction))
-                              (* (ly:moment-main-denominator main-length)
-                                 (cdr fraction)) ))
-       (make-music 'GraceMusic
-                   'element grace)))))))
+#(define-music-function (parser location main grace) (ly:music? ly:music?)
+   (_i "Create @var{grace} note(s) after a @var{main} music expression.")
+   (let ((main-length (ly:music-length main))
+        (fraction  (ly:parser-lookup parser 'afterGraceFraction)))
+     (make-simultaneous-music
+      (list
+       main
+       (make-sequential-music
+       (list
+
+        (make-music 'SkipMusic
+                    'duration (ly:make-duration
+                               0 0
+                               (* (ly:moment-main-numerator main-length)
+                                  (car fraction))
+                               (* (ly:moment-main-denominator main-length)
+                                  (cdr fraction))))
+        (make-music 'GraceMusic
+                    'element grace)))))))
 
 
 %% music identifiers not allowed at top-level,
@@ -93,148 +89,148 @@ markups), or inside a score.")
 
 applyContext =
 #(define-music-function (parser location proc) (procedure?)
-  (_i "Modify context properties with Scheme procedure @var{proc}.")
-  (make-music 'ApplyContext
-             'origin location
-             'procedure proc))
+   (_i "Modify context properties with Scheme procedure @var{proc}.")
+   (make-music 'ApplyContext
+              'origin location
+              'procedure proc))
 
 applyMusic =
 #(define-music-function (parser location func music) (procedure? ly:music?)
    (_i"Apply procedure @var{func} to @var{music}.")
-  (func music))
+   (func music))
 
 applyOutput =
 #(define-music-function (parser location ctx proc) (symbol? procedure?)
-  (_i "Apply function @code{proc} to every layout object in context @code{ctx}")
-  (make-music 'ApplyOutputEvent
-             'origin location
-             'procedure proc
-             'context-type ctx))
+   (_i "Apply function @code{proc} to every layout object in context @code{ctx}")
+   (make-music 'ApplyOutputEvent
+              'origin location
+              'procedure proc
+              'context-type ctx))
 
 appoggiatura =
 #(def-grace-function startAppoggiaturaMusic stopAppoggiaturaMusic
-  (_i "Create an appoggiatura from @var{music}"))
+   (_i "Create an appoggiatura from @var{music}"))
 
 % for regression testing purposes.
 assertBeamQuant =
 #(define-music-function (parser location l r) (pair? pair?)
-  (_i "Testing function: check whether the beam quants @var{l} and @var{r} are correct")
-  (make-grob-property-override 'Beam 'positions
-   (ly:make-simple-closure
-    (ly:make-simple-closure
-     (append
-      (list chain-grob-member-functions `(,cons 0 0))
-      (check-quant-callbacks l r))))))
+   (_i "Testing function: check whether the beam quants @var{l} and @var{r} are correct")
+   (make-grob-property-override 'Beam 'positions
+                               (ly:make-simple-closure
+                                (ly:make-simple-closure
+                                 (append
+                                  (list chain-grob-member-functions `(,cons 0 0))
+                                  (check-quant-callbacks l r))))))
 
 % for regression testing purposes.
 assertBeamSlope =
 #(define-music-function (parser location comp) (procedure?)
-  (_i "Testing function: check whether the slope of the beam is the same as @code{comp}")
-  (make-grob-property-override 'Beam 'positions
-   (ly:make-simple-closure
-    (ly:make-simple-closure
-     (append
-      (list chain-grob-member-functions `(,cons 0 0))
-      (check-slope-callbacks comp))))))
+   (_i "Testing function: check whether the slope of the beam is the same as @code{comp}")
+   (make-grob-property-override 'Beam 'positions
+                               (ly:make-simple-closure
+                                (ly:make-simple-closure
+                                 (append
+                                  (list chain-grob-member-functions `(,cons 0 0))
+                                  (check-slope-callbacks comp))))))
 
 autochange =
 #(define-music-function (parser location music) (ly:music?)
-  (_i "Make voices that switch between staves automatically")
-  (make-autochange-music parser music))
+   (_i "Make voices that switch between staves automatically")
+   (make-autochange-music parser music))
 
 
 
 balloonGrobText =
 #(define-music-function (parser location grob-name offset text)
-                       (symbol? number-pair? markup?)
-  (_i "Attach @var{text} to @var{grob-name} at offset @var{offset}
-use like @code{\\once})")
-    (make-music 'AnnotateOutputEvent
-               'symbol grob-name
-               'X-offset (car offset)
-               'Y-offset (cdr offset)
-               'text text))
+   (symbol? number-pair? markup?)
+   (_i "Attach @var{text} to @var{grob-name} at offset @var{offset}
+ (use like @code{\\once})")
+   (make-music 'AnnotateOutputEvent
+              'symbol grob-name
+              'X-offset (car offset)
+              'Y-offset (cdr offset)
+              'text text))
 
 balloonText =
 #(define-music-function (parser location offset text) (number-pair? markup?)
-  (_i "Attach @var{text} at @var{offset} (use like @code{\\tweak})")
-    (make-music 'AnnotateOutputEvent
-               'X-offset (car offset)
-               'Y-offset (cdr offset)
-               'text text))
+   (_i "Attach @var{text} at @var{offset} (use like @code{\\tweak})")
+   (make-music 'AnnotateOutputEvent
+              'X-offset (car offset)
+              'Y-offset (cdr offset)
+              'text text))
 
 bar =
 #(define-music-function (parser location type) (string?)
-  (_i "Insert a bar line of type @var{type}")
+   (_i "Insert a bar line of type @var{type}")
    (context-spec-music
     (make-property-set 'whichBar type)
     'Timing))
 
 barNumberCheck =
 #(define-music-function (parser location n) (integer?)
-  (_i "Print a warning if the current bar number is not @var{n}.")
+   (_i "Print a warning if the current bar number is not @var{n}.")
    (make-music 'ApplyContext
               'origin location
               'procedure
               (lambda (c)
-                (let*
-                    ((cbn (ly:context-property c 'currentBarNumber)))
+                (let ((cbn (ly:context-property c 'currentBarNumber)))
                   (if (and  (number? cbn) (not (= cbn n)))
-                      (ly:input-message location "Barcheck failed got ~a expect ~a"
+                      (ly:input-message location
+                                        "Barcheck failed got ~a expect ~a"
                                         cbn n))))))
 
 bendAfter =
 #(define-music-function (parser location delta) (real?)
-  (_i "Create a fall or doit of pitch interval @var{delta}.")
-  (make-music 'BendAfterEvent
-              'delta-step delta))
+   (_i "Create a fall or doit of pitch interval @var{delta}.")
+   (make-music 'BendAfterEvent
+              'delta-step delta))
 
 bookOutputName =
 #(define-music-function (parser location newfilename) (string?)
-  (_i "Direct output for the current book block to @var{newfilename}.")
-  (set! book-filename newfilename)
-  (make-music 'SequentialMusic 'void #t))
+   (_i "Direct output for the current book block to @var{newfilename}.")
+   (set! book-filename newfilename)
+   (make-music 'SequentialMusic 'void #t))
 
 bookOutputSuffix =
 #(define-music-function (parser location newsuffix) (string?)
-  (_i "Set the output filename suffix for the current book block to
+   (_i "Set the output filename suffix for the current book block to
 @var{newsuffix}.")
-  (set! book-output-suffix newsuffix)
-  (make-music 'SequentialMusic 'void #t))
+   (set! book-output-suffix newsuffix)
+   (make-music 'SequentialMusic 'void #t))
 
 %% why a function?
 breathe =
 #(define-music-function (parser location) ()
-  (_i "Insert a breath mark.")
-           (make-music 'EventChord
-             'origin location
-             'elements (list (make-music 'BreathingEvent))))
+   (_i "Insert a breath mark.")
+   (make-music 'EventChord
+              'origin location
+              'elements (list (make-music 'BreathingEvent))))
 
 
 
 clef =
 #(define-music-function (parser location type) (string?)
-  (_i "Set the current clef to @var{type}.")
+   (_i "Set the current clef to @var{type}.")
    (make-clef-set type))
 
 cueDuring =
 #(define-music-function
-  (parser location what dir main-music) (string? ly:dir? ly:music?)
-  (_i "Insert contents of quote @var{what} corresponding to @var{main-music},
+   (parser location what dir main-music) (string? ly:dir? ly:music?)
+   (_i "Insert contents of quote @var{what} corresponding to @var{main-music},
 in a CueVoice oriented by @var{dir}.")
-  (make-music 'QuoteMusic
-             'element main-music
-             'quoted-context-type 'Voice
-             'quoted-context-id "cue"
-             'quoted-music-name what
-             'quoted-voice-direction dir
-             'origin location))
+   (make-music 'QuoteMusic
+              'element main-music
+              'quoted-context-type 'Voice
+              'quoted-context-id "cue"
+              'quoted-music-name what
+              'quoted-voice-direction dir
+              'origin location))
 
 
 
 displayLilyMusic =
 #(define-music-function (parser location music) (ly:music?)
-  (_i "Display the LilyPond input representation of @var{music}
+   (_i "Display the LilyPond input representation of @var{music}
 to the console.")
    (newline)
    (display-lily-music music parser)
@@ -242,7 +238,7 @@ to the console.")
 
 displayMusic =
 #(define-music-function (parser location music) (ly:music?)
-  (_i "Display the internal representation of @var{music} to the console.")
+   (_i "Display the internal representation of @var{music} to the console.")
    (newline)
    (display-scheme-music music)
    music)
@@ -251,26 +247,26 @@ displayMusic =
 
 endSpanners =
 #(define-music-function (parser location music) (ly:music?)
-  (_i "Terminate the next spanner prematurely after exactly one note without the need of a specific end spanner.")
+   (_i "Terminate the next spanner prematurely after exactly one note
+without the need of a specific end spanner.")
    (if (eq? (ly:music-property music 'name) 'EventChord)
-       (let*
-          ((elts (ly:music-property music 'elements))
-           (start-span-evs (filter (lambda (ev)
-                               (and (music-has-type ev 'span-event)
-                                    (equal? (ly:music-property ev 'span-direction)
-                                            START)))
-                             elts))
-           (stop-span-evs
-            (map (lambda (m)
-                   (let* ((c (music-clone m)))
-                     (set! (ly:music-property c 'span-direction) STOP)
-                     c))
-                 start-span-evs))
-           (end-ev-chord (make-music 'EventChord
-                                     'elements stop-span-evs))
-           (total (make-music 'SequentialMusic
-                              'elements (list music
-                                              end-ev-chord))))
+       (let* ((elts (ly:music-property music 'elements))
+             (start-span-evs (filter (lambda (ev)
+                                       (and (music-has-type ev 'span-event)
+                                            (equal? (ly:music-property ev 'span-direction)
+                                                    START)))
+                                     elts))
+             (stop-span-evs
+              (map (lambda (m)
+                     (let ((c (music-clone m)))
+                       (set! (ly:music-property c 'span-direction) STOP)
+                       c))
+                   start-span-evs))
+             (end-ev-chord (make-music 'EventChord
+                                       'elements stop-span-evs))
+             (total (make-music 'SequentialMusic
+                                'elements (list music
+                                                end-ev-chord))))
         total)
 
        (ly:input-message location (_ "argument endSpanners is not an EventChord: ~a" music))))
@@ -279,10 +275,9 @@ endSpanners =
 
 featherDurations=
 #(define-music-function (parser location factor argument) (ly:moment? ly:music?)
- (_i "Adjust durations of music in @var{argument} by rational @var{factor}. ")
-   (let*
-       ((orig-duration (ly:music-length argument))
-       (multiplier (ly:make-moment 1 1)))
+   (_i "Adjust durations of music in @var{argument} by rational @var{factor}.")
+   (let ((orig-duration (ly:music-length argument))
+        (multiplier (ly:make-moment 1 1)))
 
      (music-map
       (lambda (mus)
@@ -290,8 +285,7 @@ featherDurations=
                 (< 0 (ly:moment-main-denominator (ly:music-length mus))))
            (begin
              (ly:music-compress mus multiplier)
-             (set! multiplier (ly:moment-mul factor multiplier)))
-           )
+             (set! multiplier (ly:moment-mul factor multiplier))))
        mus)
       argument)
 
@@ -314,10 +308,8 @@ instrumentSwitch =
    (parser location name) (string?)
    (_i "Switch instrument to @var{name}, which must be predefined with
 @code{\\addInstrumentDefinition}.")
-   (let*
-       ((handle         (assoc name instrument-definitions))
-       (instrument-def (if handle (cdr handle) '()))
-       )
+   (let* ((handle (assoc name instrument-definitions))
+         (instrument-def (if handle (cdr handle) '())))
 
      (if (not handle)
         (ly:input-message location "No such instrument: ~a" name))
@@ -334,35 +326,33 @@ instrumentSwitch =
 
 
 keepWithTag =
-#(define-music-function
-  (parser location tag music) (symbol? ly:music?)
-  (_i "Include only elements of @var{music} that are tagged with @var{tag}.")
-  (music-filter
-   (lambda (m)
-    (let* ((tags (ly:music-property m 'tags))
-          (res (memq tag tags)))
-     (or
-      (eq? tags '())
-      res)))
-   music))
+#(define-music-function (parser location tag music) (symbol? ly:music?)
+   (_i "Include only elements of @var{music} that are tagged with @var{tag}.")
+   (music-filter
+    (lambda (m)
+      (let* ((tags (ly:music-property m 'tags))
+            (res (memq tag tags)))
+       (or
+        (eq? tags '())
+        res)))
+    music))
 
 killCues =
-#(define-music-function
-   (parser location music)
-   (ly:music?)
+#(define-music-function (parser location music) (ly:music?)
    (_i "Remove cue notes from @var{music}.")
    (music-map
     (lambda (mus)
       (if (and (string? (ly:music-property mus 'quoted-music-name))
               (string=? (ly:music-property mus 'quoted-context-id "") "cue"))
          (ly:music-property mus 'element)
-         mus)) music))
+         mus))
+    music))
 
 
 
 label =
 #(define-music-function (parser location label) (symbol?)
-   (_i "Create @var{label} as a bookmarking label")
+   (_i "Create @var{label} as a bookmarking label.")
    (make-music 'EventChord
               'page-marker #t
               'page-label label
@@ -372,15 +362,14 @@ label =
 
 
 makeClusters =
-#(define-music-function
-               (parser location arg) (ly:music?)
-   (_i "Display chords in @var{arg} as clusters")
-               (music-map note-to-cluster arg))
+#(define-music-function (parser location arg) (ly:music?)
+   (_i "Display chords in @var{arg} as clusters.")
+   (music-map note-to-cluster arg))
 
 musicMap =
 #(define-music-function (parser location proc mus) (procedure? ly:music?)
-    (_i "Apply @var{proc} to @var{mus} and all of the music it contains.")
-    (music-map proc mus))
+   (_i "Apply @var{proc} to @var{mus} and all of the music it contains.")
+   (music-map proc mus))
 
 
 
@@ -388,7 +377,7 @@ musicMap =
 %% because music identifiers are not allowed at top-level.
 noPageBreak =
 #(define-music-function (location parser) ()
-   (_i "Forbid a page break. May be used at toplevel (ie between scores or
+   (_i "Forbid a page break.  May be used at toplevel (i.e., between scores or
 markups), or inside a score.")
    (make-music 'EventChord
               'page-marker #t
@@ -398,7 +387,7 @@ markups), or inside a score.")
 
 noPageTurn =
 #(define-music-function (location parser) ()
-   (_i "Forbid a page turn. May be used at toplevel (ie between scores or
+   (_i "Forbid a page turn.  May be used at toplevel (i.e., between scores or
 markups), or inside a score.")
    (make-music 'EventChord
               'page-marker #t
@@ -410,24 +399,22 @@ markups), or inside a score.")
 
 octaveCheck =
 #(define-music-function (parser location pitch-note) (ly:music?)
-   (_i "octave check")
-
+   (_i "Octave check.")
    (make-music 'RelativeOctaveCheck
               'origin location
-              'pitch (pitch-of-note pitch-note)
-          ))
+              'pitch (pitch-of-note pitch-note)))
 
-ottava = #(define-music-function (parser location octave) (number?)
-  (_i "set the octavation ")
-  (make-ottava-set octave))
+ottava =
+#(define-music-function (parser location octave) (number?)
+   (_i "Set the octavation.")
+   (make-ottava-set octave))
 
 overrideBeamSettings =
 #(define-music-function
-    (parser location
-     context time-signature rule-type grouping-rule)
-    (symbol? pair? symbol? pair?)
+   (parser location context time-signature rule-type grouping-rule)
+   (symbol? pair? symbol? pair?)
 
- (_i "Override beamSettings in @var{context}
  (_i "Override beamSettings in @var{context}
 for time signatures of @var{time-signature} and rules of type
 @var{rule-type} to have a grouping rule alist
 @var{grouping-rule}.
@@ -438,13 +425,13 @@ entries.  @var{grouping} is in units of @var{beam-type}.  If
 @var{beam-type} is @code{*}, grouping is in units of the denominator
 of @var{time-signature}.")
 
- ;; TODO -- add warning if largest value of grouping is
;;        greater than time-signature.
  ;; TODO -- add warning if largest value of grouping is
  ;;      greater than time-signature.
 
-#{
-#(override-beam-setting
-  $time-signature $rule-type $grouping-rule $context)
-#})
+   #{
+     #(override-beam-setting
+       $time-signature $rule-type $grouping-rule $context)
+   #})
 
 overrideProperty =
 #(define-music-function (parser location name property value)
@@ -452,12 +439,11 @@ overrideProperty =
 
    (_i "Set @var{property} to @var{value} in all grobs named @var{name}.
 The @var{name} argument is a string of the form @code{\"Context.GrobName\"}
-or @code{\"GrobName\"}")
+or @code{\"GrobName\"}.")
 
-   (let*
-       ((name-components (string-split name #\.))
-       (context-name 'Bottom)
-       (grob-name #f))
+   (let ((name-components (string-split name #\.))
+        (context-name 'Bottom)
+        (grob-name #f))
 
      (if (> 2 (length name-components))
         (set! grob-name (string->symbol (car name-components)))
@@ -481,7 +467,7 @@ or @code{\"GrobName\"}")
 %% because music identifiers are not allowed at top-level.
 pageBreak =
 #(define-music-function (location parser) ()
-   (_i "Force a page break. May be used at toplevel (i.e. between scores or
+   (_i "Force a page break.  May be used at toplevel (i.e., between scores or
 markups), or inside a score.")
    (make-music 'EventChord
               'page-marker #t
@@ -509,7 +495,7 @@ pageTurn =
 
 parallelMusic =
 #(define-music-function (parser location voice-ids music) (list? ly:music?)
-  (_i "Define parallel music sequences, separated by '|' (bar check signs),
+   (_i "Define parallel music sequences, separated by '|' (bar check signs),
 and assign them to the identifiers provided in @var{voice-ids}.
 
 @var{voice-ids}: a list of music identifiers (symbols containing only letters)
@@ -529,94 +515,96 @@ Example:
   C = { e e | f f | }
 @end verbatim
 ")
-  (let* ((voices (apply circular-list (make-list (length voice-ids) (list))))
-        (current-voices voices)
-        (current-sequence (list)))
-    ;;
-    ;; utilities
-    (define (push-music m)
-      "Push the music expression into the current sequence"
-      (set! current-sequence (cons m current-sequence)))
-    (define (change-voice)
-      "Stores the previously built sequence into the current voice and
+   (let* ((voices (apply circular-list (make-list (length voice-ids) (list))))
+         (current-voices voices)
+         (current-sequence (list)))
+     ;;
+     ;; utilities
+     (define (push-music m)
+       "Push the music expression into the current sequence"
+       (set! current-sequence (cons m current-sequence)))
+     (define (change-voice)
+       "Stores the previously built sequence into the current voice and
        change to the following voice."
-      (list-set! current-voices 0 (cons (make-music 'SequentialMusic
-                                        'elements (reverse! current-sequence))
-                                       (car current-voices)))
-      (set! current-sequence (list))
-      (set! current-voices (cdr current-voices)))
-    (define (bar-check? m)
-      "Checks whether m is a bar check."
-      (eq? (ly:music-property m 'name) 'BarCheck))
-    (define (music-origin music)
-      "Recursively search an origin location stored in music."
-      (cond ((null? music) #f)
-           ((not (null? (ly:music-property music 'origin)))
-            (ly:music-property music 'origin))
-           (else (or (music-origin (ly:music-property music 'element))
-                     (let ((origins (remove not (map music-origin
-                                                     (ly:music-property music 'elements)))))
-                       (and (not (null? origins)) (car origins)))))))
-    ;;
-    ;; first, split the music and fill in voices
-    (map-in-order (lambda (m)
-                   (push-music m)
-                   (if (bar-check? m) (change-voice)))
-                 (ly:music-property music 'elements))
-    (if (not (null? current-sequence)) (change-voice))
-    ;; un-circularize `voices' and reorder the voices
-    (set! voices (map-in-order (lambda (dummy seqs)
-                                (reverse! seqs))
-                              voice-ids voices))
-    ;;
-    ;; set origin location of each sequence in each voice
-    ;; for better type error tracking
-    (for-each (lambda (voice)
-               (for-each (lambda (seq)
-                           (set! (ly:music-property seq 'origin)
-                                 (or (music-origin seq) location)))
-                         voice))
-             voices)
-    ;;
-    ;; check sequence length
-    (apply for-each (lambda* (#:rest seqs)
-                     (let ((moment-reference (ly:music-length (car seqs))))
-                       (for-each (lambda (seq moment)
-                                   (if (not (equal? moment moment-reference))
-                                       (ly:music-message seq
-                                        "Bars in parallel music don't have the same length")))
-                         seqs (map-in-order ly:music-length seqs))))
-          voices)
-   ;;
-   ;; bind voice identifiers to the voices
-   (map (lambda (voice-id voice)
-         (ly:parser-define! parser voice-id
-                            (make-music 'SequentialMusic
-                              'origin location
-                              'elements voice)))
-       voice-ids voices))
;; Return an empty sequence. this function is actually a "void" function.
- (make-music 'SequentialMusic 'void #t))
+       (list-set! current-voices 0 (cons (make-music 'SequentialMusic
+                                                    'elements (reverse! current-sequence))
+                                        (car current-voices)))
+       (set! current-sequence (list))
+       (set! current-voices (cdr current-voices)))
+     (define (bar-check? m)
+       "Checks whether m is a bar check."
+       (eq? (ly:music-property m 'name) 'BarCheck))
+     (define (music-origin music)
+       "Recursively search an origin location stored in music."
+       (cond ((null? music) #f)
+            ((not (null? (ly:music-property music 'origin)))
+             (ly:music-property music 'origin))
+            (else (or (music-origin (ly:music-property music 'element))
+                      (let ((origins (remove not (map music-origin
+                                                      (ly:music-property music 'elements)))))
+                        (and (not (null? origins)) (car origins)))))))
+     ;;
+     ;; first, split the music and fill in voices
+     (map-in-order (lambda (m)
+                    (push-music m)
+                    (if (bar-check? m) (change-voice)))
+                  (ly:music-property music 'elements))
+     (if (not (null? current-sequence)) (change-voice))
+     ;; un-circularize `voices' and reorder the voices
+     (set! voices (map-in-order (lambda (dummy seqs)
+                                 (reverse! seqs))
+                               voice-ids voices))
+     ;;
+     ;; set origin location of each sequence in each voice
+     ;; for better type error tracking
+     (for-each (lambda (voice)
+                (for-each (lambda (seq)
+                            (set! (ly:music-property seq 'origin)
+                                  (or (music-origin seq) location)))
+                          voice))
+              voices)
+     ;;
+     ;; check sequence length
+     (apply for-each (lambda* (#:rest seqs)
+                             (let ((moment-reference (ly:music-length (car seqs))))
+                               (for-each (lambda (seq moment)
+                                           (if (not (equal? moment moment-reference))
+                                               (ly:music-message seq
+                                                                 "Bars in parallel music don't have the same length")))
+                                         seqs (map-in-order ly:music-length seqs))))
+           voices)
+     ;;
+     ;; bind voice identifiers to the voices
+     (map (lambda (voice-id voice)
+           (ly:parser-define! parser voice-id
+                              (make-music 'SequentialMusic
+                                          'origin location
+                                          'elements voice)))
+         voice-ids voices))
  ;; Return an empty sequence.  This function is actually a "void" function.
  (make-music 'SequentialMusic 'void #t))
 
 parenthesize =
 #(define-music-function (parser loc arg) (ly:music?)
    (_i "Tag @var{arg} to be parenthesized.")
 
    (if (memq 'event-chord (ly:music-property arg 'types))
-     ; arg is an EventChord -> set the parenthesize property on all child notes and rests
-     (map
-       (lambda (ev)
-        (if (or (memq 'note-event (ly:music-property ev 'types))
-                (memq 'rest-event (ly:music-property ev 'types)))
-          (set! (ly:music-property ev 'parenthesize) #t)))
-       (ly:music-property arg 'elements))
-     ; No chord, simply set property for this expression:
-     (set! (ly:music-property arg 'parenthesize) #t))
+       ;; arg is an EventChord -> set the parenthesize property
+       ;; on all child notes and rests
+       (map
+       (lambda (ev)
+         (if (or (memq 'note-event (ly:music-property ev 'types))
+                 (memq 'rest-event (ly:music-property ev 'types)))
+             (set! (ly:music-property ev 'parenthesize) #t)))
+       (ly:music-property arg 'elements))
+       ;; No chord, simply set property for this expression:
+       (set! (ly:music-property arg 'parenthesize) #t))
    arg)
 
 partcombine =
 #(define-music-function (parser location part1 part2) (ly:music? ly:music?)
-   (_i "Take the music in @var{part1} and @var{part2} and typeset so that they share a staff.")
+   (_i "Take the music in @var{part1} and @var{part2} and typeset so
+that they share a staff.")
    (make-part-combine-music parser
                             (list part1 part2)))
 
@@ -653,9 +641,7 @@ print @var{secondary-note} as a stemless note head in parentheses.")
      main-note))
 
 quoteDuring =
-#(define-music-function
-   (parser location what main-music)
-   (string? ly:music?)
+#(define-music-function (parser location what main-music) (string? ly:music?)
    (_i "Indicate a section of music to be quoted.  @var{what} indicates the name
 of the quoted voice, as specified in an @code{\\addQuote} command.
 @var{main-music} is used to indicate the length of music to be quoted;
@@ -666,47 +652,41 @@ usually contains spacers or multi-measure rests.")
                'origin location))
 
 removeWithTag =
-#(define-music-function
-  (parser location tag music) (symbol? ly:music?)
-  (_i "Remove elements of @var{music} that are tagged with @var{tag}.")
-  (music-filter
-   (lambda (m)
-    (let* ((tags (ly:music-property m 'tags))
-          (res (memq tag tags)))
-     (not res)))
- music))
+#(define-music-function (parser location tag music) (symbol? ly:music?)
+   (_i "Remove elements of @var{music} that are tagged with @var{tag}.")
+   (music-filter
+    (lambda (m)
+      (let* ((tags (ly:music-property m 'tags))
+            (res (memq tag tags)))
+       (not res)))
+    music))
 
 resetRelativeOctave =
-#(define-music-function
-    (parser location reference-note)
-    (ly:music?)
-    (_i "Set the octave inside a \\relative section.")
+#(define-music-function (parser location reference-note) (ly:music?)
+   (_i "Set the octave inside a \\relative section.")
 
-   (let*
-    ((notes (ly:music-property reference-note 'elements))
-     (pitch (ly:music-property (car notes) 'pitch)))
+   (let* ((notes (ly:music-property reference-note 'elements))
+         (pitch (ly:music-property (car notes) 'pitch)))
 
-    (set! (ly:music-property reference-note 'elements) '())
-    (set! (ly:music-property reference-note
-       'to-relative-callback)
-       (lambda (music last-pitch)
-       pitch))
+     (set! (ly:music-property reference-note 'elements) '())
+     (set! (ly:music-property reference-note 'to-relative-callback)
+          (lambda (music last-pitch)
+            pitch))
 
-    reference-note))
+     reference-note))
 
 revertBeamSettings =
 #(define-music-function
-    (parser location
-     context time-signature rule-type)
-    (symbol? pair? symbol?)
+   (parser location context time-signature rule-type)
+   (symbol? pair? symbol?)
 
- (_i "Revert beam settings in @var{context} for time signatures of
  (_i "Revert beam settings in @var{context} for time signatures of
 @var{time-signature} and groups of type
 @var{group-type}.  @var{group-type} can be @code{end}
 or @code{subdivide}.")
-#{
-  #(revert-beam-setting $time-signature $rule-type $context)
-#})
+   #{
+     #(revert-beam-setting $time-signature $rule-type $context)
+   #})
 
 rightHandFinger =
 #(define-music-function (parser location finger) (number-or-string?)
@@ -724,7 +704,8 @@ rightHandFinger =
 
 
 scaleDurations =
-#(define-music-function (parser location fraction music) (number-pair? ly:music?)
+#(define-music-function (parser location fraction music)
+   (number-pair? ly:music?)
    (_i "Multiply the duration of events in @var{music} by @var{fraction}.")
    (ly:music-compress music
                      (ly:make-moment (car fraction) (cdr fraction))))
@@ -734,23 +715,24 @@ setBeatGrouping =
    (_i "Set the beat grouping in the current time signature to
 @var{grouping}.")
    (define (default-group-setting c)
-    (let* ((context-time-signature
-           (ly:context-property c 'timeSignatureFraction))
-          (time-signature (if (null? context-time-signature)
-                              '(4 . 4)
-                              context-time-signature)))
-      (override-property-setting
-       c
-       'beamSettings
-       (list time-signature 'end)
-       (list  (cons '* grouping)))))
+     (let* ((context-time-signature
+            (ly:context-property c 'timeSignatureFraction))
+           (time-signature (if (null? context-time-signature)
+                               '(4 . 4)
+                               context-time-signature)))
+       (override-property-setting
+       c
+       'beamSettings
+       (list time-signature 'end)
+       (list (cons '* grouping)))))
 
    (context-spec-music
-     (make-apply-context default-group-setting)
-     'Score))
+    (make-apply-context default-group-setting)
+    'Score))
 
 shiftDurations =
-#(define-music-function (parser location dur dots arg) (integer? integer? ly:music?)
+#(define-music-function (parser location dur dots arg)
+   (integer? integer? ly:music?)
    (_i "Scale @var{arg} up by a factor of @var{2^dur*(2-(1/2)^dots)}.")
 
    (music-map
@@ -762,19 +744,20 @@ spacingTweaks =
    (_i "Set the system stretch, by reading the 'system-stretch property of
 the `parameters' assoc list.")
    #{
-      \overrideProperty #"Score.NonMusicalPaperColumn"
-       #'line-break-system-details
-       #$(list (cons 'alignment-extra-space (cdr (assoc 'system-stretch parameters)))
-               (cons 'system-Y-extent (cdr (assoc 'system-Y-extent parameters))))
+     \overrideProperty #"Score.NonMusicalPaperColumn"
+     #'line-break-system-details
+     #$(list (cons 'alignment-extra-space (cdr (assoc 'system-stretch parameters)))
+            (cons 'system-Y-extent (cdr (assoc 'system-Y-extent parameters))))
    #})
 
 styledNoteHeads =
-#(define-music-function
-   (parser location style heads music)
+#(define-music-function (parser location style heads music)
    (symbol? list-or-symbol? ly:music?)
    (_i "Set @var{heads} in @var{music} to @var{style}.")
    (style-note-heads heads style music))
 
+
+
 tabChordRepetition =
 #(define-music-function (parser location) ()
    (_i "Include the string information in a chord repetition.")
@@ -782,8 +765,7 @@ tabChordRepetition =
    (make-music 'SequentialMusic 'void #t))
 
 tag =
-#(define-music-function (parser location tag arg)
-   (symbol? ly:music?)
+#(define-music-function (parser location tag arg) (symbol? ly:music?)
 
    (_i "Add @var{tag} to the @code{tags} property of @var{arg}.")
 
@@ -795,23 +777,23 @@ tag =
 
 transposedCueDuring =
 #(define-music-function
-  (parser location what dir pitch-note main-music)
-  (string? ly:dir? ly:music? ly:music?)
+   (parser location what dir pitch-note main-music)
+   (string? ly:dir? ly:music? ly:music?)
 
-  (_i "Insert notes from the part @var{what} into a voice called @code{cue},
+   (_i "Insert notes from the part @var{what} into a voice called @code{cue},
 using the transposition defined by @var{pitch-note}.  This happens
 simultaneously with @var{main-music}, which is usually a rest. The
 argument @var{dir} determines whether the cue notes should be notated
 as a first or second voice.")
 
-  (make-music 'QuoteMusic
-             'element main-music
-             'quoted-context-type 'Voice
-             'quoted-context-id "cue"
-             'quoted-music-name what
-             'quoted-voice-direction dir
-             'quoted-transposition (pitch-of-note pitch-note)
-             'origin location))
+   (make-music 'QuoteMusic
+              'element main-music
+              'quoted-context-type 'Voice
+              'quoted-context-id "cue"
+              'quoted-music-name what
+              'quoted-voice-direction dir
+              'quoted-transposition (pitch-of-note pitch-note)
+              'origin location))
 
 transposition =
 #(define-music-function (parser location pitch-note) (ly:music?)
@@ -820,7 +802,7 @@ transposition =
    (context-spec-music
     (make-property-set 'instrumentTransposition
                       (ly:pitch-negate (pitch-of-note pitch-note)))
-       'Staff))
+    'Staff))
 
 tweak =
 #(define-music-function (parser location sym val arg)
@@ -849,7 +831,8 @@ as @code{\\repeat unfold}.")
 
 
 withMusicProperty =
-#(define-music-function (parser location sym val music) (symbol? scheme? ly:music?)
+#(define-music-function (parser location sym val music)
+   (symbol? scheme? ly:music?)
    (_i "Set @var{sym} to @var{val} in @var{music}.")
 
    (set! (ly:music-property music sym) val)
index 613ea511341373b98732761eb3ab6ae140e9d61d..4238dd14e03d772758d1cce3aba263ef8746009a 100644 (file)
@@ -342,8 +342,8 @@ predefinedFretboardsOn =
 
 %% shape note heads
 
-aikenHeads      = \set shapeNoteStyles = #'#(do re mi fa #f la ti)
-sacredHarpHeads = \set shapeNoteStyles = #'#(fa #f la fa #f la mi)
+aikenHeads      = \set shapeNoteStyles = #'#(do re mi fa sol la ti)
+sacredHarpHeads = \set shapeNoteStyles = #'#(fa sol la fa sol la mi)
 
 
 %% shifts
diff --git a/make/website.make b/make/website.make
new file mode 100644 (file)
index 0000000..dc21c6e
--- /dev/null
@@ -0,0 +1,145 @@
+################################################################
+# website (without the rest of the docs)
+
+################################################################
+#####  SECURITY -- check these values for lilypond.org #########
+################################################################
+ifeq ($(WEBSITE_ONLY_BUILD),1)
+  ### for lilypond.org
+  TOP_SRC_DIR=$(HOME)/src/lilypond
+  TRUSTED_DIR=$(HOME)/lilypond/trusted-scripts
+  top-src-dir=$(TOP_SRC_DIR)
+  depth=.
+  trusted-dir=$(TRUSTED_DIR)
+  script-dir=$(trusted-dir)
+  texi2html-init-file=$(trusted-dir)/lilypond-texi2html.init
+  top-htaccess=$(trusted-dir)/lilypond.org.htaccess
+  dir-htaccess=$(trusted-dir)/website-dir.htaccess
+  TEXI2HTML_PROGRAM=$(HOME)/usr/bin/texi2html
+  EXAMPLES=$(HOME)/media/ly-examples/
+  PICTURES=$(HOME)/media/pictures
+else
+  ### for normal git
+  script-dir=$(top-src-dir)/scripts/build/
+  texi2html-init-file=$(top-src-dir)/Documentation/lilypond-texi2html.init
+  top-htaccess=$(top-src-dir)/Documentation/web/server/lilypond.org.htaccess
+  dir-htaccess=$(top-src-dir)/Documentation/web/server/website-dir.htaccess
+  include $(config_make)
+  # I assume this is run from top-build-dir
+  EXAMPLES=Documentation/web/ly-examples/out-www/
+  PICTURES=Documentation/pictures/out-www/
+endif
+
+
+################################################################
+OUT=out-website
+
+### only update this when the language compiles correctly!
+#WEB_LANGS = es fr nl
+WEB_LANGS = es
+
+TEXI2HTML=ONLY_WEB=1 TOP_SRC_DIR=$(top-src-dir) DEPTH=$(depth) PERL_UNICODE=SD $(TEXI2HTML_PROGRAM)
+
+EXTRACT_TEXI_FILENAMES=python $(script-dir)/extract_texi_filenames.py
+CREATE_VERSION=python $(script-dir)/create-version-itexi.py
+CREATE_WEBLINKS=python $(script-dir)/create-weblinks-itexi.py
+MASS_LINK=python $(script-dir)/mass-link.py
+WEB_POST=python $(script-dir)/website_post.py
+
+SERVER_FILES=$(top-src-dir)/Documentation/web/server/
+
+# don't include web
+MANUALS=$(wildcard $(top-src-dir)/Documentation/*.tely)
+MANUALS+=$(top-src-dir)/Documentation/contributor.texi
+
+website-test:
+       echo $(TEXI2HTML)
+
+website-version:
+       mkdir -p $(OUT)
+       $(CREATE_VERSION) $(top-src-dir) > $(OUT)/version.itexi
+       $(CREATE_WEBLINKS) $(top-src-dir) > $(OUT)/weblinks.itexi
+
+website-xrefs: website-version
+       $(EXTRACT_TEXI_FILENAMES) -I $(top-src-dir)/Documentation/ \
+               -I $(OUT) -o $(OUT) --split=node \
+               $(top-src-dir)/Documentation/web.texi
+       # normal manuals
+       for m in $(MANUALS); do \
+               b=`basename "$$m" .texi`; \
+               d=`basename "$$b" .tely`; \
+               $(EXTRACT_TEXI_FILENAMES) \
+                       -I $(top-src-dir)/Documentation/ \
+                       -I $(top-src-dir)/Documentation/"$$d"/ \
+                       -I $(OUT) -o $(OUT) "$$m" ; \
+       done
+       # translations
+       for l in $(WEB_LANGS); do \
+               $(EXTRACT_TEXI_FILENAMES) \
+                       -I $(top-src-dir)/Documentation/ \
+                       -I $(top-src-dir)/Documentation/"$$l" \
+                       -I $(OUT) -o $(OUT) --split=node \
+                       $(top-src-dir)/Documentation/"$$l"/web.texi ;\
+               for m in $(MANUALS); do \
+                       n=`echo "$$m" | sed 's/Documentation/Documentation\/'$$l'/'` ; \
+                       b=`basename "$$n" .texi`; \
+                       d=`basename "$$b" .tely`; \
+                       if [ -e "$$n" ] ; then \
+                               $(EXTRACT_TEXI_FILENAMES) \
+                               -I $(top-src-dir)/Documentation/ \
+                               -I $(top-src-dir)/Documentation/"$$l" \
+                               -I $(top-src-dir)/Documentation/"$$l"/"$$d"/ \
+                               -I $(OUT) -o $(OUT) "$$n" ; \
+                       fi ; \
+               done; \
+       done;
+
+
+
+website-texinfo: website-version website-xrefs
+       $(TEXI2HTML) --prefix=index \
+               --split=section \
+               --I=$(top-src-dir)/Documentation/ \
+               --I=$(OUT) \
+               --init-file=$(texi2html-init-file) \
+               -D web_version \
+               --output=$(OUT)/website/ \
+               $(top-src-dir)/Documentation/web.texi
+       # translations
+       for l in $(WEB_LANGS); do \
+               $(TEXI2HTML) --prefix=index \
+                       --split=section \
+                       --I=$(top-src-dir)/Documentation/"$$l" \
+                       --I=$(top-src-dir)/Documentation/ \
+                       --I=$(OUT) \
+                       --lang="$$l" \
+                       --init-file=$(texi2html-init-file) \
+                       -D web_version \
+                       --output=$(OUT)/"$$l" \
+                       $(top-src-dir)/Documentation/"$$l"/web.texi ; \
+               find $(OUT)/$$l/ -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME' | sed 's!$(OUT)/'$$l'/!!g' | xargs $(MASS_LINK) --prepend-suffix .$$l hard $(OUT)/$$l/ $(OUT)/website/ ; \
+       done
+
+
+website-css:
+       cp $(top-src-dir)/Documentation/css/*.css $(OUT)/website/
+
+website-pictures:
+       mkdir -p $(OUT)/website/pictures/
+       cp $(PICTURES)/* $(OUT)/website/pictures/
+       ln -sf website/pictures $(OUT)/pictures
+
+website-examples:
+       mkdir -p $(OUT)/website/ly-examples
+       cp $(EXAMPLES)/* $(OUT)/website/ly-examples
+
+web-post:
+       $(WEB_POST) $(OUT)/website/
+
+website: website-texinfo website-css website-pictures website-examples web-post
+       cp $(SERVER_FILES)/favicon.ico $(OUT)/website/
+       cp $(SERVER_FILES)/robots.txt $(OUT)/website/
+       cp $(top-htaccess) $(OUT)/.htaccess
+       cp $(dir-htaccess) $(OUT)/website/.htaccess
+
+
index 3a876ee8640b208d8556b1173db04340ff85f57a..c413eac33e7635d7e1b7a43dcb9495f120f0c54c 100644 (file)
@@ -1011,8 +1011,8 @@ define_blacker_pixels (solfa_pen_thick);
 save solfa_base_notewidth;
 solfa_base_notewidth# := black_notehead_width#;
 
-solfa_whole_width := whole_notehead_width# / black_notehead_width#;
-solfa_half_width := half_notehead_width# / black_notehead_width#;
+solfa_whole_width := 1.0;
+solfa_half_width := 1.0;
 solfa_quarter_width := 1.0;
 
 def draw_do_head (expr width_factor, dir) =
@@ -1360,6 +1360,32 @@ fet_beginchar ("Quarter fa down head", "d2fa");
 fet_endchar;
 
 
+def draw_sol_head (expr filled) =
+       draw_outside_ellipse (1.53 - puff_up_factor / 3.0, 34, 0.66, 0.17);
+        if not filled:
+         undraw_inside_ellipse (3.25, 33, 0.81, 2.5 stafflinethickness#);
+        fi
+        draw_staff (-2, 2, 0);
+enddef;
+
+fet_beginchar ("Whole solhead", "s0sol");
+       draw_sol_head ( false);
+fet_endchar;
+
+
+fet_beginchar ("Half solhead", "s1sol");
+       draw_sol_head ( false);
+fet_endchar;
+
+
+fet_beginchar ("Quart solhead", "s2sol");
+       draw_sol_head ( true);
+fet_endchar;
+
+
+
+
+
 def draw_la_head (expr width_factor) =
        set_char_box (0, width_factor * solfa_base_notewidth#,
                      0.5 solfa_noteheight#, 0.5 solfa_noteheight#);
index 2f0409eb3c03d63d575242938a535d7d082b6de2..8de43822e04df37e3831eba8101d142ed898c459 100644 (file)
@@ -2987,7 +2987,18 @@ def conv(str):
        _ ("Unify fetaNumber and fetaDynamic encodings"))
 def conv(str):
     return re.sub(r'\bfeta(Number|Dynamic)', 'fetaText', str)
-    
+
+@rule ((2, 13, 18),
+       _ ("\RemoveEmpty*StaffContext -> \*Staff \RemoveEmptyStaves"))
+def conv(str):
+    str = re.sub (r"\\RemoveEmpty(|Drum|Rhythmic|Tab)StaffContext",
+                  r"\\\1Staff \\RemoveEmptyStaves",
+                  str);
+    str = re.sub (r"\\AncientRemoveEmptyStaffContext",
+                  r"\\VaticanaStaff \\RemoveEmptyStaves",
+                  str);
+    return str
+
 # Guidelines to write rules (please keep this at the end of this file)
 #
 # - keep at most one rule per version; if several conversions should be done,
index 0434ce8e59e52c704fd147fcaf08e0b28ddb0205..cda14bcbde459cb3fb5711205f8aaf9300d0c9ae 100644 (file)
@@ -763,7 +763,7 @@ Otherwise, return #f."
                                         (*indent*)
                                         (first op)
                                         (second op)))
-                              (reverse operations)))
+                              operations))
                        (*indent*)))
            (parameterize ((*current-context* ctype))
              (music->lily-string music parser)))))
index e252324e85b3a3e290932a9f4debc2f890acd6ea..2af8f923af4abf305fe623d8c09948610b0c4caa 100644 (file)
@@ -152,11 +152,10 @@ or down-stem?")
      (repeat-count ,integer? "Do a @code{\\repeat} how often?")
 
      (span-direction ,ly:dir? "Does this start or stop a spanner?")
-     (span-type ,string? "What kind of spanner should be created? E.g. ligature
-for ligatures, or text or hairpin for (de-)crescendi.
-
-TODO: Consider making type into symbol.")
-     (span-text ,string? "The displayed text for text spanners (e.g. cresc.)")
+     (span-type ,symbol? "What kind of dynamic spanner should be created?
+Options are @code{'text} and @code{'hairpin}.")
+     (span-text ,markup? "The displayed text for dynamic text spanners
+(e.g., cresc.)")
      (split-list ,list? "Splitting moments for part combiner.")
      (start-callback ,procedure? "Function to compute the negative length
 of starting grace notes.  This property can only be defined as initializer
@@ -170,8 +169,6 @@ a @code{StringNumberEvent}.")
 in a part.")
      (tempo-unit ,ly:duration? "The unit for the metronome count.")
      (text ,markup? "Markup expression to be printed.")
-     (text-type ,symbol?
-               "Particular type of text script (e.g., finger, dynamic).")
      (to-relative-callback ,procedure? "How to transform a piece of music
 to relative pitches.")
      (tonic ,ly:pitch? "Base of the scale.")
index 356ba898a98006489fb9ac367ba0b8074b6aa913..60d66e03c6a52c7efeb2fa2b2226429392f59318 100644 (file)
@@ -251,7 +251,6 @@ Syntax: @var{note}@code{\\laissezVibrer}")
 
     (LigatureEvent
      . ((description . "Start or end a ligature.")
-       (span-type . ligature)
        (types . (general-music span-event ligature-event event))
        ))
 
index 2db08bd4a1cf38f27c62f54bed76f3bf98a5e999..e0fe136257287e828883dfec4c4d791c37fa8e6e 100644 (file)
@@ -676,7 +676,7 @@ inside of and outside of chord construct."
 ;; Make a function that checks score element for being of a specific type.
 (define-public (make-type-checker symbol)
   (lambda (elt)
-    (not (eq? #f (memq symbol (ly:grob-property elt 'interfaces))))))
+    (grob::has-interface elt symbol)))
 
 (define-public ((outputproperty-compatibility func sym val) grob g-context ao-context)
   (if (func grob)
index bc3d2295a1a14b6022b20a60779f180d72903383..7204bc16c3e08989815341fdf3f0d639ee42a4f3 100644 (file)
@@ -19,38 +19,67 @@ depth = "../"
 # items.
 langs = ['', 'es']
 
+# FIXME: `grep -nH -B1 translationof Documentation/<lang>/web/*'
+# gives us the correct node names.
 translations = {
     'es': {
         'Source': 'Código fuente',
 
-        'Learning': 'Aprendizaj',
+        'Learning': 'Aprendizaje',
         'Music glossary': 'Glosario',
-        'Essay': 'a',
-        'Notation': 'b',
-        'Usage': 'c',
-        'Snippets': 'd',
-        'Web': 'e',
-        'Changes': 'f',
-        'Extending': 'g',
-        'Internals': 'h',
+        'Essay': 'Ensayo',
+        'Notation': 'Notación',
+        'Usage': 'Utilización',
+        'Snippets': 'Fragmentos',
+        'Web': 'Web',
+        'Changes': 'Cambios',
+        'Extending': 'Extensión',
+        'Internals': 'Funcionamiento interno',
         'Contributor': 'Guía del colaborador',
 
 # keep the spaces!
-        ' (split HTML)': ' (muchas páginas HTML)',
-        ' (big HTML)': ' (como una sola página HTML enorme)',
+        ' (split HTML)': ' (HTML seccionado)',
+        ' (big HTML)': ' (HTML monolítico)',
 
-        'Regression tests for ': 'aa ',
-        'PDF of regtests for ': 'bb ',
-        'MusicXML Regression tests for ': 'cc ',
-        'PDF of MusicXML regtests for ': 'dd ',
+        'Regression tests for ': 'Pruebas de regresión para ',
+        'PDF of regtests for ': 'Pruebas en PDF para ',
+        'MusicXML Regression tests for ': 'Pruebas de regresión de MusicXML para ',
+        'PDF of MusicXML regtests for ': 'Pruebas de MusicXML en PDF para ',
 
-        'Doc tarball for ': 'ee ',
-        ' (did not exist in 2.12)': ' (existes la nottes e 2.12)',
+        'Doc tarball for ': 'Tarball de la documentación para ',
+        ' (did not exist in 2.12)': ' (no existía en la versión 2.12)',
      },
     'fr': {
         'Learning': 'Apprener?',
         'Music glossary': 'Lizes ici pour les motes?',
      },
+    'nl': {
+        'Source': 'Broncode',
+
+        'Learning': 'Beginnen',
+        'Music glossary': 'Terminologie',
+        'Essay': 'Essay',
+        'Notation': 'Notatie',
+        'Usage': 'Gebruik',
+        'Snippets': 'Snippers',
+        'Web': 'Web',
+        'Changes': 'Veranderingen',
+        'Extending': 'Uitbreidingen',
+        'Internals': 'Internals',
+        'Contributor': 'Contributor',
+
+# keep the spaces!
+        ' (split HTML)': ' (opgesplitste HTML)',
+        ' (big HTML)': ' (grote pagina HTML)',
+
+        'Regression tests for ': 'Regressietesten voor ',
+        'PDF of regtests for ': 'PDF van regressietesten voor ',
+        'MusicXML Regression tests for ': 'MusicXML regressietesten voor ',
+        'PDF of MusicXML regtests for ': 'MusicXML regressietesten voor ',
+
+        'Doc tarball for ': 'Tarball met documentation voor ',
+        ' (did not exist in 2.12)': ' (bestond nog niet in 2.12)',
+     },
 }
 
 
@@ -197,6 +226,11 @@ def translateNameToUrl(manual, version):
 
 
 def make_manual_links(name, version, lang):
+    """Here is where all the macros manualStableLearningSplit,
+    manualStableLearningBig, manualStableLearningSplitNoName, etc. are
+    created on the fly.  Hopefully this documentation string will help
+    others a bit while grepping for those.
+    """
     for m in manuals:
         manual = m
         # TODO: this is a stupid way of doing it
@@ -244,7 +278,7 @@ def make_manual_links(name, version, lang):
             newurl = url + '/index.html'
         make_ver_link(macroLang("manual"+name+mshort+'SplitNoName',lang),
                   newurl,
-                  manual.capitalize())
+                  getTrans(manual.capitalize(),lang))
 
 def make_regtest_links(name, version, lang):
     ver_split = version.split('.')
index f0b20b9fdef224ed713935d092c02ef20f837d76..2007e911973287be4316c661ef9970596d08dd57 100644 (file)
@@ -9,18 +9,50 @@ import os
 import glob
 import re
 
-###### Translation data
-lang_lookup = {
-    'fr': 'français',
-    'es': 'español',
-    '': 'english'
-}
-
-lang_other_langs = {
-    'es': 'Otros idiomas: ',
-    'fr': 'Autres langues : ',
-    '': 'Other languages: '
-}
+###### Translation data, move out, see create-weblinks-itexi.py
+translations = {
+    'de': {
+        'English': 'Deutsch',
+        'Other languages': 'Andere Sprachen',
+        },
+    'es': {
+        'English': 'Español',
+        'Other languages': 'Otros idiomas',
+        },
+    'fr': {
+        'English': 'Français',
+        'Other languages': 'Autres langues',
+        },
+    'hu': {
+        'English': 'Magyar',
+        'Other languages': 'Más nyelvek',
+        },
+    'ja': {
+        'English': 'Japanese',
+        'Other languages': '他の言語',
+        },
+    'nl': {
+        'English': 'Nederlands',
+        'Other languages': 'Andere talen',
+        },
+    }
+
+# needs at least: make -C po or make- C Documentation/po
+HAVE_GETTEXT = False
+
+####  this breaks on lilypond.org
+# Keep some freakin' gettext compatibility
+#if HAVE_GETTEXT:
+#    import lilylib as ly;
+#    global _;_=ly._
+#else: # poor mans translation
+#    def _ (string, lang=os.environ['LANG']):
+#        return translations.get (lang.split ('_')[0], {}).get (string, string)
+
+#### this works on lilypond.org
+def _ (string, lang):
+    return translations.get (lang.split ('_')[0], {}).get (string, string)
+
 
 exclude_manuals = [
     '/music-glossary',
@@ -48,7 +80,7 @@ for file in html_files:
         # it's a translation
         lang = file_split[1]
     # make sure it's a translated language
-    if (not (lang == "en")):
+    if lang != "en":
         langs_set.add(lang)
 langs = list(langs_set)
 langs.sort()
@@ -66,26 +98,21 @@ def addLangExt(filename, lang, ext):
     text += "." + ext
     return text
 
-def makeFooter(filename, currentLang):
-    text = "<p id=\"languages\">\n"
-    text += lang_other_langs[currentLang]
-    for i in range(len(langs)):
-        lang = langs[i]
-        if (lang == currentLang):
-            continue
-        text += "<a href=\""
-       text += addLangExt(filename, lang, "html")
-        text += "\">"
-        text += lang_lookup[lang]
-        text += "</a>"
-        if (i < len(langs)-2):
-            text += ", "
-        else:
-            text += ".\n"
+def makeFooter (filename, currentLang):
     # TODO: add link to automatic language selection?
     # still need to include this page in the new webpages somewhere
-    text += "</p>\n"
-    return text
+    footer = '''<p id="languages">
+%(other)s: %(lst)s.
+</p>
+'''
+    def link (lang):
+        str = '''<a href="%(file_name)s">%(language_name)s</a>'''
+        file_name = addLangExt (filename, lang, 'html')
+        language_name = _ ('English', lang)
+        return str % locals ()
+    lst = ', '.join ([link (lang) for lang in langs if lang != currentLang])
+    other = _ ('Other languages', currentLang)
+    return footer % locals ()
 
 def getLocalHref(line):
     match = re.search(r'href=[\'"]?([^\'" >]+)', line)
@@ -132,8 +159,7 @@ for file in html_files:
     os.remove(file)
     outfile = open(file, 'w')
 
-    lang_footer = makeFooter(file_base, lang)
-
+    lang_footer = makeFooter (file_base, lang)
 
     ### alter file
     for line in lines:
diff --git a/website.make b/website.make
deleted file mode 100644 (file)
index b03012d..0000000
+++ /dev/null
@@ -1,141 +0,0 @@
-################################################################
-# website (without the rest of the docs)
-
-################################################################
-#####  SECURITY -- check these values for lilypond.org #########
-################################################################
-ifeq ($(WEBSITE_ONLY_BUILD),1)
-  ### for lilypond.org
-  top-src-dir=$(HOME)/src/lilypond
-  depth=.
-  trusted-dir=$(HOME)/lilypond/trusted-scripts
-  script-dir=$(trusted-dir)
-  texi2html-init-file=$(trusted-dir)/lilypond-texi2html.init
-  top-htaccess=$(trusted-dir)/lilypond.org.htaccess
-  dir-htaccess=$(trusted-dir)/website-dir.htaccess
-  TEXI2HTML_PROGRAM=$(HOME)/usr/bin/texi2html
-  EXAMPLES=$(HOME)/media/ly-examples/
-  PICTURES=$(HOME)/media/pictures
-else
-  ### for normal git
-  script-dir=$(top-src-dir)/scripts/build/
-  texi2html-init-file=$(top-src-dir)/Documentation/lilypond-texi2html.init
-  top-htaccess=$(top-src-dir)/Documentation/web/server/lilypond.org.htaccess
-  dir-htaccess=$(top-src-dir)/Documentation/web/server/website-dir.htaccess
-  include $(config_make)
-  # I assume this is run from top-build-dir
-  EXAMPLES=Documentation/web/ly-examples/out-www/
-  PICTURES=Documentation/pictures/out-www/
-endif
-
-
-################################################################
-OUT=out-website
-WEB_LANGS=es
-
-
-TEXI2HTML=ONLY_WEB=1 TOP_SRC_DIR=$(top-src-dir) DEPTH=$(depth) PERL_UNICODE=SD $(TEXI2HTML_PROGRAM)
-
-EXTRACT_TEXI_FILENAMES=python $(script-dir)/extract_texi_filenames.py
-CREATE_VERSION=python $(script-dir)/create-version-itexi.py
-CREATE_WEBLINKS=python $(script-dir)/create-weblinks-itexi.py
-MASS_LINK=python $(script-dir)/mass-link.py
-WEB_POST=python $(script-dir)/website_post.py
-
-SERVER_FILES=$(top-src-dir)/Documentation/web/server/
-
-# don't include web
-MANUALS=$(wildcard $(top-src-dir)/Documentation/*.tely)
-MANUALS+=$(top-src-dir)/Documentation/contributor.texi
-
-website-test:
-       echo $(TEXI2HTML)
-
-website-version:
-       mkdir -p $(OUT)
-       $(CREATE_VERSION) $(top-src-dir) > $(OUT)/version.itexi
-       $(CREATE_WEBLINKS) $(top-src-dir) > $(OUT)/weblinks.itexi
-
-website-xrefs: website-version
-       $(EXTRACT_TEXI_FILENAMES) -I $(top-src-dir)/Documentation/ \
-               -I $(OUT) -o $(OUT) --split=node \
-               $(top-src-dir)/Documentation/web.texi
-       # normal manuals
-       for m in $(MANUALS); do \
-               b=`basename "$$m" .texi`; \
-               d=`basename "$$b" .tely`; \
-               $(EXTRACT_TEXI_FILENAMES) \
-                       -I $(top-src-dir)/Documentation/ \
-                       -I $(top-src-dir)/Documentation/"$$d"/ \
-                       -I $(OUT) -o $(OUT) "$$m" ; \
-       done
-       # translations
-       for l in $(WEB_LANGS); do \
-               $(EXTRACT_TEXI_FILENAMES) \
-                       -I $(top-src-dir)/Documentation/ \
-                       -I $(top-src-dir)/Documentation/"$$l" \
-                       -I $(OUT) -o $(OUT) --split=node \
-                       $(top-src-dir)/Documentation/"$$l"/web.texi ;\
-               for m in $(MANUALS); do \
-                       n=`echo "$$m" | sed 's/Documentation/Documentation\/'$$l'/'` ; \
-                       b=`basename "$$n" .texi`; \
-                       d=`basename "$$b" .tely`; \
-                       if [ -e "$$n" ] ; then \
-                               $(EXTRACT_TEXI_FILENAMES) \
-                               -I $(top-src-dir)/Documentation/ \
-                               -I $(top-src-dir)/Documentation/"$$l" \
-                               -I $(top-src-dir)/Documentation/"$$l"/"$$d"/ \
-                               -I $(OUT) -o $(OUT) "$$n" ; \
-                       fi ; \
-               done; \
-       done;
-
-
-
-website-texinfo: website-version website-xrefs
-       $(TEXI2HTML) --prefix=index \
-               --split=section \
-               --I=$(top-src-dir)/Documentation/ \
-               --I=$(OUT) \
-               --init-file=$(texi2html-init-file) \
-               -D web_version \
-               --output=$(OUT)/website/ \
-               $(top-src-dir)/Documentation/web.texi
-       # translations
-       for l in $(WEB_LANGS); do \
-               $(TEXI2HTML) --prefix=index \
-                       --split=section \
-                       --I=$(top-src-dir)/Documentation/"$$l" \
-                       --I=$(top-src-dir)/Documentation/ \
-                       --I=$(OUT) \
-                       --lang="$$l" \
-                       --init-file=$(texi2html-init-file) \
-                       -D web_version \
-                       --output=$(OUT)/"$$l" \
-                       $(top-src-dir)/Documentation/"$$l"/web.texi ; \
-               find $(OUT)/$$l/ -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME' | sed 's!$(OUT)/'$$l'/!!g' | xargs $(MASS_LINK) --prepend-suffix .$$l hard $(OUT)/$$l/ $(OUT)/website/ ; \
-       done
-
-
-website-css:
-       cp $(top-src-dir)/Documentation/css/*.css $(OUT)/website/
-
-website-pictures:
-       mkdir -p $(OUT)/website/pictures/
-       cp $(PICTURES)/* $(OUT)/website/pictures/
-       ln -sf website/pictures $(OUT)/pictures
-
-website-examples:
-       mkdir -p $(OUT)/website/ly-examples
-       cp $(EXAMPLES)/* $(OUT)/website/ly-examples
-
-web-post:
-       $(WEB_POST) $(OUT)/website/
-
-website: website-texinfo website-css website-pictures website-examples web-post
-       cp $(SERVER_FILES)/favicon.ico $(OUT)/website/
-       cp $(SERVER_FILES)/robots.txt $(OUT)/website/
-       cp $(top-htaccess) $(OUT)/.htaccess
-       cp $(dir-htaccess) $(OUT)/website/.htaccess
-
-