I am looking for a way to change the margin form the left of the titles in LaTeX. I´ve added a picture to clarify my concern:
Is there a way, to change the margins of the titles of the sections, and only the titles, and not the entire paragraph below?
Best Answer
For standard classes (not KOMA script classes as leandriis has pointed out) you can use the titlesec package to change the format and spacing of sections, subsections and so on. See page 4 for an explanation of
\titleformat
and\titlespacing
and their optional arguments which I have not shown here for simplicity.I have changed the
<left>
argument of the\titlespacing
command to an arbitry value of1em
(which is usually 0). Change it however you want. The other values in the code below are taken from subsection 9.2. Standard Classes on page 23 and should be the values usually used by LaTeX.The example below indents sections. Indenting subsections and subsubsections works in the same way.