[Tex/LaTex] How to make section title text align with paragraph indentation

indentationsectioning

This is what I'm trying to do:

enter image description here

Best Answer

An option using titlesec; the idea is to place the counter inside a box of width equal to the value for \parindent:

\documentclass{article}
\usepackage{titlesec}
\usepackage{indentfirst}
\usepackage{lipsum}

\setlength\parindent{30pt}
\newlength\mylen
\setlength\mylen{\parindent}

\renewcommand\thesection{\Alph{section}}
\titleformat{\section}
  {\normalfont\Large\bfseries}
  {\makebox[\mylen][l]{\thesection.}}
  {0pt}
  {}

\begin{document}

\section{Test section}
\lipsum[4]

\end{document}

enter image description here

Most probably you won't need the line

\setlength\parindent{30pt}

I used it in my example code to have a generous value for \parindent, which apparently your class already provides. Since your class seems to be a non-standard one (seeing the font size for section titles), please consider changing the \Large in the second mandatory argument of

\titleformat{\section}
  {\normalfont\Large\bfseries}
  {\makebox[\mylen][l]{\thesection.}}
  {0pt}
  {}

to conform to your class definitions.

Related Question