Another question about tex output.



> This stuff is implemented by introducing a new property,
> TEX-ENVIRONMENT, which specifies the TeX environment
> if present, and otherwise *TEX-ENVIRONMENT-DEFAULT* is
> assumed. TEX-ENVIRONMENT is assigned to a few symbols
> (only MDEFINE, MDEFMACRO, and MLABLE at present
> because these were treated specially by TEX1 already).
>
> The user interface to maintain TEX-ENVIRONMENT comprises these functions:
> get_tex_environment_default ()
> set_tex_environment_default (env_open, env_close)
> get_tex_environment (x)
> set_tex_environment (x, env_open, env_close)
>
> Comments?
>
> best
> Robert Dodier
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>   

Hi Robert and all,

I think these simple commands would have solved a significant number of
problems that I've hacked my way around in the past.  As one who has
advocated a few changes, (albeit without offering any help), I'd be
pleased to see these committed.

How would these handle the following scenarios?

foo(x):=x$
tex('foo(x)=foo(x))$

Ideally, this would output:

$$\mathrm{foo}\left(x\right)=x$$

or similar based on the above environment.

Also, what about doing:
texput(foo(x),"\alpha\left(x\right)")$
foo(x):=x$
tex('foo(x)=foo(x))$

By intent, this would output:

$$\alpha\left(x\right)=x$$

Is this possible?  I've wanted to do this many times.  Someone (I
believe Robert) offered a workaround a few months ago which I've used a
few times, but I see this as a more natural way to report a definition
into my tex file without confusing non-maxima readers with a colon. 
Most of my output that goes into tex format is for general consumption. 
It does not require (perhaps should not have) a maxima like structure. 
Are these conflicting requests?

Thanks again,

Pete