reporting: @table: allow control of title font size

remove-priordens
Houtan Bastani 2013-04-03 11:37:19 +02:00
parent ee7f2fb7d0
commit d0be97c4e4
2 changed files with 8 additions and 1 deletions

View File

@ -34,6 +34,7 @@ o = struct;
o.seriesElements = seriesElements();
o.title = '';
o.title_size = 'large';
o.footnote = '';
o.config = '';
@ -85,6 +86,11 @@ assert(isempty(o.data) || isa(o.data, 'dynSeries'), ['@table.table: data must '
assert(isempty(o.seriestouse) || iscellstr(o.seriestouse), ['@table.table: ' ...
'seriestouse must be a cell array of string(s)']);
valid_title_sizes = {'Huge', 'huge', 'LARGE', 'Large', 'large', 'normalsize', ...
'small', 'footnotesize', 'scriptsize', 'tiny'};
assert(any(strcmp(o.title_size, valid_title_sizes)), ...
['@table.table: title_size must be one of ' strjoin(valid_title_sizes, ' ')]);
% using o.seriestouse, create series objects and put them in o.seriesElements
if ~isempty(o.data)
if isempty(o.seriestouse)

View File

@ -62,7 +62,8 @@ for i=1:ndates
end
fprintf(fid, '@{}}%%\n');
if ~isempty(o.title)
fprintf(fid, '\\multicolumn{%d}{c}{%s} \\\\\n', ndates+nlhc, o.title);
fprintf(fid, '\\multicolumn{%d}{c}{\\%s %s}\\\\\n', ...
ndates+nlhc, o.title_size, o.title);
end
fprintf(fid, '\\toprule%%\n');