0

My paragraphs don't indent anymore and I don't know why. My start settings are:

\documentclass[11pt]{article}
\linespread{1.25}
\setlength{\parindent}{15pt}
\usepackage{ifxetex,ifluatex}
\newif\ifxetexorluatex
\ifxetex
\xetexorluatextrue
 \else
 \ifluatex
\xetexorluatextrue
   \else
\xetexorluatexfalse
 \fi
    \fi
 \usepackage[options ]{algorithm2e}
 \SetKwInput{Kw}{Initialise}
  \ifxetexorluatex
    \usepackage{fontspec}
     \else
    \usepackage[T1]{fontenc}       
       \usepackage[utf8]{inputenc}
       \usepackage{lmodern}
       \fi
     \usepackage{rotating}
     \usepackage{indentfirst}
      \usepackage{tikz} 
      \usepackage{changepage}
     \usepackage[document]{ragged2e}
     \usepackage{caption}
      \usepackage{enumitem}
    \setlist[itemize]{leftmargin=*}
     \setlist[enumerate]{leftmargin=*} 
      \setlist[description]{leftmargin=*}
      \usepackage{adjustbox}
      \usepackage{wrapfig, blindtext}
      \usepackage{booktabs}    
     \newcommand\tab[1][1cm]{\hspace*{#1}}
    \usepackage{mathptmx}
      \makeatother
      \usepackage{amsmath} 
     \usepackage{setspace}
     \usepackage{dsfont}
     \usepackage{algorithm}
    \usepackage{algorithmic}
       \usepackage{natbib}
     \usepackage{amssymb}
    \usepackage[english]{babel}
        \usepackage{hyperref}
      \usepackage{graphicx}
     \usepackage{xcolor}
     \usepackage{listings}
      \usepackage[margin=2.5cm]{geometry}

      \begin{document}

The rest of the document is really large, so I didn't include it. What are some things that might be causing this? I did put the \parindent to 15pt, but even the command \indent isn't working.

  • 2
    you do not need a large example, but you can add a two line paragraph and \end{document} so that people can debug, if the two line paragraph is indented the problem is in code you have not shown – David Carlisle Jun 20 at 14:10
  • 1
    your code produces ! LaTeX Error: Unknown option options' for package `algorithm2e'.` – David Carlisle Jun 20 at 14:12
1

Your example can be reduced to

\documentclass[11pt]{article}
\linespread{1.25}
\setlength{\parindent}{15pt}

 \usepackage[document]{ragged2e}

      \begin{document}

zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz 
zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz 
zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz 
zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz zzzz 
\end{document}

The package does warn

LaTeX Warning: Command \@arrayparboxrestore  has changed.
               Check if current package is valid.

removing the document option restores the indent. (You should report the warning to the package maintainer) however the loss of indent is intentional as the document option sets the whole document ragged right.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.