1. Akihiro Uchida
  2. docutils-dollarmathext

Commits

Akihiro Uchida  committed 7478c7e

change dvipng options

  • Participants
  • Parent commits efeb359
  • Branches default

Comments (0)

Files changed (1)

File latex_directive.py

View file
  • Ignore whitespace
 
 latex_template = r'''
 \documentclass[12pt]{article}
+\usepackage[utf8x]{inputenc}
+\usepackage{amsmath}
+\usepackage{amsthm}
+\usepackage{amssymb}
+\usepackage{amsfonts}
+\usepackage{bm}
 \pagestyle{empty}
 %(prologue)s
 \begin{document}
 latex = "latex"
 dvipng = "dvipng"
 latex_args = ("--interaction=nonstopmode", "%s.tex")
-dvipng_args = ("-bgTransparent", "-Ttight", "--noghostscript", "-l%s" % max_pages, "%s.dvi")
+dvipng_args = ("-bg Transparent", "-T tight", "--noghostscript",
+               "-l%s" % max_pages, "-z9", "-gamma 1.5", "-D 110",
+               "%s.dvi")
 
 def latex_snippet_to_png(inputtex, prologue=''):
     """ Convert a latex snippet into a png. """
     
-    tex = latex_template % {'raw': inputtex, 'prologue': prologue }
+    tex = latex_template % {'raw': inputtex, 'prologue': prologue}
     namebase = latex_name_template % hashlib.sha1(tex).hexdigest()
     dst = namebase + '%d.png'