[Tex/LaTex] \setlength\parindent{0.5in} adds a newline to the document

mla-stylespacing

I'm using mla13 and xelatex to create a mla formatted document. My professor has asked that our papers are left aligned, so I'm using \raggedright to accomplish this. I found out that causes the paragraph indents to be removed, but because the paragraphs need to be indented in an mla-formated document I also have to re-set that with \setlength\parindent{0.5in}. The problem I'm running into is that this is causing a newline to be added to the document.

Here's an example:

\documentclass{article}
\usepackage{mla13}
\title{Sample Sources MLA13 Document}
\firstname{John}
\lastname{Smith}
\professor{Dr. Professor}
\class{FunClass}

\raggedright
\begin{document}
\makeheader
\setlength\parindent{0.5in}

In a recent report by the United Nations, they found that more than 884 million people do not have 
access to safe drinking water \cite[e.g.][15-23]{unWater}. This number equates to more than 1 out 
of every 8 people, not having access to something that is so vital to human life. Knowing this 
fact, most must ask themselves, why the same water that we drink is used to clean our toilets and 
wash our lawns. The water that hundreds of millions of people would love to have, is something that 
we just flush down the toilet. This paper intends to examine the benefits of grey water systems, 
and how their use leads to increased water conservation efforts, creating more benefits then costs.

Grey water systems are a technique that aids in water conservation efforts by reusing water that 
doesn't need to be fully cleaned. For example, many grey water systems use the water that comes 
from the shower drain to water the lawn or fill the toilet. Even though this water isn't going to a 
water treatment plant, doesn't mean that it is not clean. Grey water systems are equipped with a 
filter that removes most soaps and solid objects that make their way through the drainage system 
\cite{planetArk}. With a private market for greywater systems developing, there are a variety of 
commercial systems that filter water to ``remove hair, lint, and debris, and remove pollutants, 
bacteria, salts'' and many more materials \cite{pacificInst2010}

\end{document}

Here's that document rendered…

Document with indent

Below is the document without the line \setlength\parindent{0.5in} line. Notice how the newline after the title has disappeared. Any idea what is causing this? To be clear what I am trying to accomplish is the paragraph indent without the extra newline. Thanks!

Document without indent

Best Answer

The simplest solution is to add a % after the \setlength command. The reason for this is that the blank line after your indent command is treated as a new paragraph, but ignored after the \makeheader command. The trailing % effectively removes the blank line. See this question for details.

\documentclass{article}
\usepackage{mla13}
\title{Sample Sources MLA13 Document}
\firstname{John}
\lastname{Smith}
\professor{Dr. Professor}
\class{FunClass}
\raggedright


\begin{document}
\makeheader
\setlength\parindent{0.5in}%

In a recent report by the United Nations, they found that more than 884 million people do not have 
access to safe drinking water \cite[e.g.][15-23]{unWater}. This number equates to more than 1 out 
of every 8 people, not having access to something that is so vital to human life. Knowing this 
fact, most must ask themselves, why the same water that we drink is used to clean our toilets and 
wash our lawns. The water that hundreds of millions of people would love to have, is something that 
we just flush down the toilet. This paper intends to examine the benefits of grey water systems, 
and how their use leads to increased water conservation efforts, creating more benefits then costs.

Grey water systems are a technique that aids in water conservation efforts by reusing water that 
doesn't need to be fully cleaned. For example, many grey water systems use the water that comes 
from the shower drain to water the lawn or fill the toilet. Even though this water isn't going to a 
water treatment plant, doesn't mean that it is not clean. Grey water systems are equipped with a 
filter that removes most soaps and solid objects that make their way through the drainage system 
\cite{planetArk}. With a private market for greywater systems developing, there are a variety of 
commercial systems that filter water to ``remove hair, lint, and debris, and remove pollutants, 
bacteria, salts'' and many more materials \cite{pacificInst2010}

\end{document}

output

Related Question