[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mgp-users 01157] Sam's Improvements; my MGP macro processor



On Mon, May 26, 2003 at 09:49:07PM -0400, Sam Steingold wrote:
> the appropriate zoom value appear to depend on the screen resolution.
> this is horrible.
> -- 
> Sam Steingold (http://www.podval.org/~sds) running RedHat9 GNU/Linux

Hey Sam,

I've been monitoring your many posts to this list in the past few
days, and I feel obliged to chime in at this point with a few tips.

First of all, this is free software you're complaining about,
supported primarily by its developer who undoubtedly has many other
higher priorities, and who has already provided you with something
useful on an as-is basis.

I can understand your interest in having the product improved,
but I suggest a more appreciative and constructive approach than
the one evidenced by comments like "this is horrible" might get
you better results. (And please remember, the developer is not a
native speaker of English, so you should be especially careful in
how you express your comments.)

FWIW, all of us on this list can probably identify annoying
limitations we'd like to see improved in mgp, but you don't see
us complaining about every little thing. I suggest you give some
thought to distilling your recommendations down to a few critical
ones, and submitting them in priority order, so you can help the
developer focus on the issues of greatest importance to you. And
if he does deign to fix any of them, an expression of appreciation
would of course be appropriate.

After all, when the mighty Microsoft ships expensive, unreliable,
and dangerous products that don't live up to their advertising,
they don't usually fix anything for free, and mgp is radically
different by delivering at no cost everything it promises.

By the way, I'm sure the developer would be grateful for any
patches you might want to submit that would rectify the problems
you've mentioned.

Along these lines, I might mention that I'm not just a "post-critic",
but also a (soon-to-be) contributor of mgp improvements.
Specifically, I've written an mgp preprocessor (about 500 lines
of Perl) that lets you change fonts and styles using a simple
markup language that's a bit like POD, troff, and HTML. You can
also include files (even outside the preamble), and display code
samples with italicized comments.

I call it mg2mgp, because it converts presentation.mg to
presentation.mgp, and I'll be releasing it shortly to www.cpan.org
(although one needn't be a Perl programmer to use it; I provide a
script that automates everything.)

More details are attached at the end of this message.

-Just my $.02,

Tim
*------------------------------------------------------------*
| Tim Maher (206) 781-UNIX  (866) DOC-PERL  (866) DOC-UNIX   |
| CEO, JAWCAR ("Just Another White Camel Award Recipient")   |
| tim(AT)Consultix-Inc.Com  TeachMeUnix.Com  TeachMePerl.Com |
*+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-*
|  Watch for my Book: "Minimal Perl for Shell Programmers"   |
*------------------------------------------------------------*
The following module was proposed for inclusion in the Module List:

  modid:       MGP::Preprocessor
  DSLIP:       bdpfp
  description: Preprocessor for Magicpoint presentations
  userid:      YUMPY (Tim Maher)
  chapterid:   11 (String_Lang_Text_Proc)
  communities:
    SPUG, Seattle Perl Users Group

  similar:
    POE::Preprocessor

  rationale:

    Magicpoint, aka MGP after its file extension, provides a very basic
    platform for creating and delivering X11-based presentations. In
    doing so, it defines a small command language, which deals with
    fonts, colors, line-centering and filling, point sizes, image
    inclusion, and little else.

    But unlike the markup notations used in HTML or POD, there's no
    easy way to say embolden or italicize a word. Unlike troff, 
    there's no way to say include another file at this point
    (it *has* an %include directive, but it's not for arbitrary
    use). Nor is there a general way to run an arbitrary series of
    commands and reap their output that works the way I want.

    Moreover, there's no way to define a particular heading style, and
    have it applied every time you refer to it. There's no way to say
    "whenever I tell you to slurp in a source-code file, expand its
    tabs, and render all its comments in a particular color and a
    particular font"

    There's no easy way to say "I want half-spacing for a while", or
    "skip the next 10 lines, and then start processing again. Or to say
    "show page numbers at the top of each line".

    And there's no way to say "let me leave the %pause directives in my file,
    but ignore them this time so I can proofread each page at a
    glance". Nor is there any way to say "this is a table, render it as
    one".

    Don't get me wrong, I'm very fond of Magicpoint. Especially because
    it's driven by a text file, that can easily be preprocessed.  But if
    there was ever an application in dire need of a macro facility and
    preprocessor, this is the Mother of All Such applications.

    So what I've done is write a set of functions that can be used to
    implement a custom preprocessor that provides the features whose
    absence I lamented above (except the tables, which are still under
    development).

    This is all done behind the back of Magicpoint, which simply
    interprets and renders a *.mgp file as always.

    Some of the functions process new "directives", such as code% and
    include% (yep, mine have trailing %s, not leading ones, like MGP
    itself). Others provide support for the creation and application of
    macros, allowing the user to associate any angle-bracketed symbol
    with a series of native mgp-requests. For example,

            It's time to <BIG_AND_BOLD>Make Money
            Fast<REGULAR>, you gullible pauper.

    Or given an "undo" definition for BIG_AND_BOLD as <REGULAR>, the
    following is equivalent:

            It's time to <BIG_AND_BOLD Make Money Fast>, you
            gullible pauper.

    So that's what and idea of what I've got, and I think lots of
    people are going to want to use it.