end
end
+log 0, 'Final editorial requests: Attributions on top, as in other chapters, also for prefaces'
+xml.search('preface').each do |pref|
+ title = pref.search('title').first
+ attrib = pref.search('blockquote').last
+ attrib_text = attrib.inner_text.gsub(/\s+/,' ')
+
+ # Some formatting issues we need to modify
+ attrib_text.gsub!(/Paul y Sarah/, 'Paul <?latex \textup{>y<?latex } > Sarah')
+ attrib_text.gsub!(/Merkley (CEO.*)/, 'Merkley <citetitle>\1</citetitle>')
+
+ attrib.remove
+ title.after('<blockquote><attribution>%s</attribution></blockquote>' % attrib_text)
+ log 1, 'Moved: %s' % attrib_text
+end
+
log 0, 'Writing processed file'
# Unable to figure out API way to replace DOCTYPE
data = xml.to_xml()