I want to place in the end of the chapter a short horizontally centered line, aligned vertically in the proportions of 2:3.

Everything works except of the horizontal alignment.











\hrule width .25\textwidth height .5pt








enter image description here

  • 2
    Consider replacing the TeX macro \hrule by LaTeX \rule{width}{height}. See e.g. here. – campa Oct 9 '15 at 12:53
  • @campa, yes, I tried but now vertical stretching doesn't work correctly with \rule. – web-stranger Oct 9 '15 at 13:12

a \rule is set at the bottom of a text line, so it is lower than you might think. thus, you need to raise it so that it is vertically centered on that (otherwise invisible) line.

this formulation of the \rule command (ending with \par to ensure that it is just one line) comes close. the [1ex] is the amount the rule is to be raised.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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