Login
or
register
Overview
Introduction
Features
Credits
License
This Wiki
Status
News
Releases
Change Log
Recent Wiki Edits
User Guide
Installation
Command Line
Using as a Module
Integration
Reporting Bugs
Advanced
Mailing List
Source Code
Test Suite
Extensions
Extensions
Writing Extensions
Available Extensions
Related Projects
Footnotes
Anonymous users must enter
captcha
below.
Don't put anything here
Don't put anything here
Don't put anything here
Page Parameters
Page Name (for URL)
Page Title
Don't put anything here
Show Advanced Options
Category
Prototype
Page Content
###Summary An extension to Python-Markdown that added footnote syntax. This extension has been included with Python-Markdown since 1.7 and should be available to anyone who has a typical install of Python-Markdown. ###Syntax Python-Markdown's Footnote syntax follows the generally accepted syntax of the Markdown community at large and almost exactly matches [PHP Markdown Extra][]'s implementation of footnotes. The only differences involve a few subtleties in the output. [PHP Markdown Extra]: http://michelf.com/projects/php-markdown/extra/#footnotes Example: Footnotes[^1] have a label[^label] and a definition[^!DEF]. [^1]: This is a footnote [^label]: A footnote on "label" [^!DEF]: The definition of a footnote. A footnote definition may contain multiple lines, paragraphs, code blocks, blockquotes and most any other markdown syntax. The additional line simply must be indented at least n additional four spaces. [^1]: The first paragraph of the definition. Paragraph two of the definition. > A blockquote with > multiple lines. a code block A final paragraph. By default, the footnote definitions are placed at the end of the resulting HTML document. However, you may want the footnotes in another location within the document. Simply place the following text at that location within your markdown document (See how to configure this text below): ///Footnotes Go Here/// ###Usage From the Python interpreter: >>> import markdown >>> text = "Some markdown document." >>> html = markdown.markdown(text, ['footnotes']) To use with other extensions, just add them to the list, like this: >>> html = markdown.markdown(text, extensions = ['footnotes', 'wikilink']) To configure the place marker for footnote definitions (just be sure not to use any existing markdown syntax): >>> html = markdown.markdown(text, ['footnotes(PLACE_MARKER=+++my marker+++)']) The Footnote extension can also be called from the command line using Markdown's `-x` parameter, like so: python markdown.py -x footnotes source.txt > output.html
About this Edit
Minor Edit
Edit Summary
Don't put anything here
Don't put anything here
Powered by
Sputnik
|
XHTML 1.1