function strout = insertsl(strin)
%
%  Name: strout
% 
%  Usage: 
% 
%   Description:
%     Inserts a \ in front of the special
%     'Tex' characters in the string 'strin'

%
%  Version SWD970623
%
%  Author(s): Scott W. Doebling, doebling@lanl.gov
%
%  Institution: Los Alamos National Laboratory,
%		ESA-EA
%
%  Copyright (c) 1997, The Regents of the University
%     	of California. (See top level of code for
%	full copyright statement.)

strout = strin;

texstr = ['\';'{';'}';'_';'^'];

for t = 1:length(texstr),
   
%  Locate the string segment

nstr = findstr(strout,texstr(t));
   
%  Create the output string

for i = length(nstr):-1:1,
   
   n = nstr(i);
   
   strout = [ strout(1:(n-1)) , '\' , strout(n:end)];
   
end

end

return