No BSD License  

Highlights from
htmltool

htmltool

by

 

The HTML Toolbox (HT) stores various crosslink information about Matlab programs using HTML.

prnt_ext(printcommand)
function c = prnt_ext(printcommand)
% c = prnt_ext(printcommand)
% Returns the correct file extension for the
% print command.
%
% INPUT PARAMETERS
%
% printcommand  = We assume that the print command has the
%                 following form: print -dxxx filename
%                 where the string printcommand to this program
%                 is -dxxx.
%
% OUTPUT PARAMETER
%
% c             = vector of strings containing the correct extension,
%                 e.g. c = ['.ps']
%                 In this version the following formats are included:
%                 
%                 -deps     -> .eps     encapsulated postscript
%                 -deps2
%                 -depsc
%                 -depsc2
%                 -dps      -> .ps      postscript
%                 -dpsc   
%                 -dps2   
%                 -dpsc2 
%                 -dhpgl    -> .hgl     HPGL
%
% Copyright (c) 1996 B.K. Alsberg
%

pr0 = [printcommand blanks(1)];
ss = deblank(pr0);

if strcmp(ss,'-deps')
  c = '.eps';
elseif strcmp(ss,'-depsc')
  c = '.eps';
elseif strcmp(ss,'-deps2')
  c = '.eps';
elseif strcmp(ss,'-depsc2')
  c = '.eps';
elseif strcmp(ss,'-dps')
  c = '.ps';
elseif strcmp(ss,'-dpsc')
  c = '.ps';
elseif strcmp(ss,'-dps2')
  c = '.ps';
elseif strcmp(ss,'-dpsc2')
  c = '.ps';
elseif strcmp(ss,'-dhpgl')
  c = '.hgl';
end;

Contact us