2

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

How can I do it?

Amir
  • 133

2 Answers2

3

Please try with the below code:

 \newcommand\section{\@startsection {section}{1}{12\p@}%
                                   {-12\p@}%
                                   {6\p@}
{\normalsize\raggedright}}
MadyYuvi
  • 13,693
1

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
\renewcommand\@seccntformat[1]{\hspace*{\parindent}\csname the#1\endcsname\quad}
\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}

enter image description here

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