Postscript generation

I'm trying to write a ruby program that will output a postscript
representation of a scrabble board. Some of the things I thought of are

1. Generate LaTeX
2. Generate SVG/Dia
3. Generate postscript directly
4. Draw on a canvas and use its ps output method

Has anyone tried anything similar? If I go with option 4, which toolkit
has the nicest canvas class?

martin

I'm trying to write a ruby program that will output a postscript
representation of a scrabble board. Some of the things I thought of are

1. Generate LaTeX

easy

2. Generate SVG/Dia

never done this

3. Generate postscript directly

you'll need to work with low-level stuff like character sizes ...

4. Draw on a canvas and use its ps output method

never done this.

Has anyone tried anything similar? If I go with option 4, which toolkit
has the nicest canvas class?

martin

FWIW, I'm writing my bills via a YAML-Ruby-Lout-combo.

Lout is closer to PostScript and does not have some of TeX's more
awkward parts. And it's *very* small compared to TeX.

It should be very well suited to your problem.

s.

···

On Mon, 09 Aug 2004 07:29:17 GMT, Martin DeMello <martindemello@yahoo.com> wrote:
--
Stefan Schmiedl
Approximity GmbH http://www.approximity.com
Research & Development mailto:stefan@approximity.com

In article <hJFRc.57189$J06.55766@pd7tw2no>,

···

Martin DeMello <martindemello@yahoo.com> wrote:

I'm trying to write a ruby program that will output a postscript
representation of a scrabble board. Some of the things I thought of are

1. Generate LaTeX
2. Generate SVG/Dia
3. Generate postscript directly
4. Draw on a canvas and use its ps output method

Has anyone tried anything similar? If I go with option 4, which toolkit
has the nicest canvas class?

Well, Tk's canvas can already outupt postscript. I don't know if any
other toolkit has that capability.

Phil

Hello Martin,

"Martin DeMello" <martindemello@yahoo.com> wrote in message

I'm trying to write a ruby program that will output a postscript
representation of a scrabble board. Some of the things I thought of are

1. Generate LaTeX
2. Generate SVG/Dia
3. Generate postscript directly

        ^^^^^^^^^^^^^^^^^^^^
Take a look at Mark Slagell's Postscript generator:

http://clinic-db.vm.iastate.edu/support/postscript_module.html

I have used it in the past and it worked like a champ !

4. Draw on a canvas and use its ps output method

Has anyone tried anything similar? If I go with option 4, which toolkit
has the nicest canvas class?

martin

HTH,
-- shanko

Thanks! I'd never heard of this, but it does indeed look ideal. My
biggest issue with LaTeX was the awkwardness of mixing in graphics, and
lout looks like it solves that.

martin

···

Stefan Schmiedl <s@xss.de> wrote:

FWIW, I'm writing my bills via a YAML-Ruby-Lout-combo.

Lout is closer to PostScript and does not have some of TeX's more
awkward parts. And it's *very* small compared to TeX.

It should be very well suited to your problem.

I think Fox's can - there's a postscript device context listed in the
docs.

martin

···

Phil Tomson <ptkwt@aracnet.com> wrote:

In article <hJFRc.57189$J06.55766@pd7tw2no>,
Martin DeMello <martindemello@yahoo.com> wrote:

>4. Draw on a canvas and use its ps output method
>
>Has anyone tried anything similar? If I go with option 4, which toolkit
>has the nicest canvas class?

Well, Tk's canvas can already outupt postscript. I don't know if any
other toolkit has that capability.

Thanks - I've bookmarked this, though Lout is working out very nicely
for my current project.

martin

···

Shashank Date <sdate@everestkc.net> wrote:

Hello Martin,

"Martin DeMello" <martindemello@yahoo.com> wrote in message
> I'm trying to write a ruby program that will output a postscript
> representation of a scrabble board. Some of the things I thought of are
>
> 1. Generate LaTeX
> 2. Generate SVG/Dia
> 3. Generate postscript directly
        ^^^^^^^^^^^^^^^^^^^^
Take a look at Mark Slagell's Postscript generator:

http://clinic-db.vm.iastate.edu/support/postscript_module.html

I have used it in the past and it worked like a champ !

Okay, this was even easier than I thought :slight_smile:

There's a preliminary release up at

http://zem.novylen.net/ruby/scrabpp-0.1.zip

Can someone think up a nice platform-independent way of detecting whether
lout is installed and running it as a final step if it is? Or will I
have to require a path_to_lout config variable?

martin

···

Martin DeMello <martindemello@yahoo.com> wrote:

Thanks! I'd never heard of this, but it does indeed look ideal. My
biggest issue with LaTeX was the awkwardness of mixing in graphics, and
lout looks like it solves that.

Thanks! I'd never heard of this, but it does indeed look ideal. My
biggest issue with LaTeX was the awkwardness of mixing in graphics, and
lout looks like it solves that.

Okay, this was even easier than I thought :slight_smile:

There's a preliminary release up at

http://zem.novylen.net/ruby/scrabpp-0.1.zip

great!

Can someone think up a nice platform-independent way of detecting whether
lout is installed and running it as a final step if it is? Or will I
have to require a path_to_lout config variable?

path_to_lout would be the best, as it is not widely used under windows,
I think. And, IIRC, you get a zip-archive for windows, which you can
unpack whereever you like.

OTOH, people using it will have lout.exe in their path somewhere, so
if all else fails, you could search the directories ... OTTH, they
might have a batch file somewhere hiding the path from the outside
world...

path_to_lout seems to be the simplest thing that could work.

s.

···

On Wed, 11 Aug 2004 21:05:07 GMT, Martin DeMello <martindemello@yahoo.com> wrote:

Martin DeMello <martindemello@yahoo.com> wrote: