diff --git a/matlab/reporting/@table/table.m b/matlab/reporting/@table/table.m index 7eca19d9a3eef7eac4074c44133b6f99f3f997e7..9b29833fe240ac2bad23246e31f16e35ff56b030 100644 --- a/matlab/reporting/@table/table.m +++ b/matlab/reporting/@table/table.m @@ -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) diff --git a/matlab/reporting/@table/write.m b/matlab/reporting/@table/write.m index 1a879835ad1cfed1e6a4b21933481d05c794aa7d..c12348afe6244f2721515867d0429d5aad92a64c 100644 --- a/matlab/reporting/@table/write.m +++ b/matlab/reporting/@table/write.m @@ -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');