Hi,

I am looking to use groff as test for a small project to produce a calendar. I
am a true newbie with groff, and only use it because of ingo@ speach on
m...@openbsd.org some times ago (hi Ingo). So please excuse me if I am asking
weird things.

I am using hdtbl to produce the grid (and fill some cells with background
color), and I am trying to add vertical bars over the table to mark "here there
is a thing on several days".

In order to add such bars, I am trying to store the position while in the table,
and after emitting the table, to restore my position to draw over the table (if
I am trying to draw directly while in the table, it seems the rest of the table
is over my drawing).

So I tried to use \n[nl] register. But the value is -1, as if there is nothing
printed on the page at call time.

I have the same problem if I am using `.mk register', \n[register] is 0.

As example, I join a document, I am doing the following:

- on Jan, 6 : a vertical line directly in the table (only the part in the cell
  is visible, rest is overrided)

- on Jan, 13: show \n[nl] register value
              use .mk to store the value in custom register, and show it

- after the table, use absolute position (to show what I would like to do, but
  without manually adjusting positions)

I am using the following command-line to generate the document:
$ groff -Tpdf test.groff > test.pdf

Any advices would be welcome.

Thanks.
-- 
Sebastien Marie
.mso hdtbl.tmac
.ds t*bgc white\" background color
.ds t*fgc black\" foreground color
.ds t*bc black\"  border color
.nr t*cpd 0.3n\"  cell padding
.nr t*csp 0\"  cell spacing
.TBL cols=3 "width=2m 2m 12m" hal=c
. TR
.  TH colspan=3 fgc=white bgc=black Janvier
. TR
.  TD M
.  TD 1
.  TD
. TR
.  TD J
.  TD 2
.  TD
. TR
.  TD V
.  TD 3
.  TD
. TR
.  TD S
.  TD 4
.  TD
. TR bgc=grey
.  TD D
.  TD 5
.  TD
. TR
.  TD L
.  TD 6
.  TD hal=l
 \Z@\v'-1v'\L'5v'@ThingA
. TR
.  TD M
.  TD 7
.  TD
. TR
.  TD M
.  TD 8
.  TD
. TR
.  TD J
.  TD 9
.  TD
. TR
.  TD V
.  TD 10
.  TD
. TR
.  TD S
.  TD 11
.  TD
. TR bgc=grey
.  TD D
.  TD 12
.  TD
. TR
.  TD L
.  TD 13
.  TD
nl=\n[nl]
.nr testA \n[nl]
.mk testB
mk=\n[testB]
. TR
.  TD M
.  TD 14
.  TD
. TR
.  TD M
.  TD 15
.  TD
. TR
.  TD J
.  TD 16
.  TD
. TR
.  TD V
.  TD 17
.  TD
. TR
.  TD S
.  TD 18
.  TD
. TR bgc=grey
.  TD D
.  TD 19
.  TD
. TR
.  TD L
.  TD 20
.  TD
. TR
.  TD M
.  TD 21
.  TD
. TR
.  TD M
.  TD 22
.  TD
. TR
.  TD J
.  TD 23
.  TD hal=r ThingB
. TR
.  TD V
.  TD 24
.  TD
. TR
.  TD S
.  TD 25
.  TD
. TR bgc=grey
.  TD D
.  TD 26
.  TD
. TR
.  TD L
.  TD 27
.  TD
. TR
.  TD M
.  TD 28
.  TD
. TR
.  TD M
.  TD 29
.  TD
. TR
.  TD J
.  TD 30
.  TD
. TR
.  TD V
.  TD 31
.  TD
.ETB
.\" try to use testA register
 \v'|\n[testA]u'ThingC
.\" try to use absolute positions (a char seems necessary before \v'')
 \v'|10.9v'\h'5m'\Z@\v'-1v'\L'5v'@ThingD

Reply via email to