;ς )δHEc@sΏdZdkZdkZdklZdklZlZlZl Z l Z l Z dk l Z lZlZdZdZdZeieiZeieeƒid„Zed „Zd „ZdS( s' Replace Latex math mode/\begin{}\end{} blocks with html img tag after rendering $Id: ReplaceInlineLatex.py,v 1.11 2001/09/07 14:21:16 rsbowman Exp $ TODO: use \ref{shit} to make reference to equations. Convert \ref{shit} to the appropriate (number): add negative match to latexPattern for \ref, do a s/// after generating an equation with a \label. Separate vertical alignment characters & into a new \end{equation}\begin{equation} and then render the separate images in a table to acheive vertical alignment. N(s html_quote(s fileNameFors imagesPaths workingDirs getPngSizes runCommandslog(sstripsjoinsreplacesΥ(? Some or all expressions may not have rendered properly, because Latex returned the following error:
%s
cCs td„||ƒƒ}|SdS(NcCs|dS(Ni(sx(sx((sT/mnt/gmirror/ports/www/zope-zwiki/work/ZWiki/plugins/latexwiki/ReplaceInlineLatex.pys's(smaps findLatexstextscodeList(stexts findLatexscodeList((sT/mnt/gmirror/ports/www/zope-zwiki/work/ZWiki/plugins/latexwiki/ReplaceInlineLatex.pys findLatexCode#scCscdkl} tidƒ}tidƒ} t|ƒ}t|ƒ} g}d}xC| D];}|ddjo^tidti ƒid|ƒ}tidti ƒid |ƒ}t|||d ƒ}qVn|i|ƒ|}|i|ƒ}|o|d }|id ||d ƒ}|id ƒ}tid |ƒid ||d ƒ}|id ||d ƒ}|||i|ƒs7
s1(%s)
ss> sA((?:>|^)(?:[^<]*\s|))\( *(?:[Ee][Qq]\.)?\s*(%d) *\)([^>]*(?:<|$))s\1(\2)\3s
s
s(?%s(spreambles postambleswidthsheights fileNameFors latexCodes charheightpxs imageFiles imagesPathsimageUrls getPngSizesosspathsjoins workingDirs html_quotesresmatchslatexRemoveDelims MULTILINEsDOTALLsgroupssrcssub( s latexCodes charheightpxssrcs postamblesheights imageFileswidthspreamblesimageUrl((sT/mnt/gmirror/ports/www/zope-zwiki/work/ZWiki/plugins/latexwiki/ReplaceInlineLatex.pys getImageForws !.(s__doc__sresossDocumentTemplate.html_quotes html_quotesutils fileNameFors imagesPaths workingDirs getPngSizes runCommandslogsstringsstripsjoinsreplaces latexPatternslatexRemoveDelims errorMessages MULTILINEsDOTALLsreConstsscompilesfindalls findLatexCodesNonesreplaceInlineLatexs getImageFor(s getImageForsreConstssjoinslogs html_quotes findLatexCodes errorMessages workingDirsreplacesres getPngSizeslatexRemoveDelims latexPatternsstrips imagesPaths runCommands fileNameForsossreplaceInlineLatex((sT/mnt/gmirror/ports/www/zope-zwiki/work/ZWiki/plugins/latexwiki/ReplaceInlineLatex.pys?s +  M