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}
High GPA
  • 283
  • 1
    You can put \noindent at the start of any paragraph to suppress the indent for that paragraph. – David Purton Aug 04 '17 at 02:29
  • 5
    Normally LaTeX doesn't indent the first paragraph of sections, chapters, &c. Which class /package do you use? – Bernard Aug 04 '17 at 02:32
  • 8
    Don't load indentfirst. That's what I use to get the non-default behaviour you describe. – cfr Aug 04 '17 at 03:03
  • @Bernard AMS math, IEEE, etc.. – High GPA Aug 04 '17 at 03:12
  • See also https://tex.stackexchange.com/questions/328868/how-do-i-restart-paragraph-indentation-like-the-start-of-a-new-section/328914?s=14|0.0896#328914 – John Kormylo Aug 04 '17 at 03:53
  • If possible, please post a MWE... – MadyYuvi Aug 04 '17 at 05:40
  • @MadyYuvi What is a MWE and how to post it? – High GPA Aug 04 '17 at 06:03
  • @HighGPA A "minimal working example": to post it, (1) take a LaTeX file that has the issue you mention (all paragraphs including the first are indented), (2) make it as short as possible (have as little text as possible that still shows the issue, remove packages as long as they don't affect the issue), (3) edit this question to include the LaTeX source and optionally a screenshot of the typeset output. – ShreevatsaR Aug 04 '17 at 06:11
  • 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 04 '17 at 06:23
  • @ShreevatsaR I hope the update is clear enough. Thanks to all of you. – High GPA Aug 04 '17 at 07:58
  • @HighGPA: No. Update your question with code that starts with \documentclass and ends with \end{document}, and remove all the stuff that you see has no impact on your output (which could be considered extraneous to the problem). – Werner Aug 04 '17 at 08:05
  • @HighGPA: ...thanks for adding \end{document}. You still have a bunch of unnecessary stuff included in your code that does not pertain to the problem. Do you use any theorems? No. So remove that content. Do you use \ovl anywhere? No. So remove that. What about \im or \Hom or...? No. So remove that as well. Do you need an abstract or a \title and the accompanying \maketitle? No. Why? Because it has nothing to do with the indentation of a paragraph. What about packages like pict2e or epic or graphicx or...? Remove them, since they have nothing to do with the problem... – Werner Aug 04 '17 at 08:44
  • 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 04 '17 at 08:47
  • 1
    Since the code is not minimal, i can tell that you are either a user for over twenty years and never updated your knowledge, or were looking for a template and got a really outdated one. Templates are like used cars, you never know what you are buying when don't kbow anything about cars. – Johannes_B Aug 04 '17 at 08:48
  • Off-Topic: t1enc is a compatibility package only. You should replace it by \usepackage[T1]{fontenc}. You don't need to load graphics after graphicx. Almost nobody uses epic for decades. Even the extended eepic is outdated. In our days, we use tikz or pstricks. – Schweinebacke Aug 04 '17 at 09:15
  • 1
    @Schweinebacke This is why I am seeking help.. Thanks for comments. – High GPA Aug 04 '17 at 09:36
  • In this case: Don't use (outdated) templates you do not understand. Start with a minimal document and add only those packages you need. BTW: amsart already includes most AMS-packages. – Schweinebacke Aug 04 '17 at 09:43

1 Answers1

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}
ShreevatsaR
  • 45,428
  • 10
  • 117
  • 149