So far, I've been trying code from various examples, and landed with:


to indent the headers and their numbering. But I don't know how to get the content within each section/subsection/subsubsection to have an indented margin. In other words, I'd like to have the section/subsection/subsubsection content to be in line with it's indented header.

Is titlesec able to do this? I've been battling with the documentation, but I think they assume some more tex knowledge than I have as everything I try doesn't seem to work.

I'd like to use titlesec because, according to my understanding, I won't have to make any further adjustments while writing the document. I'm using pandoc to generate that part from markdown, so I can't have inline formatting on my sections.

Added the following as per comment requests:

Here is what I have:

What I have

And, here is what I would like:

What I would like

Or, I would like something like this:

I would like this also

  • 3
    Two thoughts: (1) not everyone knows what 'legal style indentation' looks like, and even 'to be in line with it's indented header' is not helpful (to me) --- is there no image you could point us to? (2) it is always better to provide a complete but minimal example that starts with \documentclass{<whatever>} and ends with \end{document}.
    – jon
    Apr 18, 2013 at 2:26
  • 1
    rather than indenting the body, change the margins of the document globally using geometry and alter the indent of the headings- this will be much easier
    – cmhughes
    Apr 18, 2013 at 3:08
  • Do you want to automate this? Of course, it is possible without automation...
    – Werner
    Apr 18, 2013 at 3:14
  • Thanks for the comments and suggestions, I would be ecstatic if I can automate this, but I may end up settling with @cmhughes idea of global margins. Otherwise, I'm open to more suggestions. I'm using documentclass{article} for no particular reason. Apr 18, 2013 at 3:34

2 Answers 2


This is surely possible, without automation, using the changepage package's adjustwidth environment:

enter image description here

\usepackage{changepage,lipsum,titlesec}% http://ctan.org/pkg/{changepage,lipsum,titlesec}
\titlespacing*{\subsection} {2em}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\titlespacing*{\subsubsection} {3em}{3.25ex plus 1ex minus .2ex}{1.5ex plus .2ex}
\section{A section}
\subsection{A subsection}
\subsubsection{A subsubsection}

The first argument to adjustwidth is the left-hand indentation, while the second is the right-hand indentation.

The above MWE also includes Gonzalo's suggestions for better alignment and true-to-titlesec spacing of sectional units using \titlespacing.


As a comparison, ConTeXt provides a \startsection...\stopsection version of the section heading commands, and keys beforesection and aftersection to hook into the start and stop of the section. So, one can simply set beforesection=\startnarrower and aftersection=\stopnarrower to get the desired effect.

In the code below, I define a new narrower environment to avoid interference.





With this setup, you don't need to add any commands in the main document.


    [title={A section}]

  \input ward

      [title={A subsection}]

    \input ward

        [title={A subsubsection}]

      \input ward


    \input ward


  \input ward


enter image description here

To get section numbers in the margin, add


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .