## LaTeX forum ⇒ TeXworks ⇒ how to avoid first line indented?

Information and discussion about TeXworks, an integrated LaTeX environment for several platforms
yaozhao
Posts: 37
Joined: Sat Oct 27, 2018 10:38 pm

### how to avoid first line indented?

\documentclass[a4paper, 12pt]{article}  \usepackage{amsmath}\usepackage{amssymb}\usepackage[T1]{fontenc}	\usepackage{graphicx}\DeclareUnicodeCharacter{202F}{\,}   \begin{document}\title{Solutions to Math Exercises}\author{Yao Zhao \\ University of Wisconsin-Madison}\maketitle  1.a. slope = $-\frac{2}{5}$ \\1.b. slope = undefined (infinity) \\

The first line (1.a. slope) is indented, which is not desired. How to avoid such problem?
Many thanks in advance!

mas
Posts: 219
Joined: Thu Dec 04, 2008 4:39 am
If you want to avoid the first line indent throughout the document, set it in the preamble as
\setlength{\parindent}{0pt}

If you want it for a specific line/para, use

\noindent

A suggestion: Avoid using \\ to end the paragraphs in your text.

OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim

yaozhao
Posts: 37
Joined: Sat Oct 27, 2018 10:38 pm
Thank you so much! It works!

As you mentioned, A suggestion: Avoid using \\ to end the paragraphs in your text.

I also often heard of such comments before. I want to have space between 1.a. and 1.b. I don't know what I can do if not using \\

Johannes_B
Site Moderator
Posts: 4044
Joined: Thu Nov 01, 2012 4:08 pm
Package parskip
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Stefan Kottwitz
Posts: 9416
Joined: Mon Mar 10, 2008 9:44 pm
As Johannes said, \usepackage{parskip} (to put it in code) or, what I would prefer, use the modern class scrartcl.

\documentclass[a4paper, 12pt, parskip=full]{scrartcl}  \usepackage[utf8]{inputenc}\usepackage{amsmath}\usepackage{amssymb}\usepackage[T1]{fontenc}	\usepackage{graphicx}\DeclareUnicodeCharacter{202F}{\,}\begin{document}\title{Solutions to Math Exercises}\author{Yao Zhao \\ University of Wisconsin-Madison}\maketitle 1.a. slope = $-\frac{2}{5}$ 1.b. slope = undefined (infinity) \end{document}

Here you see: end a line (a paragraph) by having an empty line in the code.

paragraph.png (17.99 KiB) Viewed 846 times

Stefan