Hello Riza,

> Is it possible to use the ".so" command in a macro, and pass in an
> argument from the macro.
>
> .de MC
> .so \\\\$1
> ..
>
> .MC file.txt

Yes.

    $ cat >foo
    .de source
    .so \\$1
    ..
    foo        
    .source bar
    foo
    ^D
    $
    $ cat >bar
    bar
    ^D
    $
    $ nroff foo | grep .
    foo bar foo
    $

You're escaping the ‘$’ too much.  You're seeing:

    $ nroff foo | grep .
    troff: foo:5: can't open '\$1': No such file or directory
    foo foo
    $

-- 
Cheers, Ralph.

Reply via email to