[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Proper usage of .rd? Tutorial or Example?
From: |
Oliver Corff |
Subject: |
Proper usage of .rd? Tutorial or Example? |
Date: |
Tue, 3 Dec 2024 16:52:23 +0100 |
User-agent: |
Mozilla Thunderbird |
Dear All,
my intention is to write a form letter mechanism that produces invoices.
I want to select from a number of predefined recipients and set up an
invoice which is filled with items like:
Item Value (EUR)
A 100
B 200
=========
Sum: 300
I thought of using .rd to read Items and Values from stdin, perhaps with
a prompt. If I say
.rd Item
I get the prompt "Item:" and can enter a name. However, the input then
becomes immediate part of the text (analogue to .so).
At the moment I am stuck with passing the values read by .rd to anything
but immediate text. However, I'd like to store the keyboard input read
by .rd to strings so I can construct a tbl with the collected data.
I searched man 7 groff which only states "Read insertion" for .rd, the
texinfo manual has more information but I cannot find information on how
to absorb the input read by .rd into a variable.
Thanks a lot for any hint!
Best,
Oliver.
--
Dr. Oliver Corff
mailto:oliver.corff@email.de