Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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
share|improve this question
1  
\hrule, probably. Can you add an example of how you use it? –  egreg May 17 at 20:35
    
Before and after you mean inline? Or a gap before means above? –  Sigur May 17 at 20:44

1 Answer 1

up vote 6 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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