auctex
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Use pagecolor with preview package


From: David Kastrup
Subject: Re: Use pagecolor with preview package
Date: Tue, 12 May 2020 21:08:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Matt Huszagh <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]