答案1
这是一个提议(\left
无论如何\right
你都不应该那样使用)。
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\newcommand{\prebig}[3]{%
{\mathclose{\vphantom{#1#3}}#2}#1#3%
}
\newcommand{\prebigl}[2]{\prebig\bigl{#1}{#2}}
\newcommand{\preBigl}[2]{\prebig\Bigl{#1}{#2}}
\newcommand{\prebiggl}[2]{\prebig\biggl{#1}{#2}}
\newcommand{\preBiggl}[2]{\prebig\Biggl{#1}{#2}}
\begin{document}
$\prebigl{_{\infty}^3}\lbrace [ \mathrm{TiO}_{6/2} ]^{2-}\bigr\rbrace^3$
\bigskip
$\bigr\rbrace_\infty^3 \prebigl{_{\infty}^3}\lbrace$
\end{document}
通过一些调整,但也许还有更好的语法,我们可以右对齐脚本:
\documentclass{article}
\usepackage{amsmath,xparse}
\NewDocumentCommand{\prebig}{mme{_^}}{%
{\mathclose{\vphantom{#1#2}}\leftscripts{#3}{#4}}#1#2%
}
\ExplSyntaxOn
\NewDocumentCommand{\leftscripts}{mm}
{
\IfNoValueTF{#1}
{% no subscript
\IfValueT{#2}{\sp{#2}}
}
{
\IfNoValueTF{#2}
{% no superscript
\sb{#1}
}
{% both
\mammoth_align_scripts:nn { #1 } { #2 }
}
}
}
\cs_new_protected:Nn \mammoth_align_scripts:nn
{
\hbox_set:Nn \l_tmpa_box { \hfil$\scriptstyle#1$ }
\hbox_set:Nn \l_tmpb_box { \hfil$\scriptstyle#2$ }
\dim_set:Nn \l_tmpa_dim
{
\dim_max:nn { \box_wd:N \l_tmpa_box } { \box_wd:N \l_tmpb_box }
}
\sb{ \hbox_to_wd:nn { \l_tmpa_dim } { \hbox_unpack:N \l_tmpa_box } }
\sp{ \hbox_to_wd:nn { \l_tmpa_dim } { \hbox_unpack:N \l_tmpb_box } }
}
\ExplSyntaxOff
\newcommand{\prebigl}{\prebig\bigl}
\newcommand{\preBigl}{\prebig\Bigl}
\newcommand{\prebiggl}{\prebig\biggl}
\newcommand{\preBiggl}{\prebig\Biggl}
\begin{document}
$\prebigl\lbrace_{\infty}^3 [ \mathrm{TiO}_{6/2} ]^{2-}\bigr\rbrace^3$
\bigskip
$\bigr\rbrace_\infty^3 \prebigl\lbrace_{\infty}^3$
\bigskip
$\prebigl[_3$\qquad $\prebigl[^2$
\end{document}