/[MITgcm]/MITgcm_contrib/gael/matlab_class/gcmfaces_misc/write2tex.m
ViewVC logotype

Diff of /MITgcm_contrib/gael/matlab_class/gcmfaces_misc/write2tex.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3 by gforget, Fri Jul 8 12:58:14 2011 UTC revision 1.5 by gforget, Wed Jan 29 02:20:16 2014 UTC
# Line 14  function []=write2tex(myFile,myStep,vara Line 14  function []=write2tex(myFile,myStep,vara
14  %                       1=section, 2=subsection (not yet implemented)  %                       1=section, 2=subsection (not yet implemented)
15  %               myFig is a figure handle (for myStep=2)  %               myFig is a figure handle (for myStep=2)
16    
17    if isempty(myFile);
18        %if no file name, then do nothing
19        return;
20    end;
21    if iscell(myFile);
22        %extecute alternative command (myFile{1}) passing rest as arguments  
23        eval([myFile{1} '(myFile{2:end});']);
24        return;
25    end;
26    
27    
28  myText=[]; myLev=[]; myFig=[];  myText=[]; myLev=[]; myFig=[];
29  if myStep<4; myText=varargin{1}; end;  if myStep<4; myText=varargin{1}; end;
30  if myStep==1; myLev=varargin{2};  if myStep==1; myLev=varargin{2};
# Line 63  eval(['load ' myFile(1:end-4) '.mat;']); Line 74  eval(['load ' myFile(1:end-4) '.mat;']);
74  %add title or section page (see myLev)  %add title or section page (see myLev)
75  if myStep==1;  if myStep==1;
76      mySection=myText;      mySection=myText;
77      fprintf(fid,'\\section{\n');      if myLev==1; fprintf(fid,'\\section{\n');
78        else; fprintf(fid,'\\subsection{\n');
79        end;
80      fprintf(fid,mySection);      fprintf(fid,mySection);
81      fprintf(fid,'} \n\n');      fprintf(fid,'} \n\n');
82  end;  end;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.22