end
def parse_wordnum(doc)
if doc.has_key?('part') then
- push_wordnum(doc['part'])
+ push_wordnum('part', doc)
elsif doc.has_key?('volume')
- push_wordnum(doc['volume'])
+ push_wordnum('volume', doc)
end
end
- def push_wordnum(lines)
+ def push_wordnum(type, doc)
+ lines = doc[type]
if lines then
- @wordlist.push(['wordnum', lines])
+ @wordlist.push([type, lines])
else
- @wordlist.push(['wordnum', []])
+ @wordlist.push([type, []])
end
end
end
<% @wordlist.each do |word| %>
<% (char, content) = word %>%
- <% if char != 'wordnum' then %>
- {\HUGE\ebas <%= char %>}(<%= char %>)
+ <% if char == 'part' then %>
+ \hspace{4em}
+ <% elsif char == 'volume' then %>
+ \hspace{2em}
+ <% else %>
+ {\Huge\ebas <%= char %>}(<%= char %>)
<% end %>%
<% if content then %>%
<% content.each do |line| %>%