Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Dynare
reporting
Commits
3daf35d3
Verified
Commit
3daf35d3
authored
Aug 27, 2019
by
Houtan Bastani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
convert to classdef. closes
#10
closes
#9
parent
240b6f57
Changes
81
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
75 changed files
with
1406 additions
and
2275 deletions
+1406
-2275
.gitlab-ci.yml
.gitlab-ci.yml
+0
-1
Makefile
Makefile
+2
-2
initialize_reporting_toolbox.m
initialize_reporting_toolbox.m
+0
-34
src/@graph/addSeries.m
src/@graph/addSeries.m
+13
-2
src/@graph/graph.m
src/@graph/graph.m
+215
-214
src/@graph/subsasgn.m
src/@graph/subsasgn.m
+0
-49
src/@graph/subsref.m
src/@graph/subsref.m
+0
-53
src/@graph/write.m
src/@graph/write.m
+5
-5
src/@graph/writeGraphFile.m
src/@graph/writeGraphFile.m
+18
-18
src/@page/addData.m
src/@page/addData.m
+11
-8
src/@page/addGraph.m
src/@page/addGraph.m
+11
-8
src/@page/addParagraph.m
src/@page/addParagraph.m
+10
-14
src/@page/addSection.m
src/@page/addSection.m
+7
-8
src/@page/addSeries.m
src/@page/addSeries.m
+11
-8
src/@page/addTable.m
src/@page/addTable.m
+35
-0
src/@page/addVspace.m
src/@page/addVspace.m
+11
-8
src/@page/page.m
src/@page/page.m
+117
-99
src/@page/subsasgn.m
src/@page/subsasgn.m
+0
-46
src/@page/subsref.m
src/@page/subsref.m
+0
-48
src/@page/write.m
src/@page/write.m
+6
-7
src/@paragraph/paragraph.m
src/@paragraph/paragraph.m
+76
-57
src/@paragraph/subsasgn.m
src/@paragraph/subsasgn.m
+0
-50
src/@paragraph/subsref.m
src/@paragraph/subsref.m
+0
-48
src/@paragraph/write.m
src/@paragraph/write.m
+2
-2
src/@report/addData.m
src/@report/addData.m
+5
-15
src/@report/addGraph.m
src/@report/addGraph.m
+5
-8
src/@report/addPage.m
src/@report/addPage.m
+1
-1
src/@report/addParagraph.m
src/@report/addParagraph.m
+5
-8
src/@report/addSection.m
src/@report/addSection.m
+5
-5
src/@report/addSeries.m
src/@report/addSeries.m
+4
-15
src/@report/addTable.m
src/@report/addTable.m
+3
-6
src/@report/addVspace.m
src/@report/addVspace.m
+3
-6
src/@report/report.m
src/@report/report.m
+105
-86
src/@report/subsasgn.m
src/@report/subsasgn.m
+0
-46
src/@report/subsref.m
src/@report/subsref.m
+0
-48
src/@report/write.m
src/@report/write.m
+1
-2
src/@report_data/display.m
src/@report_data/display.m
+0
-32
src/@report_data/printData.m
src/@report_data/printData.m
+1
-1
src/@report_data/report_data.m
src/@report_data/report_data.m
+74
-70
src/@report_data/subsasgn.m
src/@report_data/subsasgn.m
+0
-42
src/@report_data/subsref.m
src/@report_data/subsref.m
+0
-46
src/@report_data/writeDataForTable.m
src/@report_data/writeDataForTable.m
+2
-2
src/@report_series/display.m
src/@report_series/display.m
+0
-32
src/@report_series/report_series.m
src/@report_series/report_series.m
+115
-109
src/@report_series/subsasgn.m
src/@report_series/subsasgn.m
+0
-42
src/@report_series/subsref.m
src/@report_series/subsref.m
+0
-46
src/@report_series/writeSeriesForGraph.m
src/@report_series/writeSeriesForGraph.m
+6
-6
src/@report_series/writeSeriesForTable.m
src/@report_series/writeSeriesForTable.m
+3
-3
src/@report_table/addData.m
src/@report_table/addData.m
+12
-1
src/@report_table/addSeries.m
src/@report_table/addSeries.m
+13
-2
src/@report_table/display.m
src/@report_table/display.m
+0
-32
src/@report_table/report_table.m
src/@report_table/report_table.m
+211
-118
src/@report_table/subsasgn.m
src/@report_table/subsasgn.m
+0
-45
src/@report_table/subsref.m
src/@report_table/subsref.m
+0
-46
src/@report_table/write.m
src/@report_table/write.m
+5
-5
src/@report_table/writeTableFile.m
src/@report_table/writeTableFile.m
+7
-8
src/@section/addData.m
src/@section/addData.m
+14
-14
src/@section/addGraph.m
src/@section/addGraph.m
+7
-8
src/@section/addParagraph.m
src/@section/addParagraph.m
+7
-10
src/@section/addSeries.m
src/@section/addSeries.m
+39
-0
src/@section/addTable.m
src/@section/addTable.m
+7
-8
src/@section/addVspace.m
src/@section/addVspace.m
+6
-6
src/@section/display.m
src/@section/display.m
+0
-32
src/@section/section.m
src/@section/section.m
+79
-53
src/@section/subsasgn.m
src/@section/subsasgn.m
+0
-50
src/@section/subsref.m
src/@section/subsref.m
+0
-48
src/@section/write.m
src/@section/write.m
+3
-3
src/@vspace/display.m
src/@vspace/display.m
+0
-32
src/@vspace/subsasgn.m
src/@vspace/subsasgn.m
+0
-49
src/@vspace/subsref.m
src/@vspace/subsref.m
+0
-48
src/@vspace/vspace.m
src/@vspace/vspace.m
+70
-60
src/areParensNext.m
src/areParensNext.m
+0
-26
src/display_reporting_object.m
src/display_reporting_object.m
+0
-95
src/initialize_reporting_toolbox.m
src/initialize_reporting_toolbox.m
+28
-0
test/AnnualTable.m
test/AnnualTable.m
+10
-10
No files found.
.gitlab-ci.yml
View file @
3daf35d3
before_script
:
-
git clone https://git.dynare.org/Dynare/dynare.git
-
git clone https://git.dynare.org/Dynare/dseries.git
testsuite_matlab
:
...
...
Makefile
View file @
3daf35d3
...
...
@@ -5,7 +5,7 @@ all: check-octave check-matlab
check-octave
:
@
cd test
;
\
$(OCTAVE)
--silent
--no-history
runtest
.m
&&
[
-f
report.pdf
]
$(OCTAVE)
--no-init-file
--silent
--no-history
--eval
"addpath([pwd() '/../dseries/src']); addpath([pwd() '/../src']);
runtest
;"
&&
[
-f
report.pdf
]
check-matlab
:
@
$(MATLAB)
-nosplash
-nodisplay
-r
"cd test; runtest; quit"
&&
[
-f
test
/report.pdf
]
@
$(MATLAB)
-nosplash
-nodisplay
-r
"
addpath dseries/src; addpath src;
cd test; runtest; quit"
&&
[
-f
test
/report.pdf
]
initialize_reporting_toolbox.m
deleted
100644 → 0
View file @
240b6f57
% Script to set the necessary paths for the Reporting toolbox
% Copyright (C) 2015-2017 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
% Find reporting source directory
reporting_src_root
=
[
strrep
(
which
(
'initialize_reporting_toolbox'
),
'initialize_reporting_toolbox.m'
,
''
)
'src'
];
% Add path to reporting source
addpath
(
reporting_src_root
);
addpath
([
reporting_src_root
filesep
'..'
filesep
'macros'
]);
% Reminder to add and initialize dates & dseries toolboxes
if
~
exist
(
'emptydatesobject'
,
'var'
)
disp
(
'Remember to add the paths to the dates toolbox before working with the reporting toolbox'
);
end
if
~
exist
(
'emptydseriesobject'
,
'var'
)
disp
(
'Remember to add the paths to the dseries toolbox before working with the reporting toolbox'
);
end
src/@graph/addSeries.m
View file @
3daf35d3
function
o
=
addSeries
(
o
,
varargin
)
% function o = addSeries(o, varargin)
%function o = addSeries(o, varargin)
% Add a series
%
% INPUTS
% o [graph] graph object
% varargin arguments to report_series()
%
% OUTPUTS
% updated section object
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2013-201
5
Dynare Team
% Copyright (C) 2013-201
9
Dynare Team
%
% This file is part of Dynare.
%
...
...
src/@graph/graph.m
View file @
3daf35d3
This diff is collapsed.
Click to expand it.
src/@graph/subsasgn.m
deleted
100644 → 0
View file @
240b6f57
function
B
=
subsasgn
(
A
,
S
,
V
)
% function B = subsasgn(A, S, V)
% Copyright (C) 2013-2017 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
B
=
A
;
if
length
(
S
)
>
1
for
i
=
1
:(
length
(
S
)
-
1
)
B
=
subsref
(
B
,
S
(
i
));
end
B
=
subsasgn
(
B
,
S
(
end
),
V
);
B
=
subsasgn
(
A
,
S
(
1
:(
end
-
1
)),
B
);
return
end
switch
S
.
type
case
'()'
index
=
S
.
subs
{:};
assert
(
isnumeric
(
index
));
B
.
series
{
index
}
=
V
;
case
'.'
switch
S
.
subs
case
fieldnames
(
A
)
B
.
(
S
.
subs
)
=
V
;
otherwise
error
([
'@graph.subsasgn: field '
S
.
subs
'does not exist'
]);
end
case
'{}'
assert
(
isint
(
S
.
subs
{
1
}));
B
{
S
.
subs
{
1
}}
=
V
;
otherwise
error
(
'@graph.subsasgn: syntax error'
);
end
end
\ No newline at end of file
src/@graph/subsref.m
deleted
100644 → 0
View file @
240b6f57
function
A
=
subsref
(
A
,
S
)
%function A = subsref(A, S)
% Copyright (C) 2013-2017 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
switch
S
(
1
)
.
type
case
'.'
switch
S
(
1
)
.
subs
case
fieldnames
(
A
)
A
=
A
.
(
S
(
1
)
.
subs
);
case
methods
(
A
)
if
areParensNext
(
S
)
A
=
feval
(
S
(
1
)
.
subs
,
A
,
S
(
2
)
.
subs
{:});
S
=
shiftS
(
S
,
1
);
else
A
=
feval
(
S
(
1
)
.
subs
,
A
);
end
otherwise
error
([
'@graph.subsref: unknown field or method: '
S
(
1
)
.
subs
]);
end
case
'()'
if
isempty
(
S
(
1
)
.
subs
{:})
A
=
A
.
series
;
else
assert
(
isnumeric
(
S
(
1
)
.
subs
{:}));
A
=
A
.
series
{
S
(
1
)
.
subs
{:}};
end
case
'{}'
A
=
A
.
series
{
S
(
1
)
.
subs
{:}};
otherwise
error
(
'@graph.subsref: impossible case'
)
end
S
=
shiftS
(
S
,
1
);
if
length
(
S
)
>=
1
A
=
subsref
(
A
,
S
);
end
end
src/@graph/write.m
View file @
3daf35d3
function
o
=
write
(
o
,
fid
,
pg
,
sec
,
row
,
col
)
%function
o =
write(o, fid, pg, sec, row, col)
function
write
(
o
,
fid
,
pg
,
sec
,
row
,
col
)
%function write(o, fid, pg, sec, row, col)
% Write a Graph object
%
% INPUTS
...
...
@@ -16,7 +16,7 @@ function o = write(o, fid, pg, sec, row, col)
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2013-201
5
Dynare Team
% Copyright (C) 2013-201
9
Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -34,6 +34,6 @@ function o = write(o, fid, pg, sec, row, col)
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
assert
(
fid
~=
-
1
);
o
=
writeGraphFile
(
o
,
pg
,
sec
,
row
,
col
);
fprintf
(
fid
,
'\\input{%s}'
,
o
.
graphName
);
graphName
=
writeGraphFile
(
o
,
pg
,
sec
,
row
,
col
);
fprintf
(
fid
,
'\\input{%s}'
,
graphName
);
end
\ No newline at end of file
src/@graph/writeGraphFile.m
View file @
3daf35d3
function
o
=
writeGraphFile
(
o
,
pg
,
sec
,
row
,
col
)
%function
o
= writeGraphFile(o, pg, sec, row, col)
function
graphName
=
writeGraphFile
(
o
,
pg
,
sec
,
row
,
col
)
%function
graphName
= writeGraphFile(o, pg, sec, row, col)
% Write the tikz file that contains the graph
%
% INPUTS
...
...
@@ -10,7 +10,7 @@ function o = writeGraphFile(o, pg, sec, row, col)
% col [integer] this col number
%
% OUTPUTS
%
o [graph] graph object
%
graphName [string] name of graph written
%
% SPECIAL REQUIREMENTS
% none
...
...
@@ -35,16 +35,16 @@ function o = writeGraphFile(o, pg, sec, row, col)
ne
=
length
(
o
.
series
);
if
ne
<
1
warning
(
'@graph.writeGraphFile: no series to plot, returning'
);
return
;
return
end
if
isempty
(
o
.
graphName
)
o
.
graphName
=
sprintf
(
'%s/graph_pg%d_sec%d_row%d_col%d.tex'
,
o
.
graphDirName
,
pg
,
sec
,
row
,
col
);
graphName
=
sprintf
(
'%s/graph_pg%d_sec%d_row%d_col%d.tex'
,
o
.
graphDirName
,
pg
,
sec
,
row
,
col
);
else
o
.
graphName
=
[
o
.
graphDirName
'/'
o
.
graphName
];
graphName
=
[
o
.
graphDirName
'/'
o
.
graphName
];
end
[
fid
,
msg
]
=
fopen
(
o
.
graphName
,
'w'
);
[
fid
,
msg
]
=
fopen
(
graphName
,
'w'
);
if
fid
==
-
1
error
([
'@graph.writeGraphFile: '
msg
]);
end
...
...
@@ -301,17 +301,17 @@ for i=1:ne
o
.
series
{
i
}
.
writeSeriesForGraph
(
fid
,
dd
,
i
);
if
o
.
writeCSV
csvseries
=
[
csvseries
...
o
.
series
{
i
}
.
data
(
dd
)
.
set_names
([
...
o
.
series
{
i
}
.
data
.
name
{:}
'_'
...
o
.
series
{
i
}
.
graphLegendName
'_'
...
o
.
series
{
i
}
.
graphLineColor
'_'
...
o
.
series
{
i
}
.
graphLineStyle
'_'
...
num2str
(
o
.
series
{
i
}
.
graphLineWidth
)
'_'
...
o
.
series
{
i
}
.
graphMarker
'_'
...
o
.
series
{
i
}
.
graphMarkerEdgeColor
'_'
...
o
.
series
{
i
}
.
graphMarkerFaceColor
'_'
...
num2str
(
o
.
series
{
i
}
.
graphMarkerSize
)])
...
];
o
.
series
{
i
}
.
data
(
dd
)
.
set_names
([
...
o
.
series
{
i
}
.
data
.
name
{:}
'_'
...
o
.
series
{
i
}
.
graphLegendName
'_'
...
o
.
series
{
i
}
.
graphLineColor
'_'
...
o
.
series
{
i
}
.
graphLineStyle
'_'
...
num2str
(
o
.
series
{
i
}
.
graphLineWidth
)
'_'
...
o
.
series
{
i
}
.
graphMarker
'_'
...
o
.
series
{
i
}
.
graphMarkerEdgeColor
'_'
...
o
.
series
{
i
}
.
graphMarkerFaceColor
'_'
...
num2str
(
o
.
series
{
i
}
.
graphMarkerSize
)])
...
];
end
if
o
.
showLegend
le
=
o
.
series
{
i
}
.
getNameForLegend
();
...
...
src/@
report/display
.m
→
src/@
page/addData
.m
View file @
3daf35d3
function
display
(
o
)
%function
display(o
)
%
Display a Report object
function
o
=
addData
(
o
,
varargin
)
%function
o = addData(o, varargin
)
%
Add a series
%
% INPUTS
% o [report] report object
% o [page] page object
% varargin arguments to report_data()
%
% OUTPUTS
%
none
%
updated section object
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 201
3-2015
Dynare Team
% Copyright (C) 201
9
Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -28,5 +29,7 @@ function display(o)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
display_reporting_object
(
o
);
end
\ No newline at end of file
assert
(
~
isempty
(
o
.
sections
),
...
'@page.addData: Before adding data, you must add a section.'
);
o
.
sections
{
end
}
.
addData
(
varargin
{:});
end
src/@
graph/display
.m
→
src/@
page/addGraph
.m
View file @
3daf35d3
function
display
(
o
)
%function
display(o
)
%
Display a Graph object
function
o
=
addGraph
(
o
,
varargin
)
%function
o = addGraph(o, varargin
)
%
Add a report_table
%
% INPUTS
% o [graph] graph object
% o [page] page object
% varargin arguments to graph()
%
% OUTPUTS
%
none
%
updated section object
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 201
3-2015
Dynare Team
% Copyright (C) 201
9
Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -28,5 +29,7 @@ function display(o)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
display_reporting_object
(
o
);
end
\ No newline at end of file
assert
(
~
isempty
(
o
.
sections
),
...
'@page.addGraph: Before adding a graph, you must add a section.'
);
o
.
sections
{
end
}
.
addGraph
(
varargin
{:});
end
src/
allCellsAreDates
.m
→
src/
@page/addParagraph
.m
View file @
3daf35d3
function
tf
=
a
llCellsAreDates
(
dcell
)
%function
tf
= a
llCellsAreDates(dcell
)
%
Determines if all the elements of dcell are dates object
s
function
o
=
a
ddParagraph
(
o
,
varargin
)
%function
o
= a
ddParagraph(o, varargin
)
%
Add a serie
s
%
% INPUTS
% dcell cell of dates objects
% o [page] page object
% varargin arguments to paragraph()
%
% OUTPUTS
%
tf true if every entry of dcell is a dates
object
%
updated section
object
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 201
4-2015
Dynare Team
% Copyright (C) 201
9
Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -28,12 +29,7 @@ function tf = allCellsAreDates(dcell)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
assert
(
iscell
(
dcell
));
tf
=
true
;
for
i
=
1
:
length
(
dcell
)
if
~
isdates
(
dcell
{
i
})
tf
=
false
;
return
;
end
assert
(
~
isempty
(
o
.
sections
),
...
'@page.addParagraph: Before adding a paragraph, you must add a section.'
);
o
.
sections
{
end
}
.
addParagraph
(
varargin
{:});
end
end
\ No newline at end of file
src/@page/addSection.m
View file @
3daf35d3
function
p
=
addSection
(
p
,
varargin
)
%function
p
= addSection(
p
, varargin)
% Add a section
to the Cell Array of sections in the report
function
o
=
addSection
(
o
,
varargin
)
%function
o
= addSection(
o
, varargin)
% Add a section
%
% INPUTS
% 1 args => add empty section
% 2 args => add given section
% 3 args => add section at index
% o [page] page object
% varargin arguments to section()
%
% OUTPUTS
% updated page object
...
...
@@ -13,7 +12,7 @@ function p = addSection(p, varargin)
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2013-201
5
Dynare Team
% Copyright (C) 2013-201
9
Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -30,5 +29,5 @@ function p = addSection(p, varargin)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
p
.
sections
{
end
+
1
}
=
section
(
varargin
{:});
o
.
sections
{
end
+
1
}
=
section
(
varargin
{:});
end
src/@page/
display
.m
→
src/@page/
addSeries
.m
View file @
3daf35d3
function
display
(
o
)
%function
display(o
)
%
Display a Page object
function
o
=
addSeries
(
o
,
varargin
)
%function
o = addSeries(o, varargin
)
%
Add a series
%
% INPUTS
% o [page] page object
% o [page] page object
% varargin arguments to report_series()
%
% OUTPUTS
%
none
%
updated section object
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 201
3-2015
Dynare Team
% Copyright (C) 201
9
Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -28,5 +29,7 @@ function display(o)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
display_reporting_object
(
o
);
end
\ No newline at end of file
assert
(
~
isempty
(
o
.
sections
),
...
'@page.addSeries: Before adding a series, you must add a section.'
);
o
.
sections
{
end
}
.
addSeries
(
varargin
{:});
end
src/@page/addTable.m
0 → 100644
View file @
3daf35d3
function
o
=
addTable
(
o
,
varargin
)
%function o = addTable(o, varargin)
% Add a report_table
%
% INPUTS
% o [page] page object
% varargin arguments to report_table()
%
% OUTPUTS
% updated section object
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2019 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
assert
(
~
isempty
(
o
.
sections
),
...
'@page.addTable: Before adding a table, you must add a section.'
);
o
.
sections
{
end
}
.
addTable
(
varargin
{:});
end
src/@pa
ragraph/display
.m
→
src/@pa
ge/addVspace
.m
View file @
3daf35d3
function
display
(
o
)
%function
display(o
)
%
Display a Paragraph object
function
o
=
addVspace
(
o
,
varargin
)
%function
o = addVspace(o, varargin
)
%
Add a vspace
%
% INPUTS
% o [paragraph] paragraph object
% o [page] page object
% varargin arguments to vspace()
%
% OUTPUTS
%
none
%
updated section object
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 201
4-2015
Dynare Team
% Copyright (C) 201
9
Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -28,5 +29,7 @@ function display(o)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
display_reporting_object
(
o
);
end
\ No newline at end of file
assert
(
~
isempty
(
o
.
sections
),
...
'@page.addVspace: Before adding a vspace, you must add a section.'
);
o
.
sections
{
end
}
.
addVspace
(
varargin
{:});
end
src/@page/page.m
View file @
3daf35d3
function
o
=
page
(
varargin
)
%function o = page(varargin)
% Page Class Constructor
%
% INPUTS
% 0 args => empty page
% 1 arg (page class) => copy object
%
% OUTPUTS
% none
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2013-2017 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
o
=
struct
;
o
.
paper
=
''
;
o
.
title
=
{
''
};
titleFormatDefalut
=
{
'\large\bfseries'
};
o
.
titleFormat
=
titleFormatDefalut
;
o
.
titleTruncate
=
''
;
o
.
orientation
=
''
;
o
.
footnote
=
{};
o
.
sections
=
{};
o
.
pageDirName
=
'tmpRepDir'
;
o
.
latex
=
''
;
if
nargin
==
1
assert
(
isa
(
varargin
{
1
},
'page'
),
[
'@page.page: with one arg to Page '
...
'constructor, you must pass a page object'
]);
o
=
varargin
{
1
};
return
;
elseif
nargin
>
1
if
round
(
nargin
/
2
)
~=
nargin
/
2
error
([
'@page.page: options must be supplied in name/value '
...
'pairs.'
]);
classdef
page
<
handle
% page Class
%
% Copyright (C) 2013-2019 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
properties
(
Access
=
private
,
Constant
=
true
)
titleFormatDefalut
=
{
'\large\bfseries'
}
end
optNames
=
fieldnames
(
o
);