# How do you end the "over" command?

I am trying to write something similar to $\frac{a}{b} more words$ but using over (manim requires that it must be with over) but when writing $a\over b more words$ the "more words" appear in the denominator.

How can this issue be solved?

• We can answer here, but there is a reason LaTeX uses \frac not \over: why must you use the latter? Jul 9, 2020 at 16:22
• for programming mathematical animations Jul 9, 2020 at 16:23
• That's too vague. Why must you use \over? \frac will help you avoid all sorts of strange occurrences like you've just found. Jul 9, 2020 at 16:27
• yes but it is said (and I've seen some examples) that manim (the math animation tool) encounters even stranger occurences when using \frac Jul 9, 2020 at 16:30

Well the solution is simply using { } brackets like so: {a \over b} some words
• That is actually not sufficient in the general case. When using \over you should always write {{a} \over {b}}. Jul 9, 2020 at 20:33
• @DonHosek The \frac macro adds \begingroup and \endgroup around the first argument, because local assignments in it might spill to the denominator. Oct 26, 2021 at 8:27
• @DonHosek Example: $a\let\x\relax\over b\show\x$. Without the grouping, something like \frac{\bf a}{b} would have both letters in boldface. Now \bf is deprecated, I know, but that's the rationale for adding the group. Oct 26, 2021 at 10:17
• That seems a bit questionable—both the use case and the effect. It carries with it an implication that in general for a command with two arguments that an assignment in the first argument would not be carried over to the second argument which is not going to be true in general. And to consider this a common enough situation that one should always write {{a}\over{b}} seems dubious. Oct 26, 2021 at 21:50