Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dynare
reporting
Commits
3cc756ee
Commit
3cc756ee
authored
Jul 03, 2015
by
Houtan Bastani
Browse files
add header option to report class
parent
18de5a2b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/@report/report.m
View file @
3cc756ee
...
...
@@ -13,7 +13,7 @@ function o = report(varargin)
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2013-201
4
Dynare Team
% Copyright (C) 2013-201
5
Dynare Team
%
% This file is part of Dynare.
%
...
...
@@ -42,6 +42,7 @@ o.fileName = 'report.tex';
o
.
showDate
=
true
;
o
.
compiler
=
''
;
o
.
showOutput
=
true
;
o
.
header
=
''
;
if
nargin
==
1
assert
(
isa
(
varargin
{
1
},
'report'
),
[
'@report.report: with one arg, '
...
...
...
@@ -75,7 +76,7 @@ assert(ischar(o.compiler), '@report.report: compiler file must be a string');
assert
(
islogical
(
o
.
showDate
),
'@report.report: showDate must be either true or false'
);
assert
(
islogical
(
o
.
showOutput
),
'@report.report: showOutput must be either true or false'
);
assert
(
isfloat
(
o
.
margin
)
&&
o
.
margin
>
0
,
'@report.report: margin must be a float > 0.'
);
assert
(
ischar
(
o
.
header
),
'@report.report: header must be a string'
);
valid_margin_unit
=
{
'cm'
,
'in'
};
assert
(
any
(
strcmp
(
o
.
marginUnit
,
valid_margin_unit
)),
...
[
'@report.report: marginUnit must be one of '
strjoin
(
valid_margin_unit
,
' '
)]);
...
...
src/@report/write.m
View file @
3cc756ee
...
...
@@ -72,6 +72,9 @@ fprintf(fid, '\\renewcommand{\\bottomfraction}{0.8}\n');
fprintf
(
fid
,
'\\setlength{\\parindent}{0in}\n'
);
fprintf
(
fid
,
'\\setlength{\\tabcolsep}{1em}\n'
);
fprintf
(
fid
,
'\\newlength\\sectionheight\n'
);
if
~
isempty
(
o
.
header
)
fprintf
(
fid
,
'%s\n'
,
o
.
header
);
end
fprintf
(
fid
,
'\\begin{document}\n'
);
if
isunix
&&
~
ismac
fprintf
(
fid
,
'\\pgfdeclarelayer{axis background}\n'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment