[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Groff] How to embed PS char into groff input
From: |
Tadziu Hoffmann |
Subject: |
Re: [Groff] How to embed PS char into groff input |
Date: |
Tue, 11 Dec 2001 20:20:28 +0100 |
> Maybe the restriction on 255 characters needs removing?
No! The 255 character limit on lines is part of the
Document Structuring Conventions.
I've been toying around a bit with the suggestion given in
the grops manpage of using \Y, and have come to the
conclusion that this is indeed the cleanest solution since
it doesn't mangle the code (it even keeps the leading spaces
in the PostScript file, for those who like their PostScript
output readable):
.\" ------------------------------------------------------------
.de rose
ps: mdef 2
/wedge
{ newpath
% rgbR rgbG rgbB setrgbcolor
0 0 moveto
1 0 translate
15 rotate
0 15 sin translate
0 0 15 sin -90 90 arc
closepath }
def
/rose
{ gsave
currentpoint translate
2000 1.2 mul div dup scale
1.2 -1.2 translate
0.02 setlinewidth
1 1 12
{ 12 div setgray
gsave wedge gsave fill grestore 0 setgray stroke grestore
30 rotate }
for
grestore }
def
..
\Y[rose]\c
.char \[rose] \X'ps: exec \\n[.ps] rose'\h'1m'
.\" ------------------------------------------------------------
A Rose \[rose]\s+8 A Rose \[rose]\s0 A Rose \[rose]
.sp 1
rose\[rose]\*{rose\[rose]\*{rose\[rose]\*}\*}rose
.sp 1
\(->\[rose]\(<-
.\" ------------------------------------------------------------
(Seems like the DEFS dictionary starts out with a size of 50.
Does anybody know why? Spare space in case the user doesn't
correctly declare the number of definitions?)
Best regards,
Tadziu