我在一个盒子里有以下数学方程式代码:
\begin{framed}
\begin{align*}
&C_\star \rightarrow E_\star : &x=3\dfrac{5\phi^2+24\phi+12v+24}{\phi^2}, &y=108\dfrac{-\phi^3+5\phi^2+2\phi v+12\phi+4v+8}{\phi^3}\\
&E_\star \rightarrow C_\star : &\phi=12\dfrac{6-x}{6x-y-198}, &v=2\dfrac{x^3-18x^2+3267x-324y-71658}{x^3+36x^2-12xy-5643x+396y+84834}
\end{align*}
\end{framed}
答案1
加倍 & 符号可得到所需的结果:
\documentclass{article}
\usepackage{amsmath}
\usepackage{framed}
\begin{document}
\begin{framed}
\begin{align*}
&C_\star \rightarrow E_\star : &&x=3\dfrac{5\phi^2+24\phi+12v+24}{\phi^2}, &&y=108\dfrac{-\phi^3+5\phi^2+2\phi v+12\phi+4v+8}{\phi^3}\\
&E_\star \rightarrow C_\star : &&\phi=12\dfrac{6-x}{6x-y-198}, &&v=2\dfrac{x^3-18x^2+3267x-324y-71658}{x^3+36x^2-12xy-5643x+396y+84834}
\end{align*}
\end{framed}
\end{document}
答案2
你可能想看看empheq
:
\documentclass{article}
\usepackage[a4paper,margin=2cm]{geometry} % or whatever options
\usepackage{amsmath}
\usepackage{empheq}
\begin{document}
\begin{empheq}[box=\fbox]{alignat*=3}
&C_\star \rightarrow E_\star
&{}: x&=3\dfrac{5\phi^2+24\phi+12v+24}{\phi^2},\quad
& y&=108\dfrac{-\phi^3+5\phi^2+2\phi v+12\phi+4v+8}{\phi^3}\\
&E_\star \rightarrow C_\star
&{}: \phi&=12\dfrac{6-x}{6x-y-198},\quad
& v&=2\dfrac{x^3-18x^2+3267x-324y-71658}{x^3+36x^2-12xy-5643x+396y+84834}
\end{empheq}
\end{document}