Exemplo n.º 1
0
  def visit_section(self, node):
    # insert the subnav after the section heading + optional lead
    if not self.is_partial and \
       self.toc_subnav and \
       self.page_toc and \
       self.section_level == 0:
      index = 0
      children = node.children
      if len(children) and isinstance(children[0], nodes.title):
        index = 1
      if index and len(children) > 1 and 'lead' in children[1].get('classes'):
        index = 2
      node.children.insert(index, self.page_toc)

    SphinxHTMLTranslator.visit_section(self, node)
Exemplo n.º 2
0
    def visit_section(self, node):
        # insert the subnav after the section heading + optional lead
        if not self.is_partial and \
           self.toc_subnav and \
           self.page_toc and \
           self.section_level == 0:
            index = 0
            children = node.children
            if len(children) and isinstance(children[0], nodes.title):
                index = 1
            if index and len(children) > 1 and 'lead' in children[1].get(
                    'classes'):
                index = 2
            node.children.insert(index, self.page_toc)

        SphinxHTMLTranslator.visit_section(self, node)
Exemplo n.º 3
0
 def visit_section(self, node):
     old_ids = node.get('ids', [])
     node['ids'] = ['s-' + i for i in old_ids]
     node['ids'].extend(old_ids)
     HTMLTranslator.visit_section(self, node)
     node['ids'] = old_ids
Exemplo n.º 4
0
 def visit_section(self, node):
     old_ids = node.get('ids', [])
     node['ids'] = ['s-' + i for i in old_ids]
     node['ids'].extend(old_ids)
     HTMLTranslator.visit_section(self, node)
     node['ids'] = old_ids
Exemplo n.º 5
0
 def visit_section(self, node):
     ids = node.get('ids')
     node['ids'] = []
     HTMLTranslator.visit_section(self, node)
     node['ids'] = ids
Exemplo n.º 6
0
 def visit_section(self, node):
     old_ids = node.get("ids", [])
     node["ids"] = ["s-" + i for i in old_ids]
     node["ids"].extend(old_ids)
     HTMLTranslator.visit_section(self, node)
     node["ids"] = old_ids