In the following code, the hrules are different distances from the baselines. The first hrule is at the baseline of the text and the second is at the bottom of the y. How can I make them the same whether or not letters extend past the baseline?
Section x
\hrule height 0.5pt
\vspace*{1cm}
Section y
\hrule height 0.5pt
Also, why is this behavior happening? Even if I put a vspace{2pt} between each Section x/y and hrule, the spacing between the text and the lines varies. I thought vspace created a space starting at the baseline of the text.
Edit: One solution I have found to get an hrule at the baseline is to do
Section y
\\ \vspace{-\baselineskip}
\hrule height 0.5pt
but this is kind of hackish.

\strutallows for a consistent fix since it provides a maximal depth/height. A quick (and less elegant) fix would be to merely add\vphantom{y}afterSection x. Or, if you want the same baseline\hruleforSection yas inSection x, try\smash{Section y}. – Werner Aug 02 '11 at 20:43\smash{Section y}seems to really screw things up. One thing I want to achieve is to have an hrule, text, and another hrule such that the text is perfectly centered between the horizontal lines (same distance from the top of a capital letter to the top line and from the baseline to the bottom line). How big is a strut? – Justin J Stark Aug 02 '11 at 21:02\struthas height 70% of\baselineskipand a depth of 30% of the baseline skip. Consequently, it is font-dependent and is equivalent to\rule[-.3\baselineskip]{0pt}{\baselineskip}. – Werner Aug 03 '11 at 21:32