答案1
你介意這樣的事情嗎:
\documentclass{article}
\usepackage{mathtools,array}
% for show equation only
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{equation}
\setlength\PreviewBorder{1em}
\begin{document}
\begin{equation}
\left[\begin{tabular}{@{}>{$}c<{$}@{}}
\dfrac{\left(\vec{A} - \dfrac{b}{c}\vec{D}\right)}{E^2}
\end{tabular}\right]^{1/2}
\end{equation}
\end{document}
附錄:更簡單的程式碼是,如果使用tabular
環境 代替:array
\begin{equation}
\left[\begin{array}{@{} c @{}
}
\dfrac{\left(\vec{A} - \dfrac{b}{c}\vec{D}\right)}{E^2}
\end{array}\right]^{1/2}
\end{equation}
結果與之前相同。
答案2
你可以用 來做到這一點delarray
,但我認為我建議的第二種方法要好得多。
\documentclass{article}
\usepackage{amsmath}
\usepackage{delarray}
\begin{document}
Here's a fraction with very large numerator
\begin{equation*}
\begin{array}\lbrack{@{}c@{}}\rbrack
\dfrac{\left(\vec{A} - \dfrac{b}{c} \vec{D} \right)^2}{E^2}
\end{array}^{1/2}
\end{equation*}
but it's much better to write it in a different way
\begin{equation*}
\left[\frac{1}{E^2}\left(\vec{A} - \frac{b}{c} \vec{D} \right)^2\right]^{1/2}
\end{equation*}
so the terms are better aligned with the formula axis.
\end{document}