I'm using the following LaTeX code within the amsmath
environment in LaTeX (MiKTeX 2.9 and TeXnicCenter under Windows):
Let $f$ represent the resulting number of such two-step cycles that operate per second (expressed in Hz.)
\makebox[0.9\textwidth][c]{
\begin{minipage}{0.45\linewidth}
\begin{equation}
f = \frac{1}{t_{on} + t_{off}} \label{eq:f}
\end{equation}
\end{minipage}
\hspace{0.05\linewidth}
\begin{minipage}{0.45\linewidth}
\begin{equation}
\frac{1}{f} = t_{on} + t_{off} \label{eq:invf}
\end{equation}
\end{minipage}
} \break
The total time required per cycle is the inverse of frequency of those cycles.
My desire is to place two numbered equations (I wouldn't mind learning to also support subequation lettering, but it's not necessary in this case) on the exact same line, with their own equation labels displayed. I am using numbering on the left side, not the right side, for this document and I would like the left equation number of the above pair to line up with the equation number that occurs when I only place a single equation using \begin{equation}
or \begin{align}
. Without the \makebox
part, the numbering does NOT line up. So I pushed it with the \makebox
. It does line up the way I show it above, but I receive multiple "bad box" errors, which I'd like to understand better and possibly remove. Also, I'd like any advice about a better way to do this without having to nudge things with a wrapped box.
I have searched around for a while and tried many different approaches without good success, including \begin{subeqnarray}
and \begin{subequations}
.
Best Answer
Sure, this is not absolutely perfect, but it is very close without going into too much finicky detail about the spacing (click to enlarge):
The generic view on the "two-column look" is
Some highlights:
\noindent
avoids a regular\parindent
(which is a common source of "overfull\hbox
warnings" in this case);minipage
is exactly half the width of the text block (0.5\linewidth
);%
at the end of the firstminipage
is crucial to avoid an extra inter-word space between theminipages
(you only have\linewidth
to work with, not\linewidth
+\space
). See What is the use of percent signs (%
) at the end of lines?The final
\vspace
is to accommodate for an imperfect skip after aminipage
. In fact, this is a known problem that usingminipage
s causes some skip of the baseline to be not ideal. More on this conundrum is available from How to keep a constant\baselineskip
when usingminipage
s (or\parboxes
)?