我试图将章节标题放在下一段上方的行上。通过重新定义上方和下方的空间,我得到了两个截然不同的不良结果:
1:额外的空间将底线推到下一列
2:标题与段落连接
\documentclass[landscape,a6paper,twocolumn,14pt]{memoir}
\usepackage{lipsum}
\setbeforesecskip% only applies when section is not starting the page
{-0.99999\baselineskip}% outcome 1
%{-1.00000\baselineskip}% outcome 2
\setaftersecskip%
{0.00001\baselineskip}% outcome 1
%{0.00000\baselineskip}% outcome 2
\makeatletter
\setsecheadstyle{%
\fontsize{\f@size pt}%
{0.99999\baselineskip}% outcome 1
%{1.00000\baselineskip}% outcome 2
\bfseries%
}
\makeatother
\pagestyle{empty}
\counterwithout{section}{chapter}
\setlength{\textheight}{10\baselineskip}
\setlength{\textwidth}{\dimexpr\paperwidth-2\columnsep}
\setlrmargins{*}{*}{1}
\setulmargins{*}{*}{1}
\checkandfixthelayout
\begin{document}
\section{Lorem ipsum}
\lipsum[1-5]
\end{document}
设置\aftersecskip
为1\baselineskip
会在 之间留出一整行空白,而设置\secheadstyle
行高似乎没有效果。\textheight
甚至增加0.99999\baselineskip
似乎也没有效果。有没有办法在某处偷偷插入某种\par
/ \vspace
/ \skip
?
答案1
您可以尝试添加一些收缩因素:
\documentclass[landscape,a6paper,twocolumn,14pt]{memoir}
\usepackage{lipsum}
\setbeforesecskip% only applies when section is not starting the page
{-1.00000\baselineskip}%
\setaftersecskip%
{1sp minus 1sp}%
\makeatletter
\setsecheadstyle{%
\normalsize
\bfseries%
}
\makeatother
\pagestyle{empty}
\counterwithout{section}{chapter}
\setlength{\textheight}{10\baselineskip}
\setlength{\textwidth}{\dimexpr\paperwidth-2\columnsep}
\setlrmargins{*}{*}{1}
\setulmargins{*}{*}{1}
\checkandfixthelayout
\begin{document}
\section{Lorem ipsum}
\lipsum[1-5]
\end{document}