2

The superscript (subscript) left of the curly brackets should be further up (down), i.e. same height as the 3 right of the last curly bracket.

Is there an easy way, maybe similiar to \sideset for operators?

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\begin{document}

 $ _{\inf}^3{\left\lbrace   \left[ \text{TiO}_{6/2}  \right] ^{2-} \right   \rbrace }^3  $

\end{document}

enter image description here

3

Here's a proposal (not with \left and \right that you shouldn't be using like that anyhow).

\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}

enter image description here

With some tweakings, but perhaps better syntax too, we can right align the scripts:

\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}

enter image description here

  • Thanks a lot! Just out of curiosity: why shouldn't I be using \left? – Mammoth Apr 8 '18 at 8:50
  • @Mammoth Because it uses too big fences more often than not. – egreg Apr 8 '18 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.