From c09f1d02d0b2d28399de632b4d8f40f68153c488 Mon Sep 17 00:00:00 2001 From: Houtan Bastani <houtan@dynare.org> Date: Fri, 15 Mar 2013 17:34:34 +0100 Subject: [PATCH] reporting: @section: check user input --- matlab/reporting/@section/section.m | 4 +++- matlab/reporting/@section/write.m | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/matlab/reporting/@section/section.m b/matlab/reporting/@section/section.m index 2e3f0972bc..19f9aefd5d 100644 --- a/matlab/reporting/@section/section.m +++ b/matlab/reporting/@section/section.m @@ -21,7 +21,6 @@ function o = section(varargin) % along with Dynare. If not, see <http://www.gnu.org/licenses/>. o = struct; -o.align = 't'; o.elements = elements(); o.cols = 1; @@ -50,6 +49,9 @@ elseif nargin > 1 end end +% Check options provided by user +assert(isint(o.cols), '@graph.graph: cols must be an integer'); + % Create section object o = class(o, 'section'); end diff --git a/matlab/reporting/@section/write.m b/matlab/reporting/@section/write.m index 4848ad8302..be439c43e2 100644 --- a/matlab/reporting/@section/write.m +++ b/matlab/reporting/@section/write.m @@ -31,7 +31,6 @@ function o = write(o, fid) assert(fid ~= -1); fprintf(fid, '%% Section Object\n'); -%fprintf(fid, '\\begin{table}[%shtpb]%%\n', o.align); fprintf(fid, ' \\vspace{15px}\n'); fprintf(fid, '\\centering\n'); fprintf(fid, '\\noindent\\maxsizebox{\\textwidth}{!}{%%\n'); @@ -52,6 +51,5 @@ end fprintf(fid, '\\end{tabular}%%\n'); fprintf(fid, '}%%\n'); -%fprintf(fid, '\\end{table}%%\n'); fprintf(fid, '%% End Section Object\n\n'); end \ No newline at end of file -- GitLab