diff --git a/doc/dynare.texi b/doc/dynare.texi index 36fe141ff..211176fe1 100644 --- a/doc/dynare.texi +++ b/doc/dynare.texi @@ -10722,7 +10722,7 @@ Whether or not to show vertical lines separating the columns. Default: @code{fal @end defmethod @anchor{addSeries} -@defmethod Report addSeries data, graphLineColor, graphLineStyle, graphLineWidth, graphMarker, graphMarkerEdgeColor, graphMarkerFaceColor, graphMarkerSize, tableDataRhs, tableRowColor, tableShowMarkers, tableAlignRight, tableNegColor, tablePosColor, tableSubSectionHeader, zerotol +@defmethod Report addSeries data, graphLineColor, graphLineStyle, graphLineWidth, graphMarker, graphMarkerEdgeColor, graphMarkerFaceColor, graphMarkerSize, tableDataRhs, tableRowColor, tableRowIndent, tableShowMarkers, tableAlignRight, tableNegColor, tablePosColor, tableSubSectionHeader, zerotol Adds a @code{Series} to a @code{Graph} or a @code{Table}. @optionshead @table @code @@ -10762,6 +10762,10 @@ followed by annual data. Default: @code{empty} The color that you want the row to be. Predefined values include @code{LightCyan} and @code{Gray}. Default: @code{white}. +@item tableRowIndent, @code{INTEGER} +The number of times to indent the name of the series in the +table. Used to create subgroups of series. Default: @code{0} + @item tableShowMarkers, @code{BOOLEAN} In a Table, if @code{true}, surround each cell with brackets and color it according to @ref{tableNegColor} and @ref{tablePosColor}. No effect diff --git a/matlab/reports/@report_series/report_series.m b/matlab/reports/@report_series/report_series.m index 086043515..a06a159b3 100644 --- a/matlab/reports/@report_series/report_series.m +++ b/matlab/reports/@report_series/report_series.m @@ -53,6 +53,7 @@ o.tableSubSectionHeader = ''; o.tableAlignRight = false; o.tableRowColor = 'white'; +o.tableRowIndent = 0; o.tableDataRhs = ''; diff --git a/matlab/reports/@report_series/write.m b/matlab/reports/@report_series/write.m index fe3512d78..9b132e480 100644 --- a/matlab/reports/@report_series/write.m +++ b/matlab/reports/@report_series/write.m @@ -56,6 +56,7 @@ end assert(ischar(o.tableNegColor), '@report_series.write: tableNegColor must be a string'); assert(ischar(o.tablePosColor), '@report_series.write: tablePosColor must be a string'); assert(ischar(o.tableRowColor), '@report_series.write: tableRowColor must be a string'); +assert(isint(o.tableRowIndent), '@report_series.write: tableRowIndent must be an integer'); assert(islogical(o.tableShowMarkers), '@report_series.write: tableShowMarkers must be true or false'); assert(islogical(o.tableAlignRight), '@report_series.write: tableAlignRight must be true or false'); assert(isfloat(o.tableMarkerLimit), '@report_series,write: tableMarkerLimit must be a float'); @@ -73,7 +74,14 @@ end if o.tableAlignRight fprintf(fid, '\\multicolumn{1}{r}{'); end -fprintf(fid, '%s', o.data.tex{:}); +if o.tableRowIndent == 0 + fprintf(fid, '\\noindent'); +else + for i=1:o.tableRowIndent + fprintf(fid,'\\indent'); + end +end +fprintf(fid, ' %s', o.data.tex{:}); if o.tableAlignRight fprintf(fid, '}'); end diff --git a/matlab/reports/@report_table/write.m b/matlab/reports/@report_table/write.m index 4d74bb462..446117f46 100644 --- a/matlab/reports/@report_table/write.m +++ b/matlab/reports/@report_table/write.m @@ -50,6 +50,7 @@ end ndates = dates.ndat; fprintf(fid, '%% Report_Table Object\n'); +fprintf(fid, '\\setlength{\\parindent}{6pt}\n'); fprintf(fid, '\\setlength{\\tabcolsep}{4pt}\n'); fprintf(fid, '\\begin{tabular}{@{}l'); @@ -156,7 +157,7 @@ for i=1:ne end fprintf(fid, '\\bottomrule\n'); -fprintf(fid, '\\end{tabular} \\par \\medskip\n\n'); +fprintf(fid, '\\end{tabular}\\setlength{\\parindent}{0pt}\n \\par \\medskip\n\n'); fprintf(fid, '%% End Report_Table Object\n'); fprintf(1, '.'); end diff --git a/tests/reporting/CountryTablePage.m b/tests/reporting/CountryTablePage.m index 94903ca43..06ce66ea5 100644 --- a/tests/reporting/CountryTablePage.m +++ b/tests/reporting/CountryTablePage.m @@ -62,7 +62,7 @@ for i=1:length(seriesNames) deltaa = delta.tex_rename('$\Delta$'); rep = rep.addSeries('data', delta, ... 'tableShowMarkers', true, ... - 'tableAlignRight', true, ... + 'tableRowIndent', 2, ... 'tableDataRhs', deltaa); end end