# Left Adjustment of Title

I want to adjust the title indentation for all the section and subsection titles as shown in the image. How can I achieve this using the titlesec or other similar packages?

This is a minimal version of my current code.

\documentclass[12pt]{report}
\usepackage[utf8]{inputenc}

[...]

\usepackage{geometry}
\geometry{
a4paper,
left=3.5cm,
right=2cm,
top=3.5cm,
bottom=2cm
}

[...]

\begin{document}
\section{Introduction}
\subsection{Background}
\subsubsection{Machine Reading Comprehension (MRC)}
MRC is a subfield.........

[...]

\end{document}


What I want:

What I have:

I am using a documentclass{report} and my section titles are in the left edge of the paper by default. But I would like to indent them 3.5mm from the left edge of the paper as shown in the above image.

• Does this answer your question? How to left align the section title in latex? Feb 25 '21 at 6:31
• No. I am using a documentclass{report}, and my section titles are already aligned to the left side of the paper. But I would like to indent them 3.5mm from the left edge of the paper. Feb 25 '21 at 6:35
• Well would you like to paste an minimal working example? Let us know how you align title left? Feb 25 '21 at 7:01
• @ Raavan. This is important information that you should have given from the beginning. Maybe you should read first How to ask a question and provide a MWE. Feb 25 '21 at 7:02
• @Raavan please see if the answer meets the requirement -- as amended from the solution given here -- tex.stackexchange.com/questions/25082/… Feb 25 '21 at 7:10

Welcome to TEX.SE! I use titlesec package to meet this requirement.

\documentclass{report}
\usepackage{lipsum}
\usepackage{titlesec}
\usepackage[showframe]{geometry}
\geometry{
a4paper,
left=3.5cm,
right=2cm,
top=3.5cm,
bottom=2cm
}

\titleformat{\chapter}{\normalfont\huge\bfseries}{\thechapter .}{3.5mm}{}
\titlespacing*{\chapter}{3.5mm}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}
\titleformat{\section}{\normalfont\Large\bfseries}{\thesection .}{3.5mm}{}
\titlespacing*{\section}{3.5mm}{3.5ex plus 1ex minus .2ex}{2.3ex plus .2ex}
\titleformat{\subsection}{\normalfont\large\bfseries}{\thesubsection .}{3.5mm}{}
\titlespacing*{\subsection}{3.5mm}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\begin{document}
\chapter{Introduction}
\section{Background}
\lipsum[1]
\end{document}


I got the length value from texdoc titlesec sec 9.2 "Standard Classes".

• This worked! Thanks! Feb 25 '21 at 7:30

\documentclass{article}
\usepackage{titlesec}
%1inch=25,4mm
\titlelabel{{\hspace*{1cm}\makebox[1cm][l]{\thetitle}}}
%\usepackage{indentfirst}
\usepackage{lipsum}
\usepackage{showframe}
\begin{document}
\section{foo}
\hspace*{25.4mm}\lipsum[1]
\section{bar}
\subsection{foo bar}
\lipsum[1]
\end{document}