reporting: new table option vlineAfterEndOfPeriod
parent
4522c011d6
commit
6a9e9dfdea
|
@ -8421,7 +8421,7 @@ Display a solid black line at @math{y = 0}. Default: @code{false}
|
||||||
@end table
|
@end table
|
||||||
@end defmethod
|
@end defmethod
|
||||||
|
|
||||||
@defmethod Report addTable data, showHlines, precision, range, seriesToUse, title, titleSize, vlineAfter, showVlines
|
@defmethod Report addTable data, showHlines, precision, range, seriesToUse, title, titleSize, vlineAfter, vlineAfterEndOfPeriod, showVlines
|
||||||
Adds a @code{Table} to a @code{Section}.
|
Adds a @code{Table} to a @code{Section}.
|
||||||
@optionshead
|
@optionshead
|
||||||
@table @code
|
@table @code
|
||||||
|
@ -8450,6 +8450,10 @@ Title for the table. Default: @code{none}
|
||||||
@item vlineAfter, @code{dynDate}
|
@item vlineAfter, @code{dynDate}
|
||||||
Show a vertical line after the specified date. Default: @code{empty}
|
Show a vertical line after the specified date. Default: @code{empty}
|
||||||
|
|
||||||
|
@item vlineAfterEndOfPeriod, @code{BOOLEAN}
|
||||||
|
Show a vertical line after the end of every period (@i{i.e.} after
|
||||||
|
every year, after the fourth quarter, etc.). Default: @code{false}
|
||||||
|
|
||||||
@item showVlines, @code{BOOLEAN}
|
@item showVlines, @code{BOOLEAN}
|
||||||
Whether or not to show vertical lines separating the columns. Default: @code{false}
|
Whether or not to show vertical lines separating the columns. Default: @code{false}
|
||||||
@end table
|
@end table
|
||||||
|
|
|
@ -39,6 +39,7 @@ o.titleSize = 'large';
|
||||||
o.showHlines = false;
|
o.showHlines = false;
|
||||||
o.showVlines = false;
|
o.showVlines = false;
|
||||||
o.vlineAfter = '';
|
o.vlineAfter = '';
|
||||||
|
o.vlineAfterEndOfPeriod = false;
|
||||||
|
|
||||||
o.data = '';
|
o.data = '';
|
||||||
o.seriesToUse = '';
|
o.seriesToUse = '';
|
||||||
|
@ -87,6 +88,8 @@ assert(isempty(o.vlineAfter) || isa(o.vlineAfter, 'dynDate'), ...
|
||||||
if o.showVlines
|
if o.showVlines
|
||||||
o.vlineAfter = '';
|
o.vlineAfter = '';
|
||||||
end
|
end
|
||||||
|
assert(islogical(o.vlineAfterEndOfPeriod), ...
|
||||||
|
'@table.table: vlineAfterEndOfPeriod must be true or false');
|
||||||
valid_title_sizes = {'Huge', 'huge', 'LARGE', 'Large', 'large', 'normalsize', ...
|
valid_title_sizes = {'Huge', 'huge', 'LARGE', 'Large', 'large', 'normalsize', ...
|
||||||
'small', 'footnotesize', 'scriptsize', 'tiny'};
|
'small', 'footnotesize', 'scriptsize', 'tiny'};
|
||||||
assert(any(strcmp(o.titleSize, valid_title_sizes)), ...
|
assert(any(strcmp(o.titleSize, valid_title_sizes)), ...
|
||||||
|
|
|
@ -55,14 +55,22 @@ fprintf(fid, '\\begin{tabular}{@{}l');
|
||||||
|
|
||||||
for i=1:ndates
|
for i=1:ndates
|
||||||
if o.showVlines
|
if o.showVlines
|
||||||
|
fprintf(fid, 'r|');
|
||||||
|
else
|
||||||
|
fprintf(fid, 'r');
|
||||||
|
if o.vlineAfterEndOfPeriod
|
||||||
|
if dates(i).time(2) == dates(i).freq
|
||||||
fprintf(fid, '|');
|
fprintf(fid, '|');
|
||||||
end
|
end
|
||||||
fprintf(fid, 'r');
|
end
|
||||||
if ~isempty(o.vlineAfter)
|
if ~isempty(o.vlineAfter)
|
||||||
if dates(i) == o.vlineAfter
|
if dates(i) == o.vlineAfter
|
||||||
|
if ~(o.vlineAfterEndOfPeriod && dates(i).time(2) == dates(i).freq)
|
||||||
fprintf(fid, '|');
|
fprintf(fid, '|');
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
fprintf(fid, '@{}}%%\n');
|
fprintf(fid, '@{}}%%\n');
|
||||||
if ~isempty(o.title)
|
if ~isempty(o.title)
|
||||||
|
|
Loading…
Reference in New Issue