Adding a math type fraction to a note when using CL


I am stuck on what is probably a simple solution. I would like for my Note to include a fraction when a certain option is selected from a Choice. I cannot seem to get a fraction to show up.

For example, within part of my code I have

when a=1 "Here is an example of a polynomial function:

`f(x)=(1/8)x^3-2x`` " Note, I don’t have two ’ at the end, but the post was converting it

Is it possible to make the 1/8 show up in math type/latex? I’ve tried using \frac{1}{8} with no luck.



Simple fix: you need two backslashes in desmos rather than the usual one.

1 Like

Yep! That did it! Thank you!!


I am having a similar problem but mine is coming from pulling the fraction out of a student response. The response we are looking for is 1/2x+3 but when I pull the input (input5.latex) and drop it into the content sink its displaying as \frac{1}{2}x+3. What am I missing here?


That sounds like you are on the right track. I think this is what you are looking for.


I am having a similar issue where I am pulling from a graph expression. Even when typed as a fraction in the graph expression, e.g. P=4/3, the note displays its decimal equivalent.

content: “Drag the green point to identify the number ${Graph1.number(“P”)}. Then, click the button see how close you are!”

Thank you for any help!


I think the note will always display as a decimal the way you described, but there could be a workaround. Maybe someone else has a better way, but here’s my thoughts.

One thing to try would be to have two separate equations in the graph component, such as N=4 and D=3? Then in the note, try:

content: "Drag the green point to identify the number\frac${graph1.number(“N”)}${graph1.number(“D”)}. Then, click the button see how close you are!"`

I can’t get that to format properly, so here’s the example:


Hmmm. I do like that work around; thank you! I am making an activity for grade 6, where I would like for the teacher to be able to input the number in the graph portion with minimal knowledge of the CL, definitely without going into the CL. So, I could use this for any screens that use fractions, and my version for decimals and integers. Not as clean on the back end as I would hope, but front end works rather well! Thank you! :+1:t3:


I just noticed something weird. If either the numerator or denominator is negative, the Note does not display well; it only seems to take the first character of the value of either N or D and moves the rest after the fraction bar. I changed the inputs to become random, and might include a third random variables that takes a value of either 1 or -1 and use the product to see if that works!


This is a pretty brittle example so use with extreme care: fractions? • Activity Builder by Desmos

Some things you should know:

  1. It simplifies the input (which might not be a problem if you’re using a value from the graph)
  2. it’ll work on fractions that can simplify to a denominator of 100 or less (and might have some cases where it doesn’t even do that).

So… I’m getting there, and at this point I think it is time to share my activity. No issues on screens one and 2 where students are asked to plot an integer or a decimal.

On Screen 3, I have it pretty good, but only if the fraction has an initial numerator and denominator of an integer between 1 and 9 (no multi-digit, no negative). Both of those mess things up a bit when the note displays the fractions. This has turned out to be one of the more demanding (fun) activities I’ve created :smiley: and any further help would be appreciated!

Ordering and Comparing Rational Numbers • Activity Builder by Desmos