def _imgLink(col, latex, model):
 txt = _latexFromHtml(col, latex)
 fname = ('latex-%s.png' % checksum(txt.encode('utf8')))
 link = ('<img class=latex src="%s">' % fname)
 if os.path.exists(fname):
  return link
 elif (not build):
  return ('[latex]%s[/latex]' % latex)
 else:
  err = _buildImg(col, txt, fname, model)
  if err:
   return err
  else:
   return link

def _imgLink ( col , latex , model ) : txt = _latexFromHtml ( col , latex ) fname = ( 'latex-%s.png' % checksum ( txt . encode ( 'utf8' ) ) ) link = ( '<img class=latex src="%s">' % fname ) if os . path . exists ( fname ) : return link elif ( not build ) : return ( '[latex]%s[/latex]' % latex ) else : err = _buildImg ( col , txt , fname , model ) if err : return err else : return link
return an img link for latex .