[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] PDFPIC macro
From: |
Keith Marshall |
Subject: |
Re: [Groff] PDFPIC macro |
Date: |
Thu, 18 Sep 2014 16:18:26 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 |
On 18/09/14 14:37, Peter Schaffter wrote:
> On Wed, Sep 17, 2014, Ralph Corderoy wrote:
>> Can't argue with a post that uses `whence'. Would be nice to see a bit
>> more `{,t,w}hither'.
>
> :)
>
>>> . sy pdfinfo @$1 | \
>>> grep "Page *size" | \
>>> sed -e 's/Page *size: *\\([[:digit:].]*\\) *x *\\([[:digit:].]*\\).*$/\
>>> .nr pdf-wid (p;\\1)\\n\
>>> .nr pdf-ht (p;\\2)/' \
>>>> /tmp/pdfpic\n[$$]
>>
>> sed can do grep's work here. Simplest way would be to drop grep and
>> pass -n to sed, then append `p' to the trailing slash of the s///.
>
> Thanks, Keith.
Well, I agree with Ralph's analysis, but it is to him rather than to me,
that thanks is due.
--
Regards,
Keith.
Re: [Groff] PDFPIC macro, Keith Marshall, 2014/09/17
Re: [Groff] PDFPIC macro, Ralph Corderoy, 2014/09/18