我正在尝试使用创建一个自定义的方程式列表tocloft
,但我不太确定如何为每个条目及其页码使用自定义字体。
这是我正在使用的代码:
\documentclass[12pt,a4paper,english]{extbook}
[...]
\usepackage[titles]{tocloft}
\usepackage[T1]{fontenc}
\usepackage{fontspec}
[...]
\begin{document}
%%%%% To be used in case of custom font %%%%%
\myCustomFont
\fancyhead[EL]{\myCustomFont\nouppercase\leftmark}
\fancyhead[OR]{\myCustomFont\nouppercase\rightmark}
% Table of Contents
\renewcommand{\cftchapfont}{\bfseries\myCustomFont}
\renewcommand{\cftsecfont}{\myCustomFont}
\renewcommand{\cftsubsecfont}{\myCustomFont}
\renewcommand{\cftchappagefont}{\bfseries\myCustomFont}
\renewcommand{\cftsecpagefont}{\myCustomFont}
\renewcommand{\cftsubsecpagefont}{\myCustomFont}
% List of Figures
\renewcommand{\cftfigfont}{\myCustomFont}
\renewcommand{\cftfigpagefont}{\myCustomFont}
% List of Tables
\renewcommand{\cfttabfont}{\myCustomFont}
\renewcommand{\cfttabpagefont}{\myCustomFont}
% Lists of Equations
\newcommand{\listequationsname}{List of Equations}
\newcommand{\listequationsfont}{\myCustomFont}
\newcommand{\listequationspagefont}{\myCustomFont}
\newlistof{myequations}{equ}{\listequationsname}
\newcommand{\myequations}[1]{%
\addcontentsline{equ}{myequations}{\protect\numberline{\theequation}#1}\par}
\setlength{\cftmyequationsnumwidth}{2.5em}% Width of equation number in List of Equations
%%%%% Lists of equations %%%%%
%%%%% To be used in case of custom font %%%%%
\frontmatter
{
\pagenumbering{roman}
\input{content/titlepage}
\setcounter{page}{0}
\cleardoublepage\null\newpage
\input{content/dedica}
\cleardoublepage
{
\tableofcontents
\listoffigures
\listoftables
\lstlistoflistings
\listofmyequations
}
\cleardoublepage\null\newpage
}
[...]
答案1
当我问出这个问题的时候,我立刻意识到自己有多么愚蠢。
\renewcommand{\cftmyequationsfont}{\myCustomFont}
\renewcommand{\cftmyequationspagefont}{\myCustomFont}
是的。