function pretty(f,w)
%PRETTY	Pretty print symbolic output.
%	PRETTY(S) prints the symbolic matrix S in a format that 
%	resembles type-set mathematics.
%	PRETTY, with no arguments, prints the previous expression.
%	PRETTY(S,n) uses screen width n instead of the default 79.
%
%	See also LATEX.

%	Copyright (c) 1993-95 by The MathWorks, Inc.
%	$Revision: 1.10 $  $Date: 1995/03/01 21:38:55 $

if nargin < 1
   f = maple('"');
end
if isempty(f)
   f = ' ';
end
if ~isstr(f)
   f = sym(f);
end
if size(f,1) > 1
   f = sm2ar(f);
end
if nargin == 2
   maple(['interface(screenwidth=' int2str(w) ')']);
end
maple('interface(prettyprint=true)');
disp(' ')
maplemex(['print(' f ');'],1);
disp(' ')
maple('interface(prettyprint=false)');
if nargin == 2
   maple('interface(screenwidth=79)');
end
