Commits

Kamil Kisiel  committed d68be3b

Applied mag_factor patch from http://trac-hacks.org/ticket/6422

  • Participants
  • Parent commits 336545d

Comments (0)

Files changed (1)

File tracmath/tracmath.py

         latex = '/usr/bin/latex'
         dvipng = '/usr/bin/dvipng'
         max_png = 500
+        mag_factor = 1200
 
         if 'tracmath' not in self.config.sections():
             pass    # TODO: do something
         self.max_png = int(self.max_png)
         self.use_dollars = self.config.get('tracmath', 'use_dollars') or "False"
         self.use_dollars = self.use_dollars.lower() in ("true", "on", "enabled")
+        self.mag_factor = self.config.get('tracmath', 'mag_factor') or mag_factor
 
         if not os.path.exists(self.cacheDirectory):
             os.mkdir(self.cacheDirectory, 0777)
                 return 'Unable to call: %s %s %s' % (cmd, out, err)
 
             cmd = "".join([self.dvipng_cmd,
-                    " -T tight -x 1200 -z 9 -bg Transparent ",
+                    " -T tight -x %s -z 9 -bg Transparent " % self.mag_factor,
                     "-o %s %s" % (imgname, key + '.dvi')])
             pin, pout, perr = os.popen3(cmd)
             pin.close()