On Sun, 30 Apr 2006, Pedro Lopez-Cabanillas wrote:
On Sunday, 30 de April de 2006 16:27, Heikki Johannes Junes wrote:
- fix broken LilyPond 2.x export and
1) fix broken export things in 1.2.3, this patch would be applied to the
bugfix branch and also the development branch.
This is the first patch on category 1).
The patch fixes syntax on
- point-and-click and
- beaming
which makes it possible to "Preview LilyPond" with LilyPond 2.6,
when these options are selected into the export.
Terveisin,
Heikki Junes
Index: gui/lilypondio.cpp
===================================================================
--- gui/lilypondio.cpp (revision 7222)
+++ gui/lilypondio.cpp (working copy)
@@ -427,12 +427,19 @@
// enable "point and click" debugging via xdvi to make finding the
// unfortunately inevitable errors easier
if (m_exportPointAndClick) {
- str << "% point and click debugging:" << std::endl;
- if (m_languageLevel >= 2) {
+ str << "% point and click debugging is enabled" << std::endl;
+ if (m_languageLevel >= 4) {
+ // line-column set by default
+ } else if (m_languageLevel >= 2) {
str << "#(ly:set-point-and-click! 'line)" << std::endl;
} else {
str << "#(set-point-and-click! 'line)" << std::endl;
}
+ } else {
+ str << "% point and click debugging is disabled" << std::endl;
+ if (m_languageLevel >= 4) {
+ str << "#(ly:set-option point-and-click #f)" << std::endl;
+ }
}
// Lilypond \header block
@@ -933,6 +940,7 @@
std::pair<int, int> tupletRatio(1, 1);
bool overlong = false;
+ bool newBeamedGroup = false;
while (s->isBeforeEndMarker(i)) {
@@ -980,8 +988,11 @@
tupletRatio = std::pair<int, int>(numerator,
denominator);
}
} else if (groupType == GROUP_TYPE_BEAMED) {
- if (m_exportBeams) str << "[ "; //!!! wrong for 2.0
-
+ newBeamedGroup = true;
+ if (m_exportBeams && m_languageLevel < 1) {
+ str << "[ ";
+ newBeamedGroup = false;
+ }
} else if (groupType == GROUP_TYPE_GRACE) {
str << "\\grace { ";
}
@@ -1244,6 +1255,12 @@
handleText(*i, lilyText, lilyLyrics);
}
+ // LilyPond 2.0 introduces postfix syntax for beaming
+ if (newBeamedGroup && m_exportBeams && m_languageLevel >= 1) {
+ str << "[ ";
+ newBeamedGroup = false;
+ }
+
if ((*i)->isa(Indication::EventType)) {
eventsToStart.insert(*i);
eventsInProgress.insert(*i);