/[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.11 by gforget, Wed Sep 17 21:39:26 2014 UTC revision 1.13 by gforget, Mon Oct 5 22:00:09 2015 UTC
# Line 110  if myStep==2; Line 110  if myStep==2;
110      figure(myFig);      figure(myFig);
111      drawnow;      drawnow;
112      myFigNumTex=myFigNumTex+1;      myFigNumTex=myFigNumTex+1;
113      [dirTex,fileTex,EXT] = fileparts(myFile)      [dirTex,fileTex,EXT] = fileparts(myFile);
114      %print the very figure      %print the very figure
115      if strcmp(frmt,'eps');      if strcmp(frmt,'eps');
116        print(myFig,'-depsc',[dirTex fileTex '_fig' num2str(myFigNumTex) '.eps']);        print(myFig,'-depsc',[dirTex fileTex '_fig' num2str(myFigNumTex) '.eps']);
# Line 150  eval(['save ' myFile(1:end-4) '.mat myFi Line 150  eval(['save ' myFile(1:end-4) '.mat myFi
150    
151  %compile  %compile
152  if myStep==5;  if myStep==5;
153      dirOrig=pwd;      fprintf('\nNow we can attempt to compile the tex file from within Matlab. \n');
154      [PATHSTR,fileTex,EXT] = fileparts(myFile)      fprintf('If the latex implementation is incomplete then this may fail, and \n');
155      cd(PATHSTR);      fprintf('user should then abort and compile the tex file from outside Matlab. \n');
156      system(['latex ' fileTex]);      fprintf('The beamer class is required by in particular. In Matlab, if prompted \n');
157      system(['latex ' fileTex]);      fprintf(' with a question mark then typing ''quit'' will abort compilation. \n');
158      system(['dvipdf ' fileTex]);      test0=input('\n type 1 to proceed or 0 to skip this attempt\n');
159      cd(dirOrig);      if test0;
160          dirOrig=pwd;
161          [PATHSTR,fileTex,EXT] = fileparts(myFile);
162          cd(PATHSTR);
163          system(['latex ' fileTex]);
164          system(['latex ' fileTex]);
165          system(['dvipdf ' fileTex]);
166          cd(dirOrig);
167        end;
168  end;  end;
169    
170    

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.22