Merge pull request #1000 from JohannesPfeifer/collect_latex
Bugfixes related to collect_LaTeX_Files.mtime-shift
commit
2209944c7c
|
@ -9382,12 +9382,12 @@ parameters were correctly updated. The long names can be used to add parameter d
|
|||
following @LaTeX{} packages: @code{longtable}
|
||||
@end deffn
|
||||
|
||||
@deffn {MATLAB/Octave command} collect_LaTeX_Files(M_) ;
|
||||
@deffn {MATLAB/Octave command} collect_LaTeX_Files(M_,options_) ;
|
||||
|
||||
Writes a @LaTeX{} file named @code{<<M_.fname>>_TeX_binder.tex} that collects all @TeX{} output generated by Dynare
|
||||
into a file. This file can be compiled using pdflatex and automatically tries to load all required packages.
|
||||
Requires the following @LaTeX{} packages: @code{longtable}, @code{psfrag},
|
||||
@code{graphicx}, @code{epstopdf}, @code{longtable}
|
||||
@code{graphicx}, @code{epstopdf}, @code{longtable}, and @code{float}
|
||||
@end deffn
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
function collect_LaTeX_Files(M_)
|
||||
function collect_LaTeX_Files(M_,options_)
|
||||
% function collect_LaTeX_Files(M_);
|
||||
% Creates TeX-File embedding all eps-loaders created for current mod-file
|
||||
%
|
||||
|
@ -36,8 +36,15 @@ fprintf(fid,'%s \n','\usepackage{epstopdf}');
|
|||
fprintf(fid,'%s \n','\usepackage{longtable}');
|
||||
fprintf(fid,'%s \n','\usepackage{amsfonts}');
|
||||
fprintf(fid,'%s \n','\usepackage{breqn}');
|
||||
fprintf(fid,'%s \n','\usepackage{float}');
|
||||
fprintf(fid,'%s \n','\begin{document}');
|
||||
|
||||
if ~isfield(M_,'dname')
|
||||
dname = options_.dirname;
|
||||
else
|
||||
dname = M_.dname;
|
||||
end
|
||||
|
||||
%% Root directory
|
||||
TeX_Files=dir([M_.fname,'*.TeX']);
|
||||
for ii=1:length(TeX_Files)
|
||||
|
@ -51,20 +58,20 @@ for ii=1:length(TeX_Files)
|
|||
end
|
||||
|
||||
%% Output directory
|
||||
TeX_Files=dir([M_.dname filesep 'Output' filesep M_.fname '*.TeX']);
|
||||
TeX_Files=dir([dname filesep 'Output' filesep M_.fname '*.TeX']);
|
||||
for ii=1:length(TeX_Files)
|
||||
[pathstr,f_name,ext] = fileparts(TeX_Files(ii).name);
|
||||
if ~strcmp(TeX_Files(ii).name,f_name_binder)
|
||||
fprintf(fid,'%s \n',['\include{', M_.dname '/Output' '/',f_name,'}']);
|
||||
fprintf(fid,'%s \n',['\include{', dname '/Output' '/',f_name,'}']);
|
||||
end
|
||||
end
|
||||
|
||||
%5 graphs directory
|
||||
TeX_Files=dir([M_.dname filesep 'graphs' filesep M_.fname '*.TeX']);
|
||||
TeX_Files=dir([dname filesep 'graphs' filesep M_.fname '*.TeX']);
|
||||
for ii=1:length(TeX_Files)
|
||||
[pathstr,f_name,ext] = fileparts(TeX_Files(ii).name);
|
||||
if ~strcmp(TeX_Files(ii).name,f_name_binder)
|
||||
fprintf(fid,'%s \n',['\include{', M_.dname '/graphs' '/',f_name,'}']);
|
||||
fprintf(fid,'%s \n',['\include{', dname '/graphs' '/',f_name,'}']);
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -47,9 +47,11 @@ fprintf(fid, ['\\caption{Parameter Values}\\\\%%\n']);
|
|||
|
||||
fprintf(fid, '\\hline%%\n');
|
||||
fprintf(fid, '\\multicolumn{1}{c}{\\textbf{Parameter}} &\n');
|
||||
fprintf(fid, '\\multicolumn{1}{c}{\\textbf{Value}} &\n');
|
||||
fprintf(fid, '\\multicolumn{1}{c}{\\textbf{Value}} ');
|
||||
if Long_names_present==1;
|
||||
fprintf(fid, '\\multicolumn{1}{c}{\\textbf{Description}}\\\\%%\n');
|
||||
fprintf(fid, '&\n \\multicolumn{1}{c}{\\textbf{Description}}\\\\%%\n');
|
||||
else
|
||||
fprintf(fid, ' \\\\%%\n');
|
||||
end
|
||||
fprintf(fid, '\\hline\\hline%%\n');
|
||||
fprintf(fid, '\\endfirsthead\n');
|
||||
|
@ -61,9 +63,11 @@ else
|
|||
end
|
||||
fprintf(fid, '\\hline%%\n');
|
||||
fprintf(fid, '\\multicolumn{1}{c}{\\textbf{Parameter}} &\n');
|
||||
fprintf(fid, '\\multicolumn{1}{c}{\\textbf{Value}} &\n');
|
||||
fprintf(fid, '\\multicolumn{1}{c}{\\textbf{Value}} ');
|
||||
if Long_names_present==1;
|
||||
fprintf(fid, '\\multicolumn{1}{c}{\\textbf{Description}}\\\\%%\n');
|
||||
fprintf(fid, '&\n \\multicolumn{1}{c}{\\textbf{Description}}\\\\%%\n');
|
||||
else
|
||||
fprintf(fid, '\\\\%%\n');
|
||||
end
|
||||
fprintf(fid, '\\hline\\hline%%\n');
|
||||
fprintf(fid, '\\endhead\n');
|
||||
|
|
|
@ -162,7 +162,7 @@ end;
|
|||
estimation(mode_compute=9,order=1,datafile='../fs2000/fsdat_simul',mode_check,smoother,filter_decomposition,mh_replic=2002, mh_nblocks=2, mh_jscale=0.8,forecast = 8,bayesian_irf,filtered_vars,filter_step_ahead=[1,3],irf=20,moments_varendo) m P c e W R k d y;
|
||||
shock_decomposition y W R;
|
||||
|
||||
collect_LaTeX_Files(M_);
|
||||
collect_LaTeX_Files(M_,options_);
|
||||
|
||||
//identification(advanced=1,max_dim_cova_group=3,prior_mc=250);
|
||||
if system(['pdflatex -halt-on-error ' M_.fname '_TeX_binder.TeX'])
|
||||
|
|
Loading…
Reference in New Issue