4

When using the leftidx package to create the same upper index on both sides of \Bbbk[G], the indices have different height and look ugly. Minimal example:

\documentclass{article}
\usepackage{leftidx}
\usepackage{amssymb}
\begin{document}
\[ \leftidx{^D}{\Bbbk[G]}{^D} \]
\end{document}

I tried wrapping \Bbbk[G] in \left. and \right., which solves the height problem, but it creates undesired spacing on the left. I am opting against negative hspace, hoping that someone knows a good solution for this.

2 Answers 2

4

enter image description here

\documentclass{article}
\usepackage{leftidx}
\usepackage{amssymb}
\begin{document}
\[ \leftidx{^D}{\Bbbk[G]}{^D} \]
\[ \leftidx{^D}{{\Bbbk[G]}}{^D} \]
\end{document}

The extra {} mean that the base is a single atom that gets measured for the left and right superscript, otherwise the left script goes on the k and the right script goes on the ]

1
  • @egreg, David Carlisle: You both are my heroes. I flipped a coin and accepted the second answer. Commented Jan 9, 2013 at 12:51
4

You can simply add a pair of braces, so that TeX will see the subformula as a unit, without adding extra space:

\documentclass{article}
\usepackage{leftidx}
\usepackage{amssymb}
\begin{document}
\[ \leftidx{^D}{{\Bbbk[G]}}{^D} \]
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .