mailr15813 - /1.3/docs/latex/fetch_docstrings.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on April 24, 2012 - 21:31:
Author: bugman
Date: Tue Apr 24 21:31:52 2012
New Revision: 15813

URL: http://svn.gna.org/viewcvs/relax?rev=15813&view=rev
Log:
Fix for the fetch_docstrings.py script.

The number of \linebreak[0] commands inserted was far too great.  However 
there is still a problem
in that all \linebreak[0] commands are doubled.  This is for the latex2html 
generated user manual at
http://www.nmr-relax.com/manual/relax.html.


Modified:
    1.3/docs/latex/fetch_docstrings.py

Modified: 1.3/docs/latex/fetch_docstrings.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/docs/latex/fetch_docstrings.py?rev=15813&r1=15812&r2=15813&view=diff
==============================================================================
--- 1.3/docs/latex/fetch_docstrings.py (original)
+++ 1.3/docs/latex/fetch_docstrings.py Tue Apr 24 21:31:52 2012
@@ -2,7 +2,7 @@
 
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2005-2010 Edward d'Auvergne                                  
 #
+# Copyright (C) 2005-2012 Edward d'Auvergne                                  
 #
 #                                                                            
 #
 # This file is part of the program relax.                                    
 #
 #                                                                            
 #
@@ -93,14 +93,17 @@
         """
 
         # Allow line breaks after the opening bracket.
-        text = replace(text, "(", "(linebreak[0]")
+        text = replace(text, "(", "(\linebreak[0]")
 
         # Allow line breaks after periods (but not in numbers).
         for char in letters:
-            text = replace(text, ".%s" % char, ".linebreak[0]%s" % char)
+            text = replace(text, ".%s" % char, ".\linebreak[0]%s" % char)
 
         # Allow line breaks after equal signs.
-        text = replace(text, "=", "=linebreak[0]")
+        text = replace(text, "=", "=\linebreak[0]")
+
+        # Remove the backslash to prevent is processing.
+        text = replace(text, "\linebreak", "linebreak")
 
         # Return the modified text.
         return text




Related Messages


Powered by MHonArc, Updated Wed Apr 25 12:40:02 2012