[pdftex] magic height 1.00376129150390625pt for coloring the rules

Heiko Oberdiek oberdiek at ruf.uni-freiburg.de
Sat Mar 2 23:54:20 CET 2002

On Sat, 2 Mar 2002, Stanis³aw Romañski wrote:

> Is there something magic in the dimension 1.00376129150390625pt for pdfTeX ?

It is about 1bp, 1bp is the default unit for PDF or PostScript.

> The rules of smaller height seem not to be colorable (and the higher ones,
> yes).
> The simple code
> \pdfcompresslevel=0  \nopagenumbers
> \pdfliteral{0 0.4 0.1 0 k} % Pink
> \hbox{\vrule height 1.00376129150390625pt width 15pt depth 0pt}
> \hbox{\vrule height 1.003761291503906249999999999999pt width 15pt depth 0pt}
> \bye
> gives two rules: the upper is pink and the lower is set black. Why ?

pdfTeX draws a rectangle for thick rules and fills them,
it uses lines for thin rules, they are stroked.
The limit between thick and thin is about 1bp.

You have only set the color for filling, so only the thick rules
will be colored. With \pdfliteral{0 0.4 0.1 0 K} you can set the
color for stroking/thin rules.

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>

More information about the pdftex mailing list