]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge branch 'master' into lilypond/translation
authorJean-Charles Malahieude <lilyfan@orange.fr>
Mon, 6 Dec 2010 19:03:13 +0000 (20:03 +0100)
committerJean-Charles Malahieude <lilyfan@orange.fr>
Mon, 6 Dec 2010 19:03:13 +0000 (20:03 +0100)
34 files changed:
Documentation/contributor/issues.itexi
Documentation/contributor/programming-work.itexi
Documentation/es/web/manuals.itexi
Documentation/es/web/news-front.itexi
Documentation/notation/changing-defaults.itely
Documentation/notation/rhythms.itely
Documentation/notation/spacing.itely
Documentation/notation/text.itely
Documentation/web/news-front.itexi
VERSION
elisp/lilypond-mode.el
input/regression/bookpart-variable.ly [new file with mode: 0644]
input/regression/page-breaking-min-systems-per-page2.ly
input/regression/page-overflow-compression.ly [new file with mode: 0644]
input/regression/stem-length-estimation.ly
input/regression/tablature-full-notation.ly
input/regression/tablature-harmonic-functions.ly [new file with mode: 0644]
input/regression/tablature-tie-spanner.ly [new file with mode: 0644]
lily/lily-parser.cc
lily/page-layout-problem.cc
lily/tab-harmonic-engraver.cc [deleted file]
lily/tab-tie-follow-engraver.cc [new file with mode: 0644]
lily/tie-engraver.cc
ly/engraver-init.ly
ly/music-functions-init.ly
ly/property-init.ly
scm/define-grob-interfaces.scm
scm/define-grob-properties.scm
scm/define-grobs.scm
scm/lily.scm
scm/tablature.scm
scripts/build/create-weblinks-itexi.py
scripts/build/website_post.py
scripts/midi2ly.py

index 2d496e830e79f9ba489902a06199232c0880685c..70578c7ad846ffb83c052dcef7c94788f5a26539 100644 (file)
@@ -150,7 +150,7 @@ the currently-active Bug Squad member(s) can handle the message.
 The Bug Meister is omitted from the daily schedule.
 
 @example
-Sunday: Valentin
+Sunday: Colin
 Monday: Dmytro
 Tuesday: James Bailey
 Wednesday: Ralph
@@ -625,13 +625,25 @@ lilypond --png bug.ly
 @end example
 
 @item
-If the issue requires multi-page output, then generate a
-@file{bug.pdf} file with the normal:
+If the issue requires one or two pages of output, then generate a
+@file{bug.png} file with the normal:
 
 @example
 lilypond --png bug.ly
 @end example
 
+@item
+If the issue cannot be shown with less than three pages, then
+generate a @file{bug.pdf} file with:
+
+@example
+lilypond --pdf bug.ly
+@end example
+
+Note that this is likely to be extremely rare; most bugs should fit
+into the first two categories above.
+
+
 @end itemize
 
 @item
index ae4785446e382ac71855a2c2af4754c7323c2850..1e0c37fbd28e6f22bca9531b871b80580de21977 100644 (file)
@@ -1089,6 +1089,9 @@ The logfile has standard lilypond output, as well as the Graphviz
 output data.  Delete everything from the beginning of the file
 up to but not including the first occurrence of @code{digraph}.
 
+Also, delete the final liypond message about successs from the end
+of the file.
+
 @item Process the logfile with @code{dot}
 
 The directed graph is created from the log file with the program
index 9d5fed97dcf5714215bafa2d8eccafb6e86de037..afbe5d9aec06b122eb27a7213435f4f94e788dd2 100644 (file)
@@ -45,7 +45,7 @@ una introducción a LilyPond amable e @qq{imprescindible}.
 @details{Aprendizaje}
 
 @item
-@ifWebLinks{@manualStableGlossarySplitNoName-es,@rglosnamed{Top,Glosario}}
+@ifWebLinks{@manualStableGlossarySplitNoName,@rglosnamed{Top,Glosario}}
 @emph{(lectura opcional)} términos musicales y traducciones.
 @details{Glosario}
 
@@ -75,7 +75,7 @@ cómo ejecutar los programas.
 @details{Utilización}
 
 @item
-@ifWebLinks{@manualStableSnippetsSplitNoName-es,@rlsrnamed{Top,Fragmentos}}
+@ifWebLinks{@manualStableSnippetsSplitNoName,@rlsrnamed{Top,Fragmentos}}
 trucos y consejos cortos.
 @details{Fragmentos}
 
@@ -109,7 +109,7 @@ trucos interesantes.
 @details{Extender}
 
 @item
-@ifWebLinks{@manualStableInternalsSplitNoName-es,@rinternalsnamed{Top,Funcionamiento interno}}
+@ifWebLinks{@manualStableInternalsSplitNoName,@rinternalsnamed{Top,Funcionamiento interno}}
 referencia sobre el trucaje.
 @details{Funcionamiento interno}
 
index e92947f74283c4f24a75946d271e62b7e208eba6..e325da50c8f7af042711fc5c15b190ec6ad687a1 100644 (file)
 @c used for news about the upcoming release; see CG 10.2
 
 
+@newsItem
+@subsubheading ¡Lanzado LilyPond 2.13.40!  @emph{21 de noviembre de 2010}
+
+Nos complace anunciar el lanzamiento de LilyPond 2.13.40.  Esta
+versión contiene el conjunto habitual de correcciones de fallos.  Sin
+embargo, aún quedan algunos problemas críticos, por lo que esta
+versión está orientada solamente a los desarrolladores.
+
+Tenga en cuenta que ésta @strong{no} es la segunda versión de pruebas
+beta.  A causa de la aparición de algunos cambios en nuestro proceso
+de construcción del programa que no se han probado, no podemos estar
+completamente seguros de la calidad de esta versión.
+
+@newsEnd
+
+
 @newsItem
 @subsubheading Primera versión de pruebas Beta de 2.14: ¡Lanzado LilyPond 2.13.39! @emph{15 de noviembre de 2010}
 
index c696f9536541e2309e611de9e917dcc85a95d9d3..c5bc49731b30c95bbd325bce9ead8fadbc804c16 100644 (file)
@@ -71,7 +71,7 @@ This section describes what contexts are, and how to modify them.
 Learning Manual:
 @rlearning{Contexts and engravers}.
 
-Installed files:
+Installed Files:
 @file{ly/engraver-init.ly},
 @file{ly/performer-init.ly}.
 
index 9b719c93ea93e506fea2b44662b7441a0d33ba4d..c8b791790fc3746205667f5f5b0cf5fc9549abf7 100644 (file)
@@ -2011,6 +2011,36 @@ are determined in @file{scm/time-signature-settings.scm}.
 The automatic beaming settings for a time signature can be changed
 as described in @ref{Time signature}.
 
+Most automatic beaming settings for a time signature contain an
+entry for @code{beamExceptions}.  For example, 4/4 time tries to
+beam the measure in two if there are only eighth notes.  The
+@code{beamExceptions} rule can override the @code{beatStructure} setting
+if @code{beamExceptions} is not reset.
+
+@lilypond[quote,verbatim,relative=2]
+\time 4/4
+\set Timing.baseMoment = #(ly:make-moment 1 8)
+\set Timing.beatStructure = #'(3 3 2)
+% This won't beam (3 3 2) because of beamExceptions
+\repeat unfold 8 {c8} |
+% This will beam (3 3 2) because we clear beamExceptions
+\set Timing.beamExceptions = #'()
+\repeat unfold 8 {c8}
+@end lilypond
+
+In a similar fashion, eighth notes in 3/4 time are beamed as a full
+measure by default.  To beam eighth notes in 3/4 time on the beat,
+reset @code{beamExceptions}.
+
+@lilypond[quote,verbatim,relative=2]
+\time 3/4
+% by default we beam in (3) due to beamExceptions
+\repeat unfold 6 {a8} |
+% This will beam (1 1 1) due to beatLength
+\set Timing.beamExceptions = #'()
+\repeat unfold 6 {a8}
+@end lilypond
+
 @i{@strong{How automatic beaming works}}
 
 When automatic beaming is enabled, the placement of automatic beams
@@ -2071,7 +2101,7 @@ For reference, the default beaming rules are found in
 
 
 @seealso
-Installed files:
+Installed Files:
 @file{scm/beam-settings.scm}.
 
 Snippets:
index 7ec64272ac5b0ebb836fb49efec85c46e0f02278..2853b6014011736aa6709612d33c199b0a314d89 100644 (file)
@@ -157,9 +157,11 @@ To set it to @code{0.5} inches, use the @code{\in} unit suffix:
 @end example
 
 The available unit suffixes are @code{\mm}, @code{\cm},
-@code{\in}, and @code{\pt}.  For the sake of clarity, when using
-millimeters, the @code{\mm} is typically included in the code,
-even though it is not technically necessary.
+@code{\in}, and @code{\pt}.  These units are simple values for
+converting from millimeters; they are defined in
+@file{ly/paper-defaults-init.ly}.  For the sake of clarity, when
+using millimeters, the @code{\mm} is typically included in the
+code, even though it is not technically necessary.
 
 It is also possible to define @code{\paper} values using Scheme.
 The Scheme equivalent of the above example is:
@@ -172,7 +174,12 @@ The Scheme equivalent of the above example is:
 
 @seealso
 Notation Reference:
-@ref{Custom headers footers and titles}.
+@ref{Paper size and automatic scaling},
+@ref{Custom headers footers and titles},
+@ref{The \layout block}.
+
+Installed Files:
+@file{ly/paper-defaults-init.ly}.
 
 
 @node Paper size and automatic scaling
@@ -250,6 +257,9 @@ degrees, and wider line widths will be set accordingly.
 @end example
 
 @seealso
