I've written a my own little script system for generating homeworks & tests using a database of problems. Below is one particular problem which is giving me a issue for the last option, "d)":
Problem 5. What is the quadratic formula?
a) $${b \pm \sqrt{b^2 - 4ac} \over 2a}$$ \ \ \ \ \ b) $${-b \pm \sqrt{4ac - b^2} \over 2a}$$ \ \ \ \ \ c) $${-b \pm \sqrt{b^2 - 4ac} \over 2a}$$ \ \ \ \ \ \hbox{ d) $${-b \pm \sqrt{4ac - b^2} \over 2}$$ }
The \hbox is always produced by the script, and is there to (normally) keep choices from getting cut into multiple lines -- although in this case I'm making an exception and trying to get a new line just so the equation will be bigger. Anyway, it seems to mess up the "$$", so LaTeX produces the error:
! Missing $ inserted.
<inserted text>
$
l.39 ...over 2a}$$ \ \ \ \ \ \hbox{ d) $${-b \pm
\sqrt{4ac - b^2} \over 2}...
It doesn't seem to matter if I use "$$...$$" or "[...]" or "\begin{equation}...\end{equation}". It does work if I use the single "$...$" construction, but then the result looks too small for my taste.
Can anyone offer a suggestion? I'd like to keep the \hbox{} as a general grouping directive, so my preference would be something that would work inside it.
(Of course, taking out the \hbox{} would work, but as I say this is automatically generated by my script for the entire database and normally I want this behavior. I want to edit this one particular problem, not the entire script...if possible.) Thanks.
$$
at all\displaystyle
into$...$
at the beginning, it will show as if you write inside$$...$$
. But don't use$$
pair anymore. You don't even need\hbox
and shouldn't use\hbox
anyways but that's a different story\begin{equation}
??\begin{equation}
perhaps you are using latex in which case the document should not have$$
, or\hbox
or\over