def initialize parent, attributes
super parent, :table
@rows = Rows.new
@columns = []
@has_header_option = attributes.key? 'header-option'
if (pcwidth = attributes['width'])
if (pcwidth_intval = pcwidth.to_i) > 100 || pcwidth_intval < 1
pcwidth_intval = 100 unless pcwidth_intval == 0 && (pcwidth == '0' || pcwidth == '0%')
end
else
pcwidth_intval = 100
end
@attributes['tablepcwidth'] = pcwidth_intval
if @document.attributes.key? 'pagewidth'
@attributes['tableabswidth'] ||=
((@attributes['tablepcwidth'].to_f / 100) * @document.attributes['pagewidth']).round
end
attributes['orientation'] = 'landscape' if attributes.key? 'rotate-option'
end