Matlab function for Latex equations

Dear Forum,

I cannot find, which matlab functions dynare uses to write the latex equations? can you please point to the function or functions that do this job? It should typically loop through all equations and do fprintf with LaTeX commands like \begin{dmath}.

The \LaTeX equation output is produced by the preprocessor not by Matlab codes.