内容页面上的字体大小不同

内容页面上的字体大小不同

我使用memoir类,但遇到了一些 ToC 问题。章节样式定义为:

\font\robotoLarge="name:Roboto:protrusion=default;expansion=default;tlig;trep" at 24pt

\makechapterstyle{general}{
\renewcommand*{\chapterheadstart}{\vskip 30mm}
\renewcommand*{\printchaptername}{}
\renewcommand*{\printchapternum}{}
\renewcommand*{\printchaptertitle}[1]{\hspace*{16mm}\robotoLarge{}##1\rule[-1ex]{0pt}{1ex}}
\renewcommand*{\afterchaptertitle}{\hrule height 0.5mm\vskip 40pt}}\chapterstyle{general}

但是创建目录时,章节样式有所不同:字体较小,\hrule前面没有空格,并且只保留字母。如何将目录的样式固定为与我的主要章节样式相同?

答案1

标题toc使用适合un-numbered页面的章节样式部分进行排版。人们经常忘记添加此部分,请参阅\printchapternonum。还请记住,未编号的部分永远不会出现,\afterchapternum因此将其添加到(默认情况下为空)可能是一个好主意\printafternonum

由于我不知道该字体是什么,请发布一个最小示例以及您使用的引擎。此测试使用 palatino,编号和非编号之间似乎没有任何区别:

\documentclass[a4paper]{memoir}
\usepackage[T1]{fontenc}
\def\robotoLarge{\renewcommand{\rmdefault}{ppl}\fontsize{24pt}{30pt}\bfseries}

\makechapterstyle{general}{
\renewcommand*{\chapterheadstart}{\vskip 30mm}
\renewcommand*{\printchaptername}{}
\renewcommand*{\printchapternum}{}
\renewcommand*{\printchaptertitle}[1]{\hspace*{16mm}\robotoLarge{}##1\rule[-1ex]{0pt}{1ex}}
 \renewcommand*{\afterchaptertitle}{\hrule height 0.5mm\vskip 40pt}}
\chapterstyle{general}
\begin{document}
\tableofcontents*
%\chapter*{This is a test}
\chapter{This is a test}
\end{document}

相关内容