diff --git a/matlab/reporting/src/@report/write.m b/matlab/reporting/src/@report/write.m index fe96dcf87..3e0b10661 100644 --- a/matlab/reporting/src/@report/write.m +++ b/matlab/reporting/src/@report/write.m @@ -105,6 +105,14 @@ end if fid_document == -1 error(['@report.write: ' msg]); end + +if ~isempty(o.title) + fprintf(fid_document, ['\\begin{titlepage}\n\\centering\n' ... + '\\vspace*{0.5cm}\n\\huge\\bfseries\n%s\n' ... + '\\vspace*{\\fill}\n\\end{titlepage}\n\\clearpage\n'], ... + o.title); +end + if isunix && ~ismac fprintf(fid_document, '\\pgfdeclarelayer{axis background}\n'); fprintf(fid_document, '\\pgfdeclarelayer{axis lines}\n'); diff --git a/matlab/reporting/test/createReport.m b/matlab/reporting/test/createReport.m index 402a2267b..2f165eb0d 100644 --- a/matlab/reporting/test/createReport.m +++ b/matlab/reporting/test/createReport.m @@ -34,7 +34,7 @@ longNames = {'Coca Cola', 'Kinder Bueno', 'Pizza', ... 'Vegetarianism Is Good', 'OS X', 'Dothraki'}; %% Begin Report -rep = report('directory', 'my/report/dir'); +rep = report('directory', 'my/report/dir', 'title', 'Report Title'); %% Page 1: GDP