I'm basically brand new to Latex, so maybe this has a really simple answer I'm not seeing, but I'm having a problem where \frac isn't putting my first input over the numerator but instead to the side of the fraction.
the code looks like this
$\limi a_n=\limi \frac{1}{2} $
but it ends up looking like this
It's worth noting that \limi
is a custom command I made with code
\newcommand{\limi}{$\lim\limits_{n\to\infty}$}
In addition, If I change \frac
to be \tfrac
or \dfrac
it works just fine
Ex.
$\limi a_n=\limi \dfrac{1}{2} $
And last thing I've noticed is that if I delete my \limi
command it fixes the problem, and \frac
works like normal. So I'm guessing that it has something to do with my command code, but I can't figure out what's causing it. Help would be very much appreciated.
P.S.(I know that this equation doesn't make any sense, I changed the fraction to test the code, and so it would be easier to see)
$
from your definition, you are already in math mode so\limi
does not need to start math mode