Class: Metanorma::Html::StandardRenderer

Inherits:
BaseRenderer show all
Defined in:
lib/metanorma/html/standard_renderer.rb

Overview

Renders StandardDocument components to HTML. Extends BaseRenderer with terms, bibliography, and standard sections.

Direct Known Subclasses

IsoRenderer

Constant Summary

Constants inherited from BaseRenderer

BaseRenderer::CLASS_MAP, BaseRenderer::LOGO_DIR, BaseRenderer::METANORMA_LOGO, BaseRenderer::TEMPLATE_CACHE

Instance Attribute Summary

Attributes inherited from BaseRenderer

#footnote_collector, #index_term_collector

Instance Method Summary collapse

Methods inherited from BaseRenderer

#assemble_document, #build_footer, #build_header, #build_publisher_logos, #build_reader_controls, #build_scripts, #build_styles, #build_toc_html, #check_presentation_markers, #detect_publishers, #extract_plain_text, #extract_primary_doc_id, #flavor_css_module, #flavor_font_url, #flavor_js_module, #flavor_publisher_name, #flavor_publishers, #generate_full_document, #header_title_text, #html_title, #initialize, #language, #load_logo_svg, #publisher_logo_map, #register_figure_entry, #register_table_entry, #register_toc_entry, #render_liquid, #theme, #to_html, #toc_entries, #validate_presentation_xml!

Constructor Details

This class inherits a constructor from Metanorma::Html::BaseRenderer

Instance Method Details

#render(node, **opts) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'lib/metanorma/html/standard_renderer.rb', line 8

def render(node, **opts)
  case node
  when Metanorma::StandardDocument::Root
    render_standard_document(node, **opts)
  when Metanorma::StandardDocument::Terms::Term
    render_term(node, **opts)
  when Metanorma::StandardDocument::Sections::TermsSection
    render_terms_section(node, **opts)
  when Metanorma::StandardDocument::Sections::StandardReferencesSection
    render_references_section(node, **opts)
  when Metanorma::StandardDocument::Sections::BibliographySection
    render_bibliography(node, **opts)
  when Metanorma::StandardDocument::Sections::ClauseSection
    render_clause_section(node, **opts)
  when Metanorma::StandardDocument::Sections::AnnexSection
    render_annex_section(node, **opts)
  when Metanorma::StandardDocument::Sections::StandardSection
    render_standard_section(node, **opts)
  when Metanorma::StandardDocument::Sections::Abstract
    render_abstract_section(node, **opts)
  when Metanorma::StandardDocument::Sections::Foreword
    render_foreword_section(node, **opts)
  when Metanorma::StandardDocument::Sections::Introduction
    render_introduction_section(node, **opts)
  when Metanorma::StandardDocument::Sections::FloatingTitle
    render_floating_title(node, **opts)
  when Metanorma::StandardDocument::Blocks::AmendBlock
    render_amend_block(node, **opts)
  else
    super
  end
end