groff
[Top][All Lists]
Advanced

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

Re: (A possible) way to change the background color of pdf


From: Tadziu Hoffmann
Subject: Re: (A possible) way to change the background color of pdf
Date: Tue, 15 Jun 2021 15:14:59 +0200
User-agent: Mutt/1.11.4 (2019-03-13)

> I want to have a black background with green text for
> my slides.
> 
> If I'm correct this can't be set within groff.

You can draw a filled polygon (rectangle) using \D'P ...'
covering the whole page at the beginning of each page,
before outputting any text.  Example:


.\" a4 land
.\" ----------------------------------------------------------------
.nr PL 21.0c \" A4 landscape height
.nr PW 29.7c \" A4 landscape width
.pl \n(PLu
.po 2c
.ll \n(PWu-\n(.ou-\n(.ou
.gcolor green
.\" ----------------------------------------------------------------
.\" set up a separate environment for headers and footers
.\" to avoid interference with the running text
.ev 1
.vs 0
.lt \n(PWu-\n(.ou-\n(.ou
.fcolor black
.gcolor yellow
.ev
.\" ----------------------------------------------------------------
.de BP
.ev 1
\Z'\h'-\\n(.ou'\D'P 0 \\n(PLu \\n(PWu 0 0 -\\n(PLu''
.sp |2c
.ev
..
.de EP
.ev 1
.sp |\\n(PLu-1.5c
.tl '\\n[year]/\\n[mo]/\\n[dy]''\\n%'
.bp
.ev
..
.wh 0 BP
.wh -3c EP
.\" ----------------------------------------------------------------
Hello, world!


Attachment: coloredbackground.pdf
Description: Adobe PDF document


reply via email to

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