有没有办法使章节、小节等像 runin 一样运行,而不使用 memoir 类中的 titlesec 包?
\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}
上述结果类似于:
章节标题
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua...
小节标题
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua...
但我想要:
章节标题Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua...
小节标题Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua...
... 并且如上所述没有 titlesec 包。
答案1
类似于下面的例子可以做到这一点。标题后的间距值的符号控制它是否是连续的。(上面的间距的符号控制是否缩进)
\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}