groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] multi-line macro arguments (for printing envelopes)


From: Łukasz Stelmach
Subject: Re: [Groff] multi-line macro arguments (for printing envelopes)
Date: Thu, 28 Apr 2016 00:36:34 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.4 (gnu/linux)

Steffen Nurpmeso <address@hidden> writes:

> (Ted Harding) <address@hidden> wrote:
>  |> Łukasz Stelmach <address@hidden> wrote:
>  |>> I am developing a macro to print envelopes. Is it possible to pass a
>  |>> multi-line string (not necessarily defined with .ds) as a parameter
>  |>> for a macro?
>
>  |The basic idea is not to give a "multi-line string" as a single
>  |paramater, but to give the separate lines as separate arguments.
>
> Or open a diversion, read in all lines, and then work with the
> diversion.  E.g., my letter template has something like

Yes, I've got diversions in my template already :-) I simply am a noob
to groff and I don't know some nice idioms yet.

>   .RECEIVER
>   $TITLE
>   $NAME
>   $STREET
>
>   $CITY
>   .RECEIVER END

That looks like something I am trying to achieve :-)

[...]

>
> The default dimensions are for C6 (for DIN A4).

I've already got my formulas for any size I provide on the command line
like:

--8<---------------cut here---------------start------------->8---
.in (\n[.l]u + 2i - 7.4c)
.if (\n[dl]u > 5.4c) .in (\n[.l]u + 2i - 0.5c - 1c - \n[dl]u)
--8<---------------cut here---------------end--------------->8---

Your example will surely help me. Thanks a lot.

I'll publish my macro As soon as I polish it.
-- 
Było mi bardzo miło.                                  --- Rurku. --- ...
>Łukasz<                                --- To dobrze, że mnie słuchasz.

Attachment: pgp5uYjMkOoT2.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]