[Remind-Fans] rem2ps stopped working

Craig B Agricola craig at theagricolas.org
Thu Jul 28 15:58:20 EDT 2005


I'm such an ass; I thought I had already sent my findings on this out to
the list...  The error is actually pretty simple.  If you look at the
text that goes in the box for a day's reminders, you'll see the words
broken into separate strings (in PostScript, strings are delimited by
parens), followed by a close-bracket.  The open and close brackets are
delimiters of arrays.  On the next line are two empty strings followed
by a close-bracket.  The problem is caused by the addition of a new
feature in 03.00.23, which allows rem2ps to add arbitrary PostScript
code to be called before and then after the text is drawn.  The two
empty strings on the following line are PostScript code to be
interpreted at run time.  In all the files that have been sent around,
these are empty, but they are still supposed to be the last two strings
in the array of words to be drawn in the box.  The close-bracket after
the words, which ends the word array, shouldn't be there.  I haven't
looked at the rem2ps code yet, but I bet that the new feature just
forgot to suppress the closing bracket before adding the two extra
strings (and then adding the closing bracket again.)

 -Craig

On Thu, Jul 28, 2005 at 08:31:58PM +0200, Ren?? van Bevern wrote:
> On 15.07.05, Craig B Agricola wrote:
> 
> Hi.
> 
> > PostScript is a guilty pleasure for me, so feel free to send me the
> > output of rem2ps and I'll see if I can figure out what might be wrong
> > with it.
> 
> I append a working PostScript file as generated by rem2ps 03.00.22 and a
> diff to a broken PostScript file as generated by rem2ps 03.00.23.
> 
> The problem is definitively caused by rem2ps 03.00.23. Merely exchanging
> it by rem2ps 03.00.22 works in this case.
> 
> As I have very little or no understanding of PostScript, I'd very much
> appreaciate your help. :)
> 
>     Ren?? van Bevern,
>       http://progn.org


> --- ps2.ps	2005-07-28 19:18:21.000000000 +0200
> +++ ps1.ps	2005-07-28 19:18:13.000000000 +0200
> @@ -165,8 +165,22 @@
>     /width exch def
>     /xleft exch def
>     /curline () def
> +   % The last two strings in the word array are actually the PostScript
> +   % code to execute before and after the entry is printed.
> +   dup dup
> +   length 1 sub
> +   get
> +   exch
> +   dup dup
> +   length 2 sub
> +   get
> +   dup length 0 gt
> +   {cvx exec} {pop} ifelse
> +   dup length 2 sub 0 exch getinterval
>     {EnterOneWord} forall
>     FinishFormatting
> +   dup length 0 gt
> +   {cvx exec} {pop} ifelse
>     y
>  } bind def
>  % Variables for calendar boxes:
> @@ -357,6 +371,7 @@
>  Border ytop 5 xincr mul MinX add xincr
>  [
>    [(Chuck's)(17th)(birthday)]
> +()()]
>  ]
>  (15)
>  DoCalBox
> @@ -366,6 +381,7 @@
>  Border ytop 6 xincr mul MinX add xincr
>  [
>    [(Dom's)(32nd)(birthday)]
> +()()]
>  ]
>  (16)
>  DoCalBox






More information about the Remind-fans mailing list