Main Latex output code in a separate folder

Dear Forum,

Is there a way to get the main .tex file in a separate folder than where the .mod file is stored? The issue is whenever I compile the main .tex file, it generates pdfs and other log files in the same folder where the original .mod file is and therefore makes the entire folder very clumsy. I know some workarounds like changing paths in the latex file and storing it in the latex output file but I am looking for something more permanent solution i.e. within dynare itself.

No, that is not feasible because the include-commands in \LaTeX can only access subfolders but not move upwards. That was the reason we had to keep the main \LaTeX -file at the top level. See Discuss moving all mod-file output to folder `M_.dname` (#1758) · Issues · Dynare / dynare · GitLab

So basically, main .tex file cannot be saved along with other tex files of tables and results in the ‘latex’ subfolder under the main folder which saves all the outputs, is that correct?

Unfortunately, yes.

Thank you Prof. Pfeifer for the confirmation.