Tex output - unwanted subscript "t"

Hello,
The Tex output option is extremely useful, made better recently with the addition of the model_local_variable command. Unfortunately, when local parameter definitions thus created are subsequently transferred by Dynare into the equations of the compiled Tex file, they come with a “t” subscript attached. This is by no means critical, but it would be very nice indeed if it were possible to fix this issue so that the output .pdf file eliminates those unwanted subscripts. I have been doing so by hand, but it is extremely tedious!
Many thanks
Donihue

This is not feasible due to the construction of model-local variables. As the name says, they can be true variables and can be lagged or leaded in time. In that case, the time index is actually mandatory. Because Dynare does not know whether a model-local variable only contains static objects or also dynamic objects, the time index is generally put there.

Thanks Prof. Pfeifer,
I was of course aware that the name implied that Dynare would treat these items as variables (hence the “t” subscript). My query was implicitly whether there could be a “model_local_parameter” type of command, which would not then add the subscript.
Regards
Donihue

I am afraid, we currently don’t have the resources to implement this. I agree that it would be convenient, but it’s not critical.

Following up on this, it appears that the latest iteration of Dynare automatically creates the Tex equivalents of anything expressed with # sign within the model, so there is no longer need for the separate “model_local_variable” block.
This is very welcome, but sometimes leads to extremely lengthy and complicated expressions in the Tex output - see for example the output from your SW2007 file.
It would be convenient if there were a way to turn off this automatic expansion (preferably selectively by variable).
Regards
Donihue

This looks like a regression and was not intended as far as I know. @sebastien What do you think?

I don’t understand what is the problem being discussed here. Could you be more specific?

When we defined model-local variables in the past, these objects appeared in the \LaTeX-codes when used in equations. This simplified the code. So when you had

#M=betta*(a(+1)/a)*((C(+1)^eta*(1-N(+1))^(1-eta))/(C^eta*(1-N)^(1-eta)))^((1-siggma)/theta_v)*(C/C(+1))*(V(+1)^(1-siggma)/E_t_V_tp1_1_minus_sigma)^(1-1/theta_v);
1=R_R*M;

as in DSGE_mod/Basu_Bundick_2017.mod at master · JohannesPfeifer/DSGE_mod · GitHub
you got
\begin{align} M &= {\beta}\, \frac{{a_{t+1}}}{{a_{t}}}\, \left(\frac{{{C}_{t+1}}^{{\eta}}\, \left(1-{{N}_{t+1}}\right)^{1-{\eta}}}{{{C}_{t}}^{{\eta}}\, \left(1-{{N}_{t}}\right)^{1-{\eta}}}\right)^{\frac{1-{{\sigma}}}{{{\theta_v}}}}\, \frac{{{C}_{t}}}{{{C}_{t+1}}}\, \left(\frac{{{V}_{t+1}}^{1-{{\sigma}}}}{{{\left({E_t V_{t+1}^{1-\sigma}}\right)}_{t}}}\right)^{1-\frac{1}{{{\theta_v}}}}\\ 1&={{R^R}_{t}}\, {M_{t}} \end{align}

But now the expression for the model-local variable is always plugged in. Thus, you get:
\begin{align} M &= {\beta}\, \frac{{a_{t+1}}}{{a_{t}}}\, \left(\frac{{{C}_{t+1}}^{{\eta}}\, \left(1-{{N}_{t+1}}\right)^{1-{\eta}}}{{{C}_{t}}^{{\eta}}\, \left(1-{{N}_{t}}\right)^{1-{\eta}}}\right)^{\frac{1-{{\sigma}}}{{{\theta_v}}}}\, \frac{{{C}_{t}}}{{{C}_{t+1}}}\, \left(\frac{{{V}_{t+1}}^{1-{{\sigma}}}}{{{\left({E_t V_{t+1}^{1-\sigma}}\right)}_{t}}}\right)^{1-\frac{1}{{{\theta_v}}}}\\ 1&={\beta}\, \frac{{a}_{t+1}}{{a}_{t}}\, \left(\frac{{{C}}_{t+1}^{{\eta}}\, \left(1-{{N}}_{t+1}\right)^{1-{\eta}}}{{{C}}_{t}^{{\eta}}\, \left(1-{{N}}_{t}\right)^{1-{\eta}}}\right)^{\frac{1-{{\sigma}}}{{{\theta_v}}}}\, \frac{{{C}}_{t}}{{{C}}_{t+1}}\, \left(\frac{{{V}}_{t+1}^{1-{{\sigma}}}}{{{\left({E_t V_{t+1}^{1-\sigma}}\right)}}_{t}}\right)^{1-\frac{1}{{{\theta_v}}}}\, {{R^R}}_{t} \end{align}

This is because we now substitute out all model-local variables early in the preprocessor. It remains to be seen whether the old behaviour can be restored for LaTeX output. At the very least, this would require some extra work.

Ideally, we would make a distinction between write_latex_dynamic_model and write_latex_original_model.
For future reference: Restore LaTeX-output for model-local variables for write_latex_original_model (#65) · Issues · Dynare / preprocessor · GitLab

Actually this is not true. Model local variables cannot be given a lead or a lag. I am going to remove the spurious time subscript, as requested by the original poster.

This is also a regression. It was still feasible in 4.5.

I think you are wrong. See preprocessor/ParsingDriver.cc · 4.5 · Dynare / dynare · GitLab

Yes, you are right. My mistake.