1

I am writing my thesis, and I want my paragraphs work like: every paragraph has no blank in front, but different paragraph has one blank line. Then I choose to put "\vspace{8pt}\" at the end of the paragraph. Most of time it works well:

enter image description here

The problem occurs when I insert a figure after the paragraph, and because of the layout of latex, it put this figure to another place(which is good), but the paragraph next will have a blank I don't need. What should I do to remove this blank? Thank you very much!

enter image description here

enter image description here

  • 2
    You should almost never need to use \vspace within the document and never use \\ at the end of a paragraph. There is no paragraph break in the code you show, remove \vspace{8pt}\\ and replace by a blank line which marks a paragraph break. – David Carlisle Oct 28 '14 at 13:43
  • Thanks for your reply. would you please tell me which code I should use is better to break a paragraph, and can get the format I need? – user3324592 Oct 28 '14 at 13:51
  • It is hard to answer your question as you have provided no code and only hinted at your desired format. But whatever the format the markup for a paragraph should just be a blank line, whether you have vertical space or horizontal indentation at the start of a paragraph should be a global property best set by the class (or using package such as parskip) – David Carlisle Oct 28 '14 at 13:57
  • 2
    Note that the space circled is not a paragraph indentation it is spurious white space from ends of lines in the source file caused by the bad \\ markup preventing TeX's normal behaviour of discarding space at the beginning of a line. – David Carlisle Oct 28 '14 at 14:21
  • 1
    @user3324592 a blank line signifies end of paragraph never use \\ for that, in fact use of \\ outside of tables and other alignments is almost always incorrect. – David Carlisle Oct 28 '14 at 14:38
2

The space shown is an inter-word space, normally TeX drops spaces after a line break, but in this case the bad markup \vspace{8pt}\\ has defeated that mechanism so the ends of line around \begin{figure} and \end{figure} are causing white space in the output.

To mark a paragraph break in the source use a blank line never use \\ for that.

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.