Matt Huszagh <[email protected]> writes:

> Hello,
>
> I'm trying to use pagecolor with preview. Unfortunately, preview seems
> to be ignoring the pagecolor command. Here's a minimal example.
>
> mwe.tex:
>
> \documentclass{article}
> \usepackage{xcolor}
> \usepackage[active,tightpage]{preview}
> \begin{document}
> \begin{preview}
> {\color{white}
> \pagecolor{black}
> some text
> }
> \end{preview}
> \end{document}
>
> Compiled with `pdflatex mwe.tex`.
>
> Is there a way to get preview to respect the pagecolor command?

Preview attempts respecting the color settings of your editor window.
That is in conflict with respecting color settings in the document.  It
also tries fudging the document into tiny bits that are treated
semi-independently.  All of that means that color handling is tricky and
differs whether you load a color package or not, and whether you are
generating DVI or PDF.  Much of it is not entirely by design but a
consequence of technical details of the respective color workflows
interacting with preview-latex's color treatment.

So basically it's tricky, and that's even before figuring out what
"respecting the pagecolor command" means in the context of fragments
displayed in an editor window with a different color scheme.

Sometimes, you can configure preview-reference-face but it's unlikely
that the customisation will make you happy for more than one document.

-- 
David Kastrup

Reply via email to