This documentation is for an old version of IPython. You can find docs for newer versions here.

Module: nbconvert.filters.citation

Citation handling for LaTeX output.

1 Class

class IPython.nbconvert.filters.citation.CitationParser

Bases: html.parser.HTMLParser

Citation Parser

Replaces html tags with data-cite attribute with respective latex cite.

Inherites from HTMLParser, overrides:
  • handle_starttag
  • handle_endtag

1 Function


Parse citations in Markdown cells.

This looks for HTML tags having a data attribute names data-cite and replaces it by the call to LaTeX cite command. The tranformation looks like this:

<cite data-cite="granger">(Granger, 2013)</cite>



Any HTML tag can be used, which allows the citations to be formatted in HTML in any manner.