[pdftex] Rule color madness
Heiko Oberdiek
oberdiek at uni-freiburg.de
Wed Apr 9 23:49:07 CEST 2003
On Wed, Apr 09, 2003 at 08:01:58PM +0200, G. D. Brettschneider wrote:
> Well, it's not so important for me, so I didn't check
> the archives to see whether or not this has been discussed
> before, but I'm a bit surprised by this little file returning
> two lines in different colors instead of the same (with
> pdfTeX 1.00b):
>
> \pdfliteral {0 1 1 0 k}% switch color to red (CMYB)
> \hrule height 1pt % draws black line
> \vskip 1pt
> \hrule height 1.01pt % draws red line
> \vfill
> \end
>
> So it seems that rules must be thicker than 1pt before they
> can be given a color other than black - whereas colored
> letters are allowed to have thinner lines. Such behaviour
> would not be desirable, however, because TeX's standard
> rules have a thickness of only 0.4pt. - I came to this
> problem when writing a macro to underline text without
> using math mode.
There exist a "stroking" and a "nonstroking" (fill) color in the PDF
specification. You have only set the color for nonstroking operations.
Small lines are stroked, larger ones are filled.
See the driver file "pdftex.def", it sets *both* types of color,
if a color is set in the color package.
Yours sincerely
Heiko <oberdiek at uni-freiburg.de>
--
More information about the pdftex
mailing list