MCPcopy Create free account
hub / github.com/PageBot/PageBot / node_literatureref

Method node_literatureref

Lib/pagebot/base/typesetter.py:236–253  ·  view source on GitHub ↗

Collect literature references.

(self, node, e)

Source from the content-addressed store, hash-verified

234 self.typesetNode(node, e)
235
236 def node_literatureref(self, node, e):
237 """Collect literature references."""
238 # Typeset the block of the tag.
239 # Check if this is a literature reference
240 nodeId = node.attrib.get('id')
241 if nodeId.startswith('litref:'): # It is a literature reference.
242 literatureRefs = self.getLiteratureRefs(e)
243 if literatureRefs:
244 nodeId = nodeId.split(':')[1]
245 index = len(literatureRefs)+1
246 # Warning if the reference id is already used.
247 assert not nodeId in literatureRefs
248 # Make literature reference entry. Content <p> and split fields will be added later.
249 literatureRefs[index] = dict(nodeId=nodeId, node=node, e=e, p=None, pageIds=[])
250 #self.append(getMarker('literature', index))
251
252 # Typeset the block of the tag.
253 self.typesetNode(node, e)
254
255 def node_div(self, node, e):
256 """MarkDown generates <div class="footnote">...</div> and <div

Callers

nothing calls this directly

Calls 3

getLiteratureRefsMethod · 0.95
typesetNodeMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected