Another question about tex output.



On 7/7/07, Robert Dodier <robert.dodier at gmail.com> wrote:

> I've attached a patch to cut out the special case for ":="
> so function definitions are displayed as formulas.
> That's heavy-handed but I don't see a better way to do it
> given the organization of the TeX output code.

For the record, one way to resolve this problem is to inspect
the main operator of an expression for some new property,
say TEX-ENVIRONMENT, and enclose the TeX-ified expression
in that. The environment would default to $$ if not specified.
This inspection would be carried out by TEX1 in src/mactex.lisp.

At present there are 2 special cases in TEX1 (functions and
%i inputs). Everything else gets $$. I can imagine a couple
of other special cases for which the TEX-ENVIRONMENT
property could be assigned, e.g. paragraph("foo bar baz") =>
no enclosing environment so content is treated as plain text;
document(<stuff>) => enclosing <stuff> in \begin{document}
\end{document}. Maybe there are others.

At the moment I don't feel strongly enough about this to go ahead
and do anything about it. I'll be interested to hear any comments.

Robert