Why is 'pdflatex -halt-on-error -interaction=batchmode' failing?

  • Context: LaTeX 
  • Thread starter Thread starter sineth
  • Start date Start date
  • Tags Tags
    Failing
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
5 replies · 3K views
sineth
Messages
3
Reaction score
0
Hi,
I am using Matlab, and Dynare to run a model.
I have the following codes to generate the Latex file. My codes were properly working and I generated the pdf file once. Now I cannot re-generate the same pdf file. I get the warning message ('TeX-File did not compile; you need to compile it manually'
Can someone please identify any issues here? I have updated MiKTeX and checked for updates. No issue is found.
My problem is as I have generated the pdf once, do I need to delete the history files or so. Otherwise how to resolve this iissue.
Thanks
Sineth

write_latex_definitions;
write_latex_parameter_table;
write_latex_original_model;
write_latex_dynamic_model;
write_latex_static_model;
write_latex_steady_state_model;
collect_latex_files;

if system(['pdflatex -halt-on-error -interaction=batchmode ' M_.fname '_TeX_binder.tex'])
warning('TeX-File did not compile; you need to compile it manually')
 
Physics news on Phys.org
First i would save the relevant pdf files that worked previously for backup, then delete them and start again.

It may be that some step skipped over generating some intermediary data and read in the old data that a later step determined didn't match up hence the error.

Beyond that there's not much we can do here since there's little to go on unless one of us at PF has encountered this error with a similar project and recall how we fixed it.
 
Reply
  • Like
Likes   Reactions: sineth
Thanks for the reply @jedishrfu. I have tried after deleting all pdf files generated. But get the same error.
 
Rather than
Code:
if system(['pdflatex -halt-on-error -interaction=batchmode ' M_.fname '_TeX_binder.tex'])
    warning('TeX-File did not compile; you need to compile it manually')
why not try
Code:
[status,cmdout] = system(['pdflatex -halt-on-error -interaction=batchmode ' M_.fname '_TeX_binder.tex'])
if status
   disp(cmdout)
and if an error occurs MATLAB will print the actual console output of pdftex, removing the need to rerun it manually in order to diagnose the error.
 
Reply
  • Like
Likes   Reactions: jedishrfu