def to_s( options = {} )
      width = options[:width] || 80
      d = [s.text_value.size, e.text_value.size].min
      sn = s.text_value.size - d
      en = e.text_value.size - d

      l = if sn > 0
        "#{'=' * sn} #{label( :text, options )}"
      elsif en > 0
        "#{label( :text, options )} #{'=' * en}"
      else
        label( :text, options )
      end

      case d
      when 1
        "#{l}\n" + ('=' * width)
      when 2
        "#{l}\n" + ('-' * width)
      else
        l = " #{l} "
        h = '-'*width
        h[2*(d-3)+1, l.size] = l # slice substitution
        h
      end
    end
def to_s( options = {} )
      width = options[:width] || 80
      d = [s.text_value.size, e.text_value.size].min
      sn = s.text_value.size - d
      en = e.text_value.size - d

      l = if sn > 0
        "#{'=' * sn} #{label( :text, options )}"
      elsif en > 0
        "#{label( :text, options )} #{'=' * en}"
      else
        label( :text, options )
      end

      case d
      when 1
        "#{l}\n" + ('=' * width)
      when 2
        "#{l}\n" + ('-' * width)
      else
        l = " #{l} "
        h = '-'*width
        h[2*(d-3)+1, l.size] = l # slice substitution
        h
      end
    end
Text-rendered headings.  Should look like this:

 Heading Level 1
 ==========================================================================

 Heading Level 2
 --------------------------------------------------------------------------

 - Heading Level 3 --------------------------------------------------------

 --- Heading Level 4 ------------------------------------------------------