IPython Documentation

Table Of Contents

Previous topic

Module: nbconvert.filters.ansi

Next topic

Module: nbconvert.filters.datatypefilter

This Page

Module: nbconvert.filters.citation

Citation handling for LaTeX output.

1 Class

class IPython.nbconvert.filters.citation.CitationParser

Bases: HTMLParser.HTMLParser

Citation Parser

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

Inherites from HTMLParser, overrides:
  • handle_starttag
  • handle_endtag
__init__()

1 Function

IPython.nbconvert.filters.citation.citation2latex(s)

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>

Becomes

cite{granger}

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