Revision: 7711
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7711&view=rev
Author:   mdboom
Date:     2009-09-08 15:13:33 +0000 (Tue, 08 Sep 2009)

Log Message:
-----------
Reverting last change -- seems to have broken things

Modified Paths:
--------------
    trunk/matplotlib/doc/sphinxext/math_symbol_table.py

Modified: trunk/matplotlib/doc/sphinxext/math_symbol_table.py
===================================================================
--- trunk/matplotlib/doc/sphinxext/math_symbol_table.py 2009-09-08 14:30:16 UTC 
(rev 7710)
+++ trunk/matplotlib/doc/sphinxext/math_symbol_table.py 2009-09-08 15:13:33 UTC 
(rev 7711)
@@ -1,4 +1,4 @@
-nsymbols = [
+symbols = [
     ["Lower-case Greek",
      5,
      r"""\alpha \beta \gamma \chi \delta \epsilon \eta \iota \kappa
@@ -128,17 +128,27 @@
     state_machine.insert_input(lines, "Symbol table")
     return []
 
-def setup(app):
+try:
+    from docutils.parsers.rst import Directive
+except ImportError:
+    from docutils.parsers.rst.directives import _directives
     def math_symbol_table_directive(name, arguments, options, content, lineno,
                                     content_offset, block_text, state, 
state_machine):
         return run(state_machine)
     math_symbol_table_directive.arguments = None
     math_symbol_table_directive.options = {}
     math_symbol_table_directive.content = False
-    app.add_directive('math_symbol_table',
-                      math_symbol_table_directive)
+    _directives['math_symbol_table'] = math_symbol_table_directive
+else:
+    class math_symbol_table_directive(Directive):
+        has_content = False
+        def run(self):
+            return run(self.state_machine)
+    from docutils.parsers.rst import directives
+    directives.register_directive('math_symbol_table',
+                                  math_symbol_table_directive)
 
-if __name__ == '__main__':
+if __name__ == "__main__":
     # Do some verification of the tables
     from matplotlib import _mathtext_data
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to