From dec9c3a315eb344460295df456820781fc96c8dd Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Tue, 11 Jun 2013 17:11:48 +0200 Subject: [PATCH] reporting: search for pdflatex.exe on windows --- matlab/reports/@report/compile.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/matlab/reports/@report/compile.m b/matlab/reports/@report/compile.m index 5547ac2a2..60ba0c4d0 100755 --- a/matlab/reports/@report/compile.m +++ b/matlab/reports/@report/compile.m @@ -59,9 +59,9 @@ if isempty(compiler) system(['PATH=$PATH:/usr/texbin:/usr/local/bin:/usr/local/sbin;' ... 'which pdflatex'], echo); elseif strcmp(computer, 'PCWIN') || strcmp(computer, 'PCWIN64') - error(['@report.compile: On Windows machines, you must explicitly ' ... - 'provide the ''compiler'' option or set the compiler ' ... - 'variable in the Report class']); + [status, compiler] = system('findtexmf --file-type=exe pdflatex', echo); + middle = ' '; + compiler = ['"' strtrim(compiler) '"']; else % gnu/linux [status, compiler] = system('which pdflatex', echo); end