# Paragraph Indent in Section Heading

My university requires an indent for sections and subsections headings like on the picture.

How can I do it?

• This does really look awful. – user31729 Jun 7 '17 at 10:27
• @ChristianHupfer Sure, but it is a university's requirement. – Amir Jun 7 '17 at 10:29

You have all my sympathy: university requirements are so silly, sometimes!

If your sections and subsections are always numbered, you can do

\documentclass{article}
\usepackage{indentfirst}

\makeatletter
\makeatother

\begin{document}

Some text to show the indentation in the first line
Some text to show the indentation in the first line
Some text to show the indentation in the first line

\section{Test}

\subsection{Test}

Some text to show the indentation in the first line
Some text to show the indentation in the first line
Some text to show the indentation in the first line

\end{document}


• Thanks a lot, you've helped so much! I've spent several hours in Google trying to find the solution. – Amir Jun 7 '17 at 10:37

Please try with the below code:

 \newcommand\section{\@startsection {section}{1}{12\p@}%
{-12\p@}%
{6\p@}
{\normalsize\raggedright}}

• Where is this mysterious code coming from? – Johannes_B Jun 7 '17 at 10:52
• @Johannes_B If you think of the \startsection macro you may have a look at this link: tex.stackexchange.com/questions/31780/… – Jürgen Jun 7 '17 at 10:56
• @jürgen i am wondering about asecdimen. – Johannes_B Jun 7 '17 at 11:25
• Oops..its my own tag, it should be as in value, ie., 6\p@ etc. thanks for point out this... – MadyYuvi Jun 7 '17 at 11:36