0

My indentation has stopped working after one section of my document. Here is the beginning code:

\documentclass[11pt]{article}  
\usepackage{amsfonts}  
\usepackage{amsmath}  
\usepackage{amssymb}  
\usepackage{lastpage}  
\usepackage[margin=0.85in]{geometry}  
\usepackage{graphicx}  
\usepackage{tabu}  
\usepackage{textcomp,gensymb}  
\usepackage{caption}  
\usepackage{float}  
\usepackage{indentfirst}  
\usepackage{multirow}  
\usepackage{array}  
\usepackage{subcaption}  
\setlength{\parindent}{6.5ex}  
\setlength{\parskip}{1.5em}  

\begin{document}
This is the part when it does work anymore.

\section{blah blah}  
Blah blah blah, $math$, blah blah, like blah:  
\begin{gather*} more math \\ more math \\ more math \end{gather*}  
Blah blah... 

\end{document}

When I start including math environments within the paragraphs and outside, it does not seem to work anymore, what ever I try. I have tried using the \indent, using \setlength{...}, specifying all paragraphs using \par at the end, ending with \\, nothing works.

This is the part when it does work anymore.

\section{blah blah}  
Blah blah blah, $math$, blah blah, like blah:  
\begin{gather*} more math \\ more math \\ more math \end{gather*}  
Blah blah... 

After this section, no indentation works.

6
  • by default the first paragraph of a section is not indented (which is a common typographic style) you can use indentfirst package to indent initial paragraphs – David Carlisle Jul 6 '17 at 10:01
  • The indent first does not work, I have that package already. And thank you, I will check that out – Marco Froelich Jul 6 '17 at 10:11
  • Unfortunetly it did not work. I tried adding indentafter package, then the code lines, but nothing @DavidCarlisle – Marco Froelich Jul 6 '17 at 10:18
  • It is impossible to test the code as you have posted it, please edit so that you have a single example from \documentclass to \end{document} in which the paragraph is not indented. I tried that with your fragments and the paragraph afterthe heading was indented – David Carlisle Jul 6 '17 at 10:26
  • The output in your question looks like this which clearly shows indentfirst has worked and the paragraph after the heading is indented – David Carlisle Jul 6 '17 at 10:28
0

I solved it. After the new section, just add the command:

\setlength{\parindent}{...}

Then it works again. This probably gives me some blue errors, but I've learned how to ignore them.

Ex.

\section{blah blah}
\setlength{\parindent}{6.5ex}
blah blah blah (is indented)
5
  • @DavidCarlisle I have set that command in the preamble, this is the exact set of code (copy paste). I am not missing anything, and the parindent is not set to 0 – Marco Froelich Jul 7 '17 at 13:26
  • Look mate whatever I did, I can tell you that putting that code in the body of the document fixed my error, while all the other solutions did not. Thus, if people have the same problem and what an easy solution, there it is. @DavidCarlisle – Marco Froelich Jul 7 '17 at 15:29
  • I'm glad you got something working, but we'll leave this question closed as a duplicate of a question with a correct answer. I believe you when you say that the code fixed your problem but the problem is in code you have not shown so the question/answer can not help anyone else. If you try the document in the question you will see that the paragraphs are already indented so there is no problem to solve in the code as posted. – David Carlisle Jul 7 '17 at 15:35
  • Fair enough, but still a solution. – Marco Froelich Jul 8 '17 at 15:40
  • There has been no code showing a problem posted so you can not have a solution (you can edit the question even now to post an example that shows lack of indentation) – David Carlisle Jul 8 '17 at 15:43

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