From 1842056ca6d7984faafec287d84fa8e6a5852bd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Adjemian=20=28Argos=29?= <stepan@adjemian.eu> Date: Fri, 13 Sep 2024 11:37:26 +0200 Subject: [PATCH] Make conversion to png optional. --- matlab/write_table_short.m | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/matlab/write_table_short.m b/matlab/write_table_short.m index cb7c885..9b69fa0 100644 --- a/matlab/write_table_short.m +++ b/matlab/write_table_short.m @@ -1,4 +1,4 @@ -function write_table_short(datafile, texfilename) +function write_table_short(datafile, texfilename, nopng) % Produce a table of results with LaTex compiled as a pdf file and converted to a png file. % @@ -11,6 +11,10 @@ function write_table_short(datafile, texfilename) % Copyright (C) 2024 Dynare Team +if nargin<3 + nopng = true; +end + stack_solve_algo = [0, 1, 2, 3, 4, 5]; id = 1:length(stack_solve_algo); @@ -148,6 +152,17 @@ fclose(fid); cd(sprintf('%stables', rootfolder)); system(sprintf('pdflatex %s', texfilename)); -system(sprintf('convert -density 600 %s.pdf %s.png', texfilename, texfilename)); +if ~nopng + system(sprintf('convert -density 600 %s.pdf %s.png', texfilename, texfilename)); +end +cd(cfolder); + +% +% Cleanup +% + +cd(sprintf('%stables', rootfolder)); +system(sprintf('rm %s.log', texfilename)); +system(sprintf('rm %s.aux', texfilename)); cd(cfolder); -- GitLab