def visit_title(self, node): # type: (nodes.Node) -> None BaseTranslator.visit_title(self, node) self.add_secnumber(node) self.add_fignumber(node.parent) if isinstance(node.parent, nodes.table): self.body.append('<span class="caption-text">')
def visit_title(self, node): # type: (nodes.Node) -> None BaseTranslator.visit_title(self, node) self.add_secnumber(node) self.add_fignumber(node.parent) if isinstance(node.parent, nodes.table): self.body.append('<span class="caption-text">')
def visit_title(self, node, *args, **kwds): # if we have a section we do our own processing in order # to have ids in the hN-tags and not in additional a-tags if isinstance(node.parent, nodes.section): h_level = self.section_level + self.initial_header_level - 1 if node.parent.get('ids'): attrs = {'ids': node.parent['ids']} else: attrs = {} self.body.append(self.starttag(node, 'h%d' % h_level, '', **attrs)) self.context.append('</h%d>\n' % h_level) else: BaseTranslator.visit_title(self, node, *args, **kwds)
def visit_title(self, node, *args, **kwds): # if we have a section we do our own processing in order # to have ids in the hN-tags and not in additional a-tags if isinstance(node.parent, nodes.section): h_level = self.section_level + self.initial_header_level - 1 if node.parent.get('ids'): attrs = {'ids': node.parent['ids']} else: attrs = {} self.body.append(self.starttag(node, 'h%d' % h_level, '', **attrs)) self.context.append('</h%d>\n' % h_level) else: BaseTranslator.visit_title(self, node, *args, **kwds)
def visit_title(self, node): """Only 6 section levels are supported by HTML.""" if isinstance(node.parent, nodes.topic): HTMLTranslator.visit_title(self, node) elif self.section_level == 0: HTMLTranslator.visit_title(self, node) # document title title = node.astext() self.headers['title'] = self.encode(title) else: # offset section level to account for ``base_section``. self.section_level += (self.settings.base_section - 1) HTMLTranslator.visit_title(self, node) self.section_level -= (self.settings.base_section - 1)
def visit_title(self, node): HTMLTranslator.visit_title(self, node) if isinstance(node.parent, nodes.Admonition): close_tag = self.context.pop() extra = '<div class="layout-admonition-icon"></div>\n' self.context.append(close_tag + extra)
def visit_title(self, node): BaseTranslator.visit_title(self, node) self.add_secnumber(node)
def visit_title(self, node): BaseTranslator.visit_title(self, node) self.add_secnumber(node)
def visit_title(self, node): # don't move the id attribute inside the <h> tag BaseTranslator.visit_title(self, node, move_ids=0)
def visit_title(self, node): # don't move the id attribute inside the <h> tag BaseTranslator.visit_title(self, node, move_ids=0)
def visit_title(self, node): HTMLTranslator.visit_title(self, node) if isinstance(node.parent, nodes.Admonition): close_tag = self.context.pop() extra = '<div class="layout-admonition-icon"></div>\n' self.context.append(close_tag + extra)