[GRASS-user] ps.map: One Script Works, One Doesn't

Hamish hamish_b at yahoo.com
Wed Mar 10 05:42:06 EST 2010


Hamish:
> > ( and ) need to be quoted like \( and \).
> > 
> > see the documentation for the "comments" instruction,
> > I guess it applies to "text" as well.
> > 
> > PostScript uses () as the beginning/end delimiter for
> > text strings.

Glynn:
> PostScript recognises balanced parentheses within strings (making it
> one of the few languages which cannot be tokenised using regular
> expressions). Only unbalanced parentheses need to be escaped.

right.. I had run in to this in the past when using the comments
instruction for multi-line figure captions. (so the () got split between
lines) slowly it comes back

so it doesn't explain Rich's problem, but he already did..


> OTOH, ps.map should probably be escaping parentheses and backslashes
> within string literals, rather than relying upon the user to do it.

I can't find a bug report for it or any comment in the code, but ISTR
trying something like that when I ran into it the first time & added
that hint to the man page. shrug. if anyone is interested it's done with
show_text() in ps/ps.map/gprims.c.


Hamish



      


More information about the grass-user mailing list