GtLineBreaker* gt_line_breaker_bases_new()
{
  GtLineBreakerBases *lbb;
  GtLineBreaker *lb;
  lb = gt_line_breaker_create(gt_line_breaker_bases_class());
  lbb = gt_line_breaker_bases_cast(lb);
  lbb->itrees = gt_hashmap_new(HASH_DIRECT, NULL,
                               (GtFree) gt_interval_tree_delete);
  return lb;
}
GtLineBreaker* gt_line_breaker_captions_new(GtLayout *layout,
                                            GtUword width,
                                            GtStyle *style)
{
  GtLineBreakerCaptions *lbcap;
  GtLineBreaker *lb;
  gt_assert(layout);
  lb = gt_line_breaker_create(gt_line_breaker_captions_class());
  lbcap = gt_line_breaker_captions_cast(lb);
  lbcap->layout = layout;
  lbcap->width = width;
  if (!gt_style_get_num(style, "format", "margins", &lbcap->margins,
                        NULL, NULL)) {
    lbcap->margins = MARGINS_DEFAULT;
  }
  lbcap->linepositions = gt_hashmap_new(GT_HASH_DIRECT, NULL, gt_free_func);
  return lb;
}