+2002-07-15 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * lily/side-position-interface.cc (general_side_position):
+ Subtract parent offset iso. adding it. (Huh? How could this have
+ worked?)
+
+ * lily/clef-engraver.cc (stop_translation_timestep): add staff to
+ OctavateEight support.
+
+ * scripts/lilypond-book.py: add smallverbatim option.
+
+ * lily/beam.cc (quanting): bugfix. Behave sanely when no visible
+ stems.
+
+ * lily/accidental-placement.cc (position_accidentals): add padding
+ property. Increase default setting to 0.2.
+
2002-07-15 Han-Wen <hanwen@cs.uu.nl>
* lily/paper-column.cc (before_line_breaking): urg. bugfix.
@item @uref{../user/out-www/lilypond/lilypond.html,lilypond} The complete
user manual, (in @uref{../user/out-www/lilypond.ps.gz,PostScript} and
-@uref{../user/out-www/lilypond.pdf,PDF}). This
-manual contains among others the tutorial, the reference manual.
+@uref{../user/out-www/lilypond.pdf,PDF}). This manual contains among
+others the tutorial, the reference manual. The HTML version is also
+available as @uref{../user/out-www/lilypond.html,one big page}.
@c glossary maybe for new users?
@item @uref{../user/out-www/glossary.html,glossary} A glossary of musical
the short version of the lilypond blocks:
@code{ @@lilypond@{ CONTENTS @} } and @code{ \lilypond@{ CONTENTS @} }
-
+
+@item smallverbatim
+ like @code{verbatim}, but in a smaller font.
+
@item intertext="@var{text}"
Used in conjunction with @code{verbatim} option: this puts
@var{text} between the code and the music.
@lilypond[]
\score { \notes \relative c''{
- c4^"(0,0)" \grace c16_"(1/4,-1/16)" c4^"(1/4,0)" \grace {
- [c16_"(2/4,-1/8)" d16^"(2/4,-1/16)" ] } c4_"(2/4,0)"
+ c4^"(0,0)" \grace c16_" "_"(1/4,-1/16)" c4^"(1/4,0)" \grace {
+ [c16_"(2/4,-1/8)" d16^"(2/4,-1/16)" ] } c4_" "_"(2/4,0)"
}
\paper { linewidth = 8.\cm }
}
staffs, using this grace timing.
@lilypond[relative=2,verbatim,fragment]
-\context Staff = SA { e4 \grace { c16 d e f } e4 }
-\context Staff = SB { c4 \grace { g8 b } c4 }
+< \context Staff = SA { e4 \grace { c16 d e f } e4 }
+ \context Staff = SB { c4 \grace { g8 b } c4 } >
@end lilypond
such as key signatures, barlines, etc. are also synchronized. Take
care when you mix staffs with grace notes and staffs without.
-@lilypond[relative=2,fragment]
+@lilypond[relative=2,verbatim,fragment]
< \context Staff = SA { e4 \bar "|:" \grace c16 d4 }
\context Staff = SB { c4 \bar "|:" d4 } >
@end lilypond
\score{
\context StaffGroup <
\context Staff <
- % Hide fingering number (used for string number) for the "normal" staff
+ % Hide fingering number
\property Staff.Fingering \override #'transparent = ##t
\part
Battista Sammartini. It was composed around 1740. It's in the source
package under the name @file{input/tutorial/sammartini.ly}.
-@lilypondfile[verbatim]{sammartini.ly}
+@lilypondfile[smallverbatim]{sammartini.ly}
As you can see, this example features multiple voices on one staff. To
make room for those voices, their notes have to be stemmed in opposite
\clef "baritone"c'1^"{baritone}" \bar "||"
\clef "varbaritone"c'1^"{varbaritone}" \bar "||"
\clef "G_8"c'1^"{sub 8?}" c'1 \bar "||"
+ \clef "F_8"c'1^"{sub 8?}" c'1 \bar "||"
\clef "G^8"c'1^"{sup 8?}" c'1 \bar "||"
\clef "bass"c'1^"{bass}" \bar "||"
\clef "subbass"c'1^"{subbass}" \bar "||"
for (int i= apes.size (); i--;)
{
Accidental_placement_entry * ape = apes[i];
- ape->left_skyline_ = empty_skyline ( LEFT);
- ape->right_skyline_ = empty_skyline ( RIGHT);
+ ape->left_skyline_ = empty_skyline (LEFT);
+ ape->right_skyline_ = empty_skyline (RIGHT);
for (int j = apes[i]->grobs_.size(); j--;)
{
if (gh_number_p (rs))
head_ape->offset_ -= gh_scm2double (rs);
- Real padding = 0.1;
+
+ Real padding = 0.2;
+ SCM spad = me->get_grob_property ("padding");
+ if (gh_number_p (spad))
+ padding = gh_scm2double (spad);
+
apes.push (head_ape);
for (int i= apes.size () -1 ; i-- > 0;)
{
ADD_INTERFACE(Accidental_placement,
"accidental-placement-interface",
"Take care of complex accidental collisions.",
- "left-padding right-padding accidentals alignment-done")
+ "left-padding padding right-padding accidentals alignment-done")
Grob *fvs = first_visible_stem (me);
Grob *lvs = last_visible_stem (me);
- Grob *commony = fvs->common_refpoint (lvs, Y_AXIS);
- bool xstaff= (Align_interface::has_interface (commony));
-
+ bool xstaff= false;
+ if (lvs && fvs)
+ {
+ Grob *commony = fvs->common_refpoint (lvs, Y_AXIS);
+ xstaff = Align_interface::has_interface (commony);
+ }
+
for (int i = qscores.size (); i--;)
if (qscores[i].demerits < 100)
{
{
clef_p_->set_grob_property ("break-visibility", vis);
if (octavate_p_)
- octavate_p_->set_grob_property ("break-visibility", vis);
+ {
+ octavate_p_->set_grob_property ("break-visibility", vis);
+
+ }
}
typeset_grob (clef_p_);
clef_p_ =0;
if (octavate_p_)
- typeset_grob (octavate_p_);
+ {
+ Side_position_interface::add_staff_support (octavate_p_);
+ typeset_grob (octavate_p_);
+ }
octavate_p_ = 0;
}
static int compare (Spanner * const &,Spanner * const &);
virtual Grob* find_broken_piece (System*) const;
virtual SCM do_derived_mark ();
- static bool has_interface (Grob*);
+ static bool has_interface (Grob*);
protected:
void set_my_columns ();
Real off = me->get_parent (a)->relative_coordinate (common, a);
SCM minimum = me->remove_grob_property ("minimum-space");
- Real total_off = dim.linear_combination (dir) + off;
+ Real total_off = dim.linear_combination (dir) - off;
SCM padding = me->remove_grob_property ("padding");
if (gh_number_p (padding))
{
VoltaBracket \override #'minimum-space = #15 % urg, in \pt
VoltaBracket \override #'padding = #5 % urg, in \pt
StaffSymbol \override #'line-count = #1
- Stem \override #'neutral-direction = #1
+
+ Stem \override #'neutral-direction = #1
+ Beam \override #'neutral-direction = #1
% \consists "Repeat_engraver"
\consists "Dot_column_engraver"
\consists "Volta_engraver"
# making pfas takes a lot of CPU time. Let's skip it for now.
#MAKE_PFA_FILES=1
-PFA_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfa))
+PFA_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfa)) $(outdir)/cmbxti8.pfa
ifdef MAKE_PFA_FILES
ALL_GEN_FILES += $(PFA_FILES) $(outdir)/lilypond.map $(outdir)/fonts.scale
pfa: $(PFA_FILES)
+# needed for web documentation
+$(outdir)/cmbxti8.pfa:
+ $(PKTRACE) -I $(outdir)/ --pfa --simplify --keep-trying cmbxti8
+ mv cmbxti8.pfa $(outdir)/
(Y-offset-callbacks . (,Side_position_interface::aligned_side))
(molecule-callback . ,Text_item::brew_molecule)
(font-shape . italic)
+ (padding . 0.4)
+ (font-relative-size . -2)
(font-family . roman)
(meta . ((interfaces . (text-interface self-alignment-interface side-position-interface font-interface item-interface ))))
))
'output-verbatim': r'''<pre>
%s
</pre>''',
+ 'output-small-verbatim': r'''<font size=-1><pre>
+%s
+</pre></font>''',
+
## Ugh we need to differentiate on origin:
## lilypond-block origin wants an extra <p>, but
## inline music doesn't.
''',
'output-verbatim': r'''\begin{verbatim}%s\end{verbatim}%%
''',
+ 'output-small-verbatim': r'''{\small\begin{verbatim}%s\end{verbatim}}%%''',
'output-default-post': "\\def\postLilypondExample{}\n",
'output-default-pre': "\\def\preLilypondExample{}\n",
'usepackage-graphics': '\\usepackage{graphics}\n',
@c generated: %(fn)s.png
''',
'pagebreak': None,
+ 'output-small-verbatim': r'''@smallexample
+%s
+@end smallexample
+''',
'output-verbatim': r'''@example
%s
@end example
}
-def output_verbatim (body):
+def output_verbatim (body, small):
if __main__.format == 'html':
body = re.sub ('&', '&', body)
body = re.sub ('>', '>', body)
body = re.sub ('<', '<', body)
elif __main__.format == 'texi':
body = re.sub ('([@{}])', '@\\1', body)
- return get_output ('output-verbatim') % body
+
+ if small:
+ key = 'output-small-verbatim'
+ else:
+ key = 'output-verbatim'
+ return get_output (key) % body
#warning: this uses extended regular expressions. Tread with care.
newbody = newbody + get_output ("output-filename") % m.group(1)
break
-
- if 'verbatim' in opts:
- newbody = output_verbatim (body)
+
+ if 'smallverbatim' in opts:
+ newbody = output_verbatim (body, 1)
+ elif 'verbatim' in opts:
+ newbody = output_verbatim (body, 0)
for o in opts:
m = re.search ('intertext="(.*?)"', o)