I am running xdvi under Fedora 9. It comes up by default with a gray background. I can do this with a command line option, but I can't figure out how to make it a default except possibly by making it an X default.
Also, I need to turn postscript antialiasing off for my diagrams to work. I can't see how to make that the default, and I can't see how to do it as a command line option. (There is an option to turn it on, but I get it on by default.)
I found two files xdvi.cfg and XDvi, but I don't know how to modify them to achieve what I want, and I can't find any documentation which tells me.
Yes, it works by making it an X default, and you can do that e.g. in ~/.Xdefaults; there's no documentation for it since this holds for all X applications (i.e. it's documented in the X documentation). There are a few examples on
http://xdvi.sourceforge.net/customization.html
However if you turn postscript anti-aliasing off or change the background, it should be saved in your ~/xdvi.cfg - does that not work? Which version are you using (xdvi -v)?
Thanks.
I was a bit nervous about using .Xdefaults because I hadn't used it for many years and didn't remember the syntax. Also, I didn't remember that I could change the background just for one program in .Xdefaults.
But I did manage to figure out what to do.
XDvi*background:white
works.
I still don't understand what .background in the man page refers to.
I don't have a file named ~/xdvi.cfg, but I have ~/.xdvirc, which may be what you were referring to. I was expecting it to store the state of postscript aliasing, but it didn't seem to. I tried it several times, and it still came up with aliasing in place whatever I did. I tried it again just now, and it works. The file contains.
xdvi.gsAlpha: False
I don't know what the problem was before. Possibly I had more than one instance of xdvi running and one of them had aliasing on. But it doesn't matter if it continues to work now.
I note that you seem to say there is a way to change the background from within the running program. If so, I can't figure out what it is.
Yes, sorry, xdvi.cfg is a different config file, it's ~/.xdvirc. It's the last instance of xdvi running that saves its defaults to the file, so yes, if you had multiple instances running, that might be a problem.
> I still don't understand what .background in the man page refers to.
That should only make the main window white and leave the rest as-is; compare:
xdvi -xrm "XDvi*background:black" foo.dvi
xdvi -xrm "XDvi.background:black" foo.dvi
> I note that you seem to say there is a way to change the background from
> within the running program. If so, I can't figure out what it is.
That's only in the Motif version.