5

I am using the ragged2e package for my raggedright text and have set \RaggedRightParindent to 2em, as I want my paragraphs indented. But now, the very first paragraph in the document (following \maketitle is also indented. My original question was why the first graf in a new section is indented, though, as the first commenter pointed out and as the MWE shows, the first graf in a new section is not indented. So my question is now why the very first paragraph is not indented.

Is there anyway to have ragged2e set \RaggedRightParindent for the very first paragraph of a document to return to flush left?

Here is my MWE:

\documentclass[letterpaper,article,oneside]{memoir}

%% packages
\usepackage{graphicx,url}
\usepackage{rotating} 
\usepackage{datetime} 
\usepackage{ragged2e}
\usepackage[footnotesep=1.75\baselineskip]{geometry}

%% Paragraph settings
\expandafter\def\expandafter\quote\expandafter{\quote\vspace{-3\parskip}\SingleSpacing}
\DoubleSpacing
\setlength{\RaggedRightParindent}{2em}
\RaggedRight



\title{Dummy title}
\author{Dummy author}

\begin{document}
\maketitle

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam imperdiet venenatis mi ut vehicula. Sed semper pharetra fringilla. Pellentesque scelerisque sagittis sem, ut vestibulum lectus suscipit iaculis. Proin sit amet ligula scelerisque, convallis ante et, mattis mauris. 

Praesent in viverra nulla. In eleifend posuere enim, non pharetra magna accumsan nec. Donec ullamcorper et justo imperdiet vehicula. Sed malesuada erat auctor, commodo enim vehicula, iaculis orci. 

\section
Praesent in viverra nulla. In eleifend posuere enim, non pharetra magna accumsan nec. Donec ullamcorper et justo imperdiet vehicula. Sed malesuada erat auctor, commodo enim vehicula, iaculis orci. 

\end{document}
4
  • Please complete the minimal working example (MWE). If I add \section with some text, then the first paragraph is not indented. Commented Apr 26, 2014 at 19:39
  • Thanks! I altered the question a bit so that it addresses your answer.
    – hgv
    Commented Apr 26, 2014 at 20:18
  • \section is missing the argument, it takes the first following token P. But the paragraph is not indented. Do you mean the paragraph after \maketitle? \maketitle is not a \section command. Just add \noindent before the paragraph to override \parindent from \RaggedRight. Commented Apr 26, 2014 at 20:28
  • OK thanks, @HeikoOberdiek, I still have a lot to learn with Latex. Sorry for the simplistic question—I assumed the very first paragraph in a document (yes, that's what I mean; it's the same with or without a \maketitle command—no indent) was treated the same as a paragraph after a \section command. Obviously, I should not have made that assumption.
    – hgv
    Commented Apr 26, 2014 at 20:41

1 Answer 1

6

LaTeX suppresses the indentation of the first paragraph after \section and friends (BTW, package indentfirst changes this behavior). \maketitle does not contain \section or similar commands. Therefore the paragraph after \maketitle is an ordinary paragraph with indentation. Command \noindent starts a paragraph without indentation:

\documentclass[letterpaper,article,oneside]{memoir}

\usepackage[latin]{babel} % better hyphenation for "Lorem ipsum ..."

\usepackage{ragged2e}

%% Paragraph settings
\expandafter\def\expandafter\quote\expandafter{\quote\vspace{-3\parskip}\Single
\DoubleSpacing
\setlength{\RaggedRightParindent}{2em}
\RaggedRight

\title{Dummy title}
\author{Dummy author}

\begin{document}
\maketitle

\noindent
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam imperdiet
venenatis mi ut vehicula. Sed semper pharetra fringilla. Pellentesque
scelerisque sagittis sem, ut vestibulum lectus suscipit iaculis. Proin sit
amet ligula scelerisque, convallis ante et, mattis mauris.

Praesent in viverra nulla. In eleifend posuere enim, non pharetra magna
accumsan nec. Donec ullamcorper et justo imperdiet vehicula. Sed malesuada
erat auctor, commodo enim vehicula, iaculis orci.

\section{Section title}
Praesent in viverra nulla. In eleifend posuere enim, non pharetra magna
accumsan nec. Donec ullamcorper et justo imperdiet vehicula. Sed malesuada
erat auctor, commodo enim vehicula, iaculis orci.

\end{document}

Result

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .