Hi,
I have a problem and I am not sure what the best approach is to a
solution, so I will just describe it -- I am sure that someone has
encountered it before. Suggestions would be welcome.
When writing equations, I prefer to introduce a layer of indirection in
LaTeX: instead of writing, say, $r+\\sigma$, I prefer to define
\newcommand{\Ndisc}{r} % the discount rate
\newcommand{\Nsep}{\\sigma} % the separation rate
and write $\Ndisc+\Nsep$. This allows flexible redefinition if I want
to change the notation later on.
I want to continue using this style with maxima, and it should be simple
with texput(). But I want to keep using imaxima, which introduces a
complication. Ideally I would just save the definitions in a LaTeX
file, and make imaxima use \input{definitions.tex}. There is
imaxima-latex-preamble, but it is dumped when imaxima is started, so I
would have to set it before I start (i)maxima.
I tried
set_tex_environment_default("$$\\input{definitions.tex}","$$")$
but imaxima (or appears to ignore) ignores the environment.
I could have two sets of texput commands, one for working with imaxima,
one for dumping TeX for direct use, but that is somewhat tedious, for a
lot of definitions.
So I don't know what the best approach is.
Best,
Tamas