Artem
May 27, 2024, 8:23am
1
Hi, all! I’m new here, but I need help with the Latex PDF tool. I created my DSGE model, now I’m moving on to its implementation in Dynare. I’m watching Willi Mutschler’s video (https://www.youtube.com/watch?v=ZfsKGzR84hQ&list=PLiN_C6lGtCc8bhPOuE781GTgeOqtMA5Bi ) and I don’t understand why when I enter the command
if system(['/Library/TeX/texbin/pdflatex -halt-on-error -interaction=batchmode ’ M_.fname ‘_TeX_binder.tex’])
warning(‘TeX-File did not compile; you need to compile it manually’)
end
on my Windows 10 I have an error like “The system cannot find the specified path.” Moreover, in the left window “Current Folder” Willi Mutschler get more files than me after starting the code, although I enter the appropriate commands
write_latex_definitions;
write_latex_parameter_table;
write_latex_original_model;
write_latex_dynamic_model;
write_latex_static_model;
collect_latex_files;
If I remove this command, it is not clear where the PDF file is saved:
You most likely have to adjust your path from
On most Windows machines it should be just
if system(['pdflatex -halt-on-error -interaction=batchmode ' M_.fname ' _TeX_binder.tex'])```
1 Like
Artem
May 27, 2024, 8:45am
3
But in this case I get a new error ““pdflatex” is not an internal or external command, executable program or batch file”
Do you have a \LaTeX distribution like MikTeX installed?
1 Like
Then there is a problem with the path variable. Try opening the _binder.tex
file in your \LaTeX editor and compiling it there.
1 Like
Artem
June 1, 2024, 8:28am
7
What does this error mean?
The only way to know that is to have the file or for yourself to check out the compilation error message when you run the file in your \LaTeX editor.
1 Like
Artem
June 5, 2024, 8:30am
9
I have this problem in MikTeX
Artem
June 5, 2024, 8:33am
10
Could you please run my code (working on version 5.4) and see if the equations are written in latex or not?
first_variant.mod (15.3 KB)
You need to define valid \LaTeX names. For example \P
is not a valid name as there is no such command. It must be simply P_{SS}
.
Artem
June 5, 2024, 9:15am
12
Here I just tried to compile the _binder.tex file (generated by Dynare) in Miktex, and I got the following error. I didn’t write anything manually myself.
Yes, but in your mod-file you set
PSS ${\P_{SS}}$ (long_name='Steady-State level of price (DLOG price level)')
The name within the dollar signs is not a correct \LaTeX name as mentioned above. That applies to several others as well.
Artem
June 5, 2024, 9:36am
14
Like this? or without {}?
PSS {\P_{SS}} (long_name='Steady-State level of price (DLOG price level)')
No:
PSS ${P_{SS}}$ (long_name='Steady-State level of price (DLOG price level)')
1 Like
Artem
June 5, 2024, 10:25am
16
That’s it, I understand that the "" needed for Greek symbols, for example, for lambda, but not for ordinary letters (like P), right?
Artem
June 5, 2024, 10:34am
17
Finally everything worked, thank you!) The problem was in the way I wrote down the variables in Latex, and not in Dynare)
first_variant_TeX_binder.pdf (177.3 KB)