dvipng
[Top][All Lists]
Advanced

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

Re: `-bg Transparent` option isn't ignored when background color is set


From: Jan-Åke Larsson
Subject: Re: `-bg Transparent` option isn't ignored when background color is set in dvi file
Date: Mon, 17 May 2021 18:53:57 +0000
User-agent: Evolution 3.36.4-0ubuntu1

Hi,

That was intended, yes, the manual should probably have said "The background color given will be ignored if there is a background color \special in the DVI."

"Transparent" doesn't change the background color, it enables the alpha channel.

The actual background color (visible, say, in a reader without the alpha channel) is controlled by the color spec, and overridden by a color \special.

Did you want this to work differently, or was the problem that you were surprised by the behavior?

Best
Jan-Åke




On mån, 2021-05-17 at 17:41 +0000, Sébastien Miquel wrote:
Hi,

The manual says that the `-bg` option is ignored if a background color
is set in the DVI, however this doesn't seem to be the case if `-bg
Transparent` is used.

To reproduce, I used a tex file with the following content.
#+BEGIN_SRC latex
\documentclass{article}
\usepackage{xcolor}
\title{Text}
\begin{document}
\maketitle
\definecolor{bg}{rgb}{0.858, 0.188, 0.478} % magenta
\pagecolor{bg}
\end{document}
#+END_SRC

Then compile it using
#+BEGIN_SRC bash
latex -interaction nonstopmode test_latex_bg.tex
dvipng -bg Transparent -o test.png test_latex_bg.dvi
#+END_SRC

The resulting png is Transparent instead of magenta. If I specify `-bg
Blue` instead, the background is set to magenta, as expected.

Is this behaviour intended ?

Regards,

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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