Commits

Akihiro Uchida  committed 1640c71

change role/directive name to math instead of latex

  • Participants
  • Parent commits 7478c7e

Comments (0)

Files changed (1)

File latex_directive.py

                     content_offset, block_text, state, state_machine):
     """ Latex directive. """
     tex = '\n'.join(content)
+    if 'nowrap' not in options:
+        tex = r'\begin{split}%s\end{split}' % tex
+        tex = r'\begin{gather*}%s\end{gather*}' % tex
     return latex_math(tex)
 
 latex_directive.content = True
                options={}, content=[]):
     """ Latex role. """
     i = rawtext.find('`')
-    tex = rawtext[i+1:-1]
+    tex = '$%s$' % rawtext[i+1:-1]
     return latex_math(tex), []
     
 def register():
-    register_directive('latex', latex_directive)
-    register_canonical_role('latex', latex_role)
+    register_directive('math', latex_directive)
+    register_canonical_role('math', latex_role)
 
 def call_command_in_dir(app, args, targetdir):
     cwd = os.getcwd()
     try:
         os.chdir(targetdir)
-        print args
-        print ' '.join(args)
         p = subprocess.Popen(app + ' ' + ' '.join(args), shell=True)
         sts = os.waitpid(p.pid, 0)
         # FIXME -- should we raise an exception of status is non-zero?