0

I usually use \\, \par, \newline, etc. to add whitespace to LaTeX. However, when I use raggedRight, the pdflatex spits out a ton of messages saying "There's no line here to end." Ultimately, all vertical whitespace is removed.

My question is, is it possible to add whitespace to a raggedRight environment? If so, how? If not, what can I use to successfully justify my text to the left and maintain the whitespace as it is?

  • 3
    you should almost never need any of those commands. \\ gives the no line here to end error if it is at the start of a paragraph, whether or not raggedright is in force. You perhaps should give a complete example that generates the error so people can suggest alternative code. – David Carlisle Feb 28 '16 at 01:07
  • For special cases when you need to add anomalous space after a linebreak you can use \\[2cm] – David Carlisle Feb 28 '16 at 01:09
  • to expand on what david has said, \par or a blank line will not trigger the "no line here to end" message. so they can safely be used to cause a new line to start. – barbara beeton Feb 28 '16 at 03:41

1 Answers1

1

Instead of using \\\\, I found that using \smallskip,\medskip, \bigskip, and other commands from Lengths and when to use them works well. Along with David Carlisle's suggestion of using the optional length parameter after \\ to specify a length of vertical white-space.