LaTeX forum ⇒ Text Formatting ⇒ Command to start paragraph with more spacing and no indent? Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Bozack
Posts: 115
Joined: Wed Feb 06, 2008 4:21 pm

Command to start paragraph with more spacing and no indent?

I usually use the standard LaTeX behavior for new paragraphs - a new line, allowing an indentation of the first line in the new paragraph. I also use sections to split up major parts of the document.

Sometimes, however, I like to break up my text in sections without headers - creating a new paragraph with an empty line before it, and no indentation, like this:

bla blah top paragraph.\\ \\\noindent Blah blah new paragraph

I feel that this splits up the text in a nice way, when a section (or subsection) gets long. It could, for example, look like this:

Example of a new paragraph with a line skip and no indent.
examplepicture1.png (55.12 KiB) Viewed 15003 times

My question is now the following: Would it be possible to get this behavior as a command, instead of manually putting the newlines and removing the indentation? This could be just like making a \section-like command, but without actually having a header - only simply making some spacing and starting without an indent after the command has been issued.

I get an error if there are empty lines in the LaTeX code before the newlines: Sometimes I put in code for floats etc. between the paragraphs, and would like to be able to have empty lines in the code surrounding these (making it easier to read and manage). With my current approach, I either have to manually comment out each empty line of code, or not have empty lines, making the code hard to read. With the command (let's call it \skippingparagraph), I would be able to have code looking like

bla blah top paragraph. \begin{figure}[htbp]   I'm a figure!\end{figure} \skippingparagraphBlah blah new paragraph

bla blah top paragraph.%\begin{figure}[htbp]   I'm a figure!\end{figure}%\\ \\\noindent Blah blah new paragraph

Of course this command would have to do the correct thing when it ends up making the new paragraph at the top of a page or underneath a float (then the spacing shouldn't suddenly make the paragraph start further down on the page).

I realize this question is a little silly, since the command wouldn't make much of a difference, but I like to keep my code clean, and this has bothered me for years. My google-fu hasn't been strong enough to find anything related before this.

Thank you in advance for anyone giving it a try!

I tend to use the article or book document classes - although I don't think this will change much for this problem.
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 7 Professional 64bit, MikTeX 2.9, TeXnicCenter 2.0 beta 1 64bit

Tags:

Stefan Kottwitz
Posts: 9445
Joined: Mon Mar 10, 2008 9:44 pm
Very nice to see you again here in the forum!

It's good that you post this question, because line end commands are not a good choice to create vertical space. As you thought, it can be a problem when a page break happens right before: the dummy line would be at the top of the next page, but we would not need this white space there.

You can define the desired command like this:

\newcommand*{\skippingparagraph}{\par\vspace{\baselineskip}}

It breaks the paragraph and adds a vertical space of the height of one line. Indentation should not happen, but you could also add \noindent to the macro.

If you would prefer to have an empty line anyway, which makes the paragraph break, you could remove the \par from the macro.

Stefan

Bozack
Posts: 115
Joined: Wed Feb 06, 2008 4:21 pm
This is absolutely perfect, thank you so much for the quick reply! Stefan to the rescue again!

I ended up using

\newcommand*{\skippingparagraph}{\par\vspace{\baselineskip}\noindent}

to still have the line not be indented after the vertical skip.
OS, LaTeX-system, editor: Arch Linux 64bit, TeXlive, Kile | Windows 7 Professional 64bit, MikTeX 2.9, TeXnicCenter 2.0 beta 1 64bit