[LON-CAPA-users] Evaluation of variable in tex mode

Guy Albertelli II lon-capa-users@mail.lon-capa.org
Wed, 1 Oct 2003 14:48:51 -0400 (EDT)


Hi Hon-Kie,

> > > <m>$x$</m> should work (and do does <em>x</em> )
> 
> I tried <m>$x$</m> but it also is replaced by $x variable in the tex target 
> but not in the web!! This is on a development server.

This is definately incorrect operation, I'll fix this.
http://bugs.loncapa.org/show_bug.cgi?id=2254

> >But this does bring up a more interesting question, should <display>
> >(and <tex>/<web>) be doing what it is doing here, meaning it is
> >currently doing the variable value replacement on the results of the
> ><display>, <tex> and <web> tags.
> 
> I have been trying to avoid the <display>, <tex> and <web> tags for brand 
> new problems but these are from translated problems.
> 
> 
> >Should it be doing this? (I can make it stop, but I am not sure it is
> >a good idea.)
> >
> >Is anyone using this effect?
> >
> >Is anyone annoyed by this effect?
> 
> It messes up the translated problems and manually changing them runs the 
> risk of introducing mistakes. Do you see any reason to replace the tex 
> argument with the variable?

<tex>crosses the \(x\)-axis at $x</tex>

> ><display>$x=4;&tex('$x$','x')</display> should this put out 4$ or $x$
> >in the tex file?
> 
> I vote for $x$.
>

Michael Hamlin said:
> So if someone really wants no variable interpolation, they can do
>   <display eval="off">&tex('$x$','x')</display>


I think for <display> it is pretty clear it shouldn't be doing this
post-processing. It would be confusing to have any kind of double eval
like this take place, and I can't think of a single good usage for it.


Does anyone not want this default behaviour changed? (I'd really hate
to make the common usage (which I think off would and should be) to
require more typing)

-- 
guy@albertelli.com  LON-CAPA Developer  0-7-5-6-