% require 'doc_format' # set default page title if none was given unless page_title if h = @nodeTree.group2nodes[:latex].first page_title = h.title end end Listing = Struct.new(:name, :anchor, :key, :nodes) unless defined? Listing listings = ( DocProxy::GROUP2TYPES[:admonition] + DocProxy::GROUP2TYPES[:formal] ).flatten.inject([]) do |ary, key| nodes = @nodeTree.type2nodes[key] unless nodes.empty? ary << Listing.new(key.to_s.capitalize << 's', "toc:#{key}".to_html_anchor, key, nodes) end ary end %>