Commit ed5f2a8b authored by Houtan Bastani's avatar Houtan Bastani
Browse files

reporting: @section: check user input

parent 5715dea1
...@@ -21,7 +21,6 @@ function o = section(varargin) ...@@ -21,7 +21,6 @@ function o = section(varargin)
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
o = struct; o = struct;
o.align = 't';
o.elements = elements(); o.elements = elements();
o.cols = 1; o.cols = 1;
...@@ -50,6 +49,9 @@ elseif nargin > 1 ...@@ -50,6 +49,9 @@ elseif nargin > 1
end end
end end
% Check options provided by user
assert(isint(o.cols), '@graph.graph: cols must be an integer');
% Create section object % Create section object
o = class(o, 'section'); o = class(o, 'section');
end end
...@@ -31,7 +31,6 @@ function o = write(o, fid) ...@@ -31,7 +31,6 @@ function o = write(o, fid)
assert(fid ~= -1); assert(fid ~= -1);
fprintf(fid, '%% Section Object\n'); fprintf(fid, '%% Section Object\n');
%fprintf(fid, '\\begin{table}[%shtpb]%%\n', o.align);
fprintf(fid, ' \\vspace{15px}\n'); fprintf(fid, ' \\vspace{15px}\n');
fprintf(fid, '\\centering\n'); fprintf(fid, '\\centering\n');
fprintf(fid, '\\noindent\\maxsizebox{\\textwidth}{!}{%%\n'); fprintf(fid, '\\noindent\\maxsizebox{\\textwidth}{!}{%%\n');
...@@ -52,6 +51,5 @@ end ...@@ -52,6 +51,5 @@ end
fprintf(fid, '\\end{tabular}%%\n'); fprintf(fid, '\\end{tabular}%%\n');
fprintf(fid, '}%%\n'); fprintf(fid, '}%%\n');
%fprintf(fid, '\\end{table}%%\n');
fprintf(fid, '%% End Section Object\n\n'); fprintf(fid, '%% End Section Object\n\n');
end end
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment