[LON-CAPA-cvs] cvs: modules /gerd/Wiki convert.pl

www www at source.lon-capa.org
Thu Dec 15 15:57:48 EST 2011


www		Thu Dec 15 20:57:48 2011 EDT

  Modified files:              
    /modules/gerd/Wiki	convert.pl 
  Log:
  Trouble distinguishing inline and display equations. Use MimeTeX.
  
  
Index: modules/gerd/Wiki/convert.pl
diff -u modules/gerd/Wiki/convert.pl:1.12 modules/gerd/Wiki/convert.pl:1.13
--- modules/gerd/Wiki/convert.pl:1.12	Thu Dec 15 20:02:58 2011
+++ modules/gerd/Wiki/convert.pl	Thu Dec 15 20:57:48 2011
@@ -143,8 +143,7 @@
        if ($line=~/\<\!-- start content --\>/) { $outflag=1; next; }
        unless ($outflag) { next; }
 # ----------------------------------------------------- Substitutions
-       $line=~s/\<img class=\"tex inlinemath\" alt=\"([^\"]+)\"[^\>]+\>/<m>\$$1\$<\/m>/gs;
-       $line=~s/\<img class=\"tex\" alt=\"([^\"]+)\"[^\>]+\>/<m>\\\[$1\\\]<\/m>/gs;
+       $line=~s/\<img\s+class=\"tex[^\"]*\"\s+alt=\"([^\"]+)\"[^\>]+\>/<m>\$$1\$<\/m>/gs;
        $line=~s/\<a href\=\"[^\"]+\" title=\"([^\"]+)\"[^\>]*\>/&alink($targetdir,$1)/gse;
        $line=~s/\<a[^\>]+title\=([^\"]+)\"[^\>]+\>\s*\<img[^\>]+\>\s*\<\/a\>/&imglink($targetdir,$1)/gse;
        $line=~s/\<EMBED\s+src\=\"([^\"]+)\"(.*)\s+NAME\=\"[^\"]+/&embedfragment($targetdir,$1,$2)/gse;




More information about the LON-CAPA-cvs mailing list