reporting: @report: add compiler option to compile() as alternative method to pass compiler information
parent
b0ea699799
commit
01f1474c56
|
@ -1,9 +1,11 @@
|
|||
function o = compile(o)
|
||||
function o = compile(o, varargin)
|
||||
%function o = compile(o)
|
||||
% Compile Report Object
|
||||
%
|
||||
% INPUTS
|
||||
% o [report] report object
|
||||
% o [report] report object
|
||||
% varargin [char] allows user to change report compiler for a
|
||||
% given run of compile.
|
||||
%
|
||||
% OUTPUTS
|
||||
% o [report] report object
|
||||
|
@ -28,11 +30,22 @@ function o = compile(o)
|
|||
% You should have received a copy of the GNU General Public License
|
||||
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
assert(length(varargin) == 0 || length(varargin) == 2, ...
|
||||
'@report.compile: calling form: compiler, ''/path/to/compiler''.');
|
||||
if length(varargin) == 2
|
||||
assert(ischar(varargin{1}) && strcmp(lower(varargin{1}), 'compiler'), ...
|
||||
'@report.compile: ''compiler'' is the only option.');
|
||||
assert(ischar(varargin{2}), ...
|
||||
'@report.compile: the argument to ''compiler'' must be a char');
|
||||
compiler = varargin{2};
|
||||
else
|
||||
compiler = o.compiler;
|
||||
end
|
||||
|
||||
if ~exist(o.filename, 'file')
|
||||
o.write();
|
||||
end
|
||||
|
||||
compiler = o.compiler;
|
||||
if isempty(compiler)
|
||||
if strcmp(computer, 'MACI') || strcmp(computer, 'MACI64')
|
||||
% Add most likely places for pdflatex to
|
||||
|
|
Loading…
Reference in New Issue