How can I make TeXWorks display its PDF preview so that the background is black, text is (by default) white, and shades of grey are also displayed appropriately?
The answers to this question help somewhat, but the sticking-point is the background colour of the PDF preview window. (In order to reduce strain on my eyes, I have tried applying a "white" theme .css to Texworks, then using another utility to reverse-video the entire screen, but then that makes switching between apps painful.)
I know about the file
< MiKTeX installation directory>\TeXworks\0.6\configuration\syntax-patterns.txt.
I have used Windows 8.1 to map the taskbar's TexWorks icon to
< MiKTeX installation directory>\miktex\bin\x64\miktex-texworks.exe -stylesheet < my CSS file>
The file syntax-patterns.txt seems to be exclusively concerned with the formatting of the TeX-editing window, not the PDF preview window.
Windows 8.1, MiKTeX 2.9, TeXWorks 0.6
\pagecolor{black}should create a pdf with a black background. – Peter Grill Mar 16 '21 at 15:42\usepackage{xcolor}and\pagecolor{black} \color{white}(thanks to this question fo providing the other details). But the purpose of this is to make the PDF file itself display black, which is not the idea. And it entails hacking the text of every.texfile, and commenting or uncommenting said TeX code as and when I want to work on Tex or make a PDF. Having to hack the.texfile is especially undesirable for a.texfile which is auto-generated. – Rosie F Mar 16 '21 at 15:59