[py-svn] r21168 - py/dist/py/rest

jan at codespeak.net jan at codespeak.net
Thu Dec 15 12:48:03 CET 2005


Author: jan
Date: Thu Dec 15 12:48:02 2005
New Revision: 21168

Modified:
   py/dist/py/rest/latex.py
Log:
compile latex files enough times to resolve all references



Modified: py/dist/py/rest/latex.py
==============================================================================
--- py/dist/py/rest/latex.py	(original)
+++ py/dist/py/rest/latex.py	Thu Dec 15 12:48:02 2005
@@ -123,12 +123,14 @@
     if rest_options is not None:
         options.extend(rest_options)
     publish_cmdline(writer_name='latex', argv=options)
-    for i in range(2):
-        #XXX sometimes pdflatex has to be run several time
-        #find a cleaner way to do it
+
+    while True:
         latexoutput = py.process.cmdexec("pdflatex %s" % (tex, ))
         if debug:
             print latexoutput
+        if py.std.re.search("LaTeX Warning:.*Rerun", latexoutput) is None:
+            break
+            
     old.chdir()
     #cleanup:
     if not debug:



More information about the pytest-commit mailing list