[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [help-texinfo] html: playing with the style
From: |
Gavin Smith |
Subject: |
Re: [help-texinfo] html: playing with the style |
Date: |
Mon, 29 Apr 2019 17:31:34 +0100 |
User-agent: |
Mutt/1.6.1 (2016-04-27) |
On Sun, Apr 28, 2019 at 06:42:05PM +0200, Akim Demaille wrote:
> Actually it works so well that now I wish I could also use
> colors in PDF. I have played with \pdfsetcolor, tweaked
> with whatever seemed relevant in texinfo.tex, but to no
> avail. The Internet offers nothing interesting on "Texinfo
> PDF colors" (except for URLs).
> Even something copied straight from texinfo.tex does not work:
>
> @macro dwarning{text}
> @inlinefmtifelse{tex, @inlineraw{tex, {\setcolor{\linkcolor}}} \text\
> @inlineraw{tex, {\endlink}}, \text\}
> @end macro
This may not work as \linkcolor is black by default.
The following works to put text surrounded by @colorOn{} and @colorOff{}
in a purple colour:
\input texinfo
@tex
\gdef\rgbPurple{0.50 0 0.50}
\gdef\colorOn{%
\setcolor{\rgbPurple}%
}
\gdef\colorOff{%
\setcolor{\maincolor}%
}
@end tex
@ifnottex
@macro colorOn
@end macro
@macro colorOff
@end macro
@end ifnottex
address@hidden@colorOff{}bbb
@bye
If you wanted to research it you'd want to look at pdfTeX documentation
as well as the documentation of the PDF format itself:
http://www.adobe.com/devnet/pdf/pdf_reference_archive.html
The colour is set in texinfo.tex with \pdfliteral and the "rg" and "RG"
commands for PDF. These take RGB values with each component being a
number between 0 and 1.