[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [groff] Creating a numbered list without macros
From: |
Ralph Corderoy |
Subject: |
Re: [groff] Creating a numbered list without macros |
Date: |
Sat, 11 Aug 2018 08:46:42 +0100 |
Hi Yves,
> What approach would I take? Is this something that can be done with
> tabs?
The tutorial in CSTR 54, logical page `- 32 -', defines the `lp'
labelled paragraph macro that uses tabs. https://troff.org/54.pdf
If you're starting troff, that slim document is well worthy of repeated
careful study.
> a combination of indents?
Ted's pointed out the combination of indents. Another way that's
sometimes seen is to move left with `\h' to out-dent the item's
`bullet'.
$ cat list.tr
.na
.nh
.pl 10
.ll 32
.nr i 0 1
.af i i
Before.
.sp
.in 8
.ds l "\n+i. \"
\h'-\w'\*l'u'\*lFirst.
.br
.ds l "\n+i. \"
\h'-\w'\*l'u'\*lSecond.
A lot longer list item this time.
.br
.ds l "\n+i. \"
\h'-\w'\*l'u'\*lThird.
.in
.sp
After.
$
$ nroff list.tr
Before.
i. First.
ii. Second. A lot longer
list item this time.
iii. Third.
After.
$
The tedious repetition is well suited to being your own macro definition
you have in your prologue.
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy
- [groff] Creating a numbered list without macros, Yves Cloutier, 2018/08/10
- Re: [groff] Creating a numbered list without macros, Ingo Schwarze, 2018/08/10
- Re: [groff] Creating a numbered list without macros, Peter Schaffter, 2018/08/10
- Re: [groff] Creating a numbered list without macros,
Ralph Corderoy <=
- Re: [groff] Creating a numbered list without macros, Yves Cloutier, 2018/08/11
- Re: [groff] Creating a numbered list without macros, Ingo Schwarze, 2018/08/11
- Re: [groff] Creating a numbered list without macros, Holger Herrlich, 2018/08/16
- Re: [groff] Creating a numbered list without macros, Holger Herrlich, 2018/08/20
- Re: [groff] Creating a numbered list without macros, Peter Schaffter, 2018/08/20
- Re: [groff] Creating a numbered list without macros, Tadziu Hoffmann, 2018/08/20
- Re: [groff] Creating a numbered list without macros, Ingo Schwarze, 2018/08/20
- Re: [groff] Creating a numbered list without macros, Jeff Conrad, 2018/08/20
- Re: [groff] Creating a numbered list without macros, Holger Herrlich, 2018/08/21
- Re: [groff] Creating a numbered list without macros, Tadziu Hoffmann, 2018/08/21