Dear members,

I've switched to OpenBSD recently and noticed unexpected behaviour of the 
PDFPIC macro: There's no vertical space reserved.

The culprit seems to be the use of '\n' in the line where sed is used (line 89):

.  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[$$]

This results in a single line in /tmp/pdfpic\n[$$]: .nr pdf-wid (p;\\)n.nr 
pdf-ht (p;\\2) and therefor only pdf-wid gets set.

>From what I understand is that posix sed requires a real linebreak in the sed 
>command to create a linebreak, but I assume that '.sy' sends all output 
>without any linebreaks.

I've noticed a suggestion in the "Problems with .PDFPIC caused by pdfinfo" 
thread to use awk instead of sed.

I'm not familiar enough with sed or awk to give a one line fix, but I'll be 
happy to open a bug report for this.

But before doing so, I would like to get some advice.

Thanks in advance.

Kind regards,

Hans

Reply via email to