Home | History | Annotate | Download | only in extensions
      1 Footnotes
      2 =========
      3 
      4 Summary
      5 -------
      6 
      7 An extension to Python-Markdown that adds footnote syntax. This extension has 
      8 been included with Python-Markdown since 1.7 and should be available to anyone 
      9 who has a typical install of Python-Markdown.
     10 
     11 Syntax
     12 ------
     13 
     14 Python-Markdown's Footnote syntax follows the generally accepted syntax of the 
     15 Markdown community at large and almost exactly matches [PHP Markdown Extra][]'s
     16 implementation of footnotes. The only differences involve a few subtleties in 
     17 the output.
     18 
     19 [PHP Markdown Extra]: http://michelf.com/projects/php-markdown/extra/#footnotes
     20 
     21 Example:
     22 
     23     Footnotes[^1] have a label[^label] and a definition[^!DEF].
     24 
     25     [^1]: This is a footnote
     26     [^label]: A footnote on "label"
     27     [^!DEF]: The definition of a footnote.
     28 
     29 A footnote definition may contain multiple lines, paragraphs, code blocks, 
     30 blockquotes and most any other markdown syntax. The additional line simply 
     31 must be indented at least an additional four spaces.
     32 
     33     [^1]: The first paragraph of the definition.
     34 
     35         Paragraph two of the definition.
     36 
     37         > A blockquote with
     38         > multiple lines.
     39 
     40             a code block
     41 
     42         A final paragraph.
     43 
     44 By default, the footnote definitions are placed at the end of the resulting 
     45 HTML document. However, you may want the footnotes in another location within 
     46 the document. Simply place the following text at that location within your 
     47 markdown document (See how to configure this text below):
     48 
     49     ///Footnotes Go Here///
     50 
     51 Usage
     52 -----
     53 
     54 From the Python interpreter:
     55 
     56     >>> html = markdown.markdown(text, ['footnotes'])
     57 
     58 To configure the place marker for footnote definitions (just be sure not to 
     59 use any existing markdown syntax):
     60 
     61     >>> html = markdown.markdown(text, ['footnotes(PLACE_MARKER=+++my marker+++)'])
     62 
     63