For some reason I cannot indent a \subsubsection{}
that is formatted by the titlesec
package using the [runin]
option. The run-in option is for making the paragraph follow immediately after the \subsubsection{}
heading, which in my case I leave it blank and use only the numbers.
The file:
\documentclass{article}
\usepackage{titlesec}
\setcounter{secnumdepth}{3}
\titleformat{\subsection}[runin]{}{\thesubsection.}{3pt}{}
\titleformat{\subsubsection}[runin]{}{\thesubsubsection.}{3pt}{}
\begin{document}
\section{This is a section}
\subsection{} This is a paragraph:
\begin{quote}
\subsubsection{} This is a sub-paragraph I want to indent.
\end{quote}
{\addtolength{\leftskip}{5mm}
\subsubsection{} This is a sub-paragraph I want to indent.
}
\end{document}
This generates the following output:
Notice that the first method works, but it makes an error:
Something's wrong--perhaps a missing \item.
The second method does nothing at all.
Now if I remove the [runin]
option both methods work just as expected. It seems that the [runin]
option interferes with indentation. However, despite the error the first method seems to produce the desired document. Any idea how to eliminate the error?
quote
environment is implemented as a list, so you can't embed a section inside it. That's why you get the error. Do you want allsubsubsection
s to be indented? If so, then usetitlesec
to do that.\subsubsection
s to be indented, how should I do that?