[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] conditionals
From: |
Robert Thorsby |
Subject: |
Re: [Groff] conditionals |
Date: |
Tue, 01 Jun 2010 18:52:23 +1000 |
On 01/06/10 17:49:04, address@hidden wrote:
> > While you are at it, would you please include "elif" in your patch.
> There are already (as well as ".if") ".ie" for "if-else", "&" for
> "and" and ":" for "or".
>
> See 'info groff' under
>
> * Request Index::
> --> * ie: Read this for ".ie" and ".if" then at the bottom:
> --> *Note Expressions:: for "&" and ":"
G'day Ted,
Yep, one of the few requests that I do know. However, I have recently
written (as a learning exercise) a macro that automatically indented,
nested, aligned, and numbered paragraphs. The macro takes an optional
single argument:
1
a
A
i
I
0
<none>
<anything else>
Arguments 1, a, A, i, and I set the type of numbering; "0" finishes the
then current sequence and backs out to the previous level; <nothing>
takes a new paragraph and increments the current number; and <anything
else (I use "b")> creates bullets.
When I was writing the macro I used full-sized tabs in the text editor
for formatting in order to see where I was. But, even after replacing
each tab with two spaces, the lines disappeared off to the right into
oblivion. What I would have given for a case statement. :-)
Fortunately, I use awk a bit so I am used to it -- kinda.
Robert Thorsby
Whatever women must do they must do twice
as well as men to be thought half as good.
Luckily, this is not difficult.
-- Charlotte Whitton
Re: [Groff] conditionals, Larry Kollar, 2010/06/01
Re: [Groff] conditionals, Werner LEMBERG, 2010/06/01