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
Dóra Kocsis
dynare
Commits
58a583c2
Commit
58a583c2
authored
Jun 11, 2013
by
Houtan Bastani
Browse files
reporting: fix echo command in system searches for pdflatex
parent
6ff4d5cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
matlab/reports/@report/compile.m
100644 → 100755
View file @
58a583c2
...
...
@@ -46,18 +46,24 @@ if ~exist(o.filename, 'file')
o
.
write
();
end
middle
=
'./'
;
if
exist
(
'OCTAVE_VERSION'
)
echo
=
0
;
else
echo
=
'-echo'
;
end
if
isempty
(
compiler
)
if
strncmp
(
computer
,
'MACI'
,
4
)
||
~
isempty
(
regexpi
(
computer
,
'.*apple.*'
,
'once'
))
% Add most likely places for pdflatex to exist outside of default $PATH
[
status
,
compiler
]
=
...
system
([
'PATH=$PATH:/usr/texbin:/usr/local/bin:/usr/local/sbin;'
...
'which pdflatex'
],
'-
echo
'
);
'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'
]);
else
% gnu/linux
[
status
,
compiler
]
=
system
(
'which pdflatex'
,
'-
echo
'
);
[
status
,
compiler
]
=
system
(
'which pdflatex'
,
echo
);
end
assert
(
status
==
0
,
...
'@report.compile: Could not find a tex compiler on your system'
);
...
...
@@ -65,11 +71,7 @@ if isempty(compiler)
o
.
compiler
=
compiler
;
end
if
exist
(
'OCTAVE_VERSION'
)
status
=
system
([
compiler
' ./'
o
.
filename
],
0
);
else
status
=
system
([
compiler
' ./'
o
.
filename
],
'-echo'
);
end
status
=
system
([
compiler
middle
o
.
filename
],
echo
);
[
junk
,
rfn
,
junk
]
=
fileparts
(
o
.
filename
);
if
status
~=
0
...
...
Write
Preview
Supports
Markdown
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