[metapost] Better gradient and 'special'

Taco Hoekwater taco at elvenkind.com
Tue Mar 24 23:54:22 CET 2009

Dan Luecking wrote:
>> "The command
>>      special <string expression>
>> adds a line of text at the beginning of the next output
>> file."  Which suggests that the MP special command
>> still lacks the necessary power.  Is a more powerful
>> 'special' planned?
> Can't one use the withprescript and withpostscript commands
> to add arbitrary postscript commands anywhere?

Nearly everywhere, yes. They should be flexible enough for
the task at hand, for sure.

Larry, if you hadn't heard about withprescript and withpostscript,
you should update your installation and read about these new
commands in the manual. They were added in version 1.000.

For a more ready-made solution, one could use the combo of
Hans' metafun.mem and mptopdf which uses postprocessing of "special"
(and possibly "withprescript/withpostscript") to hook into the
native pdf gradient facilities.

Best wishes,

More information about the metapost mailing list