From 09d6d0d855923868ff0c3471df1fc02b4f1df253 Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Wed, 20 Mar 2013 15:10:19 +0100
Subject: [PATCH] reporting: spacing cleanup

---
 matlab/reports/@page/write.m    |  2 +-
 matlab/reports/@report/write.m  |  1 +
 matlab/reports/@section/write.m |  9 ++++-----
 matlab/reports/@table/write.m   | 10 +++++-----
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/matlab/reports/@page/write.m b/matlab/reports/@page/write.m
index f04e7e4b1f..b4453a273a 100644
--- a/matlab/reports/@page/write.m
+++ b/matlab/reports/@page/write.m
@@ -40,7 +40,7 @@ for i=1:length(o.footnote)
 end
 fprintf(fid,'\n');
 
-fprintf(fid, '\\begin{tabular}[t]{@{\\hspace*{-3pt}}c@{}}\n');
+fprintf(fid, '\\begin{tabular}[t]{c}\n');
 for i=1:length(o.title)
     fprintf(fid,'\\multicolumn{1}{c}{%s %s}\\\\\n', o.title_format{i}, o.title{i});
 end
diff --git a/matlab/reports/@report/write.m b/matlab/reports/@report/write.m
index 80cc20ab50..0c769c4a9c 100644
--- a/matlab/reports/@report/write.m
+++ b/matlab/reports/@report/write.m
@@ -59,6 +59,7 @@ fprintf(fid, '\\renewcommand{\\textfraction}{0.05}\n');
 fprintf(fid, '\\renewcommand{\\topfraction}{0.8}\n');
 fprintf(fid, '\\renewcommand{\\bottomfraction}{0.8}\n');
 fprintf(fid, '\\usepackage[Export,PGF]{adjustbox}\n');
+fprintf(fid, '\\setlength{\\parindent}{0in}\n');
 fprintf(fid, '\\begin{document}\n');
 fprintf(fid, '\\centering\n');
 
diff --git a/matlab/reports/@section/write.m b/matlab/reports/@section/write.m
index 4b79eaeacf..15b3925bf6 100644
--- a/matlab/reports/@section/write.m
+++ b/matlab/reports/@section/write.m
@@ -31,11 +31,10 @@ function o = write(o, fid)
 assert(fid ~= -1);
 
 fprintf(fid, '%% Section Object\n');
-fprintf(fid, ' \\vspace{15px}\n');
-fprintf(fid, '\\noindent\\maxsizebox{\\textwidth}{!}{%%\n');
+fprintf(fid, '\\maxsizebox{\\textwidth}{!}{%%\n');
 fprintf(fid, '\\begin{tabular}[t]{');
 for i=1:o.cols
-    fprintf(fid, '@{\\hspace*{-3pt}}c@{}');
+    fprintf(fid, 'c');
 end
 fprintf(fid, '}\n');
 ne = numElements(o);
@@ -44,9 +43,9 @@ for i=1:ne
     if rem(i, o.cols)
         fprintf(fid, ' & ');
     else
-        fprintf(fid, ' \\\\\n');
+        fprintf(fid, '\\\\\n');
     end
 end
-fprintf(fid, '\\end{tabular}}%%\n');
+fprintf(fid, '\\end{tabular}}\n');
 fprintf(fid, '%% End Section Object\n\n');
 end
\ No newline at end of file
diff --git a/matlab/reports/@table/write.m b/matlab/reports/@table/write.m
index c075d07252..5736021d29 100644
--- a/matlab/reports/@table/write.m
+++ b/matlab/reports/@table/write.m
@@ -53,7 +53,8 @@ nlhc = 1;
 
 disp('creating table.........');
 fprintf(fid, '%% Table Object\n');
-fprintf(fid, '\\begin{tabular}{l');
+fprintf(fid, '\\setlength{\\tabcolsep}{4pt}\n');
+fprintf(fid, '\\begin{tabular}{@{}l');
 
 dates = ds.time;
 ndates = dates.ndat;
@@ -64,7 +65,7 @@ for i=1:ndates
     end
     fprintf(fid, 'r');
 end
-fprintf(fid, '}%%\n');
+fprintf(fid, '@{}}%%\n');
 if ~isempty(o.title)
     fprintf(fid, '\\multicolumn{%d}{c}{%s} \\\\\n', ndates+nlhc, o.title);
 end
@@ -136,8 +137,7 @@ for i=1:nvars
     fprintf(fid, ' \\\\\n\n');
 end
 
-fprintf(fid, '\\bottomrule%%\n');
-fprintf(fid, '\\end{tabular}%%\n\n');
-fprintf(fid, '\\medskip\\par\n\n');
+fprintf(fid, '\\bottomrule\n');
+fprintf(fid, '\\end{tabular} \\par \\medskip\n\n');
 fprintf(fid, '%% End Table Object\n');
 end
-- 
GitLab