Georg Brandl avatar Georg Brandl committed eb3967d

Closes #1010: Make pngmath images transparent by default; IE7+ should handle it.

Comments (0)

Files changed (3)

 
 * #1012: Update Estonian translation.
 
+* #1010: Make pngmath images transparent by default; IE7+ should handle it.
+
 
 Release 1.1.3 (Mar 10, 2012)
 ============================
 .. confval:: pngmath_dvipng_args
 
    Additional arguments to give to dvipng, as a list.  The default value is
-   ``['-gamma 1.5', '-D 110']`` which makes the image a bit darker and larger
-   then it is by default.
+   ``['-gamma', '1.5', '-D', '110', '-bg', 'Transparent']`` which makes the
+   image a bit darker and larger then it is by default, and produces PNGs with a
+   transparent background.
 
-   An arguments you might want to add here is e.g. ``'-bg Transparent'``,
-   which produces PNGs with a transparent background.  This is not enabled by
-   default because some Internet Explorer versions don't like transparent PNGs.
-
-   .. note::
-
-      When you "add" an argument, you need to reproduce the default arguments if
-      you want to keep them; that is, like this::
-
-         pngmath_dvipng_args = ['-gamma 1.5', '-D 110', '-bg Transparent']
+   .. versionchanged:: 1.2
+      Now includes ``-bg Transparent`` by default.
 
 .. confval:: pngmath_use_preview
 

sphinx/ext/pngmath.py

     app.add_config_value('pngmath_latex', 'latex', 'html')
     app.add_config_value('pngmath_use_preview', False, 'html')
     app.add_config_value('pngmath_dvipng_args',
-                         ['-gamma 1.5', '-D 110'], 'html')
+                         ['-gamma', '1.5', '-D', '110', '-bg', 'Transparent'],
+                         'html')
     app.add_config_value('pngmath_latex_args', [], 'html')
     app.add_config_value('pngmath_latex_preamble', '', 'html')
     app.add_config_value('pngmath_add_tooltips', True, 'html')
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.