groff
[Top][All Lists]
Advanced

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

Re: [Groff] How to pass parameters to included ps


From: Werner LEMBERG
Subject: Re: [Groff] How to pass parameters to included ps
Date: Fri, 24 Feb 2006 07:53:58 +0100 (CET)

> How would I pass arbitrary ps parameters to an included ps routine?
> 
> E.g.
> 
>          .something 50 (hello) 100

You probably want something like this:

  .de END
  ..
  .
  .de something
  .  de something-aux END
  ps: exec \\$*
  .  END
  \Y[something-aux]
  ..
  .
  .something 50 (hello) 100

which gives

  x X ps: exec 50 (hello) 100
  +

in the intermediate output.

> It seems that not even man grops' example is working
> 
>          .nr x 5i
>          ,de y
>           ps: exec
>           \nx u 0 rlineto stroke
>          ..

It does -- in the example above you use `,' instead of `.' ...

  .nr x 5i
  .de y
    ps: exec
    \nx u 0 rlineto stroke
  ..

gives me these lines in the intermediate output:

  x X   ps: exec
  +  360000 u 0 rlineto stroke
  +

> If possible, a mechanism to pass parameters without non-ps scaling
> factors

Number registers are always treated without scaling if you omit a
scaling indicator.  Where's the problem?  You explicitly specify
`5i'...

> and without number registers and groff-type strings.

Please explain.  It's not clear to me what you want to achieve.


    Werner




reply via email to

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