last_markup_line_ = to_boolean (last_scm);
SCM first_scm = pb->get_property ("first-markup-line");
first_markup_line_ = to_boolean (first_scm);
+ tight_spacing_ = to_boolean (pb->get_property ("tight-spacing"));
}
Real
int compressed_nontitle_lines_count_;
bool last_markup_line_;
bool first_markup_line_;
+ bool tight_spacing_;
Line_details ()
{
bottom_padding_ = 0;
space_ = 0;
inverse_hooke_ = 1;
+ tight_spacing_ = false;
break_permission_ = ly_symbol2scm ("allow");
page_permission_ = ly_symbol2scm ("allow");
turn_permission_ = ly_symbol2scm ("allow");
{
Line_details const &old = ret.back ();
Line_details compressed = orig[i];
- Real padding = orig[i].title_ ? old.title_padding_ : old.padding_;
+ /*
+ "padding" is the padding below the current line. The padding below
+ "old" (taking into account whether "old" is a title) is already
+ accounted for in the extent of the compressed line. The padding
+ below the compressed line, therefore, should depend on whether its
+ bottom-most line is a title or not.
+ */
+ Real padding = 0;
+ if (!orig[i].tight_spacing_)
+ padding = orig[i].title_ ? old.title_padding_ : old.padding_;
compressed.shape_ = old.shape_.piggyback (orig[i].shape_, padding);
compressed.space_ += old.space_;
Real ext_len;
if (cur_rod_height > 0)
{
- padding = cached_line_details_[i].title_ ?
- cached_line_details_[i-1].title_padding_ :
- cached_line_details_[i-1].padding_;
+ if (!cached_line_details_[i].tight_spacing_)
+ padding = (cached_line_details_[i].title_
+ ? cached_line_details_[i - 1].title_padding_
+ : cached_line_details_[i - 1].padding_);
ext_len = cached_line_details_[i].tallness_;
}
else
rod_height_ += line.full_height ();
first_line_ = line;
}
- rod_height_ += line.title_ ? last_line_.title_padding_ : last_line_.padding_;
+ if (!line.tight_spacing_)
+ rod_height_ += line.title_ ? last_line_.title_padding_ : last_line_.padding_;
spring_len_ += line.space_;
inverse_spring_k_ += line.inverse_hooke_;
void
Page_spacing::prepend_system (const Line_details &line)
{
- if (rod_height_)
+ if (rod_height_ && !first_line_.tight_spacing_)
rod_height_ += first_line_.title_ ? line.title_padding_ : line.padding_;
else
last_line_ = line;