12

I'm using \hrule to draw a line that has the width of the text.

Is there a safe way to leave a gap before and after the line?

The plain code is:

blablabla
\hrule
blabla

And produces: enter image description here

Coming closer to what I need is:

blablabla \\
\hrule
blabla

Which produces: enter image description here

And, of course, I get error messages when I try:

blablabla \\
\hrule
\\ blabla
  • 1
    \hrule, probably. Can you add an example of how you use it? – egreg May 17 '14 at 20:35
  • Before and after you mean inline? Or a gap before means above? – Sigur May 17 '14 at 20:44
12

Try to avoid using \\ just end the paragraph and add space:

aaaaa

\vspace{1cm}
\hrule
\vspace{1cm}

aaaaaaa

If you want a spaced out line.

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.