2

This is what I'm trying to achieve:

Desired Section Hierarchy

But this is the closest I came so far:

Achieved so far

Here goes my code:

\documentclass[12pt]{article}

\renewcommand\thesection{\arabic{section}.}
\renewcommand\thesubsection{\alph{subsection}.} {\leftskip=2cm}
\renewcommand\thesubsubsection{\roman{subsubsection}.} {\leftskip=3cm}

\begin{document}

\section{Situational Analysis}
\subsection{Company}
\subsubsection{Mission Statement}


\end{document}

The \leftskip=Xcm doesn't do any good. Is there any simple solution? Thanks a lot!

2
  • After a quick search this former post came up.
    – RockyRock
    May 19, 2018 at 17:39
  • After a quick check I found this was not what I wanted. Thanks.
    – gamahuri
    May 19, 2018 at 18:48

2 Answers 2

4

As pointed out in this post

\usepackage{titlesec}
\titlespacing*{\subsection}{4em}{1ex}{1em}
\titlespacing*{\subsubsection}{8em}{1ex}{1em}

does the trick. The first measure is the indentation, adjust as required.

The other two measures are vertical spacing above and below the (sub)(sub)section title, respectively. Not sure how to get their default values, though. You might want to adjust them according to your document class.

1
  • Didn't notice this earlier. Thanks a lot as well. I'm going for this one.
    – gamahuri
    May 19, 2018 at 19:05
2

You can renew the environments as follow:

\documentclass[12pt]{article}  
\renewcommand\thesection{\arabic{section}.}
\renewcommand\thesubsection{\alph{subsection}.} 
\renewcommand\thesubsubsection{\roman{subsubsection}.} 


\makeatletter
\renewcommand\subsection{\leftskip 25pt\@startsection{subsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\large\bfseries}}
\renewcommand\subsubsection{\leftskip 50pt\@startsection{subsubsection}{2}{\z@}%
                                     {-3.25ex\@plus -1ex \@minus -.2ex}%
                                     {1.5ex \@plus .2ex}%
                                     {\normalfont\normalsize\bfseries}}
\makeatother

\begin{document}  

\section{My section}

Here is a section.

\subsection{My subsection}

Here is a subsection.

\subsubsection{My subsubsection}

Here is a subsubsection.

\end{document}

This code will also indent the text after a section, subsection, etc...

enter image description here

Hope it helps.

Romain

0

You must log in to answer this question.

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