Question: Beautify maple code

I have some automatically generated maple code. The code is in fact entirely within a single MAPLE object module. The auto generated code is ugly; fixing it is not feasible. Dealing with it by hand is not feasible.


If you have an ugly MAPLE proc, and just want to get a standard format for the code in the proc, you can print the proc in a maple command window and copy-past it back into the source file. *poof* it looks better. You loose the comments but who needs those anyway :) Brutal, but sometimes useful, in a pinch.


The lprint of my auto generated object is more ugly code even than the original object. Otherwise, I would just go, in a maple command window

  "save uglyobject foo.txt"

and copy foo.txt to uglyobject.txt in the OS.


Maple can print its own code in a nice fashion. Is there any way to access that functionality so make a code beautifier for maple? Its a matter of automatically making moderately readable, canonicalized code from an ugly collection of maple statements.

Please Wait...