答案1
\fixit[]{}{}{}
语法是
\fixit[<mathstyle>]{<left-delim>}{<content>}{<right-delim>}
妇女权利委员会:
\documentclass{article}
\usepackage{amsmath}
\newcommand\fixit[4][\displaystyle]{
\setbox0=\hbox{$#1#3$}
\setbox2=\hbox{$\vcenter{\copy0}$}
\raisebox{\dimexpr\ht0-\ht2}{$#1\left#2\copy2\right#4$}
}
\begin{document}
$c_{1}=\fixit{[}{\dfrac{m\left(\dfrac{N}{q}-1\right)}{N-1}}{]}
\ne\fixit{[}{\dfrac{N-1}{m\left(\dfrac{N}{q}-1\right)}}{]}$
$c_{1}=\fixit[\textstyle]{[}{\frac{m\left(\frac{N}{q}-1\right)}{N-1}}{]}
\ne\fixit[\textstyle]{[}{\frac{N-1}{m\left(\frac{N}{q}-1\right)}}{]}$
\end{document}
答案2
答案3
我的看法:
\documentclass{article}
\usepackage{amsmath,delarray}
\begin{document}
\section{Ugly}
\[
c_{1}=\left[\dfrac{m\left(\dfrac{N}{q}-1\right)}{N-1}\right]
\]
\section{Bad}
\[
c_{1}=
\sbox0{$\displaystyle\frac{m\biggl(\dfrac{N}{q}-1\biggr)}{N-1}$}
\raisebox{\dimexpr\depth-\dp0}{%
$
\begin{array}\lbrack{@{}c@{}}\rbrack
\displaystyle\frac{m\biggl(\dfrac{N}{q}-1\biggr)}{N-1}
\end{array}
$%
}
\]
\section{Good}
\[
c_{1}=
\left[\frac{1}{N-1}\cdot m\biggl(\frac{N}{q}-1\biggr)\right]
\]
\end{document}