def template
@template ||= @eruby.new "<%#encoding:UTF-8%><%\ncontinuing = false;\nentries = content\nlast_index = entries.length - 1\nif attr? :style, 'horizontal'\n%><<%= (tag = title? ? 'table' : 'informaltable') %>\#{common_attrs_erb} tabstyle=\"horizontal\" frame=\"none\" colsep=\"0\" rowsep=\"0\">\#{title_tag}\n<tgroup cols=\"2\">\n<colspec colwidth=\"<%= attr :labelwidth, 15 %>*\"/>\n<colspec colwidth=\"<%= attr :labelwidth, 85 %>*\"/>\n<tbody valign=\"top\"><%\nentries.each_with_index do |(dt, dd), index|\nlast = (index == last_index)\nunless continuing %>\n<row>\n<entry><%\nend %>\n<simpara><%= dt.text %></simpara><%\nif !last && dd.nil?\ncontinuing = true\nnext\nelse\ncontinuing = false\nend %>\n</entry>\n<entry><%\nunless dd.nil?\nif dd.text? %>\n<simpara><%= dd.text %></simpara><%\nend\nif dd.blocks? %>\n<%= dd.content.chomp %><%\nend\nend %>\n</entry><%\nif last || !dd.nil? %>\n</row><%\nend %><%\nend %>\n</tbody>\n</tgroup>\n</<%= tag %>><%\nelse\ntags = (template.class::LIST_TAGS[attr :style] || template.class::LIST_TAGS['labeled'])\nif tags[:list]\n%><<%= tags[:list] %>\#{common_attrs_erb}>\#{title_tag}<%\nend\nentries.each_with_index do |(dt, dd), index|\nlast = (index == last_index)\nunless continuing %>\n<<%= tags[:entry] %>><%\nend\nif tags.has_key?(:label)\nunless continuing %>\n<<%= tags[:label] %>><%\nend %>\n<<%= tags[:term] %>><%= dt.text %></<%= tags[:term] %>><%\nif last || !dd.nil? %>\n</<%= tags[:label] %>><%\nend\nelse %>\n<<%= tags[:term] %>><%= dt.text %></<%= tags[:term] %>><%\nend\nif !last && dd.nil?\ncontinuing = true\nnext\nelse\ncontinuing = false\nend %>\n<<%= tags[:item] %>><%\nunless dd.nil?\nif dd.text? %>\n<simpara><%= dd.text %></simpara><%\nend\nif dd.blocks? %>\n<%= dd.content %><%\nend\nend %>\n</<%= tags[:item] %>>\n</<%= tags[:entry] %>><%\nend\nif tags[:list] %>\n</<%= tags[:list] %>><%\nend\nend %>\n"
end