0

Almost all templates I tried have an indentation for all paragraphs. How do I remove the spaces before the first paragraph only?

\documentclass[12pt]{amsart}

\usepackage{amsfonts}
\usepackage{amsthm}
\usepackage{amsmath}
\usepackage{amscd}
\usepackage[latin2]{inputenc}
\usepackage{t1enc}
\usepackage[mathscr]{eucal}
\usepackage{indentfirst}
\usepackage{graphicx}
\usepackage{graphics}
\usepackage{pict2e}
\usepackage{epic}
\numberwithin{equation}{section}
\usepackage[margin=2.6cm]{geometry}
\usepackage{epstopdf} 

 \def\numset#1{{\\mathbb #1}}

\theoremstyle{plain}
\newtheorem{Th}{Theorem}[section]
\newtheorem{Lemma}[Th]{Lemma}
\newtheorem{Cor}[Th]{Corollary}
\newtheorem{Prop}[Th]{Proposition}

 \theoremstyle{definition}
\newtheorem{definition}{Definition}[section]
\newtheorem{Conj}[Th]{Conjecture}
\newtheorem{Rem}[Th]{Remark}
\newtheorem{?}[Th]{Problem}
\newtheorem{Ex}[Th]{Example}

\newcommand{\im}{\operatorname{im}}
\newcommand{\Hom}{{\rm{Hom}}}
\newcommand{\diam}{{\rm{diam}}}
\newcommand{\ovl}{\overline}
%\newcommand{\M}{\mathbb{M}}

\begin{document}

\title{example}
\begin{abstract}  a aaaaaaaaaaaaaa aaaaaa aaaaaa aaaaa aaaaaaa aaaaaaaaaaaa aaaaa aaaa aa aaaaaaaaaaaaaaaaaa aaaaaa aaaaa aaaaaaaaaaa aaaaaaaaaa aaaaa aaaaaaa aaaaaaaa aaaaaaaaaaaaaaaa
\end{abstract}

\maketitle 

\section{Prelim} 
I was often using any of the available “lorem ipsum” generators on the web while testing different things in LaTeX until I discovered that the Latex distribution provides packages generating blind text, which is definitely more convenient. With just a few lines of code, these packages will generate paragraphes, even whole documents with sections, paragraphs of text, lists, etc.

The first package that I will introduce is the “blindtext” package. First the language option as well as the package have to be loaded. Make sure you get the order right, otherwise your text might appear in latin by default.
\medskip

\section*{Reference}

\end{document}
  • 1
    You can put \noindent at the start of any paragraph to suppress the indent for that paragraph. – David Purton Aug 4 '17 at 2:29
  • 5
    Normally LaTeX doesn't indent the first paragraph of sections, chapters, &c. Which class /package do you use? – Bernard Aug 4 '17 at 2:32
  • 8
    Don't load indentfirst. That's what I use to get the non-default behaviour you describe. – cfr Aug 4 '17 at 3:03
  • 1
    @cfr Apart from indentfirst, I think it might also be language-specific babel/polyglossia modules that follow their respective typographic style, according to egreg's answer at No indent in the first paragraph in a section? – ShreevatsaR Aug 4 '17 at 6:23
  • 5
    @HighGPA: ...once you trim down all the unnecessary stuff, you'll see that you're using indentfirst which does exactly what it states - it indents the first paragraph after a section. If you had gone through the process of providing a minimal example, you would most likely have identified this as the problem. – Werner Aug 4 '17 at 8:47
1

(Creating community-wiki post to move answer out of comments.)

By default, LaTeX does not indent the first paragraph of sections, chapters, etc. This can be overriden by certain language-specific styles (with the babel package), or by loading the indentfirst package, as you have done here.

So if you don't want the first paragraph indented, don't load the indentfirst package: remove this line:

\usepackage{indentfirst}

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.