Here is the code I am using to place a heading with a line above and below the text, from this post.

    \hrule height 1pt
    \kern 5pt
    \hbox to \textwidth{\textbf{\mediumletterspace{#1}}\hfil}
    \kern 5pt
    \hrule height 0.2pt

However, with the \par at the beginning, there is \parskip vertical space followed by a \bigskip vertical space. I want to make this skip the same, regardless of the length of \parskip. How do I accomplish this? Also, if I get rid of the \par, there is no vertical skip at all and not even a line break. Why?


you can use \addvspace\bigskipamount (or with braces around \bigskipamount if this is just a single token; it doesn't make any difference). it's always prudent to insert \par.

the reason there is no vertical space -- or even a line break -- if you don't include \par is that the \vspace doesn't take effect until there is actually a transition to vertical mode, which will actually happen at the next "normal" line break. this is sometimes used as a method for spacing down a bit before the next line when you're not sure exactly where the line will end. similarly, placing \newpage in the middle of a text line will start a new page as soon as the current line ends normally.

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.