I'm trying to reproduce this chapter heading (Styling my section/chapter) in memoir. This is more or less working with the following code:


   \hspace*{-0.1\textwidth}\chaptitlefont ##1}
   \vskip -2pt \hspace*{-\marginparwidth}\rule{0.7\textwidth}{5pt}}


\chapter{Es war einmal ein Mann}

But my question: Why does the following code:


leave such a large separation to the rule? As far as I understand, \vskip is creating a new paragraph. But if I use


there is no separation at all (only the 5pt of \midchapskip). \rule and \hrule are behaving differently, but I can not understand why and I did not see a good explanation for this.


\hrule is a vertical mode command so in vertical mode stacks directly under the previous thing.

The LaTeX \rule starts with \leavevmode and so is a horizontal mode command and so if used in vertical mode you will get a vertical \parskip space and a horizontal \parindent.

You will see the same behaviour if you compare \hbox{hello} with \mbox[hello}

(Also in your example you have \hspace* in the \rule example which similarly is a horizontal command.)

Perhaps this is closer to your needs

|improve this answer|||||
  • 1
    Many thanks for your answer. I'm reading right now doc about the two TEX modes in order to understand it. Where can I see the definition of \rule? – rogorido Apr 11 '12 at 17:06

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.