Skip to content
Snippets Groups Projects
Verified Commit f2fd7524 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

allow for the removal of headers and footers from a given page. closes #15

parent 3d67c983
Branches
No related tags found
No related merge requests found
...@@ -33,6 +33,7 @@ classdef page < handle ...@@ -33,6 +33,7 @@ classdef page < handle
pageDirName = 'tmpRepDir' % The name of the folder in which to store this page. Only used when the latex command is passed. Default: tmpRepDir. pageDirName = 'tmpRepDir' % The name of the folder in which to store this page. Only used when the latex command is passed. Default: tmpRepDir.
latex = '' % The valid LATEX code to be used for this page. Alows the user to create a page to be included in the report by passing LATEX code directly. Default: empty. latex = '' % The valid LATEX code to be used for this page. Alows the user to create a page to be included in the report by passing LATEX code directly. Default: empty.
setPageNumber = '' % If true, reset the page number counter. Default: false. setPageNumber = '' % If true, reset the page number counter. Default: false.
removeHeaderAndFooter = false % Removes the header and footer from this page. Default: false.
end end
methods methods
function o = page(varargin) function o = page(varargin)
...@@ -114,6 +115,8 @@ classdef page < handle ...@@ -114,6 +115,8 @@ classdef page < handle
'@page.page: sections is not a valid option'); '@page.page: sections is not a valid option');
assert(isempty(o.setPageNumber) || isint(o.setPageNumber), ... assert(isempty(o.setPageNumber) || isint(o.setPageNumber), ...
'@page.page: setPageNumber must be an integer'); '@page.page: setPageNumber must be an integer');
assert(islogical(o.removeHeaderAndFooter), ...
'@page.page: removeHeaderAndFooter must be boolean');
end end
end end
methods (Hidden = true) methods (Hidden = true)
......
...@@ -35,6 +35,9 @@ fprintf(fid, '\n%% Page Number %d written %s\n', pg, datestr(now)); ...@@ -35,6 +35,9 @@ fprintf(fid, '\n%% Page Number %d written %s\n', pg, datestr(now));
if ~isempty(o.setPageNumber) if ~isempty(o.setPageNumber)
fprintf(fid, '\\setcounter{page}{%d}\n', o.setPageNumber); fprintf(fid, '\\setcounter{page}{%d}\n', o.setPageNumber);
end end
if o.removeHeaderAndFooter
fprintf(fid, '\\thispagestyle{empty}\n');
end
if strcmpi(o.orientation, 'landscape') if strcmpi(o.orientation, 'landscape')
fprintf(fid, '\\begin{landscape}\n'); fprintf(fid, '\\begin{landscape}\n');
end end
......
...@@ -149,7 +149,8 @@ rep = CommResidTablePage(rep, db_q, dc_q, trange, dates('2012q2')); ...@@ -149,7 +149,8 @@ rep = CommResidTablePage(rep, db_q, dc_q, trange, dates('2012q2'));
%% Commodities Graphs %% Commodities Graphs
%Page 24 %Page 24
rep.addPage('title', 'Jan1 vs Jan2', ... rep.addPage('title', 'Jan1 vs Jan2', ...
'titleFormat', '\large\bfseries'); 'titleFormat', '\large\bfseries', ...
'removeHeaderAndFooter', true);
rep.addSection('height', '0.475\textheight'); rep.addSection('height', '0.475\textheight');
rep.addGraph('title', {'World Real Oil Price Index','SUBTITLE'}, ... rep.addGraph('title', {'World Real Oil Price Index','SUBTITLE'}, ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment