Method: Metanorma::Ribose::Converter#make_preface

Defined in:
lib/metanorma/ribose/converter.rb

#make_preface(xml, sect) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/metanorma/ribose/converter.rb', line 24

def make_preface(xml, sect)
  if xml.at("//foreword | //introduction | //acknowledgements | "\
            "//clause[@preface] | //executivesummary")
    preface = sect.add_previous_sibling("<preface/>").first
    f = xml.at("//foreword") and preface.add_child f.remove
    f = xml.at("//executivesummary") and preface.add_child f.remove
    f = xml.at("//introduction") and preface.add_child f.remove
    move_clauses_into_preface(xml, preface)
    f = xml.at("//acknowledgements") and preface.add_child f.remove
  end
  make_abstract(xml, sect)
end