STACK input of compound symbols

STACK input of compound symbols

by Martin Kraska -
Number of replies: 5

I am wondering how students could input  expressions like this:


The particular challenge is delta phi (a virtual displacement). An option would be "delta(phi)" but that looks like dirac delta. 

The ddot phi could be input as diff(phi, t, 2) , yet a bit cumbersome.

Average of ratings: -
In reply to Martin Kraska

Re: STACK input of compound symbols

by Christopher Sangwin -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Martin,
You can use

texput(deltaphi,"{\\delta\\phi}");
in the question variables to create a new token deltaphi.  The teacher can then use this everywhere as a single token.  But, we currently have no way for such a token to be carried over to the inputs, so students can't use it currently.  For good reasons, the question variables are separate to the inputs.  This is something to discuss for the future.  I think Matti may have thought about this already.

Chris

In reply to Christopher Sangwin

Re: STACK input of compound symbols

by Martin Kraska -
Thanks for the explanation. Indeed my problem was what to offer to the students as input options in such cases. I could live with some code/abbreviation, but it should display in the intended original way in the validation.
In reply to Martin Kraska

Re: STACK input of compound symbols

by Christopher Sangwin -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Martin,

I've released some modifications in STACK 4.3.8 (yesterday) which means any texput statements in the question variables also affect the inputs, so you can now define such compound symbols.

Chris