groff
[Top][All Lists]
Advanced

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

Re: gropdf : missing colour when used with HDTBL macros


From: Deri
Subject: Re: gropdf : missing colour when used with HDTBL macros
Date: Thu, 14 Dec 2023 23:02:50 +0000

On Thursday, 14 December 2023 22:35:26 GMT Bjarni Ingi Gislason wrote:
>   File examples in
> 
> https://list.gnu.org/archive/html/groff/2023-12/msg00013.html
> 
> with subject "Groff hdtbl tables disappear near the footer".
> 
>   /usr/bin/groff -Tpdf -ms -mhdtbl hdtbl-issue.ms > hdtbl-issue.pdf
> 
>   Output does not have a "coloured" header "Professional
> Experience" (but black on white background) as the PostScript
> output file.
> 
> -.-.
> 
> /usr/bin/groff -Tpdf --version:
> 
> GNU groff version 1.23.0
> Copyright (C) 2022 Free Software Foundation, Inc.
> [...]
> called subprograms:
> 
> GNU troff (groff) version 1.23.0
> GNU gropdf (groff) version 1.23.0

Hi Bjarni,

If you look in hdtbl-issue-macros.ms you will see:-

.ds ACCENT "\X'ps: exec .1 .3 .6 setrgbcolor'
.ds GREY "\X'ps: exec .7 .7 .7 setrgbcolor'
.ds DGREY "\X'ps: exec .3 .3 .3 setrgbcolor'
.ds RED "\X'ps: exec 1 0 0 setrgbcolor'
.ds BLUE "\X'ps: exec 0 0 1 setrgbcolor'
.ds BLACK "\X'ps: exec 0 0 0 setrgbcolor'
.ds WHITE "\X'ps: exec 1 1 1 setrgbcolor'
.defcolor textcolor rgb #353535
.defcolor linecolor rgb #a1a1a1

The first 7 lines are defined as postscript commands which are not parsed by 
gropdf. Its man page documents the particular \X'ps: ..." which are 
understood.

The last two colours use normal groff colour definitions. I'm not too sure why 
most of the colours are done as postscript commands, but this sort of 
postscript used to be the only way to get colours from groff, before Werner 
added the colour commands, so it may be old code.

Cheers 

Deri






reply via email to

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