+Notation Reference:
+@ref{Automatic scaling to paper size}.
+
 Installed Files:
 @file{scm/paper.scm}.
 
@@ -262,18 +272,20 @@ If the paper size is changed with one of the scheme functions
 values of several @code{\paper} variables are automatically scaled
 to the new size.  To bypass the automatic scaling for a particular
 variable, set the variable after setting the paper size.  Note
-that the automatic scaling is not triggered by setting
-@code{paper-height} or @code{paper-width}, even though
+that the automatic scaling is not triggered by setting the
+@code{paper-height} or @code{paper-width} variables, even though
 @code{paper-width} can influence other values (this is separate
 from scaling and is discussed below).  The
 @code{set-default-paper-size} and @code{set-paper-size} functions
 are described in @ref{Setting paper size}.
 
 The vertical dimensions affected by automatic scaling are
-@code{top-margin} and @code{bottom-margin}.  The horizontal
+@code{top-margin} and @code{bottom-margin} (see
+@ref{Fixed vertical spacing \paper variables}.  The horizontal
 dimensions affected by automatic scaling are @code{left-margin},
 @code{right-margin}, @code{inner-margin}, @code{outer-margin},
-@code{binding-offset}, @code{indent}, and @code{short-indent}.
+@code{binding-offset}, @code{indent}, and @code{short-indent} (see
+@ref{Horizontal spacing \paper variables}.
 
 The default values for these dimensions are set in
 @file{ly/paper-defaults-init.ly}, using internal variables named
@@ -284,6 +296,10 @@ These are the values that result at the default paper size
 @code{210\mm}.
 
 @seealso
+Notation Reference:
+@ref{Fixed vertical spacing \paper variables},
+@ref{Horizontal spacing \paper variables}.
+
 Installed Files:
 @file{ly/paper-defaults-init.ly},
 @file{scm/paper.scm}.
@@ -339,6 +355,9 @@ parts of a book created with @code{\bookpart} blocks.
 @end table
 
 @seealso
+Notation Reference:
+@ref{Automatic scaling to paper size}.
+
 Installed Files:
 @file{ly/paper-defaults-init.ly}.
 
@@ -586,7 +605,8 @@ systems, equal to
 when unset.  If @code{line-width} is set, and both
 @code{left-margin} and @code{right-margin} are unset, then the
 margins will be updated to center the systems on the page
-automatically.  Also see @code{check-consistency}.
+automatically.  Also see @code{check-consistency}.  This variable
+can also be set in a @code{\layout} block.
 
 @item left-margin
 @funindex left-margin
@@ -646,6 +666,9 @@ set in a @code{\layout} block.
 @end table
 
 @seealso
+Notation Reference:
+@ref{Automatic scaling to paper size}.
+
 Installed Files:
 @file{ly/paper-defaults-init.ly}.
 
@@ -696,6 +719,9 @@ with @code{two-sided} set to true.
 @end table
 
 @seealso
+Notation Reference:
+@ref{Automatic scaling to paper size}.
+
 Installed Files:
 @file{ly/paper-defaults-init.ly}.
 
@@ -735,6 +761,9 @@ set in a @code{\layout} block.
 @end table
 
 @seealso
+Notation Reference:
+@ref{Automatic scaling to paper size}.
+
 Installed Files:
 @file{ly/paper-defaults-init.ly}.
 
@@ -854,7 +883,7 @@ Notation Reference:
 @ref{Optimal page turning},
 @ref{Minimal page breaking}.
 
-Installed files:
+Installed Files:
 @file{ly/paper-defaults-init.ly}.
 
 
@@ -944,7 +973,7 @@ sensible default, for example:
 
 
 @seealso
-Installed files:
+Installed Files:
 @file{ly/titling-init.ly}.
 
 Snippets:
@@ -997,25 +1026,33 @@ discussed in a separate chapter; see
 variables that can appear in a @code{\layout} block are:
 
 @itemize
-@item @code{ragged-right}
-@item @code{ragged-last}
-@item @code{indent}
-@item @code{short-indent}
-@item @code{system-count}
+
+@item
+@code{line-width}, @code{ragged-right} and @code{ragged-last}
+(see @ref{\paper variables for widths and margins})
+
+@item
+@code{indent} and @code{short-indent}
+(see @ref{\paper variables for shifts and indents})
+
+@item
+@code{system-count}
+(see @ref{\paper variables for line breaking})
+
 @end itemize
 
 Here is an example @code{\layout} block:
 
 @example
 \layout @{
-  indent = 2.0\cm
+  indent = 2\cm
   \context @{
     \StaffGroup
     \override StaffGrouper #'staff-staff-spacing #space = #8
   @}
   \context @{
     \Voice
-    \override TextScript #'padding = #1.0
+    \override TextScript #'padding = #1
     \override Glissando #'thickness = #3
   @}
 @}
@@ -1054,9 +1091,9 @@ fonts accordingly.
 To set the staff size individually for each score, use
 @example
 \score@{
-  ...
-  \layout@{
-  #(layout-set-staff-size 15)
+  @dots{}
+  \layout @{
+    #(layout-set-staff-size 15)
   @}
 @}
 @end example
@@ -1160,18 +1197,58 @@ staff lines.
 
 Line breaks are normally determined automatically.  They are chosen
 so that lines look neither cramped nor loose, and consecutive
-lines have similar density.  Occasionally you might want to
-override the automatic breaks; you can do this by specifying
-@code{\break}.  This will force a line break at this point.  However,
-line breaks can only occur at the end of @q{complete} bars, i.e.,
-where there are no notes or tuplets left @q{hanging} over the bar
-line.  If you want to have a line break where there is no bar line,
-you can force an invisible bar line by entering @code{\bar ""},
-although again there must be no notes left hanging over in any of
-the staves at this point, or it will be ignored.
-
-The opposite command, @code{\noBreak}, forbids a line break at the
-bar line where it is inserted.
+lines have similar density.
+
+To manually force a line break at a bar line, use the
+@code{\break} command:
+
+@lilypond[quote,ragged-right,relative=2,verbatim]
+c4 c c c | \break
+c4 c c c |
+@end lilypond
+
+By default, a @code{\break} in the middle of a measure is ignored,
+and a warning is printed.  To force a line break in the middle of
+a measure, add an invisible bar line with @w{@samp{\bar ""}}:
+
+@lilypond[quote,ragged-right,relative=2,verbatim]
+c4 c c
+\bar "" \break
+c |
+c4 c c c |
+@end lilypond
+
+A @code{\break} occuring at a bar line is also ignored if the
+previous measure ends in the middle of a note, such as when a
+tuplet begins and ends in different measures.  To allow
+@code{\break} commands to work in these situations, remove the
+@code{Forbid_line_break_engraver} from the @code{Voice} context.
+Note that manually forced line breaks have to be added in parallel
+with the music:
+
+@lilypond[quote,ragged-right,verbatim]
+\new Voice \with {
+  \remove Forbid_line_break_engraver
+} \relative c'' {
+  <<
+    { c2. \times 2/3 { c4 c c } c2. | }
+    { s1 | \break s1 | }
+  >>
+}
+@end lilypond
+
+Similarly, line breaks are normally forbidden when beams cross bar
+lines.  This behavior can be changed by setting
+@code{\override Beam #'breakable = ##t}:
+
+@lilypond[quote,ragged-right,relative=2,verbatim]
+\override Beam #'breakable = ##t
+c2. c8[ c | \break
+c8 c] c2. |
+@end lilypond
+
+The @code{\noBreak} command forbids a line break at the bar line
+where it is inserted.
 
 The most basic settings influencing line spacing are @code{indent}
 and @code{line-width}.  They are set in the @code{\layout} block.
@@ -1191,9 +1268,9 @@ but affects only the last line of the piece.
 
 @example
 \layout @{
-indent = #0
-line-width = #150
-ragged-last = ##t
+  indent = 0\mm
+  line-width = 150\mm
+  ragged-last = ##t
 @}
 @end example
 
@@ -1208,10 +1285,12 @@ cause the following 28 measures (assuming 4/4 time) to be broken
 every 4 measures, and only there:
 
 @example
-<< \repeat unfold 7 @{
-         s1 \noBreak s1 \noBreak
-         s1 \noBreak s1 \break @}
-   @emph{the real music}
+<<
+  \repeat unfold 7 @{
+    s1 \noBreak s1 \noBreak
+    s1 \noBreak s1 \break
+  @}
+  @{ @var{the actual music@dots{}} @}
 >>
 @end example
 
@@ -1232,6 +1311,9 @@ complicated.  More details are available in
 
 
 @seealso
+Notation Reference:
+@ref{\paper variables for line breaking}.
+
 Snippets:
 @rlsr{Spacing}.
 
@@ -1239,36 +1321,6 @@ Internals Reference:
 @rinternals{LineBreakEvent}.
 
 
-@knownissues
-
-Line breaks can only occur if there is a @q{proper} bar line.  A note
-which is hanging over a bar line is not proper, such as
-
-@lilypond[quote,ragged-right,relative=2,verbatim]
-c4 c2 << c2 {s4 \break } >>  % this does nothing
-c2 c4 |           % a break here would work
-c4 c2 c4 ~ \break % as does this break
-c4 c2 c4
-@end lilypond
-
-This can be avoided by removing the @code{Forbid_line_break_engraver}.
-Note that manually forced line breaks have to be added in parallel
-with the music.
-
-@lilypond[quote,ragged-right,verbatim]
-\new Voice \with {
-  \remove Forbid_line_break_engraver
-} {
-  c4 c2 << c2 {s4 \break } >>  % now the break is allowed
-  c2 c4
-}
-@end lilypond
-
-Similarly, line breaks are normally forbidden when beams cross bar
-lines.  This behavior can be changed by setting
-@code{\override Beam #'breakable = ##t}.
-
-
 @node Page breaking
 @subsection Page breaking
 
@@ -1286,9 +1338,8 @@ There are also analogous settings to @code{ragged-right} and
 @code{ragged-last} which have the same effect on vertical spacing:
 @code{ragged-bottom} and @code{ragged-last-bottom}.  If set to
 @code{##t} the systems on all pages or just the last page
-respectively will not be justified vertically.
-
-For more details see @ref{Vertical spacing}.
+respectively will not be justified vertically.  See
+@ref{Fixed vertical spacing \paper variables}.
 
 Page breaks are computed by the @code{page-breaking} function.  LilyPond
 provides three algorithms for computing page breaks,
@@ -1297,8 +1348,8 @@ provides three algorithms for computing page breaks,
 but the value can be changed in the @code{\paper} block:
 
 @example
-\paper@{
-  #(define page-breaking ly:page-turn-breaking)
+\paper @{
+  page-breaking = #ly:page-turn-breaking
 @}
 @end example
 
@@ -1319,7 +1370,7 @@ book parts.
   \paper @{
      %% In a part consisting mostly of text,
      %% ly:minimal-breaking may be preferred
-     #(define page-breaking ly:minimal-breaking)
+     page-breaking = #ly:minimal-breaking
   @}
   \markup @{ @dots{} @}
   @dots{}
@@ -1345,6 +1396,9 @@ book parts.
 
 
 @seealso
+Notation Reference:
+@ref{\paper variables for page breaking}.
+
 Snippets:
 @rlsr{Spacing}.
 
@@ -1465,7 +1519,7 @@ too slow or memory demanding, or a lot of texts.  It is enabled using:
 
 @example
 \paper @{
-  #(define page-breaking ly:minimal-breaking)
+  page-breaking = #ly:minimal-breaking
 @}
 @end example
 
@@ -1498,17 +1552,19 @@ page breaks at explicit @code{\pageBreak} commands and nowhere else.
   ragged-bottom = ##t
 }
 
+music = \relative c'' { c8 c c c }
+
 \score {
   \new Staff {
-    \repeat unfold 2 { c'8 c'8 c'8 c'8 } \break
-    \repeat unfold 4 { c'8 c'8 c'8 c'8 } \break
-    \repeat unfold 6 { c'8 c'8 c'8 c'8 } \break
-    \repeat unfold 8 { c'8 c'8 c'8 c'8 } \pageBreak
-    \repeat unfold 8 { c'8 c'8 c'8 c'8 } \break
-    \repeat unfold 6 { c'8 c'8 c'8 c'8 } \break
-    \repeat unfold 4 { c'8 c'8 c'8 c'8 } \break
-    \repeat unfold 2 { c'8 c'8 c'8 c'8 }
-    }
+    \repeat unfold 2 { \music } \break
+    \repeat unfold 4 { \music } \break
+    \repeat unfold 6 { \music } \break
+    \repeat unfold 8 { \music } \pageBreak
+    \repeat unfold 8 { \music } \break
+    \repeat unfold 6 { \music } \break
+    \repeat unfold 4 { \music } \break
+    \repeat unfold 2 { \music }
+  }
   \layout {
     \context {
       \Score
@@ -1531,11 +1587,12 @@ Snippets:
 Line- and page-breaking information usually appears within note entry directly.
 
 @example
+music = \relative c'' @{ c4 c c c @}
+
 \score @{
   \new Staff @{
-    \repeat unfold 2 @{ c'4 c'4 c'4 c'4 @}
-    \break
-    \repeat unfold 3 @{ c'4 c'4 c'4 c'4 @}
+    \repeat unfold 2 @{ \music @} \break
+    \repeat unfold 3 @{ \music @}
   @}
 @}
 @end example
@@ -1549,6 +1606,8 @@ contains only skips together with @code{\break}, @code{pageBreak} and other
 breaking layout information.
 
 @lilypond[quote,verbatim]
+music = \relative c'' { c4 c c c }
+
 \score {
   \new Staff <<
     \new Voice {
@@ -1558,10 +1617,10 @@ breaking layout information.
       s1 * 5 \break
     }
     \new Voice {
-      \repeat unfold 2 { c'4 c'4 c'4 c'4 }
-      \repeat unfold 3 { c'4 c'4 c'4 c'4 }
-      \repeat unfold 6 { c'4 c'4 c'4 c'4 }
-      \repeat unfold 5 { c'4 c'4 c'4 c'4 }
+      \repeat unfold 2 { \music }
+      \repeat unfold 3 { \music }
+      \repeat unfold 6 { \music }
+      \repeat unfold 5 { \music }
     }
   >>
 }
@@ -1572,6 +1631,8 @@ This pattern becomes especially helpful when overriding
 @code{NonMusicalPaperColumnGrob}, as explained in @ref{Vertical spacing}.
 
 @lilypond[quote,verbatim]
+music = \relative c'' { c4 c c c }
+
 \score {
   \new Staff <<
     \new Voice {
@@ -1592,10 +1653,10 @@ This pattern becomes especially helpful when overriding
       s1 * 5 \break
     }
     \new Voice {
-      \repeat unfold 2 { c'4 c'4 c'4 c'4 }
-      \repeat unfold 3 { c'4 c'4 c'4 c'4 }
-      \repeat unfold 6 { c'4 c'4 c'4 c'4 }
-      \repeat unfold 5 { c'4 c'4 c'4 c'4 }
+      \repeat unfold 2 { \music }
+      \repeat unfold 3 { \music }
+      \repeat unfold 6 { \music }
+      \repeat unfold 5 { \music }
     }
   >>
 }
@@ -1933,7 +1994,7 @@ in the staff-group that have it set.  Also see
 @end table
 
 @seealso
-Installed files:
+Installed Files:
 @file{ly/engraver-init.ly},
 @file{scm/define-grobs.scm}.
 
@@ -2160,19 +2221,18 @@ Internals Reference:
 @node Explicit staff and system positioning
 @subsection Explicit staff and system positioning
 
-One way to understand the @code{VerticalAxisGroup} and @code{\paper}
-settings explained in the previous two sections is as a collection of
-different settings that primarily concern the amount of vertical padding
-different staves and systems running down the page.
+One way to understand the flexible vertical spacing mechanisms
+explained above is as a collection of settings that control the
+amount of vertical padding between staves and systems.
 
-It is possible to approach vertical spacing in a different way using
-@code{NonMusicalPaperColumn #'line-break-system-details}.  Where
-@code{VerticalAxisGroup} and @code{\paper} settings specify vertical padding,
-@code{NonMusicalPaperColumn #'line-break-system-details} specifies exact
-vertical positions on the page.
+It is possible to approach vertical spacing in a different way
+using @code{NonMusicalPaperColumn #'line-break-system-details}.
+While the flexible vertical spacing mechanisms specify vertical
+padding, @code{NonMusicalPaperColumn #'line-break-system-details}
+can specify exact vertical positions on the page.
 
-@code{NonMusicalPaperColumn #'line-break-system-details} accepts an associative
-list of three different settings:
+@code{NonMusicalPaperColumn #'line-break-system-details} accepts
+an associative list of three different settings:
 
 @itemize
 @item @code{X-offset}
@@ -2205,13 +2265,15 @@ example @code{NonMusicalPaperColumn} overrides with the special
   #'line-break-system-details #'((Y-offset . 40))
 
 \overrideProperty NonMusicalPaperColumn
-  #'line-break-system-details #'((X-offset . 20) (Y-offset . 40))
+  #'line-break-system-details #'((X-offset . 20)
+                                 (Y-offset . 40))
 
 \overrideProperty NonMusicalPaperColumn
   #'line-break-system-details #'((alignment-distances . (15)))
 
 \overrideProperty NonMusicalPaperColumn
-  #'line-break-system-details #'((X-offset . 20) (Y-offset . 40)
+  #'line-break-system-details #'((X-offset . 20)
+                                 (Y-offset . 40)
                                  (alignment-distances . (15)))
 @end example
 
@@ -2221,7 +2283,7 @@ by looking at an example that includes no overrides at all.
 @c \book { } is required in these examples to ensure the spacing
 @c overrides can be seen between systems. -np
 
-@lilypond[quote]
+@lilypond[verbatim,quote,staffsize=16]
 \header { tagline = ##f }
 \paper { left-margin = 0\mm }
 \book {
@@ -2254,7 +2316,7 @@ the vertical startpoint of each system explicitly, we can set
 the @code{Y-offset} pair in the @code{line-break-system-details}
 attribute of the @code{NonMusicalPaperColumn} grob:
 
-@lilypond[quote]
+@lilypond[verbatim,quote,staffsize=16]
 \header { tagline = ##f }
 \paper { left-margin = 0\mm }
 \book {
@@ -2292,7 +2354,7 @@ explicitly, we can also set the vertical distances between staves
 within each system manually.  We do this using the @code{alignment-distances}
 subproperty of @code{line-break-system-details}.
 
-@lilypond[quote]
+@lilypond[verbatim,quote,staffsize=16]
 \header { tagline = ##f }
 \paper { left-margin = 0\mm }
 \book {
@@ -2333,7 +2395,7 @@ additional spacing parameters (including, for example, a corresponding
 every system and every staff.  Finally, note that @code{alignment-distances}
 specifies the vertical positioning of staves but not of staff groups.
 
-@lilypond[quote]
+@lilypond[verbatim,quote,staffsize=16]
 \header { tagline = ##f }
 \paper { left-margin = 0\mm }
 \book {
index 3f1d612441ce7d9d6f9f8a63b44edd6812b8196c..14ff59f636bd9d47ab4c0099b456cba79b36c78d 100644 (file)
@@ -493,7 +493,7 @@ Notation Reference:
 Snippets:
 @rlsr{Text}.
 
-Installed files:
+Installed Files:
 @file{scm/markup.scm}.
 
 
@@ -689,7 +689,7 @@ Snippets:
 Internals Reference:
 @rinternals{TextScript}.
 
-Installed files:
+Installed Files:
 @file{scm/define-markup-commands.scm}.
 
 
@@ -945,7 +945,7 @@ Snippets:
 Internals Reference:
 @rinternals{TextScript}.
 
-Installed files:
+Installed Files:
 @file{scm/define-markup-commands.scm}.
 
 
@@ -1126,7 +1126,7 @@ Snippets:
 Internals Reference:
 @rinternals{TextScript}.
 
-Installed files:
+Installed Files:
 @file{scm/define-markup-commands.scm},
 @file{scm/stencil.scm}.
 
@@ -1258,7 +1258,7 @@ Snippets:
 Internals Reference:
 @rinternals{TextScript}.
 
-Installed files:
+Installed Files:
 @file{scm/define-markup-commands.scm},
 @file{scm/fret-diagrams.scm},
 @file{scm/harp-pedals.scm}.
@@ -1324,7 +1324,7 @@ Extending:
 Internals Reference:
 @rinternals{TextScript}.
 
-Installed files:
+Installed Files:
 @file{scm/define-markup-commands.scm}.
 
 
@@ -1495,7 +1495,7 @@ Snippets:
 @rlsr{Text}.
 
 @c A source file gets never installed...
-@c Installed files:
+@c Installed Files:
 @c @file{lily/font-config-scheme.cc}.
 
 
index 730c86c591a02c1bf4a4bbf5e0c0164c7d9f2a24..0efed763177773d50c4edea6012c0c31c5702df4 100644 (file)
@@ -9,6 +9,21 @@
 @c used for news about the upcoming release; see CG 10.2
 
 
+@newsItem
+@subsubheading LilyPond 2.13.41 released!  @emph{Dec 4, 2010}
+
+We are happy to announce the release of LilyPond 2.13.41.  This
+release contains the usual number of bugfixes.  However, a number
+of critical issues still remain, so this release is intended for
+developers only.
+
+Please note that this is @strong{not} the second beta test.  Due
+to a number of untested changes to our build process, we cannot be
+at all confident about the quality of this release.
+
+@newsEnd
+
+
 @newsItem
 @subsubheading LilyPond 2.13.40 released!  @emph{Nov 21, 2010}
 
diff --git a/VERSION b/VERSION
index d77b08e3fa6da523a3a609655e59d87acff279cd..a32bbbf5558e4ed9179041e5f2f649c1a5ecf383 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=2
 MINOR_VERSION=13
-PATCH_LEVEL=41
+PATCH_LEVEL=42
 MY_PATCH_LEVEL=
 VERSION_STABLE=2.12.3
-VERSION_DEVEL=2.13.40
+VERSION_DEVEL=2.13.41
index f014d1ca8bab7f89b5f8f8cc8b01777fd4072b57..b460c4a62bca370598c2728e28db0512b1b989ca 100644 (file)
@@ -1155,11 +1155,12 @@ LilyPond-command-alist\t\talist from name to command"
 
   ;; Use Command on Region even for inactive mark (region).
   (if (string-match "XEmacs\\|Lucid" emacs-version)
-      (setq zmacs-regions nil)
+      (progn
+       (setq zmacs-regions nil)
+       (make-local-hook 'post-command-hook)) ; XEmacs requires
     (setq mark-even-if-inactive t))
 
   ;; Context dependent syntax tables in LilyPond-mode
-  (make-local-hook 'post-command-hook) ; XEmacs requires
   (add-hook 'post-command-hook 'LilyPond-mode-context-set-syntax-table nil t)
 
   ;; Turn on paren-mode buffer-locally, i.e., in LilyPond-mode
diff --git a/input/regression/bookpart-variable.ly b/input/regression/bookpart-variable.ly
new file mode 100644 (file)
index 0000000..9e43f53
--- /dev/null
@@ -0,0 +1,19 @@
+\version "2.13.42"
+
+
+\header {
+  texidoc = "
+A @code{\bookpart} variable can be inserted in a @code{\book}.
+No segfault should occur in this case.
+"
+}
+
+mypart = \bookpart {
+  \relative c' {
+    c1
+  }
+}
+
+\book {
+  \mypart
+}
index 6d5550912f0ee62f067af8981ec61d9dea53ea06..08988311b6cf99fc65a731253fa4ceae4611aca3 100644 (file)
@@ -1,10 +1,13 @@
-\version "2.13.1"
+\version "2.13.42"
 
 #(set-default-paper-size "a6")
 
 \header {
-  texidoc = "The min-systems-per-page variable takes precedence over
-the desire not to overfill a page."
+  texidoc = "
+The min-systems-per-page variable takes precedence over
+the desire not to overfill a page.  In this case, systems will
+overlap because they are forced to be on the page.
+"
 }
 
 \book {
@@ -13,4 +16,4 @@ the desire not to overfill a page."
   }
 
   \repeat unfold 21 { c'1 }
-}
\ No newline at end of file
+}
diff --git a/input/regression/page-overflow-compression.ly b/input/regression/page-overflow-compression.ly
new file mode 100644 (file)
index 0000000..40f8b9d
--- /dev/null
@@ -0,0 +1,17 @@
+\version "2.13.41"
+
+\header {
+  texidoc = "
+Layouts that overflow a page will be compressed in order to fit on
+the page, even if it causes collisions.  In this example, the
+tagline should not collide with the bottom staff.
+"
+}
+
+\paper {
+  paper-height= 8\cm
+}
+
+\book {
+  \repeat unfold 3 { g'''1\mark \markup "Long Text" g'''1\break}
+}
index 11d1bdd7b7f84bb945eb8c2177e98e04e59afa9f..18697f726b6a3a2b5b04ec2d971f528000481966 100644 (file)
@@ -6,14 +6,32 @@ This example should fit snugly on one page.
 "
 }
 
+#(define (assert-single-page layout props arg)
+   (if (and (= (chain-assoc-get 'page:page-number props -1)
+               (ly:output-def-lookup layout 'first-page-number))
+            (chain-assoc-get 'page:last? props -1))
+       (interpret-markup layout props arg)
+       (ly:error "failed to fit test on single page")))
+
 \paper {
   #(set-paper-size "a6")
   tagline = ##f
-  system-system-spacing #'padding = #1.20
+  system-system-spacing = #'((padding . 1.2))
+  oddHeaderMarkup = \markup \on-the-fly #assert-single-page \null
 }
 
-\new Voice {
-  \voiceTwo
-  \override Staff.Stem #'length = #0
-  \repeat unfold 144 a
+\book {
+  \score {
+    \new Voice {
+      \voiceTwo
+      \override Stem #'length = #0
+      \repeat unfold 144 a4
+    }
+    \layout {
+      \context {
+        \Score
+        \remove "Bar_number_engraver"
+      }
+    }
+  }
 }
index 7f338df38c584d6c99a6e90934f40f0e36dd5555..6013561a93b682516c6ab91536a596120af1d444 100644 (file)
@@ -23,7 +23,7 @@ tabstuff = {
   c4. d-_( |
   e\varcoda-> )
   \override TextSpanner #'(bound-details left text) = "rit." f\startTextSpan |
-  g ~ a\prall |
+  g ~ g\prall |
   g\thumb e-.\stopTextSpan
   \bar "|."
 }
diff --git a/input/regression/tablature-harmonic-functions.ly b/input/regression/tablature-harmonic-functions.ly
new file mode 100644 (file)
index 0000000..84f90da
--- /dev/null
@@ -0,0 +1,50 @@
+\version "2.13.42"
+
+\header {
+  texidoc = "
+Harmonics can be specified either by ratio or by fret number.
+"
+}
+
+test = {
+ e,4
+ \harmonicByRatio #1/2  e,\6
+ \harmonicByRatio #1/3  a,\5
+ \harmonicByRatio #2/3  d,\4 |
+ \harmonicByRatio #1/4 { g8\3 b\2 e'\1 b\2 < g b e >2 } |
+ e,1 | % check whether tab note head is restored
+ \harmonicByFret #12 e'4\1 ~
+ \harmonicByFret #12 e'4\1 (
+ \ottava #1
+ \harmonicByFret #7 e'4\1)
+ \harmonicByFret #5 e'8\1
+ \ottava #2
+ \harmonicByFret #4 < b\2 e'\1 >8 |
+ \harmonicByFret #3 < g\3 b\2 e'\1 >4
+ \harmonicByFret #2.7 < g\3 b\2 e'\1 >4
+ \harmonicByFret #2.3 < g\3 b\2 e'\1 >4
+ \harmonicByFret #2 < g\3 b\2 e'\1 >4 |
+ \ottava #0
+ e,1 | % check whether tab note head is restored
+}
+
+\paper {
+  ragged-right = ##f
+}
+
+\score {
+  <<
+    \new Staff {
+      \new Voice {
+        \clef "treble_8"
+        \override Voice.StringNumber #'transparent = ##t
+        \test
+      }
+    }
+    \new TabStaff {
+      \new TabVoice {
+        \test
+      }
+    }
+  >>
+}
diff --git a/input/regression/tablature-tie-spanner.ly b/input/regression/tablature-tie-spanner.ly
new file mode 100644 (file)
index 0000000..2c9c5eb
--- /dev/null
@@ -0,0 +1,31 @@
+\version "2.13.42"
+
+\header {
+  texidoc = "
+If a slur or a glissando follows a tie, the
+corresponding fret number is displayed in parentheses.
+"
+}
+
+music = {
+  c'4 ~ c'4 ( d'2 ) |
+  c'4 ~ c'4 \glissando d'2 |
+  c'4 ~ c'4 d'2 |
+  c'4 \glissando d'2. |
+}
+
+\score {
+  <<
+    \new Staff {
+      \new Voice {
+        \clef "G_8"
+        \music
+      }
+    }
+    \new TabStaff {
+      \new TabVoice {
+        \music
+      }
+    }
+  >>
+}
index e0722fd9800fbc9167c27abaaece0151a6be709d..50267703005eade9b70daddd354e5bd5731a9766 100644 (file)
@@ -270,7 +270,7 @@ push_paper (Lily_parser *parser, Output_def *paper)
 void
 pop_paper (Lily_parser *parser)
 {
-  if (! scm_is_null (parser->lexer_->lookup_identifier ("$papers")))
+  if (scm_is_pair (parser->lexer_->lookup_identifier ("$papers")))
     parser->lexer_->set_identifier (ly_symbol2scm ("$papers"),
                                     scm_cdr (parser->lexer_->lookup_identifier ("$papers")));
 }
index 1a39ad51e8c21f681d1d345424b1c30931820e57..aec0b80ac8380ea9a957731410152eb4edba81b3 100644 (file)
@@ -309,8 +309,17 @@ Page_layout_problem::solve_rod_spring_problem (bool ragged)
   solution_ = spacer.spring_positions ();
 
   if (!spacer.fits ())
-    warning (_f ("couldn't fit music on page: overflow is %f",
-                spacer.configuration_length(spacer.force()) - page_height_));
+    {
+      Real overflow = spacer.configuration_length (spacer.force ())
+                     - page_height_;
+      warning (_f ("couldn't fit music on page: overflow is %f",
+                   overflow));
+      warning (_ ("compressing music to fit"));
+      vsize space_count = solution_.size ();
+      Real spacing_increment = overflow / (space_count - 2);
+      for (vsize i = 2; i < space_count; i++)
+       solution_[i] -= (i-1) * spacing_increment;
+    }
 }
 
 // The solution_ vector stores the position of every live VerticalAxisGroup
diff --git a/lily/tab-harmonic-engraver.cc b/lily/tab-harmonic-engraver.cc
deleted file mode 100644 (file)
index a6e226d..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
-  This file is part of LilyPond, the GNU music typesetter.
-
-  Copyright (C) 2005--2010 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 "engraver.hh"
-
-#include "item.hh"
-#include "pointer-group-interface.hh"
-#include "simple-closure.hh"
-#include "stream-event.hh"
-#include "warn.hh"
-
-#include "translator.icc"
-
-class Tab_harmonic_engraver : public Engraver
-{
-  TRANSLATOR_DECLARATIONS (Tab_harmonic_engraver);
-
-protected:
-  DECLARE_ACKNOWLEDGER (note_head);
-};
-
-Tab_harmonic_engraver::Tab_harmonic_engraver ()
-{
-}
-
-void
-Tab_harmonic_engraver::acknowledge_note_head (Grob_info info)
-{
-  if (Stream_event *note = info.event_cause ())
-    {
-      for (SCM s = note->get_property ("articulations");
-          scm_is_pair (s); s = scm_cdr (s))
-       {
-         Stream_event *ev = unsmob_stream_event (scm_car (s));
-         
-         if (!ev)
-           continue;
-
-         
-         if (ev->in_event_class ("harmonic-event"))
-           {
-             if (Item *victim = info.item ())
-               {
-                 Engraver *eng = dynamic_cast<Engraver*> (info.origin_translator ());
-                 Item *paren = eng->make_item ("HarmonicParenthesesItem", victim->self_scm ());
-                 Pointer_group_interface::add_grob (paren, ly_symbol2scm ("elements"), victim);
-
-                 paren->set_parent (victim, Y_AXIS);
-             
-                 Real size = robust_scm2double (paren->get_property ("font-size"), 0.0)
-                   + robust_scm2double (victim->get_property ("font-size"), 0.0);
-                 paren->set_property ("font-size", scm_from_double (size));
-               }
-           }
-       }
-    }
-}
-
-ADD_ACKNOWLEDGER (Tab_harmonic_engraver, note_head);
-ADD_TRANSLATOR (Tab_harmonic_engraver,
-               /* doc */
-               "In a tablature, parenthesize objects whose music cause has"
-               " the @code{parenthesize} property.",
-               
-               /* create */
-               "HarmonicParenthesesItem ",
-
-               /* read */
-               "",
-
-               /* write */
-               ""
-               );
diff --git a/lily/tab-tie-follow-engraver.cc b/lily/tab-tie-follow-engraver.cc
new file mode 100644 (file)
index 0000000..fcf9965
--- /dev/null
@@ -0,0 +1,131 @@
+/*
+  This file is part of LilyPond, the GNU music typesetter.
+
+  Copyright (C) 2010 Carl D. Sorensen
+
+  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 <cctype>
+#include <cstdio>
+
+#include "engraver.hh"
+
+using namespace std;
+
+#include "context.hh"
+#include "item.hh"
+#include "spanner.hh"
+
+#include "translator.icc"
+
+/*
+   Change tab-note-head properties when a tie is followed by a
+   slurs or glissando.
+*/
+class Tab_tie_follow_engraver : public Engraver
+{
+  vector<Spanner *> slurs_;
+  vector<Spanner *> glissandi_;
+  vector<Item *> note_heads_;
+
+public:
+  TRANSLATOR_DECLARATIONS (Tab_tie_follow_engraver);
+
+protected:
+  DECLARE_ACKNOWLEDGER (glissando);
+  DECLARE_ACKNOWLEDGER (slur);
+  DECLARE_ACKNOWLEDGER (tab_note_head);
+
+  void stop_translation_timestep ();
+};
+
+Tab_tie_follow_engraver::Tab_tie_follow_engraver ()
+{
+}
+
+void
+Tab_tie_follow_engraver::acknowledge_glissando (Grob_info info)
+{
+  glissandi_.push_back (info.spanner ());
+}
+
+void
+Tab_tie_follow_engraver::acknowledge_tab_note_head (Grob_info info)
+{
+  note_heads_.push_back (info.item ());
+}
+
+void
+Tab_tie_follow_engraver::acknowledge_slur (Grob_info info)
+{
+  slurs_.push_back (info.spanner ());
+}
+
+void
+Tab_tie_follow_engraver::stop_translation_timestep ()
+{
+  for (vsize k = 0; k < note_heads_.size (); k++)
+    {
+      bool spanner_start = false;
+      for (vsize j = 0; j < slurs_.size (); j++)
+        {
+          Item* left_item = slurs_[j]->get_bound (LEFT);
+          if (left_item)
+            {
+              SCM left_cause = left_item->get_property ("cause");
+              Item *slur_cause = unsmob_item (left_cause);
+              if (slur_cause ==  note_heads_[k])
+                {
+                  note_heads_[k]->set_property ("span-start", SCM_BOOL_T);
+                  spanner_start = true;
+                  break;
+                }
+            }
+        }
+      if (!spanner_start)
+        for (vsize j = 0; j < glissandi_.size (); j++)
+          {
+            Item *left_bound = glissandi_[j]->get_bound (LEFT);
+            if (left_bound == note_heads_[k])
+              {
+                note_heads_[k]->set_property ("span-start", SCM_BOOL_T);
+                break;
+              }
+          }
+    }
+  slurs_.clear ();
+  glissandi_.clear ();
+  note_heads_.clear();
+}
+
+ADD_ACKNOWLEDGER (Tab_tie_follow_engraver, slur);
+ADD_ACKNOWLEDGER (Tab_tie_follow_engraver, glissando);
+ADD_ACKNOWLEDGER (Tab_tie_follow_engraver, tab_note_head);
+
+
+ADD_TRANSLATOR (Tab_tie_follow_engraver,
+               /* doc */
+               "Adjust TabNoteHead properties when a tie is followed"
+               " by a slur or glissando.",
+
+               /* create */
+               " ",
+
+               /* read */
+                " ",
+
+               /* write */
+                " "
+                );
index d636db8253832eb56bcc9221e8d1bfffdde2e91d..919a0ae806f3192c6babd91b5288e621ef77d952 100644 (file)
@@ -34,7 +34,7 @@
 #include "translator.icc"
 
 /**
-   Manufacture ties.  Acknowledge noteheads, and put them into a
+   Manufacture ties.  Acknowledge note heads, and put them into a
    priority queue. If we have a TieEvent, connect the notes that finish
    just at this time, and note that start at this time.
 
@@ -172,12 +172,12 @@ Tie_engraver::acknowledge_note_head (Grob_info i)
 
          // Prevent all other tied notes ending at the same moment (assume
          // implicitly the notes have also started at the same moment!)
-         // from triggering an "unterminated tie" warning. Neede e.g. for
+         // from triggering an "unterminated tie" warning. Needed e.g. for
          // <c e g>~ g
          for (vsize j = heads_to_tie_.size (); j--;)
            {
              if (heads_to_tie_[j].end_moment_ == end)
-               heads_to_tie_[i].tie_from_chord_created = true;
+               heads_to_tie_[j].tie_from_chord_created = true;
            }
        }
     }
@@ -241,7 +241,7 @@ Tie_engraver::stop_translation_timestep ()
 
       if (!left_ev)
        {
-         // may happen for ambituses
+         // may happen for ambitus
          continue;
        }
            
index f2ca7c3e464757b010b22b5aa893aabcfbca46f9..26f0de3706cc4833bb4478861c122a3e62f89fad 100644 (file)
@@ -724,7 +724,7 @@ context."
   \name "TabVoice"
   \alias "Voice"
   \consists "Tab_note_heads_engraver"
-  \consists "Tab_harmonic_engraver"
+  \consists "Tab_tie_follow_engraver"
 
   \remove "Note_heads_engraver"
   \remove "Fingering_engraver"
@@ -788,6 +788,7 @@ context."
   \override Hairpin #'transparent = ##t
   \override Script #'stencil = ##f
   \override TextScript #'stencil = ##f
+  \override Glissando #'stencil = #glissando::draw-tab-glissando
   %% the direction for glissando lines will be automatically corrected
   \override Glissando #'extra-dy = #glissando::calc-tab-extra-dy
   \override Glissando #'bound-details #'right = #`((attach-dir . ,LEFT)
@@ -827,8 +828,6 @@ contexts and handles the line spacing, the tablature clef etc. properly."
   \override Clef #'stencil = #clef::print-modern-tab-if-set
   %% no time signature
   \override TimeSignature #'stencil = ##f
-  %% better parentheses in a TabStaff
-  \override ParenthesesItem #'stencils = #parentheses-item::calc-tabstaff-parenthesis-stencils
   %% no arpeggios
   \override Arpeggio #'stencil = ##f
   %% we ignore collision warnings that may occur due to
index 4a58f05522f919b1f242735e0965bf8e0adbce65..67ff1282d476401aebefbd4e3abab1b33ee49a45 100644 (file)
@@ -302,7 +302,33 @@ grace =
 #(def-grace-function startGraceMusic stopGraceMusic
    (_i "Insert @var{music} as grace notes."))
 
-
+harmonicByFret = #(define-music-function (parser location fret music) (number? ly:music?)
+  (let* ((fret (number->string fret))
+         (pitch (fret->pitch fret)))
+        (make-sequential-music
+         (list
+          #{
+            \override TabNoteHead #'stencil = #(tab-note-head::print-custom-fret-label $fret)
+          #}
+          (make-harmonic
+            (calc-harmonic-pitch pitch music))
+          #{
+            \revert TabNoteHead #'stencil
+          #}))))
+
+harmonicByRatio = #(define-music-function (parser location ratio music) (number? ly:music?)
+  (let ((pitch (ratio->pitch ratio))
+        (fret (ratio->fret ratio)))
+       (make-sequential-music
+        (list
+         #{
+           \override TabNoteHead #'stencil = #(tab-note-head::print-custom-fret-label $fret)
+         #}
+         (make-harmonic
+           (calc-harmonic-pitch pitch music))
+         #{
+            \revert TabNoteHead #'stencil
+         #}))))
 
 instrumentSwitch =
 #(define-music-function
index b08c572497740bcf0cc3aae7f048f01304b69915..3bed8193a37f6d968010c49637deb6aa62775bbf 100644 (file)
@@ -453,6 +453,7 @@ tabFullNotation = {
   \revert TabVoice.MultiMeasureRestNumber #'transparent
   \revert TabVoice.MultiMeasureRestText #'transparent
   % markups etc.
+  \revert TabVoice.Glissando #'stencil
   \revert TabVoice.Script #'stencil
   \revert TabVoice.TextScript #'stencil
   \revert TabVoice.TextSpanner #'stencil
index 735ccb9dcd4acdf84aa040603465e18457fbc5ae..87aa26a212fa289c13f36551de32fbe9beeaa7f7 100644 (file)
@@ -87,6 +87,11 @@ note)."
  '(align-dir fret-diagram-details size dot-placement-list
    thickness))
 
+(ly:add-interface
+  'glissando-interface
+  "A glissando."
+  '())
+
 (ly:add-interface
  'grace-spacing-interface
  "Keep track of durations in a run of grace notes."
@@ -206,7 +211,7 @@ interesting enough to maintain a hara-kiri staff."
 (ly:add-interface
  'tab-note-head-interface
  "A note head in tablature."
- '(details))
+ '(details display-cautionary span-start))
 
 (ly:add-interface
  'trill-spanner-interface
index 25519bca80bda4f7bafa7b45a0ae7b78c88b1b45..6097eb8f0763193f0f8e3ec86c27c305b1ffddfe 100644 (file)
@@ -962,6 +962,7 @@ bounds are spaced.")
 
      (direction-source ,ly:grob? "In case @code{side-relative-direction} is
 set, which grob to get the direction from.")
+     (display-cautionary ,boolean? "Should the grob be displayed as a cautionary grob?")
      (dot ,ly:grob? "A reference to a @code{Dots} object.")
      (dots ,ly:grob-array? "Multiple @code{Dots} objects.")
 
@@ -1013,6 +1014,7 @@ grobs.")
      (spacing ,ly:grob? "The spacing spanner governing this section.")
      (spacing-wishes ,ly:grob-array? "An array of note spacing or staff spacing
 objects.")
+     (span-start ,boolean? "Is the note head at the start of a spanner?")
      (staff-grouper ,ly:grob? "The staff grouper we belong to.")
      (staff-symbol ,ly:grob? "The staff symbol grob that we are in.")
      (stem ,ly:grob? "A pointer to a @code{Stem} object.")
index c5c6d1094f9e3f57562e78b984bcce405c3e5fcf..82636f32882461c8039155aeaa12d50adb338b25 100644 (file)
        (Y-extent . #f)
        (zigzag-width . 0.75)
        (meta . ((class . Spanner)
-                (interfaces . (line-interface
+                (interfaces . (glissando-interface
+                               line-interface
                                line-spanner-interface
                                unbreakable-spanner-interface))))))
 
                                self-alignment-interface
                                spanner-interface))))))
 
-    (HarmonicParenthesesItem
-     . (
-       (padding . 0)
-       (stencil . ,parentheses-item::print)
-       (stencils . ,parentheses-item::calc-angled-bracket-stencils)
-       (meta . ((class . Item)
-                (interfaces . (font-interface
-                               parentheses-interface))))))
-
     (HorizontalBracket
      . (
        (bracket-flare . (0.5 . 0.5))
        (details . ((tied-properties . ((break-visibility . ,begin-of-line-visible)
                                        (parenthesize . #t)))
                    (repeat-tied-properties . ((note-head-visible . #t)
-                                              (parenthesize . #t)))))
+                                              (parenthesize . #t)))
+                   (harmonic-properties . ((angularity . 2)
+                                           (half-thickness . 0.075)
+                                           (padding . 0)
+                                           (procedure . ,parenthesize-stencil)
+                                           (width . 0.25)))
+                   (cautionary-properties . ((angularity . 0.4)
+                                             (half-thickness . 0.075)
+                                             (padding . 0)
+                                             (procedure . ,parenthesize-stencil)
+                                             (width . 0.25)))))
+
        (direction . ,CENTER)
        (duration-log . ,note-head::calc-duration-log)
        (font-series . bold)
        (font-size . -2)
        (stem-attachment . (0.0 . 1.35))
-       (stencil . ,ly:text-interface::print)
+       (stencil . ,tab-note-head::print)
        (whiteout . #t)
        (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
        (Y-offset . ,ly:staff-symbol-referencer::callback)
index d4a0b238465dc652a1b0df4e5319931152656ca6..00e830881202d5475280075e913e7b8286ac8a50 100644 (file)
@@ -425,6 +425,7 @@ LilyPond safe mode.  The syntax is the same as `define*-public'."
 
     "flag-styles.scm"
     "fret-diagrams.scm"
+    "tablature.scm"
     "harp-pedals.scm"
     "define-woodwind-diagrams.scm"
     "display-woodwind-diagrams.scm"
@@ -439,7 +440,6 @@ LilyPond safe mode.  The syntax is the same as `define*-public'."
     "paper.scm"
     "backend-library.scm"
     "x11-color.scm"
-    "tablature.scm"
 
     ;; must be after everything has been defined
     "safe-lily.scm"))
index 7845f2192761e930b122fb178ee4c5e78ae0290c..83ad8bdf31597cb082bc819a3baaaac9ae984e40 100644 (file)
@@ -66,7 +66,7 @@
     (if (and (symbol? style)
              (eq? style 'cross))
         (stencil-whiteout (ly:note-head::print grob))
-        (ly:text-interface::print grob))))
+        (tab-note-head::print grob))))
 
 ;; definitions for the "moderntab" clef:
 ;; the "moderntab" clef will be added to the list of known clefs,
         -0.75
         0.75)))
 
-;; for ties in tablature, fret numbers that are tied to should be invisible,
-;; except for 'tied to' numbers after a line break;; these will be
-;; parenthesized (thanks to Neil for his solution):
-(define-public (parenthesize-tab-note-head grob)
-  ;; Helper function to parenthesize tab noteheads,
-  ;; since we can't use ParenthesesItem at this stage
-  ;; This is basically the same as the C++ function
-  ;; in accidental.cc, converted to Scheme
-  (let* ((font (ly:grob-default-font grob))
-         (open (stencil-whiteout
-                (ly:font-get-glyph font "accidentals.leftparen")))
-         (close (stencil-whiteout
-                 (ly:font-get-glyph font "accidentals.rightparen")))
-         (me (ly:text-interface::print grob)))
-
-    (ly:stencil-combine-at-edge
-     (ly:stencil-combine-at-edge me X LEFT open) X RIGHT close)))
-
-;; ParenthesesItem doesn't work very well for TabNoteHead, since
-;; the parentheses are too small and clash with the staff-lines
-;; Define a callback for the 'stencils property which will tweak
-;; the parentheses' appearance for TabNoteHead
-(define-public (parentheses-item::calc-tabstaff-parenthesis-stencils grob)
-  ;; the grob we want to parenthesize
-  (let ((victim (ly:grob-array-ref (ly:grob-object grob 'elements) 0)))
-
-    ;; check whether it's a note head
-    (if (grob::has-interface victim 'note-head-interface)
-        (begin
-          ;; tweak appearance before retrieving
-          ;; list of stencils '(left-paren right-paren)
-          ;; get the font-size from victim (=TabNoteHead) to handle
-          ;; grace notes properly
-          (ly:grob-set-property! grob 'font-size
-                                 (ly:grob-property victim 'font-size))
-          (ly:grob-set-property! grob 'padding 0)
-          ;; apply whiteout to each element of the list
-          (map stencil-whiteout
-               (parentheses-item::calc-parenthesis-stencils grob)))
-        (parentheses-item::calc-parenthesis-stencils grob))))
-
 ;; the handler for ties in tablature; according to TabNoteHead #'details,
 ;; the 'tied to' note is handled differently after a line break
 (define-public (tie::handle-tab-note-head grob)
   (let* ((original (ly:grob-original grob))
          (tied-tab-note-head (ly:spanner-bound grob RIGHT))
+         (spanner-start (ly:grob-property tied-tab-note-head 'span-start #f))
          (siblings (if (ly:grob? original)
                        (ly:spanner-broken-into original) '())))
 
-    (if (and (>= (length siblings) 2)
-             (eq? (car (last-pair siblings)) grob))
-        ;; tie is split -> get TabNoteHead #'details
-        (let* ((details (ly:grob-property tied-tab-note-head 'details))
-               (tied-properties (assoc-get 'tied-properties details '()))
-               (tab-note-head-parenthesized (assoc-get 'parenthesize tied-properties #t))
-               ;; we need the begin-of-line entry in the 'break-visibility vector
-               (tab-note-head-visible
-                (vector-ref (assoc-get 'break-visibility
-                                       tied-properties #(#f #f #t)) 2)))
-
-         (if tab-note-head-visible
-             ;; tab note head is visible
-             (if tab-note-head-parenthesized
-                 (ly:grob-set-property! tied-tab-note-head 'stencil
-                                        (lambda (grob)
-                                          (parenthesize-tab-note-head grob))))
-             ;; tab note head is invisible
-             (begin
-               (ly:grob-set-property! tied-tab-note-head 'transparent #t)
-               (ly:grob-set-property! tied-tab-note-head 'whiteout #f))))
-
-        ;; tie is not split -> make fret number invisible
+    (if spanner-start
+        ;; tab note head is right bound of a tie and left of spanner,
+        ;; -> parenthesize it at all events
         (begin
-          (ly:grob-set-property! tied-tab-note-head 'transparent #t)
-          (ly:grob-set-property! tied-tab-note-head 'whiteout #f)))))
+          (ly:grob-set-property! tied-tab-note-head 'display-cautionary #t)
+          (ly:grob-set-property! tied-tab-note-head 'stencil tab-note-head::print))
+        ;; otherwise, check whether tie is split:
+        (if (and (>= (length siblings) 2)
+                 (eq? (car (last-pair siblings)) grob))
+            ;; tie is split -> get TabNoteHead #'details
+            (let* ((details (ly:grob-property tied-tab-note-head 'details))
+                   (tied-properties (assoc-get 'tied-properties details '()))
+                   (tab-note-head-parenthesized (assoc-get 'parenthesize tied-properties #t))
+                   ;; we need the begin-of-line entry in the 'break-visibility vector
+                   (tab-note-head-visible
+                    (vector-ref (assoc-get 'break-visibility
+                                           tied-properties #(#f #f #t)) 2)))
+
+              (if tab-note-head-visible
+                  ;; tab note head is visible
+                  (if tab-note-head-parenthesized
+                      (begin
+                       (ly:grob-set-property! tied-tab-note-head 'display-cautionary #t)
+                        (ly:grob-set-property! tied-tab-note-head 'stencil tab-note-head::print)))
+                  ;; tab note head is invisible
+                 (ly:grob-set-property! tied-tab-note-head 'transparent #t)))
+
+            ;; tie is not split
+            (ly:grob-set-property! tied-tab-note-head 'transparent #t)))))
+
+
 
 ;; repeat ties occur within alternatives in a repeat construct;
 ;; TabNoteHead #'details handles the appearance in this case
 (define-public (repeat-tie::handle-tab-note-head grob)
   (let* ((tied-tab-note-head (ly:grob-object grob 'note-head))
-         (details (ly:grob-property tied-tab-note-head 'details))
-         (repeat-tied-properties (assoc-get 'repeat-tied-properties details '()))
-         (tab-note-head-visible (assoc-get 'note-head-visible repeat-tied-properties #t))
-         (tab-note-head-parenthesized (assoc-get 'parenthesize repeat-tied-properties #t)))
-
-    (if tab-note-head-visible
-        ;; tab note head is visible
-        (if tab-note-head-parenthesized
-           (ly:grob-set-property! tied-tab-note-head 'stencil
-                                  (lambda (grob)
-                                    (parenthesize-tab-note-head grob))))
-       ;; tab note head is invisible
-       (begin
-          (ly:grob-set-property! tied-tab-note-head 'transparent #t)
-          (ly:grob-set-property! tied-tab-note-head 'whiteout #f)))))
+         (spanner-start (ly:grob-property tied-tab-note-head 'span-start #f)))
+    (if spanner-start
+        ;; tab note head is between a tie and a slur/glissando
+        ;; -> parenthesize it at all events
+        (begin
+          (ly:grob-set-property! tied-tab-note-head 'display-cautionary #t)
+          (ly:grob-set-property! tied-tab-note-head 'stencil tab-note-head::print))
+        ;; otherwise check 'details
+        (let* ((details (ly:grob-property tied-tab-note-head 'details))
+               (repeat-tied-properties (assoc-get 'repeat-tied-properties details '()))
+               (tab-note-head-visible (assoc-get 'note-head-visible repeat-tied-properties #t))
+               (tab-note-head-parenthesized (assoc-get 'parenthesize repeat-tied-properties #t)))
+
+        (if tab-note-head-visible
+            ;; tab note head is visible
+            (if tab-note-head-parenthesized
+                (begin
+                  (ly:grob-set-property! tied-tab-note-head 'display-cautionary #t)
+                  (ly:grob-set-property! tied-tab-note-head 'stencil tab-note-head::print)))
+            ;; tab note head is invisible
+            (ly:grob-set-property! tied-tab-note-head 'transparent #t))))))
 
 ;; the slurs should not be too far apart from the corresponding fret number, so
-;; we move the slur towards the TabNoteHeads:
+;; we move the slur towards the TabNoteHeads; moreover, if the left fret number is
+;; the right-bound of a tie, we'll set it in parentheses:
 (define-public (slur::draw-tab-slur grob)
   ;; TODO: use a less "brute-force" method to decrease
   ;; the distance between the slur ends and the fret numbers
-  (let* ((staff-space (ly:staff-symbol-staff-space grob))
+  (let* ((original (ly:grob-original grob))
+         (left-bound (ly:spanner-bound original LEFT))
+         (left-tab-note-head (ly:grob-property left-bound 'cause))
+         (staff-space (ly:staff-symbol-staff-space grob))
          (control-points (ly:grob-property grob 'control-points))
          (new-control-points (map
-                             (lambda (p)
-                               (cons (car p)
-                                     (- (cdr p)
-                                        (* staff-space
-                                           (ly:grob-property grob 'direction)
-                                           0.35))))
-                             control-points)))
+                              (lambda (p)
+                                (cons (car p)
+                                      (- (cdr p)
+                                         (* staff-space
+                                            (ly:grob-property grob 'direction)
+                                            0.35))))
+                             control-points)))
 
     (ly:grob-set-property! grob 'control-points new-control-points)
     (ly:slur::print grob)))
 
+;; The glissando routine works similarly to the slur routine; if the
+;; fret number is "tied to", it should become parenthesized.
+(define-public (glissando::draw-tab-glissando grob)
+  (let* ((original (ly:grob-original grob))
+         (left-tab-note-head (ly:spanner-bound original LEFT))
+         (cautionary (ly:grob-property left-tab-note-head 'display-cautionary #f)))
+
+    (and cautionary
+         ;; increase left padding to avoid collision between
+         ;; closing parenthesis and glissando line
+         (ly:grob-set-nested-property! grob '(bound-details left padding) 0.5))
+    (ly:line-spanner::print grob)))
+
 ;; for \tabFullNotation, the stem tremolo beams are too big in comparison to
 ;; normal staves; this wrapper function scales accordingly:
 (define-public (stem-tremolo::calc-tab-width grob)
   (let ((width (ly:stem-tremolo::calc-width grob))
-       (staff-space (ly:staff-symbol-staff-space grob)))
+        (staff-space (ly:staff-symbol-staff-space grob)))
     (/ width staff-space)))
 
 
 ;; a callback for custom fret labels
 (define-public ((tab-note-head::print-custom-fret-label fret) grob)
-  (grob-interpret-markup grob (markup #:vcenter fret)))
+  (ly:grob-set-property! grob 'text fret)
+  (tab-note-head::print grob))
+
+(define-public (tab-note-head::print grob)
+  (define (is-harmonic? grob)
+    (let ((arts (ly:event-property (event-cause grob) 'articulations)))
+      (not (null? (filter (lambda (a)
+                           (ly:in-event-class? a 'harmonic-event))
+                         arts)))))
+
+  (let* ((cautionary (ly:grob-property grob 'display-cautionary #f))
+        (details (ly:grob-property grob 'details '()))
+        (harmonic-props (assoc-get 'harmonic-properties details '()))
+        (harmonic-angularity (assoc-get 'angularity harmonic-props 2))
+        (harmonic-half-thick (assoc-get 'half-thickness harmonic-props 0.075))
+        (harmonic-padding (assoc-get 'padding harmonic-props 0))
+        (harmonic-proc (assoc-get 'procedure harmonic-props parenthesize-stencil))
+        (harmonic-width (assoc-get 'width harmonic-props 0.25))
+        (cautionary-props (assoc-get 'cautionary-properties details '()))
+        (cautionary-angularity (assoc-get 'angularity cautionary-props 2))
+        (cautionary-half-thick (assoc-get 'half-thickness cautionary-props 0.075))
+        (cautionary-padding (assoc-get 'padding cautionary-props 0))
+        (cautionary-proc (assoc-get 'procedure cautionary-props parenthesize-stencil))
+        (cautionary-width (assoc-get 'width cautionary-props 0.25))
+         (output-grob (ly:text-interface::print grob))
+        (ref-grob (grob-interpret-markup grob "8"))
+        (column-offset (interval-length
+                           (ly:stencil-extent
+                             (grob-interpret-markup grob "8")
+                             X))))
+
+    (if (is-harmonic? grob)
+        (set! output-grob (harmonic-proc output-grob
+                                        harmonic-half-thick
+                                        harmonic-width
+                                        harmonic-angularity
+                                        harmonic-padding)))
+    (if cautionary
+        (set! output-grob (cautionary-proc output-grob
+                                          cautionary-half-thick
+                                          cautionary-width
+                                          cautionary-angularity
+                                          cautionary-padding)))
+    (ly:stencil-translate-axis (centered-stencil output-grob)
+                              column-offset
+                              X)))
+
+;; Harmonic definitions
+
+(define node-positions
+  ;; for the node on m/n-th of the string length, we get the corresponding
+  ;; (exact) fret position by calculating p=(-12/log 2)*log(1-(m/n));
+  ;; since guitarists normally use the forth fret and not the 3.8th, here
+  ;; are rounded values, ordered by
+  ;; 1/2
+  ;; 1/3 2/3
+  ;; 1/4 2/4 3/4 etc.
+  ;; The value for 2/4 is irrelevant in practical, bacause the string sounds
+  ;; only one octave higher, not two, but since scheme normalizes the fractions
+  ;; anyway, these values are simply placeholders for easier indexing.
+  ;; According to the arithmetic sum, the position of m/n is at 1/2*(n-2)(n-1)+(m-1)
+  ;; if we start counting from zero
+  (vector 12
+           7   19
+           5   12    24
+           4    9    16   28
+           3    7    12   19    31
+           2.7  5.8  9.7  14.7  21.7  33.7
+           2.3  5    8    12    17    24    36
+           2    4.4  7    10    14    19    26  38 ))
+
+(define partial-pitch
+  (vector '(0 0 0)
+          '(1 0 0)
+          '(1 4 0)
+          '(2 0 0)
+          '(2 2 0)
+          '(2 4 0)
+          '(2 6 -1/2)
+          '(3 0 0)
+          '(3 1 0)))
+
+(define fret-partials
+  '(("0" . 0)
+    ("12" . 1)
+    ("7" . 2)
+    ("19" . 2)
+    ("5" . 3)
+    ("24" . 3)
+    ("4" . 4)
+    ("9" . 4)
+    ("16" . 4)
+    ("3" . 5)
+    ("2.7" . 6)
+    ("2.3" . 7)
+    ("2" . 8)))
+
+(define-public (ratio->fret ratio)
+  "Calculate a fret number given @var{ratio} for the harmonic."
+  (let* ((nom (numerator ratio))
+         (den (denominator ratio))
+         (index (+ (* (- den 2)
+                      (- den 1)
+                      1/2)
+                   nom -1)))
+     (number->string (vector-ref node-positions index))))
+
+(define-public (ratio->pitch ratio)
+  "Calculate a pitch given @var{ratio} for the harmonic."
+  (let* ((partial (1- (denominator ratio)))
+         (pitch (vector-ref partial-pitch partial)))
+
+  (ly:make-pitch (first pitch)
+                 (second pitch)
+                 (third pitch))))
+
+(define-public (fret->pitch fret)
+  "Calculate a pitch given @var{fret} for the harmonic."
+  (let* ((partial (assoc-get fret fret-partials 0))
+         (pitch (vector-ref partial-pitch partial)))
+
+  (ly:make-pitch (first pitch)
+                 (second pitch)
+                 (third pitch))))
+
+(define-public (calc-harmonic-pitch pitch music)
+  "Calculate the harmonic pitches in @var{music} given
+@var{pitch} as the non-harmonic pitch."
+  (let ((es (ly:music-property music 'elements))
+        (e (ly:music-property music 'element))
+        (p (ly:music-property music 'pitch)))
+    (cond
+      ((pair? es)
+       (ly:music-set-property! music 'elements
+                               (map (lambda (x) (calc-harmonic-pitch pitch x)) es)))
+      ((ly:music? e)
+       (ly:music-set-property! music 'element (calc-harmonic-pitch pitch e)))
+      ((ly:pitch? p)
+       (begin
+         (set! p (ly:pitch-transpose p pitch))
+         (ly:music-set-property! music 'pitch p))))
+    music))
+
+(define-public (make-harmonic mus)
+  "Convert music variable @var{mus} to harmonics."
+  (let ((elts (ly:music-property mus 'elements))
+        (elt (ly:music-property mus 'element)))
+       (cond
+        ((pair? elts)
+         (map make-harmonic elts))
+        ((ly:music? elt)
+         (make-harmonic elt))
+        ((music-is-of-type? mus 'note-event)
+         (set! (ly:music-property mus 'articulations)
+               (append
+                 (ly:music-property mus 'articulations)
+                 (list (make-music 'HarmonicEvent))))))
+       mus))
index 40df423e95ad8b47ddb78966c0798460bafc1b45..cba097c46f275a1608e0e5021043c735bd906620 100644 (file)
@@ -343,6 +343,12 @@ def translateNameToUrl(manual, version):
         else:
             return ''
 
+def addLang(url, lang):
+    if lang:
+        base, ext = os.path.splitext(url)
+        return base + '.' + lang + ext
+    else:
+        return url
 
 def make_manual_links(name, version, lang):
     """Here is where all the macros manualStableLearningSplit,
@@ -382,32 +388,33 @@ def make_manual_links(name, version, lang):
         # until 2.14 is out.  -gp
         if (url.endswith('.html')):
             make_ver_link(macroLang("manual"+name+mshort+'Pdf',lang),
-                      url,
+                      addLang(url, lang),
                       getTrans(manual.capitalize(),lang) + '.pdf')
             make_ver_link(macroLang("manual"+name+mshort+'Split',lang),
-                      url,
+                      addLang(url, lang),
                       getTrans(manual.capitalize(),lang) +
                       getTrans(' (split HTML)',lang))
             make_ver_link(macroLang("manual"+name+mshort+'Big',lang),
-                      url,
+                      addLang(url, lang),
                       getTrans(manual.capitalize(),lang) +
                       getTrans(' (big HTML)',lang))
             newurl = url
         else:
             make_ver_link(macroLang("manual"+name+mshort+'Pdf',lang),
-                      url + '.pdf',
+                      # TODO: this is an even stupider way of doing it
+                      addLang(url+'.pdf', lang),
                       getTrans(manual.capitalize(),lang) + '.pdf')
             make_ver_link(macroLang("manual"+name+mshort+'Split',lang),
-                      url + '/index.html',
+                      addLang(url + '/index.html', lang),
                       getTrans(manual.capitalize(),lang) +
                       getTrans(' (split HTML)',lang))
             make_ver_link(macroLang("manual"+name+mshort+'Big',lang),
-                      url + '-big-page.html',
+                      addLang(url + '-big-page.html', lang),
                       getTrans(manual.capitalize(),lang) +
                       getTrans(' (big HTML)',lang))
             newurl = url + '/index.html'
         make_ver_link(macroLang("manual"+name+mshort+'SplitNoName',lang),
-                  newurl,
+                  addLang(newurl, lang),
                   getTrans(manual.capitalize(),lang))
 
 def make_regtest_links(name, version, lang):
index 5267a8582807ae4f5df29d494d0511922382df6b..d4e8c4baf10a7bc2146f0fe8696ac0123cf22fc8 100644 (file)
@@ -170,13 +170,14 @@ for file in html_files:
         ### alter links as appropriate
         link = getLocalHref(line)
         if (link != ""):
-            # quesitonable
-            if (link.endswith(".html")):
-               langlink = addLangExt(link[:-5], lang, "html")
-                line = line.replace(link, langlink)
-            if (link.endswith(".pdf")):
-               langlink = addLangExt(link[:-4], lang, "pdf")
-                line = line.replace(link, langlink)
+            # questionable
+            if (not link.startswith("../doc/")):
+                if (link.endswith(".html")):
+                   langlink = addLangExt(link[:-5], lang, "html")
+                    line = line.replace(link, langlink)
+                if (link.endswith(".pdf")):
+                   langlink = addLangExt(link[:-4], lang, "pdf")
+                    line = line.replace(link, langlink)
         ### add google tracker header
         if (line.find("</head>") >= 0):
             outfile.write("""<!-- Google tracking !-->
index e0a00ae170310a5a9d40a8d92a60f86b7db8a443..eb15312de11eb57d735475afcc39471df7bbfd6f 100644 (file)
@@ -826,7 +826,7 @@ def convert_midi (in_file, out_file):
 
     
     s = ''
-    s = tag + '\n\\version "2.7.18"\n\n'
+    s = tag + '\n\\version "2.7.38"\n\n'
     for i in range (len (tracks)):
         s = s + dump_track (tracks[i], i)