Hello,
is there a way to lift the indexes a bit up when the are put right next to a double underlined symbol?
Math & Science ⇒ Higher position of indexes with double underlining
Higher position of indexes with double underlining
- Attachments
-
- double-underline-index.tex
- (297 Bytes) Downloaded 262 times
Last edited by Montag on Sat Jan 08, 2011 11:55 am, edited 1 time in total.
OS: Win 7 64-bit LaTeX: MikTeX 2.9 64-bit Editor: TXC 1 RC1
NEW: TikZ book now 40% off at Amazon.com for a short time.

Higher position of indexes with double underlining
If you wanted to make it so that the underlining didn't affect the placement of the scripts at all, you could use definitions using the \smash command:
Personally, I prefer to use the \uuline command from the ulem package for double underlining, and then you could use:
If, however, you like the lowering of the script for the single-underlining, but only wanted it lowered the same amount for double overlining, then it gets a little more complicated, e.g. (without ulem):
Or with ulem:
Take your pick!
Code: Select all
\newcommand{\uli}[1]{\smash{\underline{#1}}}
\newcommand{\dund}[1]{\smash{\underline{\underline{#1}}}}
Personally, I prefer to use the \uuline command from the ulem package for double underlining, and then you could use:
Code: Select all
\usepackage[normalem]{ulem}
\newcommand{\uli}[1]{\smash{\underline{#1}}}
\newcommand{\dund}[1]{\smash{\uuline{#1}}}
If, however, you like the lowering of the script for the single-underlining, but only wanted it lowered the same amount for double overlining, then it gets a little more complicated, e.g. (without ulem):
Code: Select all
\newcommand{\uli}[1]{\underline{#1}}
\newcommand{\dund}[1]{{\smash{\underline{\underline{#1}}}\vphantom{\underline{#1}}}}
Or with ulem:
Code: Select all
\usepackage[normalem]{ulem}
\newcommand{\uli}[1]{\underline{#1}}
\newcommand{\dund}[1]{{\smash{\uuline{#1}}\vphantom{\underline{#1}}}}
Re: Higher position of indexes with double underlining
Thank you, Frabjous. \smash it is, it comes with amsmath.
Out of curiousity, why do you prefer ulem's \uuline?
Out of curiousity, why do you prefer ulem's \uuline?
OS: Win 7 64-bit LaTeX: MikTeX 2.9 64-bit Editor: TXC 1 RC1
Re: Higher position of indexes with double underlining
It's just more compact. For that matter I prefer its single \uline to the regular \underline, which I think draws the line too low, and it looks funny. But to each their own! Also, in text mode, the regular \underline prevents line breaks, if I remember right.