使用 \setsecheadstyle 调整回忆录部分中的灵魂字母间距

使用 \setsecheadstyle 调整回忆录部分中的灵魂字母间距

我意识到我也问过几乎同样的问题问题更早。

那里的答案涉及xparse或。然而 Titlesec 与 memoir 的页面样式(运行标题设置等)titlesec发生冲突,而带有 xparse 的新命令会绕过 memoir 对默认的有用机制。\leftmark\Section\section

memoir我倾向于认为使用不应该太难\setsecheadstyle,但不知何故我没有正确理解命令定义。

因此,我尝试在文档的格式 soul中添加字母间距。文档建议。\sectionmemoir\setsecheadstyle

\newcommand\sectionFmt[1]{%
  \MakeUppercase{\soSection{#1}}%
}
\setsecheadstyle{\sectionFmt}

它出现错误,! A <box> was supposed to be here.但是, \textit{#1}工作正常。

看来我没有正确传递论点。如何正确做到这一点?

梅威瑟:

\documentclass{memoir}

\makeatletter

\usepackage{soul}
\sodef\soSection{}{.1em}{.5em plus.1em}{.1em plus.1em minus.1em}

\newcommand\sectionFmt[1]{%
  % This errors out with: '! A <box> was supposed to be here.'
  \MakeUppercase{\soSection{#1}}%
  % But \textit{} works.
  %\MakeUppercase{\textit{#1}}%
}

\setsecheadstyle{\sectionFmt}

\makeatother

\begin{document}

And most conclusive of all, there are the two hideous results which the doctor
obtained from a certain pair of formulae during his final investigations.

\section{Monstrous Implications}

Results which virtually proved the authenticity of the papers and of their
monstrous implications at the same time that those papers were borne forever
from human knowledge.

-- The Case of Charles Dexter Ward, H.P. Lovecraft

\end{document}

答案1

这可以使用microtype,你可能需要稍微调整一下,请参阅microtype手册(可能有点难以理解,我没理解)

\usepackage[T1]{fontenc}
\usepackage{microtype}
\newcommand\sectionFmt[1]{%
  \bfseries\lsstyle\MakeUppercase{#1}%
}
\setsecheadstyle{\sectionFmt}

相关内容