reporting: @table: allow control of title font size
parent
ee7f2fb7d0
commit
d0be97c4e4
|
@ -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)
|
||||
|
|
|
@ -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');
|
||||
|
||||
|
|
Loading…
Reference in New Issue