Paragraph indent, both \indent and \par, not working

Preamble. I use Win 8 Pro x64, MiKTeX 2.9, TeXnicCenter latest version.

\documentclass[12pt,a4paper]{article}
\usepackage{graphicx}
\usepackage{polyglossia}
\usepackage{xltxtra}
\usepackage{xunicode}
\usepackage{units}
\usepackage{amsmath}
\usepackage{pstricks}
\usepackage{float}
\usepackage{wrapfig}
\usepackage[top=2.5cm, left=3cm, bottom=2.5cm, right=2.5cm]{geometry}
\usepackage{setspace}
\usepackage{pgfplots}
\usepackage[document]{ragged2e}
\usepackage[nottoc]{tocbibind}
\usepackage{titlesec}
\usepackage{indentfirst}
\setlength\parindent{24pt}
\titleformat{\section}[block]{\color{black}\Large\bfseries\filcenter}{}{1em}{}
\pgfplotsset{compat=1.8}
\usepgfplotslibrary{polar}
\usepgflibrary{shapes.geometric}
\usetikzlibrary{calc}
\onehalfspacing
\setmainfont{Times New Roman}
\setdefaultlanguage{latvian}
\setotherlanguages{english, russian}
\numberwithin{equation}{subsection}
\numberwithin{figure}{subsection}
\numberwithin{table}{subsection}
\pgfplotsset{pa/.append style={axis x line=bottom, axis y line=left, xlabel={$r; \cdot 10^7 m$}, ylabel={$F_{pa}; \cdot 10^8 N$}}}
\makeatletter
\renewcommand\@biblabel[1]{#1.}
\makeatother
\begin{document}


Piece working as needed:

\begin{center}
\noindent \large{\textsc{University \\
Department\\
Faculty}}

\topskip0pt
\vspace*{\fill}
\noindent \Large{name \\
\textbf{Topic} \\
Study}
\vspace*{\fill}
\end{center}
\begin{FlushRight}
Professor } \end{FlushRight} \bigskip\bigskip\bigskip\bigskip\bigskip\bigskip\bigskip\bigskip\bigskip\bigskip\bigskip\bigskip
\begin{center}
\noindent \large{\textsc{City, Year}}
\end{center}
\newpage
\tableofcontents
\newpage


Here I make titlepage according to the asked style. Then I go for my abstract. And there are no paragraph indents, but I need one at the first line (after section, and I tried to use both \par and \indent for two different paragraphs in that piece of text. Also, not a single intent working in anywhere further in document.

\section*{Abstract}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. \par
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
\\ \indent Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
\newpage


It should have three indents, but has none.

Looking through existing similar questions didn't bring me any sort of solution either. Also, I've put my build log on pastebin - http://pastebin.com/0EiP5BKw

• In order to end a paragraph, don't do \\ \indent, but rather leave an empty line. – egreg May 30 '13 at 17:20

You have loaded the package ragged2e with the document option, that kills indents and typesets the document in raggedright fashion, which I don't think is what you want.

I've also made some changes to your input, so that it's more easily manageable. Note that commands such as \Large don't take an argument, but set their action to continue until countermanded by another command or the end of the group where they have been issued.

Note also that a paragraph is ended by simply leaving an empty line in the source code.

\documentclass[12pt,a4paper]{article}

%% Packages
\usepackage{amsmath} % must go before fontspec

\usepackage{fontspec}
\usepackage{polyglossia}

\usepackage[
top=2.5cm,
left=3cm,
bottom=2.5cm,
right=2.5cm
]{geometry}

\usepackage{graphicx}
\usepackage{units}
\usepackage{pstricks}
\usepackage{float}
\usepackage{wrapfig}
\usepackage{setspace}
\usepackage{ragged2e}
\usepackage[nottoc]{tocbibind}
\usepackage{titlesec}
\usepackage{indentfirst}

\usepackage{pgfplots}
\usepgfplotslibrary{polar}
\usepgflibrary{shapes.geometric}
\usetikzlibrary{calc}
\pgfplotsset{compat=1.8}
\pgfplotsset{
pa/.append style={
axis x line=bottom,
axis y line=left,
xlabel={$r; \cdot 10^7 m$},
ylabel={$F_{pa}; \cdot 10^8 N$}
}
}

%% Fonts and languages
\setmainfont[Ligatures=TeX,
SmallCapsFont=TeX Gyre Termes,
SmallCapsFeatures={Letters=SmallCaps}
]{Times New Roman}

\setdefaultlanguage{latvian}
\setotherlanguages{english, russian}

%% Misc settings
\titleformat{\section}[block]
{\color{black}\Large\bfseries\filcenter}
{}
{1em}
{}

\makeatletter
\renewcommand\@biblabel[1]{#1.}
\makeatother

\numberwithin{equation}{subsection}
\numberwithin{figure}{subsection}
\numberwithin{table}{subsection}

\onehalfspacing

\setlength\parindent{24pt}

\begin{document}

\begin{titlepage}
\centering

{\large\scshape
University \\
Department \\
Faculty
\par}

\vspace*{\fill}

{\Large
name
\par}

{\Large\bfseries
Topic
\par}

{\Large
Study
\par}

\vspace*{\fill}

\raggedleft

{\large
Professor
\par}

\vspace{\fill}

\centering

{\large\scshape
City, Year
\par}

\end{titlepage}

\tableofcontents
\clearpage

\section*{Abstrakts}

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

\end{document}

• @kalstrams I appreciate your edit to remove possibly sensitive data, not the one changing my style of typing. Not a big deal, anyway. – egreg Jun 24 '14 at 20:30
• I'm sorry, I just was not sure about your style of typing so I, hopefully understandably, was not able to replicate it. – user30709 Jun 25 '14 at 21:04

You have set \parindent to 0pt. Please set, e.g., \parindent30pt before your Abstract.

As far as I understand, you need not paragraphs, but paragraph indentations.

• Yes, I need paragraph indentation. As for the parindent, isn't it set to 24pt in preamble ? \usepackage{indentfirst} \setlength\parindent{24pt} – user30709 May 30 '13 at 17:42
• Nevermind. I do not really understand the difference of what I had and what you said, but adding \parindent30pt fixed it. Thanks – user30709 May 30 '13 at 17:46
• Probably it is changed somewhere. But \parindent24pt should indent your abstract, – Przemysław Scherwentke May 30 '13 at 17:46
• The way \usepackage[document]{ragged2e] "kills indents" is it changes \parindent to \RaggedRightParindent (default 0pt) at \begin{document}. Any change to \parindent before that will not stick. One must either set \parindent after \begin{document} or set \RaggedRightParindent in the preamble. – Dan Feb 12 '14 at 19:49