So I have a rule pointing at the middle of the following text. I have achieved this with the following code:
\newlength{\Fraiseheight}
\setlength{\Fraiseheight}{1ex}
\addtolength{\Fraiseheight}{-\Flinewidth}
\newlength{\Fbaselength}
\setlength{\Fbaselength}{20pt}
\newlength{\Flinewidth}
\setlength{\Flinewidth}{0.5pt}
\rule[\Fraiseheight]{\Fbaselength}{\Flinewidth}
The height 1ex is the height of an x in current font. This raises my rule
higher than the centre of an open bracket that follows. This looks awkward especially for curly brackets. My question is: What height above the baseline do I need to achieve the following effect: "-(x" or "-{x" where the - is supposed to represent my rule and the x is present to show the discrepancy between the height 1ex and that of the - character.
\settoheight\height, where\heightis a length variable. You can then write0.5\heightto get half the height. – Marc van Dongen Aug 8 '12 at 7:31