#NEWLINE# def doc_footnote( self , element , attrs ) : #NEWLINE# #INDENT# 'The optional attribute *label* is a Python string template that defines the content of the reference.\n        Default is "[%s]" where the tag is replaced by the index number of the footnote.' #NEWLINE# if ( not attrs . has_key ( 'class_' ) ) : #NEWLINE# #INDENT# attrs [ 'class_' ] = 'footnote' #NEWLINE# #UNINDENT# self . _footnoteCount += 1 #NEWLINE# self . sup ( ** attrs ) #NEWLINE# self . a ( href = ( '#fnref:footnote%d' % self . _footnoteCount ) , name = ( 'fnref:footnoteRef%d' % self . _footnoteCount ) ) #NEWLINE# self . text ( ( attrs . get ( 'label' , '[%s]' ) % self . _footnoteCount ) ) #NEWLINE# self . pushResult ( )