![使用小写罗马字母作为回忆录类的章节编号](https://linux22.com/image/235749/%E4%BD%BF%E7%94%A8%E5%B0%8F%E5%86%99%E7%BD%97%E9%A9%AC%E5%AD%97%E6%AF%8D%E4%BD%9C%E4%B8%BA%E5%9B%9E%E5%BF%86%E5%BD%95%E7%B1%BB%E7%9A%84%E7%AB%A0%E8%8A%82%E7%BC%96%E5%8F%B7.png)
我想使用小写罗马数字对章节进行编号memoir
。到目前为止,我尝试了以下方法:
\documentclass[oneside]{memoir}
\usepackage[osf]{mathpazo}
\def\thechapter{{\scshape\roman{chapter}}}
\renewcommand{\cftchapterpresnum}{\fontfamily{pplx}\selectfont\bfseries}
\renewcommand{\cftchapterpagefont}{\fontfamily{pplx}\selectfont\bfseries}
\renewcommand{\cftsectionpagefont}{\fontfamily{pplx}\selectfont}
\begin{document}
\tableofcontents
\chapter{The number 4 is more than 2}
\section{The number 4 is}
If I write chapter \ref{anotherChapter} like this is looks oki.
But the number in the header is a small i not a \textsc{i} and same
thing in the table of content and the chapter header\dots
\section{More than 4}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur
tempus facilisis nunc, sit amet suscipit ligula fermentum ac. Ut
fringilla, elit eget facilisis venenatis, risus massa viverra sem, a
placerat massa odio a mauris
\chapter{Another chapter}
\label{anotherChapter}
\end{document}
但是,这并不能完全修复所有问题。它在目录中的节列表中看起来不错,但在章节列表中却不行,在章节的引用中看起来不错,但在章节和节标题中却不行。我还需要做什么?
编辑:我试图制作一个最简单的示例,但结果有点太简单了。在我的项目中,我使用无衬线字体作为图片标题,在尝试了 Lockstep 的第一个版本后,我得到了以下结果:
\documentclass[oneside]{memoir}
\usepackage[osf]{mathpazo}
\usepackage{helvet}
\renewcommand*{\thechapter}{%
\fontfamily{ppl}\selectfont
\textsc{\roman{chapter}}%
\fontfamily{pplj}\selectfont
}
\renewcommand{\cftchapterpagefont}{\fontfamily{pplj}\selectfont\bfseries}
\renewcommand{\cftsectionpagefont}{\fontfamily{pplj}\selectfont}
\captionnamefont{\sffamily\scshape\small}
\captiontitlefont{\sffamily\small}
\begin{document}
\tableofcontents
\chapter{The number 4 is more than 2}
\section{The number 4 is}
If I write chapter \ref{anotherChapter} like this is
looks oki.
But the number in the header is a small i not a \textsc{i} and same
thing in the table of content and the chapter header\dots
\begin{figure}
\caption{Lorem ipsum}
\center \LARGE LOREM IPSUM
\end{figure}
\section{More than 4}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur
tempus facilisis nunc, sit amet suscipit ligula fermentum ac. Ut
fringilla, elit eget facilisis venenatis, risus massa viverra sem, a
placerat massa odio a mauris
\chapter{Another chapter}
\label{anotherChapter}
\end{document}
请注意,图形标题中的数字字体现在是错误的。
答案1
选项osf
切换mathpazo
到pplj
字体系列以显示旧式数字 - 但pplj
(与 不同ppl
)不具有粗体小写字母,因此您的罗马数字仅以粗体显示。因为您需要将粗体小写字母和粗体旧式数字组合用于诸如“[Section] i.1”之类的内容,所以解决方案是在的定义内切换到ppl
并返回。(您可能还希望切换到而不是ToC 页码。)pplj
\thechapter
pplj
pplx
\documentclass[oneside]{memoir}
\usepackage[osf]{mathpazo}
\usepackage{helvet}
\usepackage{etoolbox}
\makeatletter
\renewcommand*{\thechapter}{%
\ifdefstring{\f@family}{phv}{%
\textsc{\roman{chapter}}%
}{%
\fontfamily{ppl}\selectfont
\textsc{\roman{chapter}}%
\fontfamily{pplj}\selectfont
}%
}
\makeatother
\captionnamefont{\sffamily\scshape\small}
\captiontitlefont{\sffamily\small}
\begin{document}
\tableofcontents
\chapter{The number 4 is more than 2}
\section{The number 4 is}
If I write chapter \ref{anotherChapter} like this is
looks oki.
But the number in the header is a small i not a \textsc{i} and same
thing in the table of content and the chapter header\dots
\begin{figure}
\caption{Lorem ipsum}
\center \LARGE LOREM IPSUM
\end{figure}
\section{More than 4}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur
tempus facilisis nunc, sit amet suscipit ligula fermentum ac. Ut
fringilla, elit eget facilisis venenatis, risus massa viverra sem, a
placerat massa odio a mauris
\chapter{Another chapter}
\label{anotherChapter}
\end{document}
编辑:示例已更新,以便仅ppl
在当前字体系列为 时才切换到pplj
。附加代码基于这Mike Renfro 的回答;由于某种原因(扩展?)我不得不用它替换ifthen
包才能etoolbox
使其工作。
编辑 2:我不知道为什么我的测试pplj
部分失败。无论如何,对 (Helvetica) 的测试phv
成功了。:-)