Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

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 ]

share|improve this answer
    
@egreg, David Carlisle: You both are my heroes. I flipped a coin and accepted the second answer. –  Jesko Hüttenhain Jan 9 '13 at 12:51
add comment

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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