]> git.cameronkatri.com Git - mandoc.git/blob - regress/roff/nr/incr.in
Dummy implementation of the roff(7) \V (interpolate environment variable)
[mandoc.git] / regress / roff / nr / incr.in
1 .\" $OpenBSD: incr.in,v 1.1 2018/04/10 00:52:21 schwarze Exp $
2 .TH NR-INCR 1 "April 10, 2018"
3 .SH NAME
4 nr-incr \- increment a number register by accessing it
5 .SH DESCRIPTION
6 .nr myr 0 1
7 Roff can count by merely accessing a number register:
8 \n+[myr]
9 \n+[myr]
10 \n+[myr]
11 .PP
12 .nr myr +0 1+1
13 It can also change the step size:
14 \n+[myr]
15 \n+[myr]
16 \n+[myr]
17 .PP
18 .nr myr +0 3
19 It can also count down:
20 \n-[myr]
21 \n-[myr]
22 \n-[myr]
23 \n-[myr]
24 .PP
25 .nr myr -0 -2
26 Down in negative steps is up:
27 \n-[myr]
28 \n-[myr]
29 \n-[myr]
30 \n-[myr]
31 .PP
32 .nr myr 42
33 Go to some other value,
34 then continue incrementing with an unchanged (negative) step size:
35 \n+[myr]
36 \n+[myr]
37 \n+[myr]