0

Is there a way to make sections, subsections etc. runin-like without using the titlesec package in the memoir class?

\documentclass[a4paper,twoside,openany]{memoir}
\begin{document}
\section{Section title}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua...
\subsection{Subsection title}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua...
\end{document}

The result of the above is something like:

Section title

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua...

Subsection title

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua...

But I would like:

Section title Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua...

Subsection title Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua...

... and as mentioned without the titlesec package.

0

1 Answer 1

1

Something similar to the example below would do it. The sign of the value of the spacing after the header controls whether it is runin or not. (the sign of the spacing above controls indentation or not)

\documentclass[a4paper,twoside,openany]{memoir}
\setsecnumdepth{none}
\setaftersecskip{-1em}
\setaftersubsecskip{-1em}
\begin{document}
\section{Section title}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua...
\subsection{Subsection title}
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua...
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.