Aligning two adjacent numbered equations central to the vertical, and the horizontal
What's messing up your first, minipage
-based solution is an inappropriate choice of widths. Also, don't use the [t]
location specifiers for the minipage
environments -- you want both equations centered vertically on the =
symbols, right?
Also, note that I replaced {\rm{ln}}
with \ln
.
\documentclass{article}
\renewcommand\vec[1]{\mathbf{#1}}
\usepackage{amsmath} % for "\numberwithin" macro
\numberwithin{equation}{section} % optional
\begin{document}
\setcounter{section}{2} % just for this example
\noindent % <-- new
\begin{minipage}{.4\linewidth} % <-- new
\begin{equation}
\vec{B}_{\mathrm{trap}}(\vec{J}_c, \vec{r}) =
k \mu_o \vec{J}_c \hat{\vec{r}}
\end{equation}
\end{minipage}\hfill
\begin{minipage}{.5\linewidth}
\begin{equation}
k = \frac{t}{2a}\ln\biggl( \frac{a}{t} +
\sqrt{1 + \Bigl( \frac{a}{t}\Bigr)^{\!2}}\, \biggr)
\end{equation}
\end{minipage}
\end{document}