Flipping black and white in TeX

17 views
Skip to first unread message

Gwern Branwen

unread,
Jul 10, 2009, 8:55:44 PM7/10/09
to Mnemosyne mailing list
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

I recently got around to figuring out how to make TeX render with
white foreground and black background; this looks much nicer in my
Mnemosyne since I use the black-white plugin:
http://www.mnemosyne-proj.org/node/58#comment-226

The key is to edit dvipng to read
dvipng -fg 'rgb 1 1 1' -bg 'rgb 0 0 0' -D 200 -T tight tmp.dvi

(I had tried that a few months ago, but I made the mistake of using
options like '-fg rgb 1 1 1', since I naturally assumed that because
the man page did not mention needing quotes or using the long-option =
syntax, then none were needed. While trying again today, I thought,
surely it couldn't be *that* stupid... but it was.)

- --
gwern
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEAREKAAYFAkpX4o0ACgkQvpDo5Pfl1oKokQCeObJ4KevPgVCbDomq6KPqjY8Q
SZEAnj0kmmOsfE2iMuxnM8aysEIEdAKM
=rKi9
-----END PGP SIGNATURE-----

Taurus Londono

unread,
Aug 2, 2013, 8:31:19 AM8/2/13
to mnemosyne-...@googlegroups.com
FWIW, this no longer appears to work.

However, adding (e.g.)...

\usepackage{color}
\pagecolor{yellow}
\color{red}

...to the Latex preamble (config.py) gives the desired result for me. Of course, \pagecolor can match whatever background you set in the gui, else it will give the appearance of highlighted material.

Peter Bienstman

unread,
Aug 2, 2013, 10:53:41 AM8/2/13
to mnemosyne-...@googlegroups.com
Thanks for the tip!

BTW, editing the file 'dvipng' indeed no longer work, you need to edit
the corresponding setting in config.py.

Peter
Reply all
Reply to author
Forward
0 new messages