On Wed, 27 Aug 2003, Randal L. Schwartz wrote:
> Franco> Moreover, the database of question is dynamically generated using
> Franco> tt2 (I mean: I write parametric questions and then generate a bunch of
> Franco> them according with parameters), so I'm content with tt2 syntax (with my
> Franco> extensions, especially for allowing a latex syntax for computations,
> Franco> since latex is the only known computer language here).
>
> I don't follow all this. But I'm not a mathematician by training.
> Heck, I'm not much of anything by formal training. :)
Here is a fragment of a question:
A fly is closed in a cylindric container of radius $R=[%R%]~\centi\metre$
and height $H=[%H%]~\centi\metre$.
Which is the largest distance it can travel without turning?
[%
ans = {
right => '\sqrt{4 R^2 + H^2}',
wrong => ....
} %]
but now I have to print '\sqrt{4 R^2 + H^2}' in the formal solution (for
checking and for giving students the solution) and I also need the numeric
value of '\sqrt{4 R^2 + H^2}' for the multiple choice quiz.
I used to keep two versions: the latex and the perl one, but it was a mess
to keep them in sync, so I wrote a latex2perl translator (rather rough but
working).
--
Franco Bagnoli (franchino) <[EMAIL PROTECTED]> ([EMAIL PROTECTED])
virtual location: Dipartimento di Energetica "S. Stecco"
real location: Dip. Matematica Applicata "G. Sansone", Universita' Firenze,
Via S. Marta, 3 I-50139 Firenze, Italy. Tel. +39 0554796422, fax: +39 055471787
GPG Key fingerprint = 169D 9EA5 8FD3 7EDA E43A 9830 255F BCEC 0D63 3728
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates