So far, I've been trying code from various examples, and landed with:
\usepackage(titlesec)
\titleformat{\section}[block]{\bfseries}{\thesection.}{1em}{}
\titleformat{\subsection}[block]{\hspace{2em}{\thesubsection}{1em}{}
\titleformat{\subsubsection}[block]{\hspace{3em}}{\thesubsubsection}{1em}{}
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:
And, here is what I would like:
Or, I would like something like this:
Best Answer
This is surely possible, without automation, using the
changepage
package'sadjustwidth
environment: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
.