[Home]WikiPatches/ASCIIMathML

UseModWiki | WikiPatches | RecentChanges | Preferences

[ASCIIMathML] is a cool client-side javascript developed by Peter Jipsen that enables [MathML] display using [LaTeX] like formating. You may [download] the javascript, which is released under GPL.

                                                          
--- wiki.pl     Thu Sep 11 08:21:02 2003                                                                         
+++ wiki-ASCIIMathML.pl Wed Nov 10 15:41:24 2004                                                                 
@@ -53,7 +53,7 @@                                                                                                
   @IsbnNames @IsbnPre @IsbnPost $EmailFile $FavIcon $RssDays $UserHeader                                        
   $UserBody $StartUID $ParseParas $AuthorFooter $UseUpload $AllUpload                                           
   $UploadDir $UploadUrl $LimitFileUrl $MaintTrimRc $SearchButton                                                
-  $EditNameLink $UseMetaWiki @ImageSites $BracketImg );                                                         
+  $EditNameLink $UseMetaWiki @ImageSites $BracketImg $ASCIIMathML);                                             
 # Note: $NotifyDefault is kept because it was a config variable in 0.90                                         
 # Other global variables:                                                                                       
 use vars qw(%Page %Section %Text %InterSite %SaveUrl %SaveNumUrl                                                
@@ -86,6 +86,7 @@                                                                                                
 $AdminPass   = "";              # Set to non-blank to enable password(s)                                        
 $EditPass    = "";              # Like AdminPass, but for editing only                                          
 $StyleSheet  = "";              # URL for CSS stylesheet (like "/wiki.css")                                     
+$ASCIIMathML = "/ASCIIMathML.js"; # The ASCIIMathML javascript file                                              
 $NotFoundPg  = "";              # Page for not-found links ("" for blank pg)                                    
 $EmailFrom   = "Wiki";          # Text for "From: " field of email notes.                                       
 $SendMail    = "/usr/sbin/sendmail";  # Full path to sendmail executable                                        
@@ -1367,6 +1368,9 @@                                                                                            
   if ($stylesheet ne '') {                                                                                      
     $html .= qq(<LINK REL="stylesheet" HREF="$stylesheet">\n);                                                  
   }                                                                                                             
+  if ($ASCIIMathML ne '') {                                                                                     
+    $html .= qq(<script type="text/javascript" src="$ASCIIMathML"></script>\n);                                 
+  }                                                                                                             
   $html .= $UserHeader;                                                                                         
   $bodyExtra = '';                                                                                              
   if ($UserBody ne '') {                                                                                        
@@ -1375,6 +1379,9 @@                                                                                            
   if ($BGColor ne '') {                                                                                         
     $bodyExtra .= qq( BGCOLOR="$BGColor");                                                                      
   }                                                                                                             
+  if ($ASCIIMathML ne '') {                                                                                     
+    $bodyExtra .= qq( onLoad="translate()" );                                                                   
+  }                                                                                                             
   $html .= "</HEAD><BODY$bodyExtra>\n";                                                                         
   return $html;                                                                                                 
 }                                                                                                               

--SPathak


UseModWiki | WikiPatches | RecentChanges | Preferences
Edit text of this page | View other revisions | Search MetaWiki
Last edited June 23, 2009 8:43 am by gw1.highq-it.net (diff)
Search: