필터 지우기
필터 지우기

Excute Latex file via Matlab

조회 수: 36 (최근 30일)
Diana Dawoud
Diana Dawoud 2022년 9월 18일
답변: Diana Dawoud 2022년 9월 20일
I need to run a .tex file via Matlab and I'm using the following commands,
I'm using MacOS Big Sur, and I'm getting the following error: status: 127 cmdout='zsh:1:command not found;
command = 'pdflatex fileID.tex';
[status,cmdout] = system(command)
  댓글 수: 9
Jan
Jan 2022년 9월 19일
You get this as output of the which command in the terminal:
/Library/TeX/texbin/pdflatex
Then you try this:
setenv('PATH', [getenv('PATH') ':~/Library/TeX/texbin/pdflatex']);
% ^
Why do you use the home directory here?
Is this the executable: "/Library/TeX/texbin/pdflatex" ? Then why do you add the name of the executable to the path? Shouldn't it be the flder only "/Library/TeX/texbin/"?
Diana Dawoud
Diana Dawoud 2022년 9월 19일
편집: Diana Dawoud 2022년 9월 19일
The result of echo $PATH is wrong and I need to reset. I tried setenv('PATH', [getenv('PATH') ':~/Library/TeX/texbin/pdflatex']); but it did not work

댓글을 달려면 로그인하십시오.

답변 (1개)

Diana Dawoud
Diana Dawoud 2022년 9월 20일
After trying all the codes avilable online, the only solution that worked for me is to set the path as in
command = '/Library/TeX/texbin/pdflatex fileID.tex';

카테고리

Help CenterFile Exchange에서 LaTeX에 대해 자세히 알아보기

태그

제품


릴리스

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by