On 25 February 2011 08:41, Petr Man wrote: > One question for Keith. How do I prevent pdfmark from changing the color of > the link text?
Ah, yes. Section 2.5.5.1 of pdfmark.pdf sets out to explain this, but tails off into nothingness, before it tells you anything useful. Sorry about that. I ran out of time to work on it, around about the time when I set out to write that section, and simply haven't yet been able to find any more time to get back to it :-( > I want to keep it to default, You'll need to determine the groff colour name which corresponds to "default", and assign it to the string PDFHREF.TEXT.COLOUR: .ds PDFHREF.TEXT.COLOUR <groff-colour-name> By default, pdfmark assigns it thus: .ds PDFHREF.COLOUR 0.35 0.00 0.60 .defcolor pdf:href.colour rgb \*[PDFHREF.COLOUR] .ds PDFHREF.TEXT.COLOUR pdf:href.colour .als PDFHREF.TEXT.COLOR PDFHREF.TEXT.COLOUR Do note the World English spelling of COLOUR, as opposed to the COLOR usage favoured by our American colleagues. pdfmark also maintains the alias, so you may assign your change to PDFHREF.TEXT.COLOR if you prefer, but please bear in mind that, if you break the alias, it will be the value assigned to PDFHREF.TEXT.COLOUR which will be used when the link text is formatted; (hint: the U in COLOUR implies USED). You may exploit this, to effect a temporary colour change, for the scope of a few references only, thus: .rm PDFHREF.TEXT.COLOUR .ds PDFHREF.TEXT.COLOUR green .pdfhref L -D dest-name -- text for reference in green ... .pdfhref L -D dest-name -- reference text still in green then you may revert to the pdfmark default (lilac) colour, (or more strictly, to any colour you assigned before breaking the alias), thus: .als PDFHREF.TEXT.COLOUR PDFHREF.TEXT.COLOR .pdfhref L -D dest-name -- reference text now in default colour With this trick, do note the initial '.rm' to break the alias; without it, PDFHREF.TEXT.COLOR will track any change you make to PDFHREF.TEXT.COLOUR Also note the use of the string PDFHREF.COLOUR, (and its internal pdfmark alias, PDFHREF.COLOR): this defines the colour which is used for any border around the link hotspot, if you set PDFHREF.BORDER to any triplet other than the default: .ds PDFHREF.BORDER 0 0 0 (the three values represent the parameters in a '/Border [0 0 0]' pdfmark; see the Adobe pdfmark documentation for details). -- Regards, Keith.