1

The following code is to start a new section with a paragraph indented. However the paragraph is not indented. I also need to use flush left in order to keep the alignment proper. I would appreciate it if someone can help me with this

\chapter{Related Work}
\label{chapter3}

\section{Channel Characterization}

\setlength{\parindent}{5ex}
\begin{flushleft}

Accurately characterizing the wireless small-scale 
2
  • 1
    flushleft sets \parindent to \z@ (0pt). So to have indentation you need to move \setlength{\parindent}{5ex} behind \begin{flushleft}. Apr 10 '17 at 5:49
  • 1
    Please always show a minimal working example instead of a code snippet. Good answers often depend on several circumstances, i.e., the class you are using. Questions without MWE are often somehow unclear. Apr 10 '17 at 6:59
3

To indent the first paragraph of each section use:

\usepackage{indentfirst}

For the whole document to have left justification use:

\usepackage[document]{ragged2e}

In case you don't want indentation in your first paragraph (e.g. an abstract) use \noindent before your paragraph.

2
  • Thanks. How about if i want to indent paragraphs within a section and paragraphs in subsections
    – ray
    Apr 10 '17 at 2:09
  • It should be okay, indentfirst indents all the first paragraphs in all sections and subsections.
    – nikjohn
    Apr 10 '17 at 5:42
0

The titlesec package allows to customize \section command and friends. Using the non-starred version of \titlespacing does not prevent the indentation of the first paragraph. This does not seem to work with flushleft, though.

\documentclass{article}
\usepackage{titlesec}
% default values copied from titlesec documentation page 23
% "The starred version kills the indentation of the paragraph following the title" titlesec documentation page 4
\titlespacing{\section}
    {0pt}% left margin 
    {3.5ex plus 1ex minus .2ex}% space above the heading
    {2.3ex plus .2ex}% space below the heading

\usepackage{blindtext}
\begin{document}
\section{Section~A}
\Blindtext
\section{Section~B}
\Blindtext
\end{document}

screenshot

1
  • This answer does not pay attention to the problem caused by usage of flushleft. Apr 10 '17 at 6:57

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.