[LON-CAPA-cvs] cvs: loncom /interface lonhelp.pm

bowersj2 lon-capa-cvs@mail.lon-capa.org
Fri, 26 Jul 2002 19:58:52 -0000


bowersj2		Fri Jul 26 15:58:52 2002 EDT

  Modified files:              
    /loncom/interface	lonhelp.pm 
  Log:
  Allows lonhelp.om to display backslashes in the HTML output, which was
  tougher then it should be. 
  
  
  
Index: loncom/interface/lonhelp.pm
diff -u loncom/interface/lonhelp.pm:1.2 loncom/interface/lonhelp.pm:1.3
--- loncom/interface/lonhelp.pm:1.2	Mon Jul  8 16:47:41 2002
+++ loncom/interface/lonhelp.pm	Fri Jul 26 15:58:52 2002
@@ -90,6 +90,9 @@
              '\\end{html}'
              |gxe;
 
+    # Backslashes
+    $tex =~ s|\\textbackslash|###BACKSLASH###|g;
+
     # Figures leftover without captions
     $tex =~ s|  \\includegraphics(\[[^]]*\])*\{([^}]*)\}
              |  '\\begin{html}<img src="http://' . $serverroot . '/adm/help/gif/' . $2 . '.gif" border="2"'.
@@ -97,6 +100,12 @@
              |gxe;
 
     $tex = tth::tth($tex);
+
+    # Finish backslashes
+    $tex =~ s/###BACKSLASH###/'\\'/ge;
+ 
+    # Fix the pretty quotes
+    $tex =~ s/('')|(``)/&quot;/g; #" to get emacs syntax highlighter happy
 
     # For some reason all captions come out as "Figure 0:", so
     # just duck the issue...