[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Groff] Macro arguments question
From: |
Ted Harding |
Subject: |
RE: [Groff] Macro arguments question |
Date: |
Sun, 13 Nov 2005 22:34:06 -0000 (GMT) |
On 13-Nov-05 Clarke Echols wrote:
> One thing I *really* like about groff vs troff/ditroff is the
> expansion of macro and other entity names beyond two characters.
> Nice job!
>
> I am considering using macros to solve a problem that would be better
> if handled in a database, but I don't want to write the software to
> do it. However, it would be nice if I could string some multi-line
> text together as a single argument to a macro. However, it is not
> obvious to me that it can or cannot be done the way I'm thinking. I
> have been considering something on this order:
>
> .macro \{
> "text line 1, blah blah blah
> text line 2, blah blah blah
> text line 3, more here"\}
>
> I would like to have the text processed as a single argument to
> the macro just as groff would handle:
>
> .macro "argument number one"
>
> and then wrapped and adjusted as with normal text from a
> typical input file.
Hi Clarke,
Maybe I'm missing something, but would the following be something
you do not want to do, for some reason?
.macro \
"text line 1, blah blah blah \
text line 2, blah blah blah \
text line 3, more here"
> 1. Will this work?
Your example above perhaps does not work as (seems to be) intended,
i.e. if I define
.de temp
\\$1
..
.temp \{
"text line 1, blah blah blah
text line 2, blah blah blah
text line 3, more here"\}
then I get
"text line 1, blah blah blah text line 2, ... line 3, more here"
as one line (presumably as intended), but with the quotes as well,
which I suspect you don't want. But this is a consequence of
wrapping it in \{...\}, so if you just remove the quotes from
your argument it comes out right.
>
> 2. If not, is there a different, quick-and-easy/dirty way
> to do it?
>
> Any opinions out there?>
Maybe see above ... ?
Best wishes,
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <address@hidden>
Fax-to-email: +44 (0)870 094 0861
Date: 13-Nov-05 Time: 22:34:02
------------------------------ XFMail ------------------------------
- Re: [Groff] Localization question, Fabrice Ménard, 2005/11/04
- Re: [Groff] Localization question, Werner LEMBERG, 2005/11/10
- Re: [Groff] Localization question, Fabrice Ménard, 2005/11/11
- Re: [Groff] Localization question, Werner LEMBERG, 2005/11/12
- Re: [Groff] Localization question, Fabrice Ménard, 2005/11/13
- [Groff] Macro arguments question, Clarke Echols, 2005/11/13
- RE: [Groff] Macro arguments question,
Ted Harding <=
- Re: [Groff] Macro arguments question, Clarke Echols, 2005/11/13
- Re: [Groff] Macro arguments question, Tadziu Hoffmann, 2005/11/14
- Re: [Groff] Macro arguments question, Tadziu Hoffmann, 2005/11/14
- Re: [Groff] Macro arguments question, Tadziu Hoffmann, 2005/11/14
- [Groff] Localization package, Fabrice Ménard, 2005/11/25
- [Groff] Re: Localization package, Werner LEMBERG, 2005/11/25