Code covered by the BSD License  

Highlights from
publish2latex

image thumbnail

publish2latex

by

 

09 Apr 2013 (Updated )

Using full Latex markup in m-files to generate high quality documentation. Version 1.3

addSectionAt( generatedFile, at);
function generatedFile = addSectionAt( generatedFile, at);
%
temp1 = generatedFile( 1:at );
temp2 = generatedFile(at+1:end);
%
newLine = generatedFile{ at };
eolChar = newLine(end);
%
% rempove the percents
%
inds = findstr( newLine , '%' );
allInds = 1:length( newLine) ;
inds = setdiff( allInds, inds );
%
newLine = newLine(inds);
newLine = ['% \section{',newLine(1:end-1),'}',eolChar];

%
generatedFile = [temp1; newLine; temp2];

Contact us