# initialLatex in Math answer box

**URL:** <https://cl.desmos.com/t/initiallatex-in-math-answer-box/3598>\
**Category:** Questions\
**Created:** [August 19, 2021, 5:19pm UTC](https://cl.desmos.com/t/initiallatex-in-math-answer-box/3598 "2021-08-19T17:19:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![StoyanNYC](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/stoyannyc/32/2967_2.png) [@StoyanNYC](https://cl.desmos.com/u/StoyanNYC)\
**Post date:** [August 19, 2021, 5:19pm UTC](https://cl.desmos.com/t/initiallatex-in-math-answer-box/3598/1 "2021-08-19T17:19:25Z")

</div>

Here is a copy of my activity. It is designed to give different feedback depending on whether or not a student got the right answer. The right answer is 16 and that is specified in the CL. However, regardless of what answer is given, the screen responds with the feedback for a wrong answer. It appears that the initialLatex is the issue because if I remove it, the screen works fine. However, I’d like to have that initial text in the answer box. Is there a way to correct the issue?

> **[Desmos Question • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/611e91e19f96770722e9a83c)**
>
> by Stoyan Stoyanov

---

<div class="post-metadata">

**Author:** ![C\_Harper](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/c_harper/32/1526_2.png) [@C\_Harper](https://cl.desmos.com/u/C_Harper)\
**Post date:** [August 19, 2021, 5:37pm UTC](https://cl.desmos.com/t/initiallatex-in-math-answer-box/3598/2 "2021-08-19T17:37:45Z")

</div>

My suggestion would be to turn your student response area into a table and put your initial text in one box and leave the box next to it open for student response. You can do this by clicking the 3 dots to change the direction of the table. I’d love to see other options though.

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [August 19, 2021, 5:57pm UTC](https://cl.desmos.com/t/initiallatex-in-math-answer-box/3598/3 "2021-08-19T17:57:30Z")

</div>

You can use parseEquation for this situation:

```auto
check= numericValue( parseEquation(this.latex).rhs )=16
correct: check

```

This basically takes the latex entry as an equation and checks the numericValue of the right hand side.  
Then use mi7.script.check for hiding/displaying your notes.

---

<div class="post-metadata">

**Author:** ![StoyanNYC](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/stoyannyc/32/2967_2.png) [@StoyanNYC](https://cl.desmos.com/u/StoyanNYC)\
**Post date:** [August 19, 2021, 6:12pm UTC](https://cl.desmos.com/t/initiallatex-in-math-answer-box/3598/4 "2021-08-19T18:12:20Z")

</div>

This worked like a dream! Thank you so much!

---

<div class="post-metadata">

**Author:** ![StoyanNYC](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/stoyannyc/32/2967_2.png) [@StoyanNYC](https://cl.desmos.com/u/StoyanNYC)\
**Post date:** [August 19, 2021, 6:13pm UTC](https://cl.desmos.com/t/initiallatex-in-math-answer-box/3598/5 "2021-08-19T18:13:04Z")

</div>

That is a great idea for certain types of screens I am working on. Thank you!!

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [August 25, 2021, 11:40pm UTC](https://cl.desmos.com/t/initiallatex-in-math-answer-box/3598/6 "2021-08-25T23:40:48Z")

</div>

I realize after the fact that using numericValue for something like “16x” will return 16, so to make it more accurate:

```auto
ans=simpleFunction(parseEquation(this.latex).rhs)
check= ans.evaluateAt(0)=16 and ans.evaluateAt(1)=16
correct: check

```

Here, I’m instead turning the right hand side into a function, which should always evaluate to 16 (i.e. y=16), whereas “y=16x” would vary.

---

<div class="post-metadata">

**Author:** ![StoyanNYC](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/stoyannyc/32/2967_2.png) [@StoyanNYC](https://cl.desmos.com/u/StoyanNYC)\
**Post date:** [August 26, 2021, 6:29pm UTC](https://cl.desmos.com/t/initiallatex-in-math-answer-box/3598/7 "2021-08-26T18:29:27Z")

</div>

That’s great. It’s a way of checking for equivalent expressions. That is very helpful

---

<div class="post-metadata">

**Author:** ![StoyanNYC](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/stoyannyc/32/2967_2.png) [@StoyanNYC](https://cl.desmos.com/u/StoyanNYC)\
**Post date:** [October 10, 2021, 10:06pm UTC](https://cl.desmos.com/t/initiallatex-in-math-answer-box/3598/8 "2021-10-10T22:06:34Z")

</div>

> [@Daniel\_Grubbs](#):
>
> ```auto
> ans=simpleFunction(parseEquation(this.latex).rhs)
> check= ans.evaluateAt(0)=16 and ans.evaluateAt(1)=16
> correct: check
> 
> ```

Follow up question. The script works beautifully when the initialLatex incorporates variables or, say Greek letters, that are recognized in the Graphing Calculator. It works if the initial latex is a word, like “Expression=”… BUT, it does not work if I use a different symbol, like a capital Greek Letter, or an emoji in the initial latex, like “5🔱=”. Is there a reason why that is? Technically, when we specify rhs, the only expression of interest is to the right of the equal sign.

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [October 11, 2021, 4:24pm UTC](https://cl.desmos.com/t/initiallatex-in-math-answer-box/3598/9 "2021-10-11T16:24:09Z")

</div>

I believe that if you’d get an error typing it into the calculator, parseEquation( ) will just get an error. It has to be a valid equation (as far as the calculator is concerned) to be parsed in the first place.

---

<div class="post-metadata">

**Author:** ![Lucyjane\_Flint](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/lucyjane_flint/32/4359_2.png) [@Lucyjane\_Flint](https://cl.desmos.com/u/Lucyjane_Flint)\
**Post date:** [May 25, 2023, 1:44pm UTC](https://cl.desmos.com/t/initiallatex-in-math-answer-box/3598/10 "2023-05-25T13:44:55Z")

</div>

i dont know how to work it
