[Tex/LaTex] Paragraph indent, both \indent and \par, not working

indentationparagraphs

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}
\noindent \large{Work advisor: \\
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

Best Answer

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
  Work advisor: \\
  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